Download our Lua Cheat Sheet
Lua is a minimalistic, lightweight language implemented as a C library. It's fast and simple to learn, efficient to run, embeddable, and tiny (its source code download is under 500 KB, and compiled it's just over 1 MB). You can use Lua to create an API for your application, or as a scripting language, for quick prototyping, or for the foundation of your software project.
Not only is Lua simple in design, it's also consistent in ways that many other languages are not. It has explicit scoping (so it's not dependent on indentation), it interfaces with C through simple wrappers, and it can accept raw C data as a data type. Lua's syntax is direct and predictable, so that once you learn just a few structures, the rest is largely intuitive.
For example, the `end` keyword is used to close a clause, whether that clause is an `if` statement, a `for` or `while` loop, or a function. The *table* construct is the sole data-structuring mechanism in Lua, and can be used to represent ordinary arrays, lists, symbol tables, sets, records, graphs, trees, and can even mimic object-oriented classes. Broad statements about Lua are plentiful, and they usually apply equally across the language. There aren't exceptions to the syntax you learn: once you learn something, you can use that principle no matter what you're writing in Lua.
Lua is simple enough to fit on one side of a single-page cheat sheet, but we provide a two-page cheat sheet for you to allow for notes about syntax, data structures, important variables, and a few tricks and tips. Whether you're new to Lua or you've been using it for years, download this cheat sheet and keep it handy. It'll make Lua (or at least the writing of it) even faster.