|
|||||||||||||||||||||||||||||||||||
|
37 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
97 of 102 people found the following review helpful:
5.0 out of 5 stars
Let the revolution begin,
By André Carregal (Rio de Janeiro, RJ Brasil) - See all my reviews
This review is from: Programming in Lua: (Paperback)
The Lua programming Language has been around for a while but this book by Roberto Ierusalimschy will be a mark in its history. The book managed to surpass every expectation I had for it, and I was eager! From someone with no Lua knowledge to those with Lua klocs in their backs, this book will be a great companion in a nice to read trip down the Lua 5.0 lane.The book begins with the basic Lua elements and structures and then advances through control structures, functions, iterators and coroutines. Iterators and coroutines are one of those language features that may confuse the first timers, but the author manages to show the concepts and inter relations between them in a way that clarified the issues even for a seasoned Lua programmer. Alas, make no mistake, the whole first part is totally worthwhile for non beginners. The second part of the book shows one of Lua biggest assets: tables and metatables. I've seen people sneer at Lua at first glance and then convert themselves to Lua evangelists simply for the features of tables and metatables. The author does his magic and makes a whole set of apparently complex concepts flow by the reader as fluid and logical as they can be. By the way, fluency is arguably one of the major benefits of this book. The reader is taken from substrate to substrate of the Lua way of life without even taking notice. Every end of chapter left me with the satisfaction of having been presented with one more facet of Lua and with the tranquility that everything was falling in place at the right timing. After tables and metatables, the book presents the concepts of Packages and Object Orientation in Lua. If you had any doubt ever that Lua was able to sustain "real" Modular/OO programming, be prepared to replace your dogmas. The book not only clarifies how to do it in Lua but also shows how easy and clear the coding gets. The author ends the second part of the book with a great chapter on Weak Tables. I have to admit that I was somewhat refractory to Weak Tables before I read this book, but after this single chapter I was converted. May the name "weak" not influence your judgment on those Weak Tables. They are great, and the book showed more about them than I was expecting. The third part of the book focuses on the standard libraries. Those would be the Table, String, I/O, Operating System and Debug libraries. Instead of repeating the contents of the Lua reference manual, the author manages to show lots of new information about the libraries by the use of examples and clear explanations. There are some points in Lua that can indeed be quite idiosyncratic at a glance, but this book is more than enough to clarify every one of them. The fourth and last part of the book brings us the Lua C API. For the beginner Lua programmer this part will probably be skipped, but for the average programmer and most of all for the hardcore Lua explorer, this part will be pure delight. C programming is not for the faint of heart, but having a Lua interface for your C library is akin to the jackpot of embedded languages in my opinion. This part of the book shows that the task of wrapping C code for Lua is not only feasible, but easily done once you grasp the fundamentals. Have one thing in mind, this was no small task for the author. Describing such an plethora of resources and how to use them in six chapters demands a clear yet straight to the point approach, and once again the book shines through. Step by step the author shows how to deal with the Stack, to get arguments from and return values back to Lua, to handle tables (even those big ones), to call Lua functions from C code, to call C functions from Lua code, to handle strings, to handle state (using the registry, references and upvalues), and last but not least to use userdata types and metatables in C. The last chapter of the book brings two examples of the use of the C API, one offers a directory iterator and the other a really nice example of binding an existent library (expat) for Lua use. Lots of my questions on the C API were dismissed with those two examples. I should also reserve a praise for the book index. Not only I've found it complete but it is easy to understand some details of the Lua structure only by glancing at the index pages. Conclusion Being one of the first readers of this book was not only a great honor but also a great surprise. As a Lua old timer, I wasn't expecting to be presented to so many novelties, subtleties and jewels of programming in almost every chapter. Was I wrong... If you have not seen Lua until now, this book is THE starting point. If you are acquainted with other versions of Lua but have not studied version 5.0, this book is a great shortcut for your new endeavors. Finally, if you think Lua is your native language and no book could teach you something worthwhile, think again. I was grateful I didn't skip not even one paragraph. We've got the language. We've got the book. Let the revolution begin... :o)
36 of 37 people found the following review helpful:
5.0 out of 5 stars
A valuable multi-level book,
By Enrico Colombini (Collebeato, Italy) - See all my reviews
This review is from: Programming in Lua: (Paperback)
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 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.
23 of 23 people found the following review helpful:
5.0 out of 5 stars
Excellent book,
By Kurt Jung (Michigan, USA) - See all my reviews
This review is from: Programming in Lua: (Paperback)
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.
15 of 16 people found the following review helpful:
5.0 out of 5 stars
It is an excellent book,
This review is from: Programming in Lua, Second Edition (Paperback)
I developed my previous project (Ribosome Builder [sourceforge.net]) with Lua and found it to be very stable, easy-to-use, small, fast and powerful. That said, I was eagerly looking forward to the release of this next edition of the book, because I'm using Lua again for my current projects, and hope to make even better use of Lua 5.1. I'm especially excited about the new support for modules, and also the fact that Lua is now supported by SWIG. Previously, I had to do a lot of manual hacking to define the interface functions between my core code (in C++) and the lua scripts.
I've read about 3/4 of the book so far and I am very pleased with it. The book is very cleanly and clearly written, with many things explained in a concise and elegant style. For example, Ierusalimschy's explanation of closures allowed me to immediately grasp them and appreciate why they are useful. I remember reading about them way back years ago in Larry Wall's book 'Programming Perl', and was remained rather confused about the concept. I don't know if the additional years of experience helped, but the clear style of the Lua book certainly did. Using a scripting language for enhancing and extending a complex project just seems to be a given for most serious projects these days, and after surveying the field, I considered only two main choices: Python and Lua. Python is also really well designed and powerful, but I decided to go with Lua because it does pretty much everything I need it to do, does it very well, but best of all, it is so very small. These days when even the most basic projects can quickly grow into complex, interconnected monstrosities with a zillion dependencies, I believe that the values of small and simple are more important than ever. So for that reason especially, I'm really excited about Lua and the prospect for using it more effectively after I finish swallowing this tasty Blue PIL.
11 of 11 people found the following review helpful:
5.0 out of 5 stars
If you only buy one LUA book....,
By
This review is from: Programming in Lua, Second Edition (Paperback)
This book is an excellent introduction to LUA programming.
I also have the "Beginning Lua Programming Book" by Kurt Jung and Aaron Brown (which admittedly covers a broader scope), but I find myself constantly referring to "Programming in Lua". My own bias is that I am a C++ programming looking to embed LUA in a C++ application. Whilst I am a huge fan of this book, I would prefer slightly more coverage of the C Api for C/C++ programmers. One glaring example is the absence of any reference (that I could find) to the lua_next function. The stack concept is central to understanding interaction between LUA and C/C++ programs. I feel that my learning would have been accelerated by highlighting this fact, ideally with some pictorial representation of the stack contents when c/c++ methods are called from LUA, when lua_getfield, and lua_next methods are called. Maybe this could be covered in a third edition. This book is still an excellent introduction to LUA!
17 of 19 people found the following review helpful:
5.0 out of 5 stars
An Elegant Book for an Elegant Language,
By Mike Owens (Fort Worth, TX) - See all my reviews
Amazon Verified Purchase(What's this?)
This review is from: Programming in Lua, Second Edition (Paperback)
I am new to Lua. While a C++ developer, having used Perl, Python and Ruby, I was suprised by how much you can do with this compact scripting language.
The second edition is as eloquently written as the first (which is available online), but with new material and even more examples. In little time it introduced me to all aspects of the latest version of Lua -- 5.1 -- which includes a number of new features such as the new package system. Being a newcomer, it was nice to have a recent book covering all aspects of this latest version. The book is well organized. It works as both a primer and complete course on the langauge. It covers the basic tenets and first principles, as well as the subtleties. It is written in the spirit of Lua: accomplishing much in minimal space. It does so through crisp, engaging writing and thorough, well-crafted examples. It is one of those books that feels timeless -- so well done that you mark your name on it with a Sharpie. Lua is both a language and developer's tool. Part IV of the book, devoted to the C API, is as thorough for developers as the preceding parts are for language users. As I am using Lua in a multi-threaded environment, the second edition had the perfect example covering everything I needed to know -- from managing multiple states (interpreters) to wrapping C/C++ data structures. I was so pleased with the book, I emailed the author. If you use Lua, and especially if you are new to Lua, you won't be disappointed with this edition.
10 of 10 people found the following review helpful:
5.0 out of 5 stars
Your One Stop Lua Source,
By Marius V. Gheorghe (Newmarket, Ontario, Canada) - See all my reviews
This review is from: Programming in Lua: (Paperback)
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. Marius Gheorghe Software Team Leader
16 of 18 people found the following review helpful:
5.0 out of 5 stars
The Blue PiL,
By Dado Sutter (Rio de Janeiro, Brasil) - See all my reviews
This review is from: Programming in Lua, Second Edition (Paperback)
Reading the first PiL left us with that hard-to-believe-it-could-get-any-better impression.
But Roberto did it again and surprised us with another 5-stars gem! The Lua language has evolved (a lot!) and version 5.1 brings new mechanisms such as a full modules/packaging support system, tighter control over garbage collection, new (minor but significant) syntax notations, all of which justify this second edition. For the 5.0 user the book also offers plenty of new examples, such as graph management, extensive string content manipulation and a complete multithreaded C system using different Lua states in each thread. Lua itself would be a good enough reason to buy another book written by its creator, but PiL 2 is much more than one could expect. The book is full of brilliant solutions and tackles a wide variety of computing challenges, in the best Knuth style as hardly seen ever since. The text not only shows spotless academic rigour and consistency, but it is also astonishingly clear, pleasant to read and carefully crafted and lapidated by a writer who learned English as a second language. A bedside book!
9 of 9 people found the following review helpful:
5.0 out of 5 stars
All C programmers should have this book,
By
This review is from: Programming in Lua, Second Edition (Paperback)
Buying this book does more than support the Lua project. Having the book available will change your opinion of integrating script with C code! "Progamming in Lua" is a well-written text that makes using Lua practical. All of the best features of Lua are covered; the sample code is concise, clear and complete.
Lua is very different from C, and so allows a programmer to easily do things that are difficult in C. That makes it a perfect companion language. The only obstacle is training a C programmer to use it! That's where the book becomes useful. It's a quick read and covers all the essentials. Even better, Lua is so well-connected to C that it is easy to switch back and forth in the course of a typical programming day, writing performance code in C and high-level logic in Lua. It is even possible to easily interact with Lua data structures in C without writing Lua code for situations where the data structures are desirable but Lua code isn't required. If you're looking for a scripting language for your next project, you need to know about Lua, and this book is the quickest way to make an informed decision.
5 of 5 people found the following review helpful:
4.0 out of 5 stars
Great introduction to Lua,
By
Amazon Verified Purchase(What's this?)
This review is from: Programming in Lua, Second Edition (Paperback)
Lua isn't a complicated language, honestly. If you're coming at it from another language, especially ones with simpler syntaxes like PHP or VB, you'll feel right at home. In fact, it's so simple you could easily pick up most of the language's workings just by looking at other people's code, and building your own from there. That said, not everyone likes to learn that way. Some people, myself included, like to have a reference book that they can pick up at a whim, skim to the topic that they're struggling with and find a solution. That's what this book excels at: reference, and teaching by example. It's a great buy for anyone looking to get into Lua scripting, and a nice reference guide for those already fluent in other languages.
|
|
Most Helpful First | Newest First
|
|
Programming in Lua, Second Edition by Roberto Ierusalimschy (Paperback - March 5, 2006)
$39.95 $24.96
Usually ships in 2 to 3 weeks | ||