r/lisp 10h ago

Common Lisp sta6: static site generator for Common Lisp

Post image
23 Upvotes

hi everyone,

I'm new to Common Lisp, although I have tried other lisp dialect (i.e., Clojure, Racket) to attempt making a static site and/or leetcode(s). This is my first attempt of porting the SSG into a library.

sta6: sta(six), static -- is a tiny SSG that turns pages/*.lisp into build/*.html, with support for dynamic routes (e.g., /blog/+slug+).

the usage of sta6 is as follows (src/pages/page.lisp):

(defpackage #:pages/page
  (:use #:cl)
  (:export #:render))

(defun pages/page:render ()
  (sta6:html5
    (:img :width (/ 500.0 3)
          :src "https://twobithistory.org/images/sicp.jpg")
    (:br)
    (:br)
    (:span "Hello, from Common Lisp.")
    (:ul
      (loop for x from 1 to 3 do
        (:li x)))))

which yields the image above, the full example can be found here.

sta6 uses an external HTML generator under the hood:

if you're in need of a personal site, give sta6 a try! here's an example of my site built with sta6:

why use sta6?:

  1. You do not need (to learn) an external templating language (e.g., Nunjucks, Handlebars, EJS).

resources:


r/lisp 31m ago

Benchmarking embedded languages in Rust

Upvotes

I'm working on a CPU-based renderer in rust and evaluating embedded languages for scene description and procedural rendering. Some of these languages are lisps so I thought there may be interest here.

A few caveats worth noting:

- The benchmark code and report is generated by claude (based on my specification)

- The actual benchmark code are rudimentary snippets. I am evaluating the implementations for a specific purpose.

- I am developing a proof-of-concept with ECL first and then janet.

https://drive.google.com/file/d/1fFI1tyW3xdNKnNfmveIo1EZeWl_pUACJ/view?usp=sharing