Buy new:
$22.99$22.99
FREE delivery: Wednesday, March 15 on orders over $25.00 shipped by Amazon.
Ships from: Amazon.com Sold by: Amazon.com
Buy used: $17.93
Other Sellers on Amazon
FREE Shipping
100% positive over last 12 months
+ $5.43 shipping
92% positive over last 12 months
+ $3.99 shipping
86% positive over last 12 months
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required. Learn more
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Programming in Lua 3rd Edition
There is a newer edition of this item:
Enhance your purchase
- ISBN-10859037985X
- ISBN-13978-8590379850
- Edition3rd
- PublisherLua.org
- Publication dateJanuary 3, 2013
- LanguageEnglish
- Dimensions7.44 x 0.76 x 9.69 inches
- Print length366 pages
Frequently bought together

- +
- +
Customers who viewed this item also viewed
Coding with Roblox Lua in 24 Hours: The Official Roblox Guide (Sams Teach Yourself)Official Roblox Books(Pearson)Paperback
Product details
- Publisher : Lua.org; 3rd edition (January 3, 2013)
- Language : English
- Paperback : 366 pages
- ISBN-10 : 859037985X
- ISBN-13 : 978-8590379850
- Item Weight : 1.44 pounds
- Dimensions : 7.44 x 0.76 x 9.69 inches
- Best Sellers Rank: #1,308,097 in Books (See Top 100 in Books)
- #949 in Computer Programming Languages
- #2,152 in Software Development (Books)
- #4,328 in Programming Languages (Books)
- Customer Reviews:
About the author

Roberto Ierusalimschy is the leading architect of the Lua programming language, driving its development since its inception in 1993. He is a full professor of Computer Science at PUC-Rio (the Pontifical Catholic University of Rio de Janeiro), where he works with programming-language design and implementation.
Roberto has a M.Sc. Degree and a D.Sc. Degree in Computer Science, both from PUC-Rio. He was a visiting researcher at the University of Waterloo, ICSI, GMD, and UIUC, and a Tinker Professor at Stanford. As a professor at PUC-Rio, Roberto was the advisor of several students that later became influential members of the Lua community. Roberto is also a member of the IFIP Working Group on Language Design.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on Amazon-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
Everyone approaching Lua should start with this essential tool as it is, by far, the most efficient and authoritative way to truly understand Lua and its C-API, which is the key to Lua's ability to integrate with system languages. Written as though K&R were in the room, it has just the right amount of instructive insight and tutorials to bring context, without making it hard to actually find what you need to know. You will wear this book out.
In the Third Edition, lessons were added to the end of each chapter. Many of the lessons are actually open-ended questions, such as "Why is the elseif statement more important in Lua, than it might be in other languages?" These lend to a great deal of understanding that I found very helpful.
Other lessons and examples highlight how somethings are accomplished in Lua, which might be a specialized feature found in another, more complicated language. Here, I found myself learning about the language, gaining an appreciation of its design, as well as insights into being productive with the it.
It's not a huge book, but every section was very dense with knowledge and even after 2 years of playing around with Lua, I found it enjoyable and well worth my time to go through this new edition.
Some Editorializing on Lua:
Lua is best thought of as an implementation and a language. As a language, it is very small, yet it contains some very compact and powerful semantic constructs that you might not expect. That is, Lua is smaller than Visual Basic, yet it has coroutines, first class functions, closures and some wonderfully done meta-programming features.
However, these merits might just be my personal taste. There are other great languages out there, although it's worth noting that, after you remove the section on the C-API, Programming in Lua is roughly the same size as JavaScript The Good Parts. :)
Perhaps the feature that deserves the most attention is Lua's implementation, which is focused on its first design goal: an accessible, embeddable scripting language. Lua includes a very clean API written for C, which provides very efficient, controlled and seamless access to and from Lua. It is unique and it is also why, in spite of it being a language less known in web development circles, Mediawiki chose it for their templating system.
Finally, Lua is maintained by a small team, in PUC-Rio, a University in Rio de Janeiro in Brazil, that knows how to say "no." They keep the garden tended and pull the weeds, and otherwise keep Lua small and beautiful.
As a result, programming in Lua and working with its implementation is pleasant. Maybe that's the most informative thing that might be said: When I use Lua, I'm having fun.
So... buy the book? :)
The structure of the recent 3rd edition follows that of the "classic" of programming: "The C Programming Language", written by Brian Kernighan and Dennis Ritchie many years ago. A short introductory chapter describing Lua at large is followed by 30 chapters focusing specific areas. The first 10 chapters are about the essential aspects of Lua, but include more "advanced" issues such as iterators and coroutines. The next 7 chapters are about data structures and OO programming. Another 7 chapters describe Lua's standard libraries, and the last 8 chapters are about Lua's C API and discuss more advanced issues such as threads ans memory management. Many examples and case studies are spread all over the book.
The book has about 350 pages, what is still acceptable as a "bed lecture". Several chapters are a bit short (e.g., the one describing Lua's mathematical library, which essentially is the C standard math library, could have spent half a dozen more pages.) The 3rd edition has about 50 more pages than the 2nd; includes end-of-the-chapter exercises and reflects changes in Lua from version 5.1 to 5.2 (environments/global variables, extended coroutines, bit operations library,...). Overall it is a more polished work than the 2nd edition, and is a very inexpensive book (24 bucks today...), certainly due to Roberto's option of self-publishing. This option doesn't affect the quality: despite having already read a big chunk of the book, I didn't found noticeable typos or errors.
A must have book for Lua lovers.
The book is very thorough and I appreciate the attention that went into the sections on writing C applications that invoke Lua code and on writing Lua applications that invoke C libraries.
I took away a star because I felt a lot of the "stack" counting concepts could benefit from a simple graphic here or there and they didn't bother to make any; you just have to study the text and the examples until the stack indexing clicks in your head.
Overall, a great book for anyone programming in Lua.
Top reviews from other countries
The reference manual and Programming in Lua Volume 1 are available on line which is plenty to get you familiar with the basics. Once you've grasped those, YOU NEED THIS BOOK!
Its style is the same as PiL#1 which is to say comprehensive and well written. The author explains every bit of the language and makes clear what is essential and what is 'common practice'. He also provides useful tips on alternative (Lua-like) ways of doing things which don't always come naturally to C/++ programmers.
The first third deals with the basics of writing Lua scripts. The second third explains some more advanced ways of scripting along with the Lua standard libraries. The last third tends to deal integrating Lua into your own C/++ applications. For this last third, it is probably useful having a copy of the Lua source (also on line) and compiling in your own environment to experiment with some of the C API. Throughout the book there are regular annotations where something relevant has changed since 5.1.
The official Lua mailing list is also a very active list that's worth signing up for as well. The author actively participates in the list too.
Even if you're only interested in the 5.1 interpreter/JIT series then get this edition, as all differences from 5.1->5.2 are highlighted as presented.
And even if you're not interested in computer programming (!) then lend this book to a native English speaking author/writer and watch them become ashamed...








