Here are answers to some frequently asked questions about Lua.
For an introduction to what Lua is, see this summary or learn how to get started with Lua.
For programming questions, see the community-maintained LuaFaq and also the much longer uFAQ.
See the download and get started pages for instructions on how to get source code and binaries for Lua.
Lua is implemented in pure ANSI C and compiles unmodified in all known platforms. All you need to build Lua is an ANSI C compiler (gcc is a popular one). Lua also compiles cleanly as C++.
If you are building Lua in a Unix system (like Linux or Mac OS X), then you probably already have everything you need and simply typing make should do it. (You'll only have to choose a suitable platform.) Otherwise, see the next question. In any case, for full instructions see the README that comes with the distribution. Chapter 1 of the book Beginning Lua Programming contains detailed instructions for downloading, building, and installing Lua. Here are simple instructions for Linux and Mac OS X:
wget http://www.lua.org/ftp/lua-5.3.4.tar.gz tar zxf lua-5.3.4.tar.gz cd lua-5.3.4 make linux test
curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz tar zxf lua-5.3.4.tar.gz cd lua-5.3.4 make macosx test
If you don't have the time or the inclination to compile Lua yourself, get a binary from LuaBinaries. If you only want to try Lua, try the live demo. Try also LuaDist, a multi-platform distribution of Lua that includes batteries.
This depends on your compiler. Most compilers in these platforms require that you create "project" files. You'll need to create projects (or whatever your compiler uses) for building the library, the interpreter, and the compiler. The sources are all in the src directory. The exact lists of which modules should go into which project are given in the README. See also BuildingLua in the wiki. Chapter 1 of the book Beginning Lua Programming contains detailed instructions for downloading, building, and installing Lua.
If you don't have the time or the inclination to compile Lua yourself, get a binary from LuaBinaries. Try also LuaDist, a multi-platform distribution of Lua that includes batteries.
Lua is in continuous development but new versions are infrequent.
Lua 5.3 was released on 12 Jan 2015. The current release is Lua 5.3.4, released on 30 Jan 2017.
Lua 5.3 was released recently. For a preview of what is coming in the next version, try a work version when available.
If you're concerned with incompatibilities, you shouldn't, because we make every effort to avoid introducing any incompatibilities. When incompatibilities are unavoidable, previous code is usually supported unmodified, possibly by building Lua with a suitable compilation flag. In any case, the reference manual contains a list of incompatibilities.
Yes, Lua is freely available for any purpose, including commercial purposes, at absolutely no cost, and using it requires no paperwork. Read the details in the license page.
Yes. Lua is distributed under the terms of the very liberal and well-known MIT license, which is compatible with GPL and is approved by the Open Source Initiative. Read the details in the license page.
Lua is intended to be used in other people's software, including yours. In most cases, Lua is simply extended with new functions that adapt Lua to your specific domain. This is exactly what Lua was designed for. When the time comes to distribute your software two questions may arise: "May I still call the language inside my software Lua?" and "May I call it something else?".
The answer is the following: If the syntax and the semantics of the language (that is, the parser and the virtual machine) remain the same, then the language is still Lua. If you simply add new libraries, or even replace the standard Lua libraries with your own libraries, the language is still the same, and you don't need to (and probably shouldn't) give it a completely different name.
If you have changed the syntax or the semantics of the language, then it's probably a minor extension and you'll probably benefit from calling your language a Lua variant, so that you can refer users to existing Lua documentation and community, with the caveats relating to your extension of the language.
Usually, people use some name that has Lua as part of it (CGILua, LuaMan, LuaOrb, etc.), so that it is clear that it uses Lua but it is not the official Lua distribution. In other words, it should be very clear that your software uses Lua (or, more specifically, that the language inside your software is Lua), but also it should be clear that your software is not Lua.
In any case, please give us credit for Lua, according to the license.
If this explanation is still unclear, please contact us.
No, there is no publicly available repository of Lua development code. Lua is open-source software but it is not openly developed. Read this explanation. If you want to see a preview of what is coming in the next version, you'll have to wait until a work version becomes available.
We encourage discussions based on tested code solutions for problems and enhancements, but we never incorporate third-party code verbatim. We always try to understand the issue and the proposed solution and then, if we choose to address the issue, we provide our own code. All code in Lua is written by us. See also the previous question.
Complete information on Lua can be found in its home page. You may want to read a summary first, choose an entry point from the site map, or learn how to get started with Lua.
Yes, a friendly and active one called lua-l. Everyone is welcome. Read all about it here.
For discussions in Portuguese, there is Lua BR, the Brazilian version of lua-l.
No, just use the mailing list. If you want to read the postings using a web interface, see the archives at MARC. You may want also want to search the archives.
If you're looking for a Q&A forum for Lua, try stackoverflow or pt.stackoverflow.
First, try to make sure that you have indeed found a bug. Check whether the problem has been already reported (and probably fixed). Search the archives of the mailing list to see whether someone else has come across the same problem and have a fix or an explanation. After that research, if you still think you may have found a bug, post a report in the mailing list.
Before reporting a bug, try to identify a minimal program that exhibits the bug, also known as MWE and SSCCE. This makes it much easier to reproduce, document, and track down the bug. Also, read Simon Tatham's essay on How to Report Bugs Effectively.
Lua is used in many products and projects around the world, including several well-known games. The full list is too long for us to keep track. See a list of lists.
Yes, several. See the complete list here. Roberto's book, Programming in Lua, is a detailed and authoritative introduction to all aspects of Lua programming. The fourth edition appeared in 2016. The first edition was published in 2003 and is available online. Previous editions are available in several languages. There are books on Lua by other authors as well.
You can help to support the Lua project by buying a book published by Lua.org and by making a donation.
You can also help to spread the word about Lua by buying Lua products at Zazzle and CafePress.