FMPL is a prototype-based, image-based programming language and live multi-user/multi-agent environment, implemented in Rust. The persistent object image is the source of truth; source files are a bootstrapping convenience.
New here? Read the engineering tour —
architecture, verified capabilities, and the honest gap ledger, in one page —
learn the language from the language guide
(the web rendering of TUTORIAL.md), or try the
browser REPL
(fmpl-core compiled to WebAssembly, no install).
Status: experimental. FMPL is a working prototype under active development, not a finished language. The core pipeline (lexer → parser → compiler → VM), object system, PEG grammar engine, and REPL/TUI/web front-ends all run today; the metacircular self-hosting path and persistence layer are in progress. Expect sharp edges.
The original FMPL ("of Accardi") came out of UC Berkeley's Experimental Computing Facility around 1992 — a MUD server language in the LambdaMOO / ColdMUD tradition, with an interpreter written by Jon Blow.
This FMPL was created by Norman Nunley, Jr. and
is a descendant of the original, not a restoration of it. Nunley extracted an
EBNF grammar from the original FMPL sources in the late 1990s; decades later
that grammar (see fmpl.ebnf) seeded this project. The syntax is
only lightly similar to the 1992 language, and everything beyond the grammar —
the streaming model, first-class PEG grammars, the indexed-RPN VM, capability
security, the metacircular bootstrap — is new design. The MUD lineage is
first-hand: Nunley also co-wrote cool++, a C++ rewrite of Stephen White's
CoolMUD (White created MOO, from which LambdaMOO was forked). See
project.md for the full north star.
let nums = [1, 2, 3, 4, 5]
nums.map(\x x * 2) -- => [2, 4, 6, 8, 10]
nums.fold(0, \acc, x acc + x) -- => 15
%{name: "Alice", age: 30}.name -- => "Alice"
-- Guarded pattern match via the `@` operator (`when` and `if` are equivalent):
42 @ { n when n > 0 => n * 2, _ => 0 } -- => 84
-- Prototype objects with capability-scoped access:
object counter {
init(n): self.count = n
get(): self.count
count: 0
}
let c = spawn counter(7)
c.get() -- => 7
FMPL is a Cargo workspace (Rust, edition 2024). It is metacircular: the
canonical parser is generated at build time from FMPL source
(lib/core/fmpl_parser.fmpl) via a two-step bootstrap. The convenience target
runs both steps for you:
just build # bootstrap the FMPL-generated parser, then build the workspace
just test # run the test suite
just repl # launch the REPL (fmpl-cli)If you don't have just, the raw commands are:
# 1. Build the bootstrap binary (skips parser generation on this pass).
FMPL_BOOTSTRAP_PHASE=1 cargo build -p fmpl-bootstrap
# 2. Rebuild fmpl-core so it embeds the FMPL-generated parser, then build all.
touch fmpl-core/build.rs
cargo build --workspace
cargo run -p fmpl-cli # REPL (commands are dot-prefixed: .help, .quit)
cargo run -p fmpl-web # web REPL on http://localhost:3000
cargo run -p fmpl-tui # TUI (Ctrl+L for LLM chat)Why the two steps? A plain
cargo buildworks, but silently uses the Rust fallback parser rather than the canonical FMPL-generated one. Buildingfmpl-bootstrapfirst (step 1) letsfmpl-core's build script generate the real parser on the next build (step 2). Thecanonical_pipeline_paritytest enforces that the generated parser is active.
Source → Lexer (logos) → Parser → AST → Compiler → Indexed RPN bytecode → VM
ObjectDb (image) · TupleSpace · Fjall (persist)
| Crate | Purpose |
|---|---|
fmpl-core |
Lexer, parser, compiler, VM, object system, PEG grammar engine, tuple space, persistence |
fmpl-cli |
REPL (rustyline) |
fmpl-web |
Axum + HTMX web REPL |
fmpl-tui |
Ratatui TUI for agentic LLM interaction |
fmpl-scenario-runner |
Data-driven behavior-scenario test runner |
fmpl-bootstrap |
Stage-0 Rust-compiler fallback for the bootstrap |
fmpl-wasm |
wasm-bindgen bindings for the browser REPL |
- Engineering tour — one-page overview: architecture, what works, what doesn't
- Browser REPL — fmpl-core as WebAssembly, live on GitHub Pages
- Field logs — engineering retrospectives: revitalizing the agent-written codebase and closing the metacircular-parser gap
project.md— north star, principles, design lineagedocs/design-principles.md— durable design invariantsAGENTS.md— workflow rules and gotchas for agents and humansDEV.md— codebase inventory: workspace layout, key files, documentation mapTUTORIAL.md/DEMO.md— language walkthrough and examplesspecs/— implementation specs (VM, object system, grammars, tuplespace, persistence, pattern matching)
Matt Parrett rehabilitated the repository for
public release — a fresh clone that builds, GitHub Actions CI, the honest gap
ledger (docs/known-gaps.md), the WebAssembly browser
REPL, and the engineering tour
and field logs. See the
rehab field log for the
full account.
MIT — see LICENSE.