Frequently Asked Questions
Here are answers to some frequently asked questions about Lua.
For programming questions,
see the community-maintained
LuaFaq.
1 - Distribution
See the
download page
for instructions on how to get source code and binaries for Lua.
1.1 - What do I need to build 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 file INSTALL that comes with the distribution.
Chapter 1
of the book
Beginning Lua Programming
contains detailed instructions for building and installing Lua.
If you don't have the time or inclination to compile Lua yourself,
get a binary from
LuaBinaries.
If you only want to try Lua,
try the
live demo.
1.2 - How do I build Lua in Windows and other systems?
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 file INSTALL.
See also
BuildingLua
in the
wiki.
Chapter 1
of the book
Beginning Lua Programming
contains detailed instructions for building and installing Lua.
If you don't have the time or inclination to compile Lua yourself,
get a binary from
LuaBinaries.
Try also
Lua for Windows,
an easy-to-use distribution of Lua packed with several useful libraries.
1.3 - When is the next version due?
Lua 5.1 was released on 21 Feb 2006.
The current release is Lua 5.1.4,
of 22 Aug 2008.
Work on Lua 5.2 has begun but no release date has been fixed.
Intermediate,
work versions
will be announced in the
mailing list
as they become available.
1.4 - What changes will the next version bring?
No roadmap exists for Lua 5.2 yet.
(But see
this.)
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.
1.5 - Is Lua free software?
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.
1.6 - Is Lua compatible with GPL software?
Yes.
Up until Lua 4.0,
the
license
was perhaps a bit unclear about this.
Since Lua 5.0,
Lua is licensed 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.
1.7 - What do I call software derived from Lua?
Lua is intended to be used in other people's software,
including yours.
In most cases,
Lua is simply extended with new functions,
and this is exactly what Lua was designed for.
These new functions adapt Lua to your specific domain.
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 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 give it a completely different name.
If you have changed the syntax or 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.
1.8 - Is there a public CVS repository?
No, there is no publicly available repository of Lua development code.
If you want to see a preview of what is coming in the next version,
you'll have to wait until a
work version
is available.
Read also
this.
2 - Information
Complete information on Lua can be found in its
home page.
You may want to read a
summary first
or choose an entry point from the
site map.
2.1 - Is there a mailing list for Lua?
Yes, and a friendly and active one.
Everyone is welcome.
Read all about it
here.
2.2 - Is there a newsgroup for Lua?
No,
just use the
mailing list.
If you want to read the postings using a web interface,
see the archives at
Gmane
and
MARC.
You may want also want to
search the archives.
2.3 - How do I report a bug in Lua?
Please
check
whether it has been already reported (and probably fixed).
Try also posting to the
mailing list:
someone else might have come across the same problem and have a fix or an explanation.
You may want to
search the archives
to see whether it has been discussed before.
If all that fails to shed light on your problem,
please
contact
the
Lua team.
Before reporting a bug,
try to identify a "minimal" program that exhibits the bug.
This makes it much easier to reproduce and track down the bug.
Also,
read Simon Tatham's essay on
How to Report Bugs Effectively.
2.4 - Who uses Lua?
The
wiki
contains
a list
of projects and products around the world that use Lua.
Wikipedia contains
another list.
2.5 - Are there any books on Lua?
Yes!
Roberto's book,
Programming in Lua,
is a detailed and authoritative introduction to all aspects of Lua programming.
The
first edition
was published in 2003
and is available
online.
The
second edition
appeared in 2006
and is available in English, German, Korean, and Chinese.
There are
books on Lua by other authors
as well.
See the complete list
here.
2.6 - How can I help to support the Lua project?
You can help to
support the Lua project
by buying a book
or by making a donation.
Companies that use Lua may wish to become a
corporate sponsor.
Last update:
Mon Dec 22 13:34:20 BRST 2008