tech-userlevel archive

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

Re: Lua as a scripting language in NetBSD

On Sat, Oct 17, 2009 at 12:48:53PM +0200, Alan Barrett wrote:
> Are there any tools currently in the base system that you would
> like to extend using embedded Lua?  If so, which tools, and what
> sort of actions would be facilitated by embedding a scripting
> language?

First is httpd. As written e.g. in the BSD magazine article about
embedded webservers, CGI has a noticable overhead and glue for using lua
should be small without a high impact both in terms of code size and
memory footprint.

Second is a new small footprint DHCP server. Lua makes a sane
configuration language here with the possibility of arbitrary
customisation. The principle of making easy things easy and hard things
possible applies here. Lua as configuration language can't be any worth
than the adhoc language employed by ISC and even statically linked the
result can still be half the size of the current dhcpd.

For scripts a good candidate for use is pkg_install. The current use of
sh/awk/sed both requires larger bootstrap kits on !NetBSD and makes it
difficult to correctly handle e.g. configuration files with spaces (XXX
add PR reference here). This is not strictly a reason to move it to
base, but might provide an idea for what it is useful.


Home | Main Index | Thread Index | Old Index