Lua is the language of choice for anyone who needs a scripting language that is simple, efficient, extensible, portable, and free. Currently, Lua is being used in areas ranging from embedded systems to Web development and is widely spread in the game industry, where knowledge of Lua is an indisputable asset. "Programming in Lua" is the official book about the language, giving a solid base for any programmer who wants to use Lua. Authored by Roberto Ierusalimschy, the chief architect of the language, it covers all aspects of Lua 5---from the basics to its API with C---explaining how to make good use of its features and giving numerous code examples. "Programming in Lua" is targeted at people with some programming background, but does not assume any prior knowledge about Lua or other scripting languages. This Second Edition updates the text to Lua 5.1 and brings substantial new material, including numerous new examples, a detailed explanation of the new module system, and two new chapters centered on multiple states and garbage collection.