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

SSPUR documentation

A programming language for AI agents to write, read, and maintain. SSPUR is statically typed and effect-tracked. Code lives in a content-addressed store of typechecked definitions, agents change it through atomic edits that run every test, and contracts are checked at run time, fuzzed and proved. It compiles to native code that runs faster than idiomatic C++ with the same safety checks.

type Item = {name: Str, price: Int where _ >= 0, qty: Int where _ > 0}

fn total(items: List[Item]) -> Int
= items.map(_.price * _.qty).sum

fn main() -> Unit ! log
= do
  cart = [Item{name: "pen", price: 3, qty: 4}, Item{name: "book", price: 12, qty: 1}]
  log("total: {total(cart)}")

test empty = total([]) == 0
$ sspur run cart.ssp
total: 24
$ sspur test cart.ssp
1 passed, 0 failed

Try it in the playground: it checks and runs SSPUR in your browser, with nothing to install.

SSPUR Pulse is a live dashboard of the world today, fetched, checked and rendered by SSPUR programs every 3 hours. How it works describes the programs behind it.

SSPUR packages is the package registry: search packages, read their API docs, and publish your own from the browser or with sspur publish. SSPUR’s home page is sspurlang.github.io.

Project Configuration

Manifests, lock files and the knobs on the compiler.

Cheat Sheet

The everyday syntax on one checked page.

Design and Performance

Why it works this way, and how fast it is.

Release Notes

What changed in each version.

SSPUR is at version 1.0. Code that works on 1.0 keeps working on every 1.x release; the stability policy says what is stable and what is still experimental. It is designed, written and maintained by Utkarsha Vardhana, and dual-licensed under MIT and Apache 2.0.