Comprehensive Lua Training Course

Primary tabs

Course Language

This course is delivered in Polish or English.

Course Code


Duration Duration

21 hours (usually 3 days including breaks)

Requirements Requirements

Familiarity with at least one other programming language. Programming experience. Optionally if you have familiarity with other scripting languages, that will make it easier to understand Lua.

Overview Overview

Lua is an easy to use scripting language that is used as an embedded plugin/extension language in different products. For example it is the embedded scripting language of network applications like nmap and wireshark, and can also be found as a scripting language in World of Warcraft, Orbiter and other games.

Lua can also be used as a standalone language. It is a lightweight, multi-paradigm programming language and therefore the course teaches various concepts that students will find useful in other areas of software engineering as well.

This course covers everything out there to know about Lua. We build up from the basic programming constructs, learn about advanced techniques and finally talk about embedding of Lua into other programming languages and embedding other programming languages into Lua. The course contains a lot of programming exercises, so that newcomers can gain proficiency with the language, starting from scratch.

Course Outline Course Outline

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


  • 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
  • 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

Guaranteed to run even with a single delegate!
Public Classroom Public Classroom
Participants from multiple organisations. Topics usually cannot be customised
From 5194PLN
Private Classroom Private Classroom
Participants are from one organisation only. No external participants are allowed. Usually customised to a specific group, course topics are agreed between the client and the trainer.
Private Remote Private Remote
The instructor and the participants are in two different physical locations and communicate via the Internet
From 15160PLN
Request quote

The more delegates, the greater the savings per delegate. Table reflects price per delegate and is used for illustration purposes only, actual prices may differ.

Number of Delegates Public Classroom Private Remote
1 5194PLN 15160PLN
2 4252PLN 9235PLN
3 3938PLN 7260PLN
4 3781PLN 6273PLN
Cannot find a suitable date? Choose Your Course Date >>
Too expensive? Suggest your price

Related Categories

Lua Training

Course Discounts

Course Venue Course Date Course Price [Remote/Classroom]
Building Web Apps using the MEAN stack Kraków, ul. Rzemieślnicza 1 Mon, 2016-10-24 09:00 14652PLN / 6440PLN
ITIL® Foundation Certificate in IT Service Management Zielona Góra, ul. Reja 6 Mon, 2016-10-24 09:00 4554PLN / 2320PLN
Apache Tomcat and Java EE Administration Warszawa, ul. Złota 3/11 Mon, 2016-10-24 09:00 5178PLN / 1894PLN
Market Forecasting Kraków, ul. Rzemieślnicza 1 Tue, 2016-10-25 09:00 5742PLN / 2714PLN
A Practical Guide to Successful Pricing Strategies Poznan, Garbary 100/63 Wed, 2016-10-26 09:00 3366PLN / 1883PLN
Design Patterns in C# Bielsko-Biała, Al. Armii Krajowej 220 Wed, 2016-10-26 09:00 3861PLN / 2130PLN
Creating and delivering presentations in Power Point (social skills workshop) Poznan, Garbary 100/63 Thu, 2016-10-27 09:00 3346PLN / 1414PLN
Agile Project Management with Scrum Kraków, ul. Rzemieślnicza 1 Wed, 2016-11-02 09:00 3386PLN / 1929PLN
Understanding Windows Communication Foundation (WCF) Szczecin, ul. Małopolska 23 Wed, 2016-11-02 09:00 10266PLN / 3611PLN
Python Programming Szczecin, ul. Małopolska 23 Mon, 2016-11-07 09:00 N/A / 5434PLN
Agile Project Management with Scrum Poznan, Garbary 100/63 Mon, 2016-11-07 09:00 3386PLN / 1529PLN
Business Analysis, BABOK V3.0 and IIBA Certification Preparation Katowice ul. Opolska 22 Mon, 2016-11-07 09:00 9405PLN / 5753PLN
Adobe InDesign Lublin, ul. Spadochroniarzy 9 Mon, 2016-11-07 09:00 1881PLN / 1327PLN
Administration of Linux System Olsztyn, ul. Kajki 3/1 Tue, 2016-11-08 09:00 3861PLN / 1920PLN
SQL Fundamentals Warszawa, ul. Złota 3/11 Wed, 2016-11-09 09:00 3663PLN / 1510PLN
Adobe Illustrator Katowice ul. Opolska 22 Wed, 2016-11-09 09:00 2871PLN / 1848PLN
Excel For Statistical Data Analysis Warszawa, ul. Złota 3/11 Mon, 2016-11-14 09:00 2673PLN / 1291PLN
Visual Basic for Applications (VBA) in Excel - Advanced Białystok, ul. Malmeda 1 Mon, 2016-11-14 09:00 3455PLN / 2202PLN
Social Media - facebook, twitter, blog, youtube, google+ Gdynia, ul. Ejsmonda 2 Mon, 2016-11-14 09:00 1881PLN / 1102PLN
Apache Web Server Administration Kraków, ul. Rzemieślnicza 1 Tue, 2016-11-15 09:00 4732PLN / 3177PLN
SQL in MySQL Gdynia, ul. Ejsmonda 2 Thu, 2016-11-17 09:00 2851PLN / 1413PLN
OCUP2 UML 2.5 Certification - Intermediate Exam Preparation Wroclaw, ul.Ludwika Rydygiera 2a/22 Thu, 2016-11-17 09:00 5148PLN / 2175PLN
Creating and managing Web sites Kraków, ul. Rzemieślnicza 1 Mon, 2016-11-21 09:00 5841PLN / 3298PLN
Angular JavaScript Katowice ul. Opolska 22 Mon, 2016-11-21 09:00 5940PLN / 3380PLN
Agile w projektach zdalnych Katowice ul. Opolska 22 Tue, 2016-11-22 09:00 5049PLN / 1962PLN
Effective working with spreadsheet in Excel Rzeszów, Plac Wolności 13 Thu, 2016-11-24 09:00 PLN / 767PLN
Test Automation with Selenium Gdańsk, ul. Powstańców Warszawskich 45 Tue, 2016-12-06 09:00 7722PLN / 3624PLN
Graphic techniques (Adobe Photoshop, Adobe Illustrator) Wroclaw, ul.Ludwika Rydygiera 2a/22 Tue, 2016-12-06 09:00 4851PLN / 2740PLN
Docker and Kubernetes Gdańsk, ul. Powstańców Warszawskich 45 Wed, 2016-12-07 09:00 N/A / 4989PLN

Upcoming Courses

VenueCourse DateCourse Price [Remote/Classroom]
Tarnów ul. Kościuszki 10 Mon, 2016-11-07 09:0015160PLN / 5644PLN
Łódź, ul. Tatrzańska 11Tue, 2016-11-08 09:0015160PLN / 5494PLN
Gdynia, ul. Ejsmonda 2Tue, 2016-11-15 09:0015160PLN / 5644PLN
Białystok, ul. Malmeda 1Tue, 2016-11-15 09:0015160PLN / 5644PLN
Zielona Góra, ul. Reja 6Tue, 2016-11-15 09:0015160PLN / 5344PLN

Some of our clients