Thank you for sending your enquiry! One of our team members will contact you shortly.
Thank you for sending your booking! One of our team members will contact you shortly.
Course Outline
Introduction to Lua
- A brief history
- Lua's objectives, features, and limitations
- Lua documentation and tutorial resources
- Installing the Lua interpreter
- Configuring and using LuaRocks
Basic syntax and semantics
- Identifiers
- Comments, including block comments
- Global variables and strictness enforcement
- Local variables
- Standalone programs and command-line arguments
- Compilation units, chunks, expressions, and semicolons
Data types and data structures
- Basic types: nil, boolean, number, string
- Object types: function, userdata, thread, table
- References/objects versus basic values
- The significance of tables in Lua
Introduction to tables and their versatility
- Tables as associative arrays
- Tables as numeric arrays and sequences
Basic control structures
- The if then elseif else end structure
- The while loop
- The repeat loop
- The simple for loop
Error handling
- Return values versus exceptions
- Converting return values to exceptions
- Converting exceptions to return values
- 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 versus stateful iterators
- Differences between iterators and co-routines
Metatables and metamethods
- The set example
- The __tostring metamethod
- Arithmetic metamethods
- The __index and __newindex metamethods
- The __len metamethod
Modules and packages
- Using modules
- Creating modules
- Organizing modules into packages
Object-oriented programming
- The building blocks of OOP in Lua
- Examples
Discussion on more advanced language features
- Weak tables
- Finalizers
- Compilation, eval, and loading
Requirements
Proficiency in at least one other programming language is required, along with general programming experience. Familiarity with other scripting languages is optional but will facilitate a smoother learning experience for understanding Lua.
14 Hours
Testimonials (1)
The clarity of the information. Despite a very compact program due to its short duration (2 days), we covered everything from the basics to the most advanced concepts of Lua in a simple manner.
Benoit Crauet - Pole Parcs Operations & Spectacle Formation Operationnelle I Disneyland(R) Paris
Course - Lua Fundamentals
Machine Translated