Language

Lua

First appeared
1993
Paradigm
Imperative, scripting, multi-paradigm
Toolchain
Lua 5.4.7
Container image
debian:trixie-20261027-slim + lua5.4 5.4.7-1+b2

Lua (Portuguese for “moon”) was created in 1993 at the Pontifical Catholic University of Rio de Janeiro by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. It was built to be embedded in larger programs, and it’s small and fast enough that it now runs inside game engines, Roblox, the Neovim editor, and network tools.

Lua has one data structure, the table. The same table type serves as an array, a dictionary, a record, and an object, depending on which keys you use. Arrays are tables whose keys are 1, 2, 3, and so on, and #t gives their length. The standard library is small: string patterns, table.sort, math, and file input and output. There’s no split, no round, and no CSV reader, and modules from LuaRocks, Lua’s package manager, aren’t installed here.

Quirks

Concepts in Lua

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every Lua example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language lua