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
- To learn the language, read
snail-schemein ten minutes, then the tutorials. - To find a library, start at the library reference, which lists every one and links its source.
- To build something, read getting started, then workspaces and builds and the application model.
- To work on the compiler, read the compiler architecture and bootstrap.
Try it in a browser with WebGPU
- Play Siegework: explore a seeded map, wire an energy network across it, and destroy three nests.
- Open the viewer and drop a
.glbon it, or pick a sample, to see it path traced (the path tracer). - Open Splats and drop a trained scene’s
.plyon it. - Play Hearsay: the rumor mill and the favor ledger.
The book describes what is implemented and marks proposals explicitly. Source lives in the repository, and GitHub issues track open work.