Lua
Lightweight scripting
100% free · no signup to
read 8 chapters Programming language
Created
1993 by Roberto Ierusalimschy
Type
Lightweight, embeddable, scripting
Speed
One of the fastest scripting languages
Used in
Roblox, World of Warcraft, Redis, Nginx
Key feature
Tables (arrays + dictionaries in one)
Embeddable
Yes — embed in C/C++ applications
File extension
.lua
Best for
Game scripting, embedded systems, config
What is Lua?
Lua is a lightweight, fast scripting language designed for embedding. It's used in Roblox, World of Warcraft, Redis, Nginx, and countless game engines.
Why Lua?
Lua is extremely fast for a scripting language, tiny (the interpreter is ~300KB), and easy to embed in C/C++ applications. It's the go-to language for game scripting.
| Feature | Lua | Python | JavaScript |
|---|---|---|---|
| Speed | Very fast | Slow | Fast (V8) |
| Size | Tiny (~300KB) | Large | Medium |
| Embeddable | Excellent | Poor | Poor |
| 1-indexed | Yes (arrays start at 1) | No (0-indexed) | No (0-indexed) |
| Best for | Game scripting, embedded | Data science, AI | Web apps |
What you'll learn
| Chapter | What you'll know |
|---|---|
| Introduction | What Lua is, how to run it |
| Syntax | Variables, tables, control flow |
| Functions | Closures, OOP with metatables |
| Games | Roblox/Love2D patterns |
Start with introduction.