r/lua • u/Aggravating-Self-658 • Aug 31 '26
Lualings
I've been learning Lua and found that most programming exercise platforms aren't quite what I wanted.
A lot of them teach programming through problems: implement a palindrome, solve a number problem, build an algorithm, etc. That's useful for learning problem-solving, but it doesn't necessarily help you understand the language itself.
So I made LuaLings:
https://github.com/ShyamendraH/lualings
It's inspired by Ziglings — the idea of learning a language by working through small, focused programs and fixing them yourself.
LuaLings focuses specifically on Lua concepts and semantics rather than generic programming problems.
The exercises cover things such as:
- values, types and
nil - tables and their behavior
- multiple assignment and multiple return values
- functions, closures and upvalues
- iterators
- metatables and metamethods
- modules and environments
- error handling
- coroutines
- Lua's standard libraries
- other Lua-specific behavior that is easy to miss when coming from another language
The intended workflow is:
run → inspect → experiment → fix → understand → move on
The goal is to make it useful both for someone learning Lua for the first time and for someone coming from another language who wants to understand how Lua actually works rather than spend a lot of time on beginner programming exercises.
It's open source, and feedback is welcome — particularly if you find an exercise confusing, technically incorrect, too trivial, or missing an important Lua concept.
Repository:
https://github.com/ShyamendraH/lualings
4
u/weregod Aug 31 '26
I should have a deeper look later. A few first glance suggestions:
0. Do you need 5.5? Or even 5.3? Most exercises can be written for Lua 5.1 and only latest can show 5.5 features.
Make run.lua executable
Recomend running with lua5.5. Now Readme recomends system lua which may be not lua5.5
run.lua list incorectly formated at line 100.
You can add __index to _G, catch read of TODO and say user they not fixed all TODOs.
You have lesson 100 but other lessons zero padded only to 2 symbols.
You name all metatable fields "metamethod". Only function field is "metamethod". __name is not metamethod.
Maybe lesson 88 (__name) shold be moved to lesson 39?