A pure-postfix, stack-based programming language with dynamic class-based OOP, source-mapped bytecode metadata, and capability-first side effects. Built for the modern stack.
Run Snippets Live
Write postfix Ricochet code in your browser. Watch the data stack shift, push, and pop in real-time as your code compiles and executes.
Why Ricochet?
Preserving postfix stack thinking while building modern, PostgreSQL-backed MVC web apps and robust CLI tooling.
Pure Postfix Execution
No infix parser. No operator precedence. Every operator is a word, every word is a stack operation. Data flows left to right, always.
Class-Based OOP
Open classes, dynamic creation, and runtime metaprogramming — without turning the language into Java with Forth punctuation. Postfix declarations: name first, keyword second.
Stack-Aware Debugger
Breakpoints, break-on-fault, task inspection, and full stack traces with source maps. Debug running requests, spawned tasks, and async work from the terminal.
Capability-Oriented
No magical global IO. Apps, tests, plugins, and hosted scripts receive explicit powers through context injection. Request, db, logger, view — all capability objects.
Web MVC Built In
Routes, controllers, PostgreSQL Active Record, and HTML templates with full Ricochet interpolation. rco serve --watch with hot reload and stable request snapshots.
Batteries Included
Single CLI for everything you need. Project scaffolding, dependency management via ricochet.toml, test suites, and compile-time documentation generation.
Write Postfix OOP Code
Object-oriented programming in postfix is clean and readable. Let's see the structure.
Subclassing & Variable Access
In Ricochet, class declarations use the postfix structure Name Parent subclass. We end definitions and blocks using the universal word end.
Comments are enclosed in double parentheses (( ... )). Comments immediately preceding declarations compile as their docstring documentation.
Variables are declared with postfix var (e.g., amount var), written with set, and read with get. Field mutation uses dot keywords: user .email get retrieves the field, and "a@example.com" user .email set sets it.
Method calls use the explicit dot form object .methodName. In methods, the receiver is bound to self.
(( Represents a user account ))
User Model subclass
users table
id field
email field
name field
displayName method
self .name get empty? if
self .email get
else
self .name get
end
end
end
User new user set
"Alice" user get .name set
user get .displayName .
(( Output terminal: Alice ))
Install Tooling
Get the Ricochet CLI compiler and package manager up and running instantly.
Built-in Tooling
The ricochet CLI (short alias rco) includes everything you need:
- ✓
rco new: Creates a minimal web/cli project scaffolding - ✓
rco serve --watch: Live HTTP server with snapshot hot-reloading - ✓
rco repl: Ephemeral live metaprogramming workspace - ✓
rco test --debug: Runs test classes under VM debugger