"An extremely naïve, brutalist attempt at packaging up simple Lua (5.1) apps with all the stuff needed to edit and build them."
You knew this was coming. Conway's Game of Life in text mode using Unicode Braille glyphs.
git clone https://github.com/akkartik/teliva
@akkartik I love the idea behind this; nice work.
I am super curious about the decision to use a version of Lua that dates from 2006 though; even 5.2 fixes almost all of the most glaring flaws in 5.1 without having the higher LOC count of the latest version.
@technomancy Yeah, totally. I'm not really sure what I'm doing there, and might change this. My reasoning at the moment was:
- preserve the luajit option
- go with a smaller implantation if it's still widely used (thanks to luajit)
I'd love to be corrected on either score.
@akkartik I see, yeah. unfortunately those two goals are somewhat at odds with each other; if you prioritize speed you have to sacrifice size.
despite being compatible with 5.1, luajit fixes almost all the big flaws in it, though some of its fixes need to be specifically opted into at compile time.
IMO either switching to luajit or a newer PUC would be better than staying on PUC 5.1 but I can understand wanting to keep options open.
@technomancy That's really helpful. I'm going to keep an eye out for flaws since I haven't experienced them myself yet. Is there a definitive list somewhere?
I plan to write lots of Lua code over the next few weeks and months, so I'm sure I'll run into them for myself.
@akkartik the biggest problems are the inability for coroutines to yield across protected calls or C code boundaries and the inability to construct proxy tables (using metamethods) that can be iterated.
these are both issues which beginners are unlikely to hit on their own, but coroutines and metamethods are both pretty important as means of abstractions for using 3rd-party code. if your goals don't involve users pulling in libraries, maybe it's less of an issue.
@technomancy @akkartik Also worth noting for those metamethods, if you're already working from C, is the native patch approach as seen in the Lua wiki http://lua-users.org/wiki/GeneralizedPairsAndIpairs
Though in the case of __ipairs you get the extra confusion of the fact that Lua 5.3 went on to deprecate it and 5.4 to remove it in favor of making ipairs respect __index and __len :(
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!