lua-users home
lua-l archive

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


From: <RLake@oxfam.org.uk>

> I think Lua Binary Modules is great for Lua 4, but I would personally
> like to see a Lua 5 binding mechanism which takes more advantage of
> the new facilities of Lua 5. It would be a shame not to do this :)
>
> LTN 7, while excellent, was written before Lua had full lexical binding.
> It is now possible to completely avoid use of the global namespace, and
> I think this should be done. The modification is quite simple: a module
> file does not modify the global environment at all; instead, it returns
> a table. It is then up to the module consumer to give that container
> a name.

I agree. But couldn't that also be done for Lua4? Returning the module
functions in a table , that is?

<snip of several good suggestions>
Well, my comment would be: security etc. is important... But im concerned if
this might not go 'overboard' slightly.
My personal wish for Lua (and also LuaCheia) would be to have maximum
flexibility and modularity. And that also means that I do not need an admin
to install stuff for me. The ideal Lua distribution for me consists of one
or only a few files I can put where they are suitable to me, and run them.

That's the exact goal why Python, Perl, PHP, Ruby don't cut it for me, ease
of distribution.
Ideally _nothing_ needs to be installed to run a LuaCheia app.

And then, if you look at CGILua, that implement just what you are proposing
re security. A core that get's run by root (the server), then sets up an
restricted env and runs custom code as user.
I think a small and light core LuaCheia can easily be expanded to do that
(lua.c -> cgilua.c)

-Martin