This is great! I wish every language had an intro like that :) It was interesting to find resemblance of Lua's classes to Perl's blessing. Always meant to look into the language and this tutorial made me do it. I also learned about the LÖVE game engine, which I'm going to play with this week. Thank you! http://love2d.org/
Learn Lua in 15 Minutes
81–90 of 99 posts
Re: Learn Lua in 15 Minutes
#82Re: Learn Lua in 15 Minutes
#83Re: Learn Lua in 15 Minutes
#84This is great! I wish every language had an intro like that :) It was interesting to find resemblance of Lua's classes to Perl's blessing. Always meant to look into the language and this tutorial made me do it. I also learned about the LÖVE game engine, which I'm going to play with this week. Thank you! http://love2d.org/
If you're playing with love2d you might as well want to check out Zoetrope, I found it very awesome. http://libzoetrope.org/
The former seems to be built on top of the latter, yes? Are there particular things lacking in LÖVE that Zoetrope fills in? I couldn't find this info quickly on their sites.
Re: Learn Lua in 15 Minutes
#85This is a good start, but there's also some deeper ideas in Lua. It has a good implementation of coroutines, for example; if you're familiar with continuations from Scheme, they fit most of the same uses. (They're like generators from Python or fibers from Ruby, but with less edge cases.) The C interop is also a Big Deal. Lua seems like a cute little language, like a cleaner Javascript, but it's a LOT more useful if…
Coroutines are tricky, and you need to explain them, not just present a bit of code. I think it is the right decision to omit them from a 15-minute intro. The C API is way out of scope. I would cover assert() statements and the common (exit_status, result) var return, since that is so idiomatic. Maybe also loading chunks.
Re: Learn Lua in 15 Minutes
#86That page could do with a little syntax highlighting, at least for the comments. -- does not stand out.
Re: Learn Lua in 15 Minutes
#87A logical next step might be to do do the Lua Missions (read: koans): https://github.com/kikito/lua_missions . (Disclaimer: The missions look good, but I haven't personally tried them.)
Actually, the Lua Missions are excellent! I highly recommend taking the time to work through them. More than just a series of exercises (like most of the foo-koans), there's actually a narrative and a larger lesson you can learn if you work through the full problem set.
Thanks for the kind words. One word of warning though: I never got around to make one mission about coroutines.
But I accept pull requests :)
Re: Learn Lua in 15 Minutes
#88Re: Learn Lua in 15 Minutes
#89Earlier quoted context omitted.
You have a keen eye for subtle references! I didn't expect many people to get that one :) There's another math anecdote reference hidden in there as well - probably even more obscure than Karl's sum.
Upon reading this comment had to skim the whole thing looking for more (hadn't yet finished reading). No more maths references than tau found yet. :/
http://en.wikipedia.org/wiki/1729_(number)
That's a very obscure reference, though, so I apologize for sending anyone looking based on my previous comment.