- 容易和 C/C++ 間互相呼叫,擴充性極高
- ...
-
Part I · The Language
- Getting Started (Hello World)
- 1.1 Chunks
- 1.2 Some Lexical Conventions (識別字、註解)
- 1.3 Global Variables
- 1.4 The Stand-Alone Interpreter
- Types and Values
- Expressions
- 3.1 Arithmetic Operators
- 3.2 Relational Operators
- 3.3 Logical Operators
- 3.4 Concatenation
- 3.5 Precedence
- 3.6 Table Constructors
- Statements
- 4.1 Assignment (多值指定)
- 4.2 Local Variables and Blocks
- 4.3 Control Structures
- 4.3.1 if then else
- 4.3.2 while
- 4.3.3 repeat
- 4.3.4 Numeric for
- 4.3.5 Generic for
- 4.4 break and return
- Functions
- 5.1 Multiple Results
- 5.2 Variable Number of Arguments
- 5.3 Named Arguments
- More about Functions
- 6.1 Closures
- 6.2 Non-Global Functions
- 6.3 Proper Tail Calls
- Iterators and the Generic for
- 7.1 Iterators and Closures
- 7.2 The Semantics of the Generic for
- 7.3 Stateless Iterators
- 7.4 Iterators with Complex State
- 7.5 True Iterators
- Compilation, Execution, and Errors
- 8.1 The
requireFunction - 8.2 C Code
- 8.3 Errors
- 8.4 Error Handling and Exceptions
- 8.5 Error Messages and Tracebacks
- 8.1 The
- Coroutines
- 9.1 Coroutine Basics
- 9.2 Pipes and Filters
- 9.3 Coroutines as Iterators
- 9.4 Non-Preemptive Multithreading
- Complete Examples
- 10.1 Data Description
- 10.2 Markov Chain Algorithm
Part II · Tables and Objects
- Data Structures
- 11.1 Arrays
- 11.2 Matrices and Multi-Dimensional Arrays
- 11.3 Linked Lists
- 11.4 Queues and Double Queues
- 11.5 Sets and Bags
- 11.6 String Buffers
- 11.7 Graphs
- Data Files and Persistence
- 12.1 Data Files
- 12.2 Serialization
- 12.2.1 Saving Tables without Cycles
- 12.2.2 Saving Tables with Cycles
- Metatables and Metamethods
- 13.1 Arithmetic Metamethods
- 13.2 Relational Metamethods
- 13.3 Library-Defined Metamethods
- 13.4 Table-Access Metamethods
- 13.4.1 The
__indexMetamethod - 13.4.2 The
__newindexMetamethod - 13.4.3 Tables with Default Values
- 13.4.4 Tracking Table Accesses
- 13.4.5 Read-Only Tables
- 13.4.1 The
- The Environment
- 14.1 Accessing Global Variables with Dynamic Names
- 14.2 Declaring Global Variables
- 14.3 Non-Global Environments
- Packages
- 15.1 The require Function
- 15.2 The Basic Approach for Writing Modules
- 15.2 Privacy
- 15.3 Packages and Files
- 15.4 Using the Global Table
- 15.5 Other Facilities
- Using Environments
- The module Function
- Submodules and Packages
- Object-Oriented Programming
- 16.1 Classes
- 16.2 Inheritance
- 16.3 Multiple Inheritance
- 16.4 Privacy
- 16.5 The Single-Method Approach
- Weak Tables
- 17.1 Memoize Functions
- 17.2 Object Attributes
- 17.3 Revisiting Tables with Default Values
Part III · The Standard Libraries
- The Mathematical Library
- The Table Library
- 19.1 – Array Size
- 19.2 – Insert and Remove
- 19.3 – Sort
- Concatenation
- The String Library
- Basic String Functions
- 20.1 Pattern-Matching Functions
- 20.2 Patterns
- 20.3 Captures
- Replacements
- 20.4 Tricks of the Trade
- The I/O Library
- 21.1 The Simple I/O Model
- 21.2 The Complete I/O Model
- 21.2.1 A Small Performance Trick
- 21.2.2 Binary Files
- 21.3 Other Operations on Files
- The Operating System Library
- 22.1 Date and Time
- 22.2 Other System Calls
- The Debug Library
- 23.1 Introspective Facilities
- 23.1.1 Accessing Local Variables
- 23.1.2 Accessing Upvalues
- 23.2 Hooks
- 23.3 Profiles
Part IV · The C API
- 23.1 Introspective Facilities
- An Overview of the C API
- 24.1 A First Example
- 24.2 The Stack
- 24.2.1 Pushing Elements
- 24.2.2 Querying Elements
- 24.2.3 Other Stack Operations
- 24.3 Error Handling with the C API
- 24.3.1 Error Handling in Application Code
- 24.3.2 Error Handling in Library Code
- Extending your Application
- The Basics
- 25.1 Table Manipulation
- 25.2 Calling Lua Functions
- 25.3 A Generic Call Function
- Calling C from Lua
- 26.1 C Functions
- 26.2 C Libraries
- Techniques for Writing C Functions
- 27.1 Array Manipulation
- 27.2 String Manipulation
- 27.3 Storing State in C Functions
- 27.3.1 The Registry
- 27.3.2 References
- 27.3.3 Upvalues
- User-Defined Types in C
- 28.1 Userdata
- 28.2 Metatables
- 28.3 Object-Oriented Access
- 28.4 Array Access
- 28.5 Light Userdata
- Managing Resources
- 29.1 A Directory Iterator
- 29.2 An XML Parser
- Threads and States
- 30.1 Multiple Threads
- 30.2 Lua States
- Memory Management
- 31.1 The Allocation Function
- 31.2 The Garbage Collector
其它
- 簡介:http://programmermagazine.github.io/201402/htm/people1.html
- 應用程式
- 課程
- http://yhhuang1966.blogspot.com/2015/07/lua_14.html
- https://www.linuxlinks.com/best-free-books-learn-lua/ (免費電子書)
- Programming in Lua
- https://michaelchen.tech/review/programming-in-lua-4th-edition/
- https://sites.google.com/a/kimicat.com/www/lua教學
- Lua 5.3 Reference Manual
- https://github.com/brndnmtthws/conky/wiki (桌面系統監控內建 Lua 支援)
- CirnOS (在 Raspberry Pi 專門提供 Lua 執行環境的作業系統)
沒有留言:
張貼留言