Customer Reviews: Programming in Lua
Amazon Vehicles Up to 80 Percent Off Textbooks Amazon Fashion Learn more nav_sap_plcc_ascpsc Lindsey Stirling Fire TV Stick Happy Belly Coffee Totes Summer-Event-Garden Amazon Cash Back Offer ElvisandNixon ElvisandNixon ElvisandNixon  Amazon Echo  Echo Dot  Amazon Tap  Echo Dot  Amazon Tap  Amazon Echo Starting at $49.99 All-New Kindle Oasis Shop Now STEM

Customer Reviews

4.6 out of 5 stars
Format: Paperback|Change
Price:$30.69+ Free shipping with Amazon Prime
Your rating(Clear)Rate this item

There was a problem filtering reviews right now. Please try again later.

on January 30, 2013
If you are new to Lua, then you don't have this book. If you are not new to the language, then you already have it!

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? :)
0Comment| 50 people found this helpful. Was this review helpful to you?YesNoReport abuse
on February 3, 2013
I own all the 3 paper editions of Roberto's PIL, and I was never disappointed by any of them, Nevertheless, IMHO the quality of the 2nd and of the new 3rd edition are somewhat above that of the first edition.

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.
11 comment| 20 people found this helpful. Was this review helpful to you?YesNoReport abuse
on January 30, 2013
Lua is a free scripting language with an interesting development history. It is light, readable, expressive, fast, almost universally portable (being ANSI C) and easily integrated with C and C++. It is widely used as dedicated scripting language, general-purpose language, data-description language and to build domain-specific languages.

Written by the chief architect of the language, "Programming in Lua" is aimed at programmers wishing to approach or to better understand Lua and the extra power offered by a fully dynamic language.

Despite its deceptively small size and a plain, readable style with eye-resting typesetting, "Programming in Lua" packs an impressive amount of information peppered with small, clear code examples, supplemented in this new edition by practical exercises; it reminds me of my favorite programming book: the K&R (Kernighan and Ritchie's "The C programming language"). It is a multi-level book that always gives something new at every reading.

Its four sections introduce capabilities, concepts and techniques that may surprise even seasoned programmers, especially those using static languages only.

The first section is devoted to the language itself, including not-so-common subjects such as multiple results, first-class functions, closures, iterators and coroutines. The next section shows how to build all sorts of data structures, from simple arrays and lists to packages and objects, using Lua "tables" and the powerful idea of "metatables" that makes the language easily customizable.
The third section introduces the standard libraries (which are actually optional, e.g. in small embedded applications) with special emphasis on the simple but versatile pattern matching capabilities.

The fourth and last section is different: aimed at system programmers, it explains in detail how to interface Lua and C, both to add new functions to Lua and to use Lua inside a C program (possibly called from programs written in other languages).

This new edition of "Programming in Lua" covers version 5.2 of the language. I use Lua as a general-purpose fast and light language for system tasks and small programs, as data-description language and as embedded language inside C++ applications: the combined power of the two languages is impressive. I liked this book a lot, I learned much from it and I've assigned it a place of honor besides my well-thumbed K&R.
33 comments| 15 people found this helpful. Was this review helpful to you?YesNoReport abuse
on January 26, 2013
This book is considered THE primary resource for learning to program in Lua, as long as you are not new to programming in general! The additional material in this new edition makes it even more effective and useful for those with a somewhat limited programming background, although still not a book for complete beginners to programming in general. I would suggest for newcomers to programming wanting to use Lua to get both this book and "Beginning Programming with Lua." In fact, I feel this is a good combo for many, myself included. Be aware that this 3rd edition of PiL, as this book is known in the Lua community, targets Lua 5.2, and the other book recommended targets Lua 5.1. The versions are quite similar but you need to be aware of the differences. This book is careful in pointing out to the reader these differences, as version 5.1 is still widely used.
0Comment| 7 people found this helpful. Was this review helpful to you?YesNoReport abuse
on January 29, 2013
Lua is a great embeddable programming language with a small memory footprint and powerful yet simple semantics and syntax which is also very fast (lot faster than Perl and Python.). I have been using Lua (and LuaJIT) professionally and for personal projects since 2006. Out of many books 'Programming in Lua' by Roberto is the best language manual about Lua. Reminds me of K&R 'Programming in C'. Very well written, concise, precise and accurate. If you are programming in Lua or interested in Lua in the future this book is MUST HAVE. The third edition covers the recently released Lua-5.2.
0Comment| 6 people found this helpful. Was this review helpful to you?YesNoReport abuse
on February 5, 2013
The book is just what you need, no matter you program in Lua for a long time or you just need something to start programming in it. It starts with basics and evolves deep into most advanced topics of language. My interest in this book was mostly to read about changes from version 5.1 to 5.2, especially C API part. And i got what i expected. I'd recommend this book to anyone who use or plan to use the Lua language. The overall quality and completeness of the feed of information in book is fine. Roberto Ierusalimschy is one of Lua authors, so it's no wonder. I use Lua in my projects and it's very extensive and delightful experience. Recommended!
0Comment| 6 people found this helpful. Was this review helpful to you?YesNoReport abuse
on January 9, 2013
Programming in Lua is a great book to learn the ins and outs of the language. I'm learning lua for use in the Corona Sdk and being able to have this reference at hand is a must. Great writing style and I love that this new edition has exercises after each chapter. Keep up the good work!
0Comment| 6 people found this helpful. Was this review helpful to you?YesNoReport abuse
TOP 1000 REVIEWERon November 7, 2014
This is a lot better option than trying to learn about Lua using free resources on the Internet. Firstly, it is up-to-date with the latest version of Lua (5.2) at this time. I banged my head against online examples full of deprecated function calls that wouldn't work. Once I had this book, I was no longer wasting my time with out-dated examples.

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.
0Comment| 2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on July 31, 2013
Being new to Lua and having to work on cleaning a large amount of Lua code that someone else had written I needed some information in addition to the Lua language manual.

This book has been quite helpful so far, but I haven't finished digesting it yet so I expect to find even more useful information.
0Comment| 3 people found this helpful. Was this review helpful to you?YesNoReport abuse
on February 5, 2013
Essential if you are planning to progam in Lua (5.1 or 5.2). In my opinion it's worth study even if you don't plan a Lua project just for the programming advice and examples (in the tradition of "Software Tools" by Kernighan and Plauger).
0Comment| 5 people found this helpful. Was this review helpful to you?YesNoReport abuse