
#Lua
#Programming
#C
#API
#Markov_Chain
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
I. The Basics
1. Getting Started
2. Interlude: The Eight-Queen Puzzle
3. Numbers
4. Strings
5. Tables
6. Functions
7. The External World
8. Filling some Gaps
II. Real Programming
9. Closures
10. Pattern Matching
11. Interlude: Most Frequent Words
12. Date and Time
13. Bits and Bytes
14. Data Structures
15. Data Files and Serialization
16. Compilation, Execution, and Errors
17. Modules and Packages
III. Lua-isms
18. Iterators and the Generic for
19. Interlude: Markov Chain Algorithm
20. Metatables and Metamethods
21. Object-Oriented Programming
22. The Environment
23. Garbage
24. Coroutines
25. Reflection
26. Interlude: Multithreading with Coroutines
IV. The C API
27. An Overview of the C API
28. Extending Your Application
29. Calling C from Lua
30. Techniques for Writing C Functions
31. User-Defined Types in C
32. Managing Resources
33. Threads and States
About the Author
Roberto Ierusalimschy is the leading architect of the Lua programming language, driving its development since its inception in 1993. He is a full professor of Computer Science at PUC-Rio (the Pontifical Catholic University of Rio de Janeiro), where he works with programming-language design and implementation.
Roberto has a M.Sc. Degree and a D.Sc. Degree in Computer Science, both from PUC-Rio. He was a visiting researcher at the University of Waterloo, ICSI, GMD, and UIUC, and a Tinker Professor at Stanford. As a professor at PUC-Rio, Roberto was the advisor of several students that later became influential members of the Lua community. Roberto is also a member of the IFIP Working Group on Language Design.









