This is a pleasant surprise: I just added hyperlin...
# devlog-together
This is a pleasant surprise: I just added hyperlinks to my text editor in 35 lines of Lua. Deep in the guts of the renderer, right before it renders a fragment of text, check if it's a file, and if so turn it into my button abstraction ( Caveats: links can't wrap over multiple lines, links can't contain spaces. Incredibly inefficient, to check the file system for every single word. So it's in a fork for now while I decide just what to do with this new super power.
I should have gotten into Lua and been a much braver teenager. I remember seeing the language in all kinds of weird game environments (here’s to you, Gary’s Mod 🍻) and wondering what’d it be like to know it. It seems more than reasonably powerful and useful. So if you’re writing up a text editor.. well now I’m curious, haha.
And now I get to try out
and some itch games, haha
I'm sure it'd be equally straightforward in any other language. If you made all the weird and idiosyncratic choices I did about what to include and what to exclude from the codebase and the product 😄
LOL, that’s fair. Lemme search up a Lua transpiler and see what it spits out in COBOL 🙃 👍
Imagine any other dynamic language (Ruby, JavaScript, Python), remove features until you can't anymore, and that's basically Lua. is a short, fun read.
The first edition is online (I doubt it's changed too much). For a flavor, take a look at the section on multiple inheritance