Lua Quick Reference


Lua Quick Reference

Order the e-book – $20 USD
Order the e-book & print book bundle – $35 USD
Order the e-book bundle with Textadept Quick Reference – $27 USD
Order the print book on Amazon US, CA, UK, DE, FR, IT, ES – ~$28 USD

Published: Jul 2017
ISBN: 978-0-9912379-3-7
Pages: 158

Read an excerpt. Download the source code examples.

Lua is a small, fast, powerful, and embeddable scripting language. It is well-suited for use in video games, application scripting, embedded devices, and nearly anywhere else a scripting language is needed. This quick reference contains a wealth of knowledge on how to program in and embed Lua, whether it is Lua 5.3, 5.2, or 5.1. This book can even be used with LuaJIT, a Just-In-Time compiler for Lua based on Lua 5.1. Lua Quick Reference groups the language’s features and C API in a convenient and easy-to-use manner, while clearly marking the differences between Lua versions.

This book covers:

Mitchell commands over a decade of experience programming in and embedding Lua in both the corporate and open-source realms.

Table of Contents


  1. On page 32, in the section “Assign and Retrieve Metatables”, the functions setmetatable() and getmetatable() incorrectly state the functionality of the metafield __metatable.

    setmetatable() should state: “If v has a metatable and that metatable has the metafield __metatable, raises an error.” getmetatable() should state: “If v has a metatable and that metatable has the metafield __metatable, returns that value instead.”

  2. On page 17, in the section “Expressions and Operators”, Table 3 does not list the operators << and >> as existing only in Lua 5.3. Those operators should be marked as existing only in Lua 5.3.