A Chef interpreter, written in Rust
Programs that read like recipes.
Cheffers is a complete interpreter for Chef, the esoteric programming language where every program is a cooking recipe: ingredients are variables, mixing bowls are stacks, and the method is the code.
Runs entirely in your browser via WebAssembly — nothing to install, nothing sent to a server.
The Answer Broth.
The simplest dish in the book: one ingredient, one bowl, one perfect number. Serve warm to fans of intergalactic hitchhiking.
Ingredients.
42 g mystery beans
Method.
Put mystery beans into the mixing bowl. Pour contents of the mixing bowl into the baking dish.
Serves 1.
Start here
Three ways into the kitchen
cargo install and cheffers runs any .chef recipe straight from your terminal.
Get started
The language
What is Chef?
Chef is an esoteric programming language created by David Morgan-Mar in 2002. Programs in Chef look like cooking recipes — ingredients represent variables, mixing bowls are stacks, and cooking instructions translate to program operations.
When executed, your recipe doesn't just cook a dish — it computes!
- Ingredientvariable
- Mixing bowlstack
- Baking dishoutput
- Refrigeratorinput
- Sous-cheffunction
Features
Cooked to the spec
100% complete
All 62 specification tests passing.
Fast & efficient
Built with Rust for optimal performance.
Easy to use
A simple command-line interface: cheffers recipe.chef.
Well tested
A comprehensive test suite runs on every push.
Getting started
Install it, then serve a recipe
# From GitHub cargo install --git https://github.com/y-a-v-a/cheffers # From source git clone https://github.com/y-a-v-a/cheffers.git cd cheffers cargo install --path .
# Run a Chef recipe cheffers path/to/recipe.chef # Try the included examples cheffers tests/fixtures/hello-world.chef cheffers tests/fixtures/fibonacci.chef
Documentation
Go deeper
Guides
- Understanding Stack-Based Programming in Chef How Chef's stack-based paradigm works and how to think in stacks instead of variables. Perfect for developers coming from JavaScript, Python, or other imperative languages.
- Fibonacci Program — Spec Analysis A deep dive into the canonical Fibonacci implementation: recursive auxiliary calls, Refrigerate as conditional exit, and other spec ambiguities.
Project
About Cheffers
- Repository
- y-a-v-a/cheffers
- Version
- 0.2.0
- License
- MIT
- Language
- Rust (2021 edition)
Contributing
Found a bug or want to contribute? Visit the GitHub repository to open an issue or submit a pull request.
External resources
- Original Chef website — the official Chef language homepage by David Morgan-Mar
- Esolang Wiki: Chef — community wiki page with examples and discussion
Ready to start cooking with code?
Learn the fundamentals with the stack-based programming guide, or jump straight into the playground.