Chapter 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 versatile 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 handles 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 systems—tools that ...

Get Beginning Lua Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.