Programming in Lua, 3rd Edition
- Length: 366 pages
- Edition: 3
- Language: English
- Publisher: Lua.org
- Publication Date: 2013-01-03
- ISBN-10: 859037985X
- ISBN-13: 9788590379850
- Sales Rank: #199366 (See Top 100 Books)
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. Lua also has established itself as a major language in software development for mobile devices. 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 Third Edition updates the text to Lua 5.2 and brings substantial new material. In particular, it brings more than one hundred exercises distributed through all chapters, ranging from simple questions about the language to full small-size projects.
Table of Contents
Part I: The Language
1. Getting Started
2. Types and Values
3. Expressions
4. Statements
5. Functons
6. More about Functions
7. Iterators and the Generic for
8. Compilation, Execution, and Errors
9. Coroutines
10. Complete Examples
Part II: Tables and Objects
11. Data Structures
12. Data Files and Persistence
13. Metatables and Metamethods
14. The Environment
15. Modules and Packages
16. Object-Oriented Programming
17. Weak Tables and Finalizers
Part III: The Standard Libraries
18. The Mathematical Library
19. The Bitwise Library
20. The Table Library
21. The String Library
22. The I/O Library
23. The Operating System Library
24. The Debug Library
Part IV: The C API
25. An Overview of the C API
26. Extending Your Application
27. Calling C from Lua
28. Techniques for Writing C Functions
29. User-Defined Types in C
30. Managing Resources
31. Threads and States
32. Memory Management