Lua Embedding Training Course

Primary tabs

Course Language

This course is delivered in English.

Course Code

luaemb

Duration Duration

14 hours (usually 2 days including breaks)

Requirements Requirements

A good understanding of the basics of the Lua programming language

Overview Overview

This Lua course teaches how to interact with Lua from C (and/or other programming languages).

We discuss integration in both directions: how to embed C code in Lua (eg. for performance gains), and how to make a C/C++/Java program extensible with Lua.

As an in-class exercise we create a small program that is extensible with Lua.

The course also tackles the Lua virtual machine and teaches how to understand the bytecode underpinning the language.

This course can serve an add-on to the Lua Fundamentals or Lua Advanced courses in which case a shorter (1 day) version can be organized.

Course Outline Course Outline

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 $6150
(118)
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 $6150
Request quote
Private Remote Private Remote
The instructor and the participants are in two different physical locations and communicate via the Internet
From $3850
Request quote
SelfStudy SelfStudy
Self-study courses allow you to learn at your own pace on your own time. There is no live instructor involved. The participants use recorded video, quizzes and reading at their own convenience.
Price not set yet
Register Interest

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 $6150 $6150 $3850
2 $3495 $3420 $2270
3 $2610 $2510 $1743
4 $2168 $2055 $1480
Cannot find a suitable date? Choose Your Course Date >>
Too expensive? Suggest your price

Related Categories


Course Discounts

Upcoming Courses

VenueCourse DateCourse Price [Remote/Classroom]
QC, Montreal - University StreetMon, Jul 11 2016, 9:30 am$3850 / $6850
ON, Oakville - Glen AbbeyTue, Jul 12 2016, 9:30 am$3850 / $6210
BC, Vancouver - World Trade CenterWed, Jul 13 2016, 9:30 am$3850 / $6250
ON, Toronto - University & DundasThu, Jul 14 2016, 9:30 am$3850 / $6551
BC, Victoria - The AtriumMon, Jul 18 2016, 9:30 am$3850 / $6550

Some of our clients