lua-users home
lua-l archive

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


On Mon, Feb 18, 2013 at 7:37 AM, Rena <hyperhacker@gmail.com> wrote:
> An interesting idea that comes to mind as well is that since Lua
> doesn't have the concept of pointers, a script can't just try to write
> to arbitrary memory or execute arbitrary machine code. What a Lua
> script can do depends entirely on what functions are available to
> it.

That's a good one.  The 'leakage' problem is basically why
module(...,package.seeall) has fallen out of favour (apart from it
being slower than the alternatives). Good modules should never leak!

I wonder about the minimum amount of C needed, as well. We know LuaJIT
can bite C heels when carefully crafted, and the FFI gives a
programmer options for direct access to memory (effectively typed
native arrays).  And there's no need to write all that tedious binding
code to access the necessary C.

Some of the bad reactions to the NetBSD Lua-in-kernel move comes from
C programmers being naive. They automatically think it is the software
equivalent of structural steel, and anything else is considered at
best concrete - not useful unless it does have some steel
reinforcement ;)

steve d.