LLMpediaThe first transparent, open encyclopedia generated by LLMs

Lua

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: MySQL Workbench Hop 4
Expansion Funnel Raw 75 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted75
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
Lua
NameLua
ParadigmsProcedural programming, Object-oriented programming, Functional programming, Data-driven programming
DesignerRoberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
DeveloperPontifical Catholic University of Rio de Janeiro, PUC-Rio
First appeared1993
TypingDynamic typing
ImplementationsLuaJIT, Puc-Rio Lua, Luau (Roblox)
Influenced byC programming language, Scheme (programming language), Modula, SNOBOL
InfluencedJavaScript, Python, AngelScript
LicenseMIT License

Lua Lua is a lightweight, embeddable scripting language created for extensibility, portability, and ease of integration with applications. Developed at a Brazilian research university, Lua emphasizes a small core with powerful metaprogramming and interoperable C APIs, making it popular across games, embedded systems, and scientific tools. The language's runtime and tooling are maintained by teams and communities associated with academic and commercial organizations.

Overview

Lua's design centers on a compact interpreter and a small standard library that provide building blocks rather than high-level abstractions. The language offers Dynamic typing, first-class functions, and tables that combine array and Hash table semantics to represent records, objects, and modules. Implementations prioritize portability to platforms such as Windows, Linux, macOS, iOS, and Android, and to constrained environments found in Embedded systems and console platforms developed by companies like Sony and Microsoft. Lua's reference implementation is often distributed by an academic group affiliated with Pontifical Catholic University of Rio de Janeiro.

History and Development

Lua originated in 1993 as a scripting solution for configuration and data-description tasks at a Brazilian laboratory associated with PUC-Rio. Founders Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes built the language to address needs from software vendors and researchers working with CORBA-style systems and international software products. Throughout the 1990s and 2000s, releases added features such as the virtual machine, garbage collection improvements, and the metatable/metamethod system; major versions aligned with work by the authors and collaborators at academic conferences and workshops attended by committees and standards bodies. Parallel commercial and open-source efforts, including LuaJIT and platform-specific forks, expanded Lua's reach into game engines produced by companies like Valve Corporation and Epic Games and into scripting layers of embedded vendors collaborating at industry events.

Language Design and Features

The core data structure, tables, supports associative arrays and implements objects via prototypes or delegation patterns familiar from Self (programming language) and JavaScript prototypes. First-class functions and closures enable functional-style programming related to constructs from Scheme (programming language) and ML (programming language family). Metatables and metamethods provide customizable operator behavior akin to C++ operator overloading and reflective hooks used in languages such as Ruby. Coroutines implement cooperative multitasking resembling lightweight thread constructs found in Go (programming language) and older coroutine systems used in LuaJIT discussions and papers. The C API permits embedding and extension in host applications; this interoperability model has inspired designs in scripting-behavior layers for engines developed by studios like Blizzard Entertainment and Riot Games.

Implementation and Ports

The PUC-Rio reference implementation compiles with ANSI C and runs on architectures supported by GCC, Clang, and Microsoft Visual C++. High-performance variants include LuaJIT, which integrates a tracing just-in-time compiler used extensively in projects by Cloudflare and in game engine toolchains. Forks and derivatives such as Luau (Roblox) adapt semantics and tooling for large-scale platforms like Roblox Corporation. Ports target consoles and embedded RTOS products provided by vendors including NVIDIA for GPU-accelerated platforms and vendors in the Internet of Things ecosystem. Implementers maintain bindings to ecosystems such as .NET Framework, Java (programming language), and Node.js through bridging libraries and foreign-function interfaces.

Standard Libraries and Modules

The minimal standard libraries contain modules for string manipulation, table operations, basic I/O, pattern matching influenced by SNOBOL-style patterns, and mathematical routines similar to those in C math library. Extensions and libraries maintained by the community provide modules for JSON handling used in web backends hosted on Amazon Web Services instances, HTTP client libraries employed in integrations with GitHub and GitLab, database drivers connecting to SQLite, PostgreSQL, and MySQL, and bindings for graphics and audio APIs exposed by OpenGL and OpenAL. Package managers and ecosystems such as LuaRocks host libraries for serialization, testing frameworks used in CI pipelines on services like Travis CI and GitHub Actions, and bindings to systems like ZeroMQ and Redis.

Use Cases and Applications

Lua is embedded as a scripting layer in major game engines and titles produced by companies such as Electronic Arts and Ubisoft, used for gameplay logic, UI scripting, and modding systems. It appears in networking devices and appliances from vendors in the telecommunications industry and in automation frameworks for industrial control products. Scientific visualization and data analysis tools developed by research teams at institutions like CERN and university labs sometimes use Lua for glue code and configuration. Large platforms adapt Lua derivatives for sandboxed scripting in social and user-generated-content systems operated by companies including Roblox Corporation and Wattpad.

Community and Ecosystem

A vibrant ecosystem of contributors includes academic authors, independent developers, and corporate engineering teams. Conferences, mailing lists, and repositories hosted on platforms like GitHub and community hubs linked to universities foster development, while package indices and documentation projects maintained by volunteers and organizations such as LuaRocks and faculty at PUC-Rio provide curated modules. Commercial support and consultancy are offered by firms specializing in game development and embedded software; collaborative efforts tie Lua integrations into continuous delivery pipelines used by enterprises leveraging Docker and orchestration with Kubernetes.

Category:Programming languages