ANN: Redbean Fennel Template

82 views
Skip to first unread message

Alys B

unread,
Sep 18, 2021, 8:44:26 PM9/18/21
to cosmopolitan cosmonauts
Hello,

It's been really cool seeing all the progress made so far on Cosmopolitan and Redbean. I've created a template project for creating a Redbean server with Fennel support. (Fennel compiles to Lua.)

This means you get a run-anywhere Lisp server with good performance in just a few megabytes. Let's break these features down:

—'run-anywhere' You already know—this leverages Actually Portable Executables to run natively on Windows, BSDs, macOS, and Linux on x86_64, and via qemu on other platforms.
—'Lisp' Fennel is a Lisp with Clojure-inspired syntax, pattern matching, and macro support that compiles to Lua.
—'good performance' The server can handle tens of thousands of requests in my testing on an two-core Core i5. A Core i9 eight-core processor could likely handle hundreds of thousands of requests.
—'just a few megabytes' The base Redbean image is about 1.6 MB and adding Fennel is negligible. Docker images are a similar size.

While the edit-compile-run loop is already pretty tight, I would like to tweak the template to make it easy to modify it live and hot reload. I find that way of developing to very effective, and it's popular among Lisp programmers, which would make this more appealing.

I'm doing most of my development on Mercurial, hosted at my own instance. I suspect most people will want to interact via Git, so there's also a Git mirror on GitLab:

—Official mercurial repository: https://rhodecode.alysbrooks.com/alysbrooks-public/redbean-fennel
—GitLab mirror: https://gitlab.com/actuallyalys/redbean-fennel
Reply all
Reply to author
Forward
0 new messages