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 $4750
Request
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 $4750
Request quote
Private Remote Private Remote
The instructor and the participants are in two different physical locations and communicate via the Internet
From $3450
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 $4750 $4750 $3450
2 $2750 $2700 $2050
3 $2083 $2017 $1583
4 $1750 $1675 $1350
Cannot find a suitable date? Choose Your Course Date >>
Too expensive? Suggest your price

Related Categories


Course Discounts

Course Venue Course Date Course Price [Remote/Classroom]
Test Automation with Selenium TX, Austin - Littlefield Congress Tue, Aug 23 2016, 9:30 am $3480 / $5705

Upcoming Courses

VenueCourse DateCourse Price [Remote/Classroom]
New York (NYC) - Midtown Manhattan - Park Avenue & E48-49th (Grand Central)Wed, Jun 15 2016, 9:30 am$3450 / N/A
Atlanta, GA - Midtown (Colony Square)Wed, Jun 15 2016, 9:30 am$3450 / N/A
CA, Sacramento - Promenade CircleWed, Jun 15 2016, 9:30 am$3450 / N/A
DC, Washington – 2200 PennsylvaniaWed, Jun 15 2016, 9:30 am$3450 / N/A
Edison, NJWed, Jun 15 2016, 9:30 am$3450 / N/A

Some of our clients