For the fridge door
The Pantry Reference
Every instruction, measure and rule — one page, no fluff. Square brackets mean “optional”.
The recipe skeleton
Parts appear in this order, each separated from the next by a blank line:
| Part | Required? | Notes |
|---|---|---|
Recipe Title. | yes | first line, ends with a period |
| comment paragraph | no | free text; ignored by the interpreter |
Ingredients. + one per line | no | declares your variables |
Cooking time: 25 minutes. | no | pure theatre — does nothing |
Pre-heat oven to 180 degrees Celsius. | no | also theatre |
Method. + sentences | yes | the program; line breaks don't matter |
Serves N. | to print anything | prints the first N baking dishes, each from the top down |
| auxiliary recipes | no | full recipes below the main one, called with Serve with |
Ingredients & measures
Declared as [value] [[heaped | level] measure] name — e.g.
108 g lard, 2 cups flour, 111 cups oil,
pancakes. The value is optional (fill it later with Take or
Fold; using it while empty is a runtime error). Names may contain spaces.
Declaring the same name twice keeps the newest value.
| Measure | State | Prints as |
|---|---|---|
g, kg, pinch(es) | dry | number |
ml, l, dash(es) | liquid | character (Unicode) |
cup(s), teaspoon(s), tablespoon(s), or no measure | either | number, until liquefied |
heaped / level + any measure | dry, definitely | number |
Bowl basics
| Instruction | What it does |
|---|---|
Put ingredient into [the] [nth] mixing bowl. | pushes the ingredient's value on top of the bowl (ingredient keeps its value) |
Fold ingredient into [the] [nth] mixing bowl. | the opposite, despite the wording: takes the top value off the bowl and stores it in the ingredient |
Clean [the] [nth] mixing bowl. | empties the bowl |
Pour contents of the [nth] mixing bowl into the [pth] baking dish. | copies the bowl onto the dish, order intact, on top of what's there; the bowl keeps its contents |
Bowls and dishes are stacks: add to the top, take from the top, serve
from the top. There's an unlimited supply of both — name them the 2nd mixing
bowl, the 3rd baking dish… (digits + st/nd/rd/th). No number
means the first.
Kitchen math
All arithmetic hits whatever value is on top of the bowl; the named ingredient is the other operand and is never used up.
| Instruction | Top of bowl becomes |
|---|---|
Add ingredient [to [the] [nth] mixing bowl]. | top + ingredient |
Remove ingredient [from [the] [nth] mixing bowl]. | top − ingredient |
Combine ingredient [into [the] [nth] mixing bowl]. | top × ingredient |
Divide ingredient [into [the] [nth] mixing bowl]. | top ÷ ingredient (whole numbers; the fraction is discarded) |
Add dry ingredients [to [the] [nth] mixing bowl]. | pushes the sum of all dry ingredients as a new value |
Texture & rearranging
| Instruction | What it does |
|---|---|
Liquefy ingredient. | the ingredient now prints as a character |
Liquefy contents of the [nth] mixing bowl. | everything currently in the bowl prints as characters |
Stir [the [nth] mixing bowl] for N minutes. | the top value sinks N places down the pile (or to the bottom, if the pile is short) |
Stir ingredient into the [nth] mixing bowl. | same, sink-depth taken from the ingredient's value |
Mix [the [nth] mixing bowl] well. | shuffles the bowl randomly |
Control flow
| Instruction | What it does |
|---|---|
Verb the ingredient. | loop start: if the ingredient is 0, skip past the matching end; otherwise run the body |
Verb [the ingredient] until verbed. | loop end: verbed must echo the opening verb; if an ingredient is named here, it drops by 1 each lap; then the opening ingredient is re-checked |
Set aside. | break out of the innermost loop immediately |
Serve with auxiliary recipe. | call the named helper recipe (see below) |
Refrigerate [for N hours]. | end this recipe now; with “for N hours”, print the first N baking dishes first |
In & out
| Instruction | What it does |
|---|---|
Take ingredient from refrigerator. | reads one number from input into the ingredient (playground: the Input panel, whitespace-separated, one per Take) |
Serves N. | the recipe's final line: prints dishes 1…N, each emptied from the top. No Serves, no output |
The sous-chef contract
- An auxiliary recipe is a complete recipe placed after the main one.
- On
Serve with sauce.the sous-chef gets copies of all your bowls and dishes; their changes never touch yours. - They use their own ingredient list — your ingredient names are invisible to them.
- When they finish (or
Refrigerate), their first mixing bowl is poured on top of your first mixing bowl. - Sous-chefs may call sous-chefs, including themselves — recursion.
Character codes you'll actually use
| Character | Code | Character | Code |
|---|---|---|---|
| newline | 10 | digits 0–9 | 48–57 |
| space | 32 | A–Z | 65–90 |
! | 33 | a–z | 97–122 |
. | 46 | ? | 63 |
Remember: dry values print as numbers, back to back with no separator. Put a
32 ml water (space) or 10 ml anything (newline) between them.
Common kitchen disasters
| Symptom | Likely cause |
|---|---|
| parse error on a sentence | a typo'd verb or ingredient — Chef never shrugs and moves on |
| runtime error: “declared without a value” | you used an ingredient before Take or Fold filled it |
| runtime error on Add/Remove/Combine/Divide | the bowl was empty — arithmetic needs a top value to season |
| runtime error: loop exceeded its limit | the checked ingredient never reaches 0 (Cheffers stops runaway loops at 10 million laps) |
| no output at all | you forgot Serves 1. — or never poured into a baking dish |
output is a number mush like 54321 | dry numbers have no separators; add a splash of water (32 ml) |
| letters print as numbers | the values are still dry — Liquefy them |
| message comes out backwards | stacks! last in, first out — push your message in reverse |
House notes (this interpreter)
Where the official spec is silent, Cheffers
makes these calls: all values are integers and division truncates toward zero; loops
are capped at 10 million laps; sous-chefs stack at most 64 deep;
Mix well in the playground uses a fixed random seed, so shuffles are
reproducible there. The full details live in the
README's conformance notes.