Recipe Card
Served Output
Nothing has been served yet.
Ingredient Shelf
The pantry is empty.
Mixing Bowl
The bowl is clean.
Baking Dish
No dish is prepared.
Chef's Notes
No notes yet.
Cook strange recipes. Serve real output.
Nothing has been served yet.
The pantry is empty.
The bowl is clean.
No dish is prepared.
No notes yet.
Chef is an esoteric programming language where programs are written as cooking recipes. It was designed by David Morgan-Mar in 2002. Although it looks humorous, it uses real programming concepts: variables, stacks, arithmetic, and output.
In Code Kitchen, you write a Chef recipe in the editor, and the interpreter parses and executes it step by step — so you can see exactly how stacks and variables work behind the scenes.
Every Chef program follows this structure:
value unit name (e.g. 72 g haricot beans).
Each ingredient is a variable with a numeric value. The name can be multiple words (e.g. "haricot beans").
The mixing bowl is a stack (last in, first out). Put pushes to the top. Fold pops from the top. Arithmetic affects the top item only.
The baking dish is the output buffer. Pour copies the bowl contents into the dish. When the program ends, the dish contents become the output.
Liquefy converts numbers to characters using ASCII codes (e.g. 72 → 'H', 101 → 'e'). This is how Chef programs produce text output.
| Command | What it does | Stack operation |
|---|---|---|
Put <ingredient> into the mixing bowl. |
Push ingredient's value onto the stack | PUSH |
Fold <ingredient> into the mixing bowl. |
Pop top value and store it in the ingredient | POP |
Add <ingredient> to the mixing bowl. |
Add ingredient's value to top of stack | top += value |
Remove <ingredient> from the mixing bowl. |
Subtract ingredient's value from top of stack | top −= value |
Combine <ingredient> into the mixing bowl. |
Multiply top of stack by ingredient's value | top ×= value |
Divide <ingredient> into the mixing bowl. |
Divide top of stack by ingredient's value | top ÷= value |
Liquefy contents of the mixing bowl. |
Convert all values in the bowl to characters (ASCII) | chr() |
Stir the mixing bowl for N minutes. |
Roll the top element down N positions | ROTATE |
Pour contents of the mixing bowl into the baking dish. |
Copy bowl contents to the output dish | COPY → dish |
Clean the mixing bowl. |
Empty the bowl (remove all values) | CLEAR |
Refrigerate [for N hours]. |
End execution and serve the output | HALT |
Put.Add, Remove, Combine, Divide) to modify values.Liquefy to convert numbers into characters (if you want text output).Pour to copy the bowl contents into the baking dish.Refrigerate to end execution. The baking dish contents become the program output.Tip: Without Liquefy, values are output as numbers. With it, they are output as characters. The value 72 becomes 'H' because chr(72) = 'H' in ASCII.
This recipe adds 5 + 3 and outputs the result:
Number Stew. Ingredients. 5 g apples 3 g pears Method. Put apples into the mixing bowl. Add pears to the mixing bowl. Pour contents of the mixing bowl into the baking dish. Refrigerate for 1 hour. Serves 1.
Put apples → pushes 5 onto the bowl. Bowl: [5]Add pears → adds 3 to the top. Bowl: [8]Pour → copies bowl to dish. Dish: [8]Refrigerate → output is "8"space
33 = !
48 = 0
65 = A
66 = B
67 = C
72 = H
97 = a
98 = b
99 = c
100 = d
101 = e
108 = l
111 = o
114 = r
119 = w
Full table: A-Z = 65–90, a-z = 97–122, 0-9 = 48–57