Penelope

A language that knows how to wait. pause as a first-class primitive.

The thesis

In ordinary languages, a running program's mid-execution state is ephemeral. If the process dies, the state dies with it. You write checkpoint files, queues, retries, idempotency layers to survive failure.

Modern durable-execution frameworks (Temporal, Inngest, Restate, DBOS) add that infrastructure on top of ordinary languages. They work — and they force you to structure programs around activity/step/await boundaries.

Penelope dissolves these boundaries by making pause/resume a language primitive, not a framework feature.

let x = 10;
let y = pause;        // process exits, state saved to disk
print(to_str(x + y));         // a later process resumes, prints 15

The variable x survives across processes. The user wrote no checkpoint, no restore, no await. Just let y = pause. That is the entire ergonomic claim.

The foundational axiom

Execution is data. A running program is a value.

If the runtime state is just JSON, it can be persisted to disk, forked, inspected, migrated, compared, transmitted, scheduled — like any other value. Everything else in Penelope follows from this axiom.

What ships today

PhaseWhatStatus
Phase 1Foundations: lexer + parser + step-machine + snapshot✅ done
Phase 2Effect system: 8 effects + strings + agent runtime✅ done
Phase 3Bytecode VM + 5-pass optimizer + snapshot v3✅ done
Polish R1wait_for value injection · source positions · REPL · LSP✅ done
Polish R2list/dict · type checker · profiler · VSCode ext · docs site✅ done
Polish R3Rust-style errors · LSP hover · snippets · web playground✅ done — try the Playground
Polish R4pen fmt · pen test · LSP completions + go-to-def · --watch · color✅ done
Phase 4Self-hosting · live editing · time-travelfuture

Quick start

git clone https://github.com/airingursb/Penelope
cd Penelope
npm install && npm run build

# Run a program
bin/penelope run examples/01-toplevel-pause.pen

# Compile to bytecode
bin/penelope build -O2 examples/09-fib.pen

# Drop into a REPL
bin/penelope repl

# Type-check
bin/penelope check examples/08-24h-agent.pen