❯ cargo run -q -- -c tests/config.kdl test decision fennel -M INVALID
Garbage
Look Ma'! No compiler!
Post
❯ cargo run -q -- -c tests/config.kdl test decision fennel -M INVALID
Garbage
Look Ma'! No compiler!
❯ cargo run -q -- -c tests/config.kdl test decision fennel -M INVALID
Garbage
Look Ma'! No compiler!
Wanna know the best part?
❯ git diff --cached --stat
src/sex_dungeon/elegant_weapons.rs | 19 +++++++------------
tests/config.kdl | 3 +--
tests/test_request_handler.sh | 11 +----------
3 files changed, 9 insertions(+), 24 deletions(-)
Embedding the fennel compiler results in 15 lines less code! And it's nicer, more user friendly, too.
Yes, it does mean I have a few hundred kilobytes of vendored fennel.lua in the repo, but that's not all that much, all things considered. When embedding into the binary, it also gets compressed, and only weighs some ~86KiB or so. In a ~28MiB binary, that doesn't make a whole lot of difference.
Except it makes using Fennel a lot more convenient. I added Lua support to #iocaine first and foremost to support Fennel, so this feels very satisfying right now.
Okay, hit a bit of a roadblock... trying to make it all play nice with the fennel version of the built-in handler embedded in iocaine is not going well.
I may skip writing a Fennel version of the built-in handler for now... or maybe I'll write it, but won't enable it just yet.
Shipping a vendored Fennel compiler is one thing, I'm comfortable adding that when I'm polishing the second release candidate to become the final release Very Soon™.
Doing all kinds of file loading crimes to be able to load Fennel from embedded blobs is a whole different level. I probably shouldn't do that so close to 3.0. It'll be fine for a point release later.
@algernon what's a few hundred kilobytes between friends
@technomancy While it does take up some space in the repo, it's almost always going to get transferred compressed, and in the grand scheme of things, makes little difference.
As for shipping it with iocaine: I embed it in the binary, compressed (with DEFLATE), it's an additional ~86KiB or so.
And having an embedded copy means it's easier to test, and I can ship a fennel variant of the built-in request handler too.
Fair trade, imo!
A space for Bonfire maintainers and contributors to communicate