funkaster
[ my public key: https://keybase.io/rolandoam; my proof: https://keybase.io/rolandoam/sigs/Q8SNg1xUA0lrAKRtgdrKCDYNy7zPOLcWOygRHiWc0hE ]
๐ Joined in 2011
๐ผ 1,738 Karma
โ๏ธ 437 posts
Load more
(Replying to PARENT post)
But for Guile in particular there's https://artanis.dev/ that's a pretty close cousin.
(Replying to PARENT post)
(Replying to PARENT post)
Testing ergonomics: Went from 15+ lines of boilerplate to a one-liner by introducing structural testing. Routes can now return S-expressions (chiccup) instead of rendered HTML, so you test against data structures, not string parsing.
;; Assert against structure, not HTML strings
(test "returns greeting"
'(ccup [h1 "Hello"])
(test-route-body app 'GET "/hello"))
Structural middleware: Since routes return S-expressions and rendering happens at the framework boundary, middleware can inspect and transform the DOM structure before it becomes HTML. Want to inject CSRF tokens into every form? It's just an S-expression transform with sxml-transforms. No template engine plugins needed. (see the post for a complete example)Performance notes: I benchmarked chiccup rendering at 145k ops/sec average (339k for simple elements, 2k for 50-row tables). Even worst case is 0.5ms - way below database/network latency, so no caching layer needed, at least not for now.
What's next: Besides the Redis-backed job queue and rqlite-based ORM mentioned in the full post, I'm working on improving route handling with automatic path parameter extraction:
(get "/posts/:id/comments"
;; :id automatically becomes a local variable
(display id)) ; just works, no (alist-ref 'id params) needed
Schematra is a Sinatra-inspired web framework for CHICKEN Scheme. Still pre-1.0, API is evolving based on real-world use.Full post: https://schematra.com/blog/whats-new-in-schematra-0-4
Source: https://github.com/schematra/schematra
Benchmarks: https://github.com/schematra/schematra/tree/main/benchmarks
(Replying to PARENT post)
Show HN:
"Schematra โ Sinatra-inspired minimal web framework for Chicken Scheme"
Most of the projects that I've written on the side have been using some combination of Sinatra + Sequel + Postgres/Redis/Something else + HTMX. I love the simplicity of Sinatra's API so I decided to focus on trying to have a similar experience but in scheme, trying to make it ergonomic for a scheme dev (that part might not be there yet since I'm not an experienced scheme dev).
The most fun part was the dev cycle: Emacs + NREPL + Aider (as a code reviewer & rubber ducky. For codegen it's mostly annoying but works great for documentation & refactoring).
I hope to add full SSE & WebSocket support some time this week. Anyway, hopefully this is interesting to some of you and might be a source of fun :)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
[1]: https://www.npr.org/2025/01/08/1223466587/zip-code-history
(Replying to PARENT post)