Wiley Beginning Lua Programming 978-0-470-06917-2 User Manual

Product codes
978-0-470-06917-2
Page of 22
1
Getting Situated
The first order of business in learning to program in Lua is to acquire and install the necessary
tools. For your initial steps, all you need is the Lua interpreter, a small program that enables you to
type Lua commands and have them executed immediately. As you advance through this book,
you will need additional tools such as a text editor and the Lua compiler. 
If you want to write web applications, you’ll need access to a web server such as Kepler (a versa-
tile Lua-based web server) or Apache (an industry-wide standard). These and other web servers
are freely available on the Internet. 
If you want to extend Lua with low-level libraries or to embed Lua into your application, you’ll
need a software development kit (often referred to as SDK) with a compiler that is compatible with
Lua’s application program interface (referred to as API). 
Lua is written in the C programming language, and a C compiler turns a program written in this
language into something that can run on your computer. Most C compilers work fine, as do
Delphi and the cross-platform Free Pascal Compiler.
This chapter is unlike the others in this book, because it has little to do with Lua and much to do
with setting up programs on your system. Although Lua doesn’t have a setup program that han-
dles installation details, you’ll find the steps are straightforward. In addition to guiding you
through the process, this chapter briefly explores programming editors and revision control sys-
tems — tools that can enhance your productivity as you become proficient in Lua.
Choosing How to Install Lua
Lua can be installed on a wide variety of platforms and, after it is installed, it will function simi-
larly on all of them. Unlike most of the material that follows in this book, this chapter necessarily
delves into some platform-specific details. Basically, there are two categories that are covered here:
Windows desktop systems (including Windows 95 and up) and Unix-type systems, including
GNU/Linux, Mac OS X, AIX, BSD, and Solaris. (The many other operating systems and hardware
platforms capable of running Lua are outside the scope of this book.) 
04_069172 ch01.qxp  1/2/07  7:53 PM  Page 1
COPYRIGHTED MATERIAL