Learn Lua in Y Minutes
I started with BlackBulletIV's Lua for programmers. Next I read the official Programming in Lua book. That's the how. It might be helpful to check out the Lua short reference on lua-users.org. The main topics not covered are standard libraries: By the way, the entire file is valid Lua; save it as learn.lua and run it with "lua learn.lua" ! This was first written for tylerneylon.com, and is also available as a GitHub gist. Have fun with Lua! Got a suggestion? A correction, perhaps? Open an Issue on the GitHub Repo, or make a pull request yourself! Originally contributed by Tyler Neylon, and updated by 9 contributors. © 2025 Tyler Neylon
Learn Lua in Y Minutes Learn X in Y minutes Where X=Lua Language: English Deutsch español français italiano 한국어 português (Brasil) русский 中文 (简体) Get the code: learnlua.lua -- Two dashes start a one-line comment. --[[ Adding two ['s and ]'s makes it a multi-line comment. --]] ---------------------------------------------------- -- 1. Variables and flow control. ---------------------------------------------------- num = 42 -- Numbers can be integer or floating point. s = 'walternate' -- Immutable strings like Python. t = "double-quotes are also fine" u = [[ Double brackets start and end multi-
saved by
related reading
- Full Lua Programming Crash Course - Beginner to Advancedyoutube.com
- Programming in Lua (first edition)lua.org
- Learn X in Y Minutes: Scenic Programming Language Tourslearnxinyminutes.com
- A half-hour to learn Rustfasterthanli.me
- how I think when I think about programming - alice mazalicemaz.com
- Teach Yourself Programming in Ten Yearsnorvig.com
- Get better at programming by learning how things workjvns.ca
- Lua can be a really cool HTML templating engine · riki's houseriki.house
- GitHub - jlevy/the-art-of-command-line: Master the command line, in one pagegithub.com
- styleguide | Style guides for Google-originated open-source projectsgoogle.github.io
- Write your Own Virtual Machinejmeiners.com
- A Lean Syntax Primer — overreactedoverreacted.io