lua-users home
lua-l archive

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


On Wed, Nov 24, 2010 at 11:22:03AM +0000, Peter Cawley wrote:
> On Wed, Nov 24, 2010 at 5:22 AM, James Turner <james@calminferno.net> wrote:
> > I no I'm late to the game, but I've just discovered Lua and have fallen
> > in love. As an exercise to get familiar with the language, I have
> > created an interactive lua console that runs in your browser at
> > http://trylua.org.
> 
> In my opinion, the standard library has been overly restricted, and I
> would expect more of the following to be available: _G, pcall, load,
> loadstring, getmetatable, setmetatable, string.dump, getfenv, setfenv.
> On a related note, the fact that pcall is not available, but xpcall
> is, looks like an oversight. Finally, behaviour on infinite loops
> (e.g. enter "while true do end" or "x = [[x]]; while true do x = x ..
> x end") seems to be to run forever.
>

pcall should have been there. I've added it now. I used
http://lua-users.org/wiki/SandBoxes as a base to what I made available.
I'm going to look at the link posted earlier with the code from the
official try lua and see what's being restricted there.