langwhy

Lua

Scripting· alive, actively evolving· since 1994 · Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes · PUC-Rio, Rio de Janeiro

Embeddable scripting language for adding logic and configuration to a host program.

Draft from 2026-10-30, not yet checked claim by claim against its sources. Help verify it.

Born from

In 1992 Petrobras, the Brazilian oil company, asked Tecgraf, the graphics lab at PUC-Rio, for data-entry front-ends for its engineers, and by 1993 Tecgraf had two small languages, DEL and SOL, for the job. DEL grew heavier each time users asked for conditionals and loops, and Brazil's market reserve, in force from 1977 to 1992, made buying customized software from abroad hard, so Tecgraf built its own tools and merged the two into one embeddable language.

What it trades away

garbage collectedmemory
dynamic typestypes
runs on a virtual machineruns as
green threadsconcurrency

Cost: Small by design: the official distribution ships few libraries, so the host program supplies most tools, and until Lua 5.0 the garbage collector could pause the program for long stretches.

Where it fits

SlotFit
embedded●●●
games●●●
config●●●Neovim reads its configuration from init.lua.
scripts●○○
browser○○○

Why it exists

In 1992 Petrobras, the Brazilian oil company, asked Tecgraf, the computer graphics group at PUC-Rio, for graphical data-entry front-ends for its engineers. Tecgraf answered with two small languages, DEL for data entry and SOL for configurable reports. DEL grew heavier each time users asked for conditionals and loops (Lua HOPL paper). Brazil’s market reserve, in force from 1977 to 1992, made buying customized software from abroad slow, so Tecgraf built its own tools. Around mid-1993 Roberto Ierusalimschy, Luiz Henrique de Figueiredo and Waldemar Celes decided that a single, broader language could replace both, and Lua was born (Lua HOPL paper). Because other Tecgraf products would need to embed a scripting language too, the new one was to be a library with a C API (Lua HOPL paper).

What it trades away

Lua stays small on purpose. Its official distribution ships only a few libraries, because it is built to be embedded in a host application that supplies the rest of the tools (Lua HOPL paper). Values are dynamically typed, so type mistakes surface at run time. Until Lua 5.0 the garbage collector ran in one atomic step and could pause a program for a long time (Lua HOPL paper). Coroutines are cooperative: the authors chose non-preemptive, collaborative multithreading over shared-memory threads, so a coroutine that never yields holds up everything else in its thread (Lua HOPL paper).

Where it won

Lua’s wins are mostly inside other products. The 2007 history paper reports that over 40 percent of Adobe Lightroom was written in Lua, about 100,000 lines (Lua HOPL paper). Roblox’s Luau is derived from Lua 5.1 and is the scripting language creators use in Roblox Studio (Roblox). Redis runs Lua 5.1 scripts inside the server, atomically (Redis). Neovim reads its configuration from init.lua (Neovim), and Wireshark lets users write dissectors in Lua (Wireshark).

Named wins

Evolution

Reacts to: scheme, modula

Weigh it against: JavaScript, Python, tcl, scheme

Timeline

Links

website · repo · wikipedia · docs · PLDB

Sources

  1. https://www.lua.org/doc/hopl.pdf
  2. https://www.lua.org/history.html
  3. https://www.lua.org/versions.html
  4. https://create.roblox.com/docs/scripting/luau
  5. https://redis.io/docs/latest/develop/programmability/eval-intro/
  6. https://neovim.io/doc/user/lua-guide/
  7. https://wiki.wireshark.org/Lua
  8. https://en.wikipedia.org/wiki/Lua_(programming_language)

Unverified draft, 2026-10-30.Edit the facts · edit the story · JSON · Markdown