You can now make any app end-user-programmable -- as long as it's built in LÖVE
forum.malleable.systems/t/adding-malleability-to-any-love-app/90
Kartik Agaram have you poked around the way fennel-folks tackle this?
I like your way better because it is all lua+love, no emacs 😆
📝 Interactive programming with Fennel Lua Lisp, Emacs and Lisp Game Jam winner EXO_encounter 667
Phil Hagelberg recently won the Lisp Game Jam 2018 with his entry EXO_encounter 667. What I found most interesting however, was his interactive programming setup. He programmed his game in (and contributed new features to) a Lisp to Lua compiler called Fennel, and used the game programming library Löve. With Emacs and some Lua thread magic, he was able to perform runtime changes and introspection to his live running game project.
I've played with Fennel very slightly, though I haven't tried to set up any emacs integration.
I have no doubt Emacs is far more powerful in these capabilities. Hopefully my stuff can act as a gateway drug for a few people.
yeah -- my goal here wasn't to push you to emacs (I would never recommend anyone pick it up...as a life long emacs addict), but to flag that folks are doing this sort of interactive dev with love using fennel.
I think the main guy behind fennel even has a package specifically for doing it. Sort of like an embeddable editor.
Thanks! I don't think I'd ever actually tried this, even though I follow technomancy on Mastodon. People are too retiring about plugging their stuff, compared to me 😆 I'm going to try it out.
The original blog post says an error crashes the whole app. And I spot checked a few places in Polywell from my phone and didn't see any error handling. So maybe that's one difference. Both my driver.love and this new approach are robust to errors. (The motivation for this new approach: someone was trying to use driver.love on iPad, where the OS only permits one LÖVE app to run at a time.)
There's also a minor difference in the communication mechanism. Polywell uses a separate thread, but it seems to be just to get non-blocking I/O. driver.love uses a temporary file for the same purpose. Feels like fewer moving parts, but this is subjective.
There's no reason you couldn't read/write the temporary file from Emacs and get all its sweet sweet power. Conversely, there's no reason you couldn't switch Polywell to driver.love's error handling and/or simpler communication mechanism.
Ah never mind, Polywell does use xpcall
: git.sr.ht/~technomancy/polywell/tree/main/item/config/console.fnl#L42