Lua Resources

Here are some resources to help the aspiring Lua programmer. We hope you find them helpful. If you have not heard of Lua it is a small, fast, portable, embeddable programming language. You can read more about it at https://www.lua.org/about.html.

Books

Programming in Lua (PIL) is the canonical book for learning Lua published by the language authors/maintainers themselves. It is available online at https://www.lua.org/pil/ as well as in print and ebook versions.

Besides PIL the Lua foundation also publishes several other books on Lua. The proceeds from sales of these books go to support the Lua foundation.

For reference purposes there is also the Lua Reference Manual available online as well as in print. The print version currently seems to be on Lua 5.1.

They also publish Lua Programming Gems.

Lua Packages

Lua Rocks at luarocks.org is the package manager for Lua modules for Unix and Windows. See their Get started page for instructions on how to start using Lua Rocks to download and install so-called rocks or Lua packages.

For example, the HTML for this page was generated from markdown (see daringfireball.net/projects/markdown) using the Markdown Lua rock.

Online Tutorials and Resources

The Learning Lua wiki at lua-users.org is another great starting place for learning Lua.

There are a number tutorials and resources online.

Tutorials

Lua Websites and Communities

Tools

If you are just getting started and need a nice simple programming editor for Lua, I recommend SciTE available for download at http://www.scintilla.org/SciTEDownload.html. It is cross platform. A free option for MacOS X (since SciTE has to be purchased on the App store for macs) is TextWranger by BareBones Software.

ZeroBrane Studio is a full featured IDE (integrated development environment) which includes a debugger.

For debugging Lua there are various choices for debuggers. Lua provides a library for debugging, but not an actual included debugger. You can find a tutorial on the Lua debugging library at http://www.tutorialspoint.com/lua/lua_debugging.htm. There is also a wiki on debugging lua at http://lua-users.org/wiki/DebuggingLuaCode.

Some of the available debuggers are:

Extending Applications and Games with Lua

Lua has been used to provide scripting and extension capabilities for a number of popular games and applications. Here are some links to using Lua in some of its most popular environments: