Title
#devlog-together
Kartik Agaram

Kartik Agaram

08/23/2022, 11:16 PM
This is a pleasant surprise: I just added hyperlinks to my text editor in 35 lines of Lua. https://codeberg.org/akkartik/lines-and-links/commit/c81bedca8ddd 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 (https://github.com/akkartik/lines.love/blob/main/button.lua). 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.
Ivan Lugo

Ivan Lugo

08/23/2022, 11:21 PM
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.
11:24 PM
And now I get to try out
love
and some itch games, haha
Kartik Agaram

Kartik Agaram

08/23/2022, 11:27 PM
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 😄
Ivan Lugo

Ivan Lugo

08/23/2022, 11:28 PM
LOL, that’s fair. Lemme search up a Lua transpiler and see what it spits out in COBOL 🙃 👍
w

wtaysom

08/24/2022, 8:33 AM
Imagine any other dynamic language (Ruby, JavaScript, Python), remove features until you can't anymore, and that's basically Lua. https://www.lua.org/pil/ is a short, fun read.
8:37 AM
The first edition is online (I doubt it's changed too much). For a flavor, take a look at the section on multiple inheritance https://www.lua.org/pil/16.3.html.