3 ms·
Very nice. It kinda feels like it ends before it gets past the stuff I could guess from knowing my way around other scripting languages, but I'm guessing it's
by _dan 16y ago
Very nice.
It kinda feels like it ends before it gets past the stuff I could guess from knowing my way around other scripting languages, but I'm guessing it's a work-in-progress. It'd probably benefit from even a brief "Why Lua?" discussion, though.
It's very pretty, but I'd consider getting rid of the text-shadow on code examples.
(Minor point, but: # as a length operator isn't entirely unique to Lua, Perl has $#foo to return the length [kinda] of the array @foo).
- chrisbroadfoot 16y agoThere was a screencast on "Why Lua" posted to HN not too long ago.
- rubinelli 16y agoThis one: http://kylecordes.com/2010/lua-strange-loop http://kylecordes.com/2010/lua-strange-loop
- chrisbroadfoot 16y agoThank you! That's it. He makes a compelling case :)
- draegtun 16y agoIn Perl $#foo returns the index of the last element. To get the length you use @foo in scalar context. For eg: my @bag_of_stuff = qw(do re me fa so la si); say $#bag_of_stuff; # => 6 say scalar @bag_of_stuff; # => 7 NB. Lua arrays start at 1. Perl & most other languages start with 0 (zero) index
- _dan 16y agoYeah, I know (hence "kinda"), didn't seem like the time or place to go on about Perl's quirks, though ;)
- alexyoung 16y agotext-shadow should be removed from the body text as well, it makes the text look blurry and harder to read.