The book is not an introduction to programming; in particular, it assumes the reader is already familiar with other scripting languages such as AWK, Perl, or Python. The book concentrates more on the parts of Lua which can be difficult for people used to other scripting languages to understand, such as function closures, how Lua uses function factories to run for loops (and how one can have Lua iterate through items in a list using the right function in a for loop), metatables, and Lua’s prototypical class model.
This book uses a large number of code examples to illustrate how code is written in Lua, and to provide public domain “battery” code (such as a regular expression splitter and a function which makes regular expressions case insensitive) people can use in their own Lua scripts.
This book is not a Lua reference; a very terse reference manual is already included with Lua. This is a companion to the reference manual to have code examples and longer explanations of the concepts expressed in that manual.
The book can be read here:
https://In addition to the PDF e-book, the Open Document source, as well as all fonts used in the book, is also available as part of my “Lunacy” fork of Lua 5.1:maradns. samiam. org/ lunacy/ Sam Discusses Lunacy.
https://github.com/samboy/lunacyLook in the doc/ folder.
Comments for blog entries can be seen in the forum.