tech-kern archive

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

Re: luactl & Lua standard libraries



Hi

> Am 21.05.2016 um 00:27 schrieb Guilherme Salazar <gmesalazar%gmail.com@localhost>:
> 
> Hi folks,
> 
> kernel Lua states created with luactl(8) are created empty. There has
> been some discussion about it.

Where was this discussed?  Are you referring to the email discussion we had?

> 
> It would be nice to add an option to luactl to allow loading of Lua
> standard libraries -- by calling luaL_openlibs on the Lua state. I
> have added an option `-s` to `luactl require` that does this. See [1]
> 
> To make it clear, the following creates an empty kernel Lua state named s0:
> 
>   luactl create s0
> 
> What I propose is:
> 
>   luactl create s0
>   luactl -s require s0
> 
> or, equivalently,
> 
>   luactl -cs require s0
> 
> (-c option creates s0 if it doesn't exist and then -s calls luaL_openlibs on s0)
> 
> Comments?

I am against this change.  What we should do instead is to provide the libraries as
individual loadable modules.  We already have the mechanism for that in place.

> 
> [1] https://netbsd.org/~salazar/patches/luactl.patch


Home | Main Index | Thread Index | Old Index