I wanted to share a side project I’ve been tinkering with for a while and finally got around to shipping: Coalton Playground – basically a web-based REPL for Coalton, which is this interesting statically-typed Lisp dialect. So What’s Coalton? If you haven’t heard of it, Coalton is kind of a weird (in a good way) mashup – it takes Haskell’s type system and plants it right in the middle of Common Lisp. You get all the type safety stuff like algebraic data types and pattern matching, but it still plays nice with “regular” Lisp code. Or, as the official site puts it: “Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp“ Why I Built This I wanted to play with Coalton but setting up a Lisp environment felt like too much work. You need SBCL, then Quicklisp, then install Coalton… and by that point I’d usually get distracted by something else. So I figured I’d make a playground where you can mess around with it right in the browser. Here’s What It Looks Like Pretty straightforward – you write Coalton code like this: (coalton-toplevel (declare fib (Integer -> Integer)) (define (fib n) (if (<= n 1) n (+ (fib (- n 1)) (fib (- n 2)))))) (cl:format cl:t "fib(10) = ~A~%" (coalton:coalton (fib 10))) Hit run, and you get your output. Then, click on “Generated Code” to see equivalent Common Lisp. A screenshot of one example: The Fun Technical Bits Getting this to run fast enough was actually kind of interesting. Turns out you can pre-build SBCL cores with Coalton already loaded, which cuts the startup time from ~400ms to ~80ms. Small win, but it makes the whole thing feel snappier. [Warning: not built for scale right now, subject to random errors, unavailability, etc] Want to Try It? If you’re curious about what statically-typed Lisp feels like, or you just want to procrastinate for a few minutes, go check it out. https://coalton.app I threw in some examples to get you started – basic stuff like factorial and fibonacci, plus some fa...
First seen: 2025-08-13 16:04
Last seen: 2025-08-14 01:09