The RAPP Programming Language Book home

RAPP rev-5 · book edition

The RAPP Programming Language

A tutorial, programming workbook, and reference manual for agents that keep a verifiable memory and communicate over one exact wire.

RAPP is a programming language for durable agent behavior in the same sense that a wire format can be a language: it gives independent programs one vocabulary for values, addresses, identity, events, trust, and portable packages. Its executable grammar is the RAPP protocol.

The book starts with a working frame, derives every byte rule beneath it, then adds identity, packaging, signatures, authority, migration, real-world conformance, and a complete implementation plan. Numbered exercises turn each chapter into a workbook. No API keys or third-party packages are needed for the core examples.

Begin the interactive edition → · Complete print edition · Download the 6×9 PDF

The interactive edition adds keyboard-accessible Copy code and Copy prompt actions plus a stable deep link for every example. Prompts are explicitly marked, provider-neutral inert text: nothing in the book submits them or chooses an AI for you. The PDF remains the print and download edition.

Ask any AI to help you explore RAPP

Copy this prompt and paste it into any AI you choose:

You are helping me learn the RAPP programming language.
Explain the difference between canonicalization, content addressing, and identity.
Use one short example for each, identify which bytes are hashed, and flag any assumption you make.

Contents

Part I — From values to addresses

  1. A Tutorial Introduction — build and attack a real chain
  2. Canonicalization — one value, one byte sequence
  3. Content Addressing — one hash function, typed spaces

Part II — From identity to a portable organism

  1. Identity: the rappid — mint once; never hash a name
  2. The Frame — particle, wave, chain, and fork
  3. The Wire — synchronous requests and asynchronous frames
  4. The Egg — deterministic packaging and safe handoff

Part III — Trust, authority, and proof

  1. Trust and Signatures — byte integrity becomes authorship
  2. The Registry, Evolution, and Security — authority and lawful change
  3. Conformance, and Meeting a Real World — the code meets the committed estate

Part IV — Implementing the language

  1. Implementing the Language — build the parser, addresses, identity, frames, packages, trust adapter, and transactional append

Reference

Start at the Terminal

git clone https://github.com/kody-w/rapp-1
cd rapp-1

python3 examples/01_hello_frame.py
python3 examples/02_build_a_chain.py
python3 examples/04_typed_addresses.py
python3 examples/05_failure_atlas.py
python3 examples/06_pack_an_egg.py
python3 conformance.py

The implementation is deliberately small enough to read beside the prose. SPEC.md is normative; this book explains it; rapp.py makes the core executable; conformance.py makes selected claims falsifiable.