Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

snail-scheme

snail-scheme is a statically-typed Scheme successor, for building applications, compiling to WebAssembly with garbage collection. Its compiler is written in the language and compiles itself; programs run on Node and in the browser.

What is here

  • The language: S-expressions, hygienic macros and explicit types; records as mutable heap objects any number of names may share; capabilities passed as values, so a function can do only what it was handed; and one-shot suspension, from which exceptions, generators and tasks are built (the language).
  • Libraries, all written in snail-scheme: a prelude, files, processes and sockets, pages, document interfaces and canvas applications, WebGPU as a capability with rasterizing, Gaussian splatting and path tracing on top of it, and GPU tensor graphs with gradients (library reference).
  • Tools: one command, snail-scheme, that builds and runs scripts, a language server with editor support for Zed and VS Code, and a formatter (development toolchain).
  • Runtimes: tasks scheduled in snail-scheme, with Node and the browser completing what they wait on (runtimes).
  • Applications, in src/apps/: Siegework, a colony game; Hearsay’s two prototypes; a path-traced glTF viewer; a Gaussian splat viewer; and a trainer that fits splats to photographs (tensors and training).

Where to start

Try it in a browser with WebGPU

The book describes what is implemented and marks proposals explicitly. Source lives in the repository, and GitHub issues track open work.