Lua is spreading more and more throughout different areas of software, from embedded systems and mobile devices to the Web and the Internet of Things. Besides, it has a major role in the game industry, where knowledge of Lua has become an indisputable asset. Lua is the language of choice for anyone who needs a scripting language that is simple, efficient, extensible, portable, and free. Programming in Lua is the official book about the language, providing a solid base to 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. The book is the main source of programming patterns for Lua, with numerous code examples that help the reader to make the most of Lua’s flexibility and powerful mechanisms. 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 Fourth Edition updates the book to Lua 5.3 and marks a complete reorganization of the text. Building on his many years of experience teaching Lua, Roberto has restructured the book to present the material in a growing order of complexity, allowing the reader to better absorb the character of the language.

Table of Contents

Part I. The Basics
Chapter 1. Getting Started
Chapter 2. Interlude: The Eight-Queen Puzzle
Chapter 3. Numbers
Chapter 4. Strings
Chapter 5. Tables
Chapter 6. Functions
Chapter 7. The External World
Chapter 8. Filling Some Gaps

Part II. Real Programming
Chapter 9. Closures
Chapter 10. Pattern Matching
Chapter 11. Interlude: Most Frequent Words
Chapter 12. Date And Time
Chapter 13. Bits And Bytes
Chapter 14. Data Structures
Chapter 15. Data Files And Serialization
Chapter 16. Compilation, Execution, And Errors
Chapter 17. Modules And Packages

Part III. Lua-Isms
Chapter 18. Iterators And The Generic For
Chapter 19. Interlude: Markov Chain Algorithm
Chapter 20. Metatables And Metamethods
Chapter 21. Object-Oriented Programming
Chapter 22. The Environment
Chapter 23. Garbage
Chapter 24. Coroutines
Chapter 25. Reflection
Chapter 26. Interlude: Multithreading With Coroutines
Chapter 27. An Overview Of The C Api
Chapter 28. Extending Your Application
Chapter 29. Calling C From Lua
Chapter 30. Techniques For Writing C Functions
Chapter 31. User-Defined Types In C
Chapter 32. Managing Resources
Chapter 33. Threads And States

Book Details

Title: Programming in Lua, 4th Edition
Author: Roberto Ierusalimschy
Length: 388 pages
Edition: 1
Language: English
Publisher: Lua.org
Publication Date: 2016-08-01
ISBN-10: 8590379868
ISBN-13: 9788590379867