lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Aug 22, 2005 at 08:50:09PM -0500, wrote:
> Well, perhaps LUA isn't what you're looking for then.  Writing a very
> simple VM isn't very difficult depending upon your experience.  LUA is
> essentially a stack-based VM with a large amount of opcodes.  Writing
or, for that matter, a register based VM

> a VM with very few opcodes may be something to consider.  This is a little
> off-topic, but for a project a while back, I wrote a very small stack-based
> VM which had only 3 opcodes.  PUSH, POP and CALL.  The CALL opcode called
> an internal function referenced by an offset, and any items remaining on
> the stack were used as output strings.  Sorry if this a little OT, but
> in some situations, you need to know when you need to try a different
> language/tool.
No problem, we do have Ook! perfectly well suited for Orang Utans.
Yet it is turing complete, and if it outputs to some xterm
with dangerous escape sequences (like open logfile) it can do
a lot of damage which you'd never figure out.

In addition to using sandboxing you need full output cleaning
and hard limits on memory and CPU usage. So you want to run user
code in a subprocess, because there is hardly another way to cope
with excess ressource usage than to kill it.