[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Using debugging hooks as a 'watchdog' on code execution?
- From: "Patrick Donnelly" <batrick.donnelly@...>
- Date: Sat, 5 Jan 2008 16:06:12 -0700
My IRC bot that would run code for people taught me a lot about
sandboxing Lua, as well as the lengths people will go to to break bots
You will inevitably run into problems everywhere unless you thread it
(LuaTask is a good choice). Simple things like table.concat or
string.find can eat cpu cycles indefinitely if they are smart.
Naturally debug library doesn't help you much if everything happens on
the C side of Lua.
"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."