
Discover the Lua programming language, an open-source language built on C, across platforms from systems to mobile apps, with a self-contained course for beginners and advanced learners.
Lua is a lightweight, extensible language designed for seamless integration with C, offering automatic memory management, efficient string handling, and portability across devices for game and scripting tasks.
Explore Lua variables, including global and local scope, declaration and initialization, l-values and r-values, and multiple assignments with expressions and numeric literals.
Explore Lua datatypes and the shift from dynamic typing to value types. See how booleans, numbers, strings, and nil determine conditions, with the type function revealing each value's type.
Discover Lua operators across arithmetic, relational, logical, unary, and miscellaneous categories, including +, -, *, /, %, ^, and the length operator #, with emphasis on operator precedence in expressions.
Explore hands-on Lua operators, including arithmetic, assignment, relational, logical, exponentiation, and the length operator, with examples of strings, conditionals, and print outputs.
Loops in Lua demonstrate executing a block of code multiple times based on a condition, using the general loop form and nesting concepts.
Learn how a while loop repeats a statement while a condition is true (non-zero). See the body may be a single statement or a block, and control exits after loop.
The lecture explains the for loop as a production control structure that executes a set number of times, covering initialization, max/min values, increment/decrement, and condition checks, with a hands-on example.
Explore Lua's repeat until loop, where the body executes at least once and the condition is tested at the end, causing the loop to repeat until the condition becomes true.
Discover how the break statement terminates a loop and transfers control after the loop, using a condition that stops at a value between 10 and 15.
Master decision making statements in Lua by specifying conditions and actions for true and false outcomes, including the three types of if statements and truthiness rules.
Explore how the if statement uses a boolean expression to decide whether to execute a block of code, distinguishing true and false outcomes with a practical hands-on example.
Master the if-else statement in Lua by exploring boolean expressions, true and false outcomes, and if blocks versus else blocks, including else-if chains with hands-on examples.
Master nested if statements that test boolean expressions and execute code when conditions hold. See a hands-on example using values such as 100 and 200.
Learn to define and call functions in Lua, with arguments, return values, and local versus global scope, illustrated by a max function example.
Learn how Lua handles strings, including single-quoted, double-quoted, and long bracket literals, and use escape sequences to represent special characters.
The lecture introduces Lua string manipulation functions, covering uppercase and lowercase conversion, substring replacement, finding indices, reversing strings, and repeating strings in practical examples.
Understand Lua arrays by building one- and multi-dimensional tables, initialize them, and access elements with for loops, including nonstandard indices like zero and negative values.
Explore how tables serve as Lua's core data structure, acting as arrays and dictionaries, supporting numeric and string indexing, dynamic growth, and reference semantics, with garbage collection managing memory.
Explore Lua table manipulation using inverse and get functions, removing elements, finding the maximum numeric index, and sorting the table alphabetically, illustrated with fruit examples.
Learn how Lua modules work, load a module with require, and use a sample math module with add, subtract, multiply, and divide functions.
Learn how metatables modify a Lua table's behavior, using setmetatable and getmetatable to control access and updates, including __index for looking up missing keys and __newindex for updates.
Explore the rawset function in Lua, showing how it updates an existing key or creates a new one in the main table, with examples combining two tables.
Explore coroutines in Lua, creating new coroutines, pausing and resuming execution with resume, tracking states such as normal, suspended, and dead, and passing values between resumed calls.
Explore practical Lua coroutine examples that show how resume and function calls control execution flow, using local functions and conditional logic to illustrate coroutine behavior.
Learn file handling in Lua, exploring implicit and explicit file descriptors, opening files in read, write, append, and create modes, reading lines, and proper closing.
Learn to implement robust error handling to catch syntax errors and input mistakes, display meaningful error messages, and protect function calls so unexpected conditions don’t disrupt users.
Explore Lua's automatic memory management and garbage collection, reclaiming objects no longer accessible while monitoring memory usage and collector behavior.
Discover object oriented programming in Lua by defining a class, creating objects, and accessing properties and member functions, while learning inheritance and abstraction.
Lua is an open source language built on top of C programming language. Lua has its value across multiple platforms ranging from large server systems to small mobile applications. This course covers various topics ranging from the basics of Lua to its scope in various applications. This course is designed for all those readers who are looking for a starting point to learn Lua. It has topics suitable for both beginners as well as advanced users. It is a self-contained course and you should be able to grasp the concepts easily even if you are a total beginner. However it would help if you have a basic understanding of working with a simple text editor and command line.