Review: Programming in Lua by Roberto Ierusalimschy
If you want to learn Lua, this is the book to get. It’s literally written by one of the guys that created the language, this is the authoritative source. There may be other books that cater to beginners, or are more focused on an application of Lua in a particular app. However, if you want to learn the nuts and bolts of Lua, you can look no further. It’s this book.
Everything is essentially covered here. Basic types like numbers, strings, tables, and functions. Working with files and I/O. Using the standard library for things like pattern matching, date and time, and binary data. All sorts of ways to create data structures (arrays, linked lists, queues, matrices, sets, etc.). How to implement higher level concepts like object-orientation and inheritance with metatables. Interfacing with a host application using C code, and a small treatment of multi-threading at the end. The code is particularly easy to read and understand, and the author clearly explains each step. I’m not sure I’ve ever seen such care in explaining a programming language than what Roberto Ierusalimschy has pulled off here.
Overall this is an amazing text, extremely detailed and well written, and authored by the literal inventor of the language. Most of the topics are intermediate to advanced level, and a few of the tricks with metatables were even a bit confusing for me (at first glance). So far this is the only book on Lua I’ve read, and I can see a few others that appear more geared to novice programmers. It’s difficult to say which is best for everyone, but this here is clearly the gold standard.