Unix Review > Archives > 2004 > May 2004

May 2004

Regular Expressions: Lua Shines

by Cameron Laird and Kathryn Soraiz

Take a look a Lua.

We write that every few years (most recently in May of 2002) because the Lua programming language is underappreciated, and because it continues to advance despite the comparatively small number of people working on and with it.

This spring, though, is a particularly good time to jump to Lua (the Portuguese word for "moon"), because Version 5.0 and The Lua Book are both better than we expected them to be.

Simple and extensible

Let's begin with a bit of background. Lua is a high-level or "scripting" procedural language, roughly comparable to Tcl, Python, Ruby, and similar languages. Lua source code has a familiar appearance; the canonical factorial definition with which the book begins looks almost like:

 -- This is a comment.
 function factorial(n)
          if n == 0 then
             return 1
          else
             return n * fact(n - 1)
          end
 end
Lua is around a decade old; Version 1.1 was the first public release in July of 1994. It's used mostly outside the United
States, with the core implementation team based in Brazil. Although Lua is far down the list of computing languages in wide use in the United States, at least a couple of development communities strong in the United States have recognized the language's virtues; a poll at GameDev.net, for example, yielded Lua as the most popular language for game scripting.

Sys Admin Spotlight

CMP DevNet Spotlight

Career Center: Going It Alone
Ever dreamed of leaving that corporate development job for the challenges of independent software consulting? Here are 10 tips to make your solo career path a success.

In the News

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 11.0

Version 11.0 delivers every issue of Sys Admin from 1992 through 2005 and every issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!




MarketPlace

�Six Sigma� Certified?
100% Online-Six Sigma Certificate From Villanova -Find Out More Now.

PMP Certification-Online
Nation's Leading Online PMP Course From Villanova-Find Out More Now.

Microsoft SQL Server 2008 Express - FREE Edition
Build Rich Desktop and Web Applications and Deploy to Most Versions of SQL Server.

Automate Software Builds with Visual Build Pro
Easily create an automated, repeatable process for building and deploying software.

Wanna see your ad here?