But for Guile in particular there's https://artanis.dev/ that's a pretty close cousin.
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
Taking a break from tech to work on a luxury fashion brand with my mum. She hand paints all the designs. I it first collection is a set of silk scarves and we’re moving into skirts and jackets soon.
Been a wonderful journey to connect with my mum in this way. And also to make something physical that I can actually touch. Tech seems so…ephemeral at times
Deleted Comment