lua-users home
lua-l archive

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


On Nov 17, 2011, at 4:20 , Natanael Copa wrote:
> Hi,
> 
> So we (Alpine Linux) are playing with the idea of having an init
> system with lua for Linux. The idea is that instead of writing start
> up scripts in shell you write them in lua. I think this makes much
> sense because:
> * you avoid many forks = speed up
> * you can have scripts instead of compiled C stuff
> * you have a nice language which gives you arrays/hash tables etc for
> a low price (half size of bash)
> * lots smaller than glib - you can have a very small base system

I have had this idea before. I was actually planning to replace the initscripts of my Arch system with Lua, but stuff kept getting in the way. I have a few planning notes left behind I could probably salvage though.

> This means that if we want have the possibility to have /usr on
> separate partition we must move Lua out from /usr.
> 
> This is easily done with /usr/bin/lua and /usr/lib/liblua*. My
> question now is, what about pluggable modules? /usr/lib/lua can move
> to /lib/lua but what about /usr/share/lua? I don't like the idea of
> moving it to /share/lua. Suggestions?

Maybe /lib/lua5.1/ext and /lib/lua5.1/lua? Though when I was experimenting, I built a separate Lua named syslua so that extensions for it didn't conflict with the system Lua that I used for actual programming.

> Since this means we will replace lots of shell scripts with lua, are
> there any lua modules for typical shell things? like mv, cp, ps, kill
> etc.
> 
> Does anyone know similar projects? (bsdlua is one)
> 
> Thanks!
> 
> -- 
> Natanael Copa
> 


Thanks,
Matthew Frazier
http://leafstorm.us/