Programming in Lua
||Author: Roberto Ierusalimschy|
List Price: $34.95
Our Price: Click to see the latest and low price
Publisher: Roberto Ierusalimschy (November, 2003)
Sales Rank: 8,112
Average Customer Rating: 5 out of 5
Customer ReviewsRating: 5 out of 5
Lua is a gem among programming languages. Its designers have commendably placed a high value on keeping the language small, readable and portable. The diminutive size and simple syntax of Lua, however, belie a very rich, highly factored and stable architecture. It is a fun language in which to program. Lua dovetails beautifully with lower level languages by means of a C interface, and its drum tight language processor and libraries are right at home in event-driven graphical applications as well as console programs.
The excellent book "Programming in Lua" by Roberto Ierusalimschy provides developers with a broad summary of the language. The author includes a myriad of small examples, each of which is well focused and easily grasped. Different solutions to a given problem are often accompanied by benchmark figures. Prof. Ierusalimschy has an educator's gift for finding the appropriate level at which to write, and readers will appreciate the conversational nature of his writing. Unlike many programming language books, "Programming in Lua" has a strong content-to-fluff ratio throughout.
The book provides valuable explanations of language and library features which even the careful reader of the Lua reference manual might miss. In addition, over twenty C library entry points are discussed (and, thankfully, indexed) which are not mentioned in the reference manual.
It is hard to conceive of a software project which would not benefit from using Lua, both as an embedded component and as a standalone interpreter of scripts. The book "Programming in Lua" is valuable for anyone with an interest in this lovely language.
Rating: 5 out of 5
A valuable multi-level book
Lua is a free scripting language with an interesting development history. It is a language that is gaining wider acceptance thanks to small size, readable syntax, expressive power, efficiency, ANSI C portability and easy two-way integration with C and C++. It is also useful as a data-description language that can be tailored to one's needs.
Written by the chief architect of the language, this book is aimed at programmers whishing to approach or to better understand Lua and the (often unsuspected) capabilities offered by a fully dynamic language.
Despite its deceptively small size (260 pages) and a plain, readable style with an eye-resting typesetting, "Programming in Lua" packs an impressive amount of information peppered with small, clear code examples to help digesting it; 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.
Rather than offer a catalogue of functions (left to the downloadable reference manual), the book's four sections introduce capabilities, concepts and interesting techniques that may surprise programmers used to static languages.
The first section is devoted to the language itself, including not-so-common subjects like dynamic typing, multiple results, first-class functions, closures, iterators and coroutines. The following section shows how to build all sorts of data structures, from simple arrays and lists to packages and objects, using Lua's "tables" and the powerful idea of "metatables" that makes the language easily customizable.
The third section introduces the standard libraries (they are actually optional, e.g. in microcontroller 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).
"Programming in Lua" covers version 5.0 of the language, which is now mature and stable. I am using Lua both as a general-purpose 'light' language for system tasks or small programs, and as an 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 done it the honor of a place besides my well-thumbed K&R.
Rating: 5 out of 5
Your One Stop Lua Source
I found Programming in Lua a good complement to the resources already available online.
Roberto shows flair in his writing and his various points about the language are sustained by concise but clear (and many times entertaining) programming examples.
In my limited Lua experience I have come across information similar to the one presented in Roberto's book in other places too. However, the book organizes the concepts well, systematically and, perhaps more importantly, in a consistent style (not to mention that is also well indexed).
For the beginner Lua programmers it offers handholding, for the programmers with extensive C background it shows how to replace conventional C idioms with more efficient Lua ones and, finally, for the hardcore Lua people it offers those glimpses of Lua code honed to perfection.
At fewer than 300 pages the book manages to cover the entire language while emphasizing on doing things the Lua way. I only wished there were more goodies in the book but, then, it only matches Lua's footprint!
For those people caring for their collection of programming books, I found the book's graphics sleek and, well, Lua-ish. I personally ordered two copies, one to sit in my personal library besides Stroustrup and other sacred, and one to use as a reference at work.
As a professional with many years of programming experience I recognize value in this book and recommend it to anyone that programs or wishes to program in Lua.
Software Team Leader
CableTest Systems Inc.
· AI Game Programming Wisdom 2
· Game Coding Complete
· Game Scripting Mastery
· Game Programming With Python, Lua, and Ruby