The Lua Scripting Language
About a week ago, I imported the Lua programming language, version 5.1.2, into NetBSD-current as a component of the base system.
Lua is a scripting language with a very small memory footprint that has been designed as an embedded (or hosted) language from the ground up. As such, it's integration into software written in e.g. C or C++ is straightforward. Lua is very fast, it is recognized as one of the fastest scripting languages. The language has a clear and simple syntax with some very powerful concepts; the libraries (called packages) that come with it are themselves reasonable small. Lua compiles programs to a bytecode which is executed by a very small virtual machine. Lua scripts can be precompiled to bytecode for faster load times (but not faster execution). The first versions of Lua date back in 1993, so the language is stable and mature.
Lua is excellent as a scripting language in base, because it is small, fast, and powerful and a user can learn it very quickly. For endusers, having Lua can leverage scripting in NetBSD, e.g. if an interface to e.g. POSIX functionality is used. For developers of software written in C it is a very convenient and efficient means to extend the software by a scripting engine.
Lua allows us to extend exisiting software in interesting ways, DHCP option processing in DHCP clients comes to my mind, or the system installer, sysinst, which can be made a lot more flexible using Lua scripting.
The only change I made to the default Lua distribution is to remove the current working directory ('.') from the module load paths, to avoid potential security problems.
The Lua homepage is at http://www.lua.org/, the reference manual can be found at http://www.lua.org/manual/5.1/. More information about Lua can also be found at http://www.lua.org/about.html.
Posted by Marc Balmer on November 06, 2010 at 10:36 AM UTC #
Posted by ficovh on November 06, 2010 at 07:24 PM UTC #
Posted by Prudhvi Krishna Surapaneni on November 12, 2010 at 06:45 PM UTC #
Posted by Marc Balmer on November 14, 2010 at 09:59 AM UTC #
Posted by Martin Weber on November 14, 2010 at 04:27 PM UTC #
Posted by Marc Balmer on November 15, 2010 at 09:06 PM UTC #
Posted by Martin S Weber on November 17, 2010 at 05:41 PM UTC #
Posted by blinkkin on November 17, 2010 at 06:04 PM UTC #
Posted by James on November 20, 2010 at 02:08 AM UTC #
Posted by Marc Balmer on November 20, 2010 at 07:44 AM UTC #
Posted by Vesa on December 09, 2010 at 09:16 AM UTC #
Posted by Adrew on November 15, 2011 at 07:47 AM UTC #