
Lua is a proven, robust scripting language known for speed, portability, and embeddability, used in Lightroom and games, with a permissive open-source license and meta programming features.
Learn Lua comments, including single-line comments that start with two dashes and multi-line blocks using brackets, and apply tricks to enable or ignore code efficiently.
Explore global variables and their behavior in Lua: they can be used before declaration, and uninitialized ones print nil. Assigning nil reverts them to undeclared status, with memory reclaimed.
Explore Lua's dynamically typed nature, with no type definitions, where a value carries its type and a variable can hold nil or types, including boolean, string, userdata, function, and table.
Explore how Lua handles numerals, including integer and double precision representations, decimal and exponent forms, hexadecimal constants, and type checks for integers versus floats.
Explore arithmetic and relational operators in Lua, including subtraction, multiplication, division, negation, and integer division; understand automatic type handling, float vs integer results, and type-sensitive comparisons.
Learn to write long strings in Lua by delimiting with matching square brackets, spanning multiple lines, ignoring the first newline, and using equals signs to customize the delimiter when needed.
Explore how Lua coerces numbers and strings, showing implicit conversions during concatenation and explicit casts with tostring and tonumber, including base 2–36 and nil on invalid input.
Explore Lua's string library functions, including length, bytes, reverse, upper, lower, sub, cat, and format, plus find, gsub, and char; learn indexing from 1 and negative indices and string immutability.
Lua tables serve as the language's primary data structuring mechanism, using key-value pairs as associative arrays; create tables with constructors, assign keys, and observe reference behavior and garbage collection.
Explore how Lua uses tables to represent lists and sequences, with 1-based indices, length checks, and handling holes and nil values for reliable list operations.
Explore the simple Lua i/o model by reading from the default input or a file handle, writing to the output stream, and using explicit file handles with various read modes.
Explain how the Lua while loop repeats a code block while the condition is true, using do-end syntax, with an example that prints table values and increments an index.
Learn how lua's repeat-until loop executes the body at least once and repeats until the condition becomes true, with local variable scope inside the loop and a practical example.
Learn how the numeric for loop in Lua initializes the control variable, evaluates start and end values, applies an optional step, and demonstrates loop-local scope.
Explore closures and lexical scoping in Lua, showing how inner functions access non-local variables and retain state after their outer function returns, with separate counters demonstrating independent closures.
Explore Lua pattern matching, including string patterns, pattern parameters, and escapes; master character classes, magic characters, and repetition for text extraction.
Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode with a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.
Topics covered in the course are:
Introduction to Lua
IDE and installation
Basic Language Constructs
Numbers
Strings
Tables
Functions
Input/Output
Blocks and Loops
Closures
Pattern Matching
Date and Time
Bitwise Operations
Data Structures in Lua - Arrays, Matrices, Linked Lists, Queues
Modules and Packages
Iterators and generic for
Metatables and Metamethods
Object Oriented Programming
The Environment
Garbage
Coroutines
C API
So, let's dive into the course