/* jquery */ /* jquery accordion style*/ /* jquery init */

The Lua Language

Origins and People

Lua, named after the Portuguese for moon, is a fast, lightweight, embeddable scripting language based around a relatively simple 'C' application programming interface (API).

Roberto Ierusalimschy first created the language in 1993 as part of his work with the Computer Graphics Technology Group (Tecgraf) at Brazil's Pontifacal Catholic University of Rio de Janeiro. Brazil's restrictive trade agreements of the time helped to boost the significance of home grown technology solutions from this and similar technology groups.

Lua's design takes syntactic influences from SQL, DEL (a data entry language), Modula and Scheme. The friendly syntax and multi-platform availability makes it an ideal choice for products that encourage end users to modify or extend the software's behaviour, without exposing them to the inner complexity.

After initially using BSD-like licensing, from version 5.0 onwards Lua was released under the open source MIT license.

Developer Highlights

The intention of Lua's smallish data structure collection and relatively limited feature set is to strike a balance between approachability, flexibility, performance and implementation size. However, another benefit of these design principles is that they help reduce the learning curve to a minimum.

Built on top of the ISO C language Lua offers maximum portability and a tiny binary footprint. The interpreter is typically just 180kB in size. Yet Lua still manages to support automatic memory management and desirable functional language traits such as first-class functions and closures.

Lua is considered an ideal scripting language solution by numerous technology companies and open source projects. It has also found a niche in the video gaming world, with game-enhancing Lua scripts available for World of Warcraft, FarCry and Sim City 4. Lua scores highly with game developers because of its easy to embed nature, fast execution speed and easy-to-grasp syntax.

The LuaForge website hosts a comprehensive collection of Lua modules.

Developer Lowlights

Lua was always intended to be a small, efficient scripting language, rather than a fully-featured, general purpose one. This invariably means it's more suited to a complementary tool role for existing commercial products and open source initiatives.

An intrinsic part of Lua's design philosophy is its limited number of data types and slimmed down feature set. Yet, such restrictions may lead more experienced developers to focus on other, more flexible scripting languages such as JavaScript, Python and Go.

Lua's bare bones Unicode support may trouble some programmers, especially in web development scenarios. And its pattern matching functionality is rather limited when compared to the power of regular expressions.

The Future

Lua scripts are already incorporated into a surprisingly diverse range of products. Lego Mindstorms, Adobe's Lightroom, MySQL's Workbench, Propellerhead's Reason Digital Audio Workstation, Canon's Hack Development Kit for cameras, the Celestia astronomy app and numerous Linux apps are just a few of the many examples.

In January 2012 Lua won a Front Line Award from the Game Developer magazine in the Programming Tools category. And the fast growing open source Machine To Machine (M2M) Communication development world has recognised its potential. With such a pedigree Lua's future appears to be assured.

No comments: