Lua
Learn Lua by typing small, idiomatic code.
Practice Lua's minimal design by typing it: tables as the one data structure, metatables for OOP and operator overloading, closures, and coroutines for cooperative multitasking. Each snippet is idiomatic Lua, and an AI tutor explains every line — how a metatable's __index drives inheritance, why closures capture upvalues — so the whole language fits in your head as your typing speeds up.
Progress0 / 345 solved · 0/34 sections
best wpm
0
avg wpm
0
accuracy
0%
runs
0
level
1
rating
1000
Run Lua on your machine
1. Install the toolchain
brew install lua # or: sudo apt install lua5.42. Save your code as hello.lua, then compile & run
lua hello.luaprogress by section
1Fundamentals0/14start →
2Strings In Depth0/14start →
3Values & References0/10start →
4Slices & Arrays0/10Unlock →
5Data structures0/12Unlock →
6Iterators0/12Unlock →
7Closures0/13Unlock →
8Pattern Matching0/12Unlock →
9Error Handling0/12Unlock →
10Conversions0/10Unlock →
11Math0/14Unlock →
12Text Processing0/14Unlock →
13Date & Time0/10Unlock →
14Modules0/10Unlock →
15Algorithms0/10Unlock →
16Sorting Algorithms0/10Unlock →
17Expression Parsing0/6Unlock →
18OOP & Traits0/12Unlock →
19Design Patterns0/14Unlock →
20Metatables0/14Unlock →
21Coroutines0/12Unlock →
22File I/O0/8Unlock →
23Filesystem0/8Unlock →
24Commands0/8Unlock →
25Array0/10Unlock →
27String0/10Unlock →
29Interval0/5Unlock →
30Linked List0/6Unlock →
31Tree0/14Unlock →
Maximum Depth of Binary TreeInvert Binary TreeSame TreeLowest Common Ancestor of a BSTBinary Tree Level Order TraversalSubtree of Another TreeImplement Trie (Prefix Tree)Kth Smallest Element in a BSTValidate Binary Search TreeAdd and Search WordConstruct Binary Tree from Preorder and InorderBinary Tree Maximum Path SumSerialize and Deserialize Binary TreeWord Search II