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 11:39:35AM +0200, Marc Balmer wrote:
> I am suggesting to add the language Lua to the NetBSD base system as a  
> scripting language for general use and as a scripting language to be  
> embedded in applications in the base system.  Please let me explain why 
> and what the conseqeunces of such an addition would be.

This is a great idea, and one that I've floated with a few people
over the last couple of years.

1) Lua can run as a standalone interpreter, with modules written in
Lua or dynamically loaded C/C++ modules.
This is the "use Lua standalone" mode.

2) Lua embeds easily into other C applications.  You create a "Lua state"
that is independant of other states, even running in other threads.
This would be excellent for embedded into, say, nvi.
This is the "use Lua from C/C++" mode.

3) It's easy to sandbox Lua so that user code is partitioned
and can't access any libraries (including I/O) except what you
expose in the sandbox.

4) Lua has fairly reasonable object-oriented properties, without
suffering from the "shiny shit feature of the week" problem that
others do.

5) Lua is used every day by over ten million people for some serious
computation and gaming; it's the language used to customize the
World of Warcraft interface, and there's some very complex programs
being performed in that context.
It is not a "toy configuration language".

I've written & maintained my share of large Perl and Python apps
over the years, and dabbled a bit in Lua.  I'll continue to maintain
the Python code I'm responsible for, but Lua is what I'll be using
in future apps for configuration and user-extensibility.

Attachment: pgpYdhwGhrjFT.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index