Ask HN: Best book (or other media) to learn lua from?

4 points by Sturmrufer ↗ HN
What it says on the tin.

5 comments

[ 4.5 ms ] story [ 22.4 ms ] thread
I learned Lua by reading "Programming In Lua" and by searching github for Lua projects and reading them.
I agree. "Programming in Lua" is a fantastic book! It showcases the whole language, as it's philosophy and how to use it's more advanced features.

I have the feeling that there is no "intermediate Lua". After you grasp the basics, the next step is really advanced stuff. The book helps you make that transition.

Not a book, but if you are looking for a real-world motivation for a lua project - try out awesomewm, a window manager thats customizable using lua. You'll write some lua scripts and end up with a workspace to your liking.
Hey! I really love Lua. I'd recommend reading Programming in Lua (whatever the latest edition is) and Lua Programming Gems. Unfortunately, Lua is one of those languages that isn't written about a lot because its use case is usually for embedding. You'll have to do some legwork to read how other people write Lua. You probably want to read a lot of code on Github. Olivine Labs springs to mind here as an org that uses Lua quite a bit, but there are more. I got off the Lua train at 5.1, but 5.3 adds a lot of niceties.

Depending on how deep into the rabbit hole you want to go, reading the VM source code is instructive too (it's a pleasant read at ~10kloc. I'd actually recommend reading it on the website as they've hyperlinked much of the code.)