Lua Embedding Training Course

Primary tabs

Course Language

This course is delivered in French or 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 3350EUR
(94)
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 3350EUR
Request quote
Private Remote Private Remote
The instructor and the participants are in two different physical locations and communicate via the Internet
From 2850EUR
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 3350EUR 3350EUR 2850EUR
2 2065EUR 2015EUR 1765EUR
3 1637EUR 1570EUR 1403EUR
4 1423EUR 1348EUR 1223EUR
Cannot find a suitable date? Choose Your Course Date >>
Too expensive? Suggest your price

Related Categories


Upcoming Courses

VenueCourse DateCourse Price [Remote/Classroom]
Rennes, Place St AnneTue, 2016-08-16 09:302850EUR / 3350EUR
Montpellier, GarosudWed, 2016-08-17 09:302850EUR / 3350EUR
Thu, 2016-08-18 09:302850EUR / 4350EUR
Lyon, Swisslife TowerMon, 2016-08-22 09:302850EUR / 3350EUR
Grenoble, City Center near the main Train StationWed, 2016-08-24 09:302850EUR / 3350EUR

Some of our clients