Main Content

Lua - a powerful, up and coming scripting language

Archive - Originally posted on "The Horse's Mouth" - 2008-05-05 10:57:56 - Graham Ellis

Lua is a powerful, lightweight scripting language. It combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. It is ideal for configuration, scripting, and rapid prototyping. Lua has been used in many industrial applications, with an emphasis on embedded systems and games, and indeed is currently the leading scripting language in games.

Here's a quick Download, build, install, test procedure for Lua

• Download from http://www.lua.org/ftp/ and save to disc. The file you choose is lua-5.1.3.tar.gz

• unpack tar file and build

tar xzf lua-5.1.3.tar.gz
cd lua-5.1.3
make linux


• Install (as root, into /usr/local)

su -
cd ~trainee/lua-5.1.3
make install
exit


• Test (as trainee, once again)

[trainee@holt ~]$ lua
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print "hello world"
hello world
>
[trainee@holt ~]$


I've put a simple program - the next step beyond "Hello World" that shows some of the basics of the language here, and I would be delighted to spend a day or two going through the language with you ... (Keywords - Lua Courses / Training / Classes!)