Comprehensive Lua Training Course

Primary tabs

Course Language

This course is delivered in Polish or English.

Course Code

luacomp

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

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

Guaranteed to run even with a single delegate!
Public Classroom Public Classroom
Participants from multiple organisations. Topics usually cannot be customised
From 5194PLN
(74)
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.
From 5194PLN
Request quote
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 Classroom Private Remote
1 5194PLN 5194PLN 15160PLN
2 4252PLN 4252PLN 9235PLN
3 3938PLN 3938PLN 7260PLN
4 3781PLN 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]
Oracle 11g - Programming with PL / SQL II Wroclaw, ul.Ludwika Rydygiera 2a/22 Mon, 2016-09-26 09:00 2363PLN / 1785PLN
BPMN 2.0 for Business Analysts Wroclaw, ul.Ludwika Rydygiera 2a/22 Tue, 2016-09-27 09:00 3110PLN / 2337PLN
R Warszawa, ul. Złota 3/11 Wed, 2016-09-28 09:00 7588PLN / 4850PLN
Administracja serwerem Apache Tomcat Kraków, ul. Rzemieślnicza 1 Mon, 2016-10-03 09:00 2344PLN / 1736PLN
Visual Basic for Applications (VBA) in Excel - Introduction to programming Warszawa, ul. Złota 3/11 Tue, 2016-10-04 09:00 1941PLN / 1504PLN
Programming in Scala Poznan, Garbary 100/63 Tue, 2016-10-04 09:00 3479PLN / 2114PLN
Web Application Development in PHP Szczecin, ul. Małopolska 23 Tue, 2016-10-04 09:00 2688PLN / 2081PLN
Introduction to Linux Poznan, Garbary 100/63 Tue, 2016-10-04 09:00 1640PLN / 1100PLN
Docker for Developers and System Administrators Gdańsk, ul. Powstańców Warszawskich 45 Wed, 2016-10-05 09:00 2682PLN / 2016PLN
Adobe InDesign Lublin, ul. Spadochroniarzy 9 Wed, 2016-10-05 09:00 1220PLN / 1144PLN
ITIL® Foundation Certificate in IT Service Management Warszawa, ul. Złota 3/11 Mon, 2016-10-10 09:00 2639PLN / 2076PLN
Visual Basic for Applications (VBA) in Excel - Advanced Wroclaw, ul.Ludwika Rydygiera 2a/22 Mon, 2016-10-10 09:00 1689PLN / 1296PLN
Market Forecasting Poznan, Garbary 100/63 Thu, 2016-10-13 09:00 2936PLN / 2112PLN
ITIL® Foundation Certificate in IT Service Management Łódź, ul. Tatrzańska 11 Mon, 2016-10-17 09:00 2639PLN / 2160PLN
Effective working with spreadsheet in Excel Rzeszów, Plac Wolności 13 Tue, 2016-10-18 09:00 598PLN / 737PLN
ITIL® Foundation Certificate in IT Service Management Szczecin, ul. Małopolska 23 Wed, 2016-10-19 09:00 2639PLN / 2134PLN
Market Forecasting Warszawa, ul. Złota 3/11 Wed, 2016-10-19 09:00 2936PLN / 2112PLN
A Practical Guide to Successful Pricing Strategies Poznan, Garbary 100/63 Wed, 2016-10-26 09:00 1427PLN / 1093PLN
Creating and delivering presentations in Power Point (social skills workshop) Poznan, Garbary 100/63 Thu, 2016-10-27 09:00 1572PLN / 1121PLN
Agile Project Management with Scrum Kraków, ul. Rzemieślnicza 1 Wed, 2016-11-02 09:00 1746PLN / 1449PLN
Agile Project Management with Scrum Poznan, Garbary 100/63 Mon, 2016-11-07 09:00 1746PLN / 1315PLN
Administration of Linux System Olsztyn, ul. Kajki 3/1 Tue, 2016-11-08 09:00 1940PLN / 1509PLN
SQL Fundamentals Warszawa, ul. Złota 3/11 Wed, 2016-11-09 09:00 1358PLN / 853PLN
Excel For Statistical Data Analysis Warszawa, ul. Złota 3/11 Mon, 2016-11-14 09:00 1343PLN / 1031PLN
Visual Basic for Applications (VBA) in Excel - Advanced Białystok, ul. Malmeda 1 Mon, 2016-11-14 09:00 1689PLN / 1413PLN
Python Programming Szczecin, ul. Małopolska 23 Tue, 2016-11-15 09:00 5790PLN / 3824PLN
Creating and managing Web sites Kraków, ul. Rzemieślnicza 1 Mon, 2016-11-21 09:00 3410PLN / 2836PLN
Graphic techniques (Adobe Photoshop, Adobe Illustrator) Wroclaw, ul.Ludwika Rydygiera 2a/22 Tue, 2016-12-06 09:00 1963PLN / 1470PLN

Upcoming Courses

VenueCourse DateCourse Price [Remote/Classroom]
Bielsko-Biała, Al. Armii Krajowej 220Mon, 2016-10-10 09:006273PLN / 3955PLN
Warszawa, ul. Złota 3/11Mon, 2016-10-10 09:006273PLN / 3814PLN
Kraków, ul. Rzemieślnicza 1Mon, 2016-10-10 09:006273PLN / 3996PLN
Poznan, Garbary 100/63Wed, 2016-10-12 09:006273PLN / 3814PLN
Katowice ul. Opolska 22Wed, 2016-10-12 09:006273PLN / 3955PLN

Some of our clients