課程目錄:Comprehensive Lua培訓
4401 人關注
(78637/99817)
課程大綱:

  Comprehensive Lua培訓

 

 

 

Introduction to Lua
A bit of history
Lua's goals, features and non-goals
Resources of Lua documentation and tutorials
Installing the Lua interpreter
Setting up and using LuaRocks
Basic syntax and semantics
Identifiers
Comments, block comments
Global variables and enforcing of strictness
Local variables
Standalone programs, program arguments
Compilation units, chunks, expressions, semicolons
Data types and data structures
Basic types: nil, boolean, number, string
Object types: function, userdata, thread, table
References/objects vs. basic values
The importance of tables in Lua
Introduction to tables and their versatility
Tables as an associative array
Tables as numeric arrays, sequences
Basic control structures
The if then elseif else end
The while loop
The repeat loop
The simple for loop
Error handling
Return values vs exceptions
Converting a return value to an exception
Converting an exception to a return value
Error levels
Example programs
Polynomial evaluation
Breadth first search
Additional exercises
More about functions
Named arguments
Object-oriented calls
Closures
Currying
Tail calls
Multiple assignment and return
Varargs
Iterators and co-routines
The generic for loop
Stateless vs stateful iterators
Differences between iterators and co-routines
Metatables and metamethods
The set example
The __tostring metamethod
Arithmetic metamethods
The __index, __newindex metamethods
The __len metamethod
Modules and packages
Using modules
Creating modules
Organizing modules into packages
Advanced tables
Tables for queues and stacks
Tables describing graphs
Matrices as tables
Linked lists as tables
String buffers
Metatables through examples
Proxies
Readonly
Memoization
Dynamic programming with memoization
The Fibonacci example
Environments
Relationship between global variables and environments
Free variables
The _ENV table and the _G table
More about modules
Different approaches to creating modules
Modules that change the behavior
Module initialization and arguments
Using environments to implement safe modules
Advanced iterators and co-routines
Producer, consumer, filter
Wrapping co-routines to get iterators
Stateless iterator for linked lists
Contributing to the Ecosystem
Uploading packages to MoonRocks
Functional paradigm in Lua
The map function
The reduce / fold function
Object-oriented Programming
Different approaches to OOP
Different approaches to inheritance
Examples
A walkthrough of the Lua Standard Libraries
Compilation
Compilation
Eval
Relationship with the environment
Binary chunks
Garbage collection
Weak tables
Finalizers, the __gc meta-method
Lua bytecode and virtual machine
Generating bytecode from source code
Reading and analyzing bytecode
Quick tour of the source code of the Lua VM
C modules
Calling C from Lua
Search path and loading of C modules
Calling Lua from C
The Stack
Error handling
Continuations
Handling Lua values and types from C
Arrays
Strings
Userdata
Metatables
Object oriented calls
Light userdata
Memory management
Allocators
GC API
Threads in Lua
Co-routines vs threads
Real multi-threading and Lua states

主站蜘蛛池模板: 亚洲综合久久久| 久久天堂AV综合合色蜜桃网| 色天使久久综合网天天| 亚洲VA综合VA国产产VA中| 久久婷婷五月综合国产尤物app| 亚洲AV综合色区无码一区| 伊人久久大香线焦综合四虎| 国产综合成人色产三级高清在线精品发布| 亚洲色图综合网| 亚洲欧美成人久久综合中文网| 91精品婷婷国产综合久久| 国产精品亚洲综合久久| 欧美亚洲另类久久综合| 色综合久久天天综线观看| 久久综合视频网| 熟女少妇色综合图区| 国产色综合一区二区三区| 在线综合亚洲欧美网站| 日日狠狠久久偷偷色综合96蜜桃| 综合在线免费视频 | 久久婷婷五月综合国产尤物app | 国产成人亚洲综合| 激情综合色五月六月婷婷| 婷婷五月综合丁香在线| 青青草原综合久久大伊人| 国产成人亚洲综合无码| 色综合合久久天天综合绕视看| 亚洲高清无码综合性爱视频| 综合久久一区二区三区| 99久久国产亚洲综合精品| 国产成人亚洲综合网站不卡| 欧美日韩国产综合视频一区二区三区| 精品综合久久久久久888蜜芽| 天天综合久久久网| 亚洲VA欧美va国产va综合| 人人狠狠综合久久亚洲88| 色综合久久天天综线观看| 国产综合精品久久亚洲| 狠狠色狠狠色综合伊人| 日韩人妻无码一区二区三区综合部| 久久综合综合久久综合|