https://dev.fennel-lang.org/wiki/CookbookHugsql
here's a tiny port of the #clojure HugSQL library (you know, for embracing SQL) to #fennel for your FLHOS stack needs
https://dev.fennel-lang.org/wiki/CookbookHugsql
here's a tiny port of the #clojure HugSQL library (you know, for embracing SQL) to #fennel for your FLHOS stack needs
I figured out why Fennel's web stack isn't dominating the top of hacker news on the reg
it's because we don't have a cool acronym
so now I present to you: the FLHOS stack: Fennel, Lua-Http, Ocaps, SQLite
https://dev.fennel-lang.org/wiki/CookbookHugsql
here's a tiny port of the #clojure HugSQL library (you know, for embracing SQL) to #fennel for your FLHOS stack needs
planning ahead for this year's FennelConf; if you have been using #fennel recently and having fun with it, consider giving a presentation!
our presentations at FennelConf don't have to be
professional and meticulously rehearsed; we value enthusiasm over polish, so you can demo whatever you have been having fun with recently
https://lists.sr.ht/~technomancy/fennel/%3C87seevgl3d.fsf@asthra%3E
tentatively looking at the 27th of December
at the Clojure Conj conference a few days ago I ran into the lead developer of Calva, the VS Code mode for Clojure, and I mentioned how none of the Fennel developers use that editor, so its support for Fennel is rather poor, and I wish we had something like Calva for #fennel
and he responded that it might be better to just add Fennel support to Calva rather than creating a separate thing
I've taken a look at what that would require but I have never used vscode or typescript or npm before so I'm in a bit over my head, but it looks like it shouldn't be terribly difficult?
at the Clojure Conj conference a few days ago I ran into the lead developer of Calva, the VS Code mode for Clojure, and I mentioned how none of the Fennel developers use that editor, so its support for Fennel is rather poor, and I wish we had something like Calva for #fennel
and he responded that it might be better to just add Fennel support to Calva rather than creating a separate thing
I've taken a look at what that would require but I have never used vscode or typescript or npm before so I'm in a bit over my head, but it looks like it shouldn't be terribly difficult?
planning ahead for this year's FennelConf; if you have been using #fennel recently and having fun with it, consider giving a presentation!
our presentations at FennelConf don't have to be
professional and meticulously rehearsed; we value enthusiasm over polish, so you can demo whatever you have been having fun with recently
https://lists.sr.ht/~technomancy/fennel/%3C87seevgl3d.fsf@asthra%3E
tentatively looking at the 27th of December
New instance new #introduction
I'm Alex,
I make opensource games using #fennel with #love2d, music using #reaper and #pixelart using #aseprite. (see bio)
For writing code, I exclusively use #emacs
Goals for this year
1. Use Zig in a real project
2. Make a game with #godot
3. Get better at making vector art #inkscape
Programing languages I love Fennel, Erlang, Scheme, C, Elisp, Zig
Offline, I enjoy snowboarding and painting minis (Lord of the Rings)
For my music check out @alexjgriffith@mastodon.art
Zipping and unzipping files in fennel has always given me headaches.
LuaZip, the default lua-zip available in Apt only allows you to read files, not write them.
Brimworks has a lua-zip library (my goto) that reads and writes, but has compatibility issue with emscripten in some browsers / operating systems.
This weekend I wrote my own minimal wrapper around lua-zlib in fennel that lets you read a zip file directly into a table of strings and vice versa.
Zipping and unzipping files in fennel has always given me headaches.
LuaZip, the default lua-zip available in Apt only allows you to read files, not write them.
Brimworks has a lua-zip library (my goto) that reads and writes, but has compatibility issue with emscripten in some browsers / operating systems.
This weekend I wrote my own minimal wrapper around lua-zlib in fennel that lets you read a zip file directly into a table of strings and vice versa.
hoping to make a release of #fennel version 1.6.0 sometime soon
if you haven't pulled from main in a while, it'd be helpful if you could try the latest to make sure your stuff all still works!
https://git.sr.ht/~technomancy/fennel/tree/main/item/changelog.md#160--
In iocaine, every request is served by a script, and there can be any number of them in flight at the same time. I do not control the threads, and I do not want to. Anything thread bound is a no-go.
Any scripting language I'd even consider embedding needs to separate runtime from environment/context/whatever it ends up calling that thing, and must be able to run any number of scripts concurrently, in isolation.
I pretty much need the engine to be Send + Sync, really.
Interpreters are out aswell, they're never going to match the speed of a compiled language (Roto & wasmtime are compiled to machine code via cranelift).
There are fast-ish languages, like Lua, but my experiments indicate that for iocaine's use-case, neither LuaJIT nor LuaU provide any gains (they usually measured below Lua 5.4!) - my scripts are short, and don't live long, JIT doesn't help much there, as far as I can tell.
I'm willing to add new languages to iocaine, if they match or exceed the speed of Lua, but that's already stretching it. The only reason I have Lua support in iocaine is because of #Fennel. I desperately wanted a lisp. Even if I won't be using it myself, I wanted iocaine to support one. Lua, and thus Fennel, are considerably slower than Roto, but they run at an acceptable speed nevertheless.
Most languages I tried were waaay slower than Lua.
homeserver experimentation
here's a short write-up on the #fennel wiki about how to package command-line programs and servers
I'll be closing the #fennel survey soon so if you haven't filled it out yet, it's at https://fennel-lang.org/survey/
also we haven't gotten as many responses as past years, so if you could share the link with other fennel-using communities that would be great; thanks!
I've just recently opened this year's #fennel community survey! if you're Fennel user, please take a few minutes to fill this out; it shouldn't take long
I'm currently writing #Fennel examples, and this is delightful. I even managed to make the decide function even more beautiful than it was!
(local ruleset [is-in-ai-robots-txt?
default])
(fn decide [request]
(accumulate [outcome nil
_ f (ipairs ruleset)
&until (not= outcome nil)]
(f request)))
This is perfection.
From nothing to running iocaine + Caddy with ai.robots.txt's robots.json and a few metrics as a starting point.
Contains #Roto, #Lua, and #Fennel - and a few tests too, for each.
Woke up, and realized that the thing I though I could maybe add to iocaine 2.6 is far easier to do in a 3.0 context.
So after the 2.5 release tomorrow, I will branch off for 3.0 stuff. Branch, so that I can release 2.6 or 2.5.1 if need be - 3 will take a while.
I'm currently writing #Fennel examples, and this is delightful. I even managed to make the decide function even more beautiful than it was!
(local ruleset [is-in-ai-robots-txt?
default])
(fn decide [request]
(accumulate [outcome nil
_ f (ipairs ruleset)
&until (not= outcome nil)]
(f request)))
This is perfection.
I'm on a bit of a roll lately, and have released #iocaine version 2.4.0 just a few moments ago.
This does not bring that many significant changes as 2.3.0 did, but it does introduce #Lua and #Fennel as languages you can script its decision making with, on top of #Roto, which was introduced in 2.2.0.
While these languages run slower than Roto, they're still very fast, and are not going to be a bottleneck - they do provide a more familiar language to write the decision making in!
Oh, and metrics can now be persisted across restarts.
[server.request-handler]
path = "tmp/fennel/handler"
language = "fennel"
options = { compiler = "tmp/fennel/fennel.lua" }
Look, 'ma! No Lua shim. The Fennel code is about 40 lines of Rust, a bit of boilerplate wrapping the Lua code.
And because I give funny names to my structs, the one dealing with #Fennel is called ElegantWeapons.