Tech News
← Back to articles

Compiling Dinner

read original related products more articles

Compiling Dinner

When you read a recipe, you’re already programming. Ingredients are inputs. Actions—chop, stir, simmer—are instructions. The kitchen is your runtime environment, and you, the cook, are the processor. If you follow the recipe to the letter, you get the expected output: a finished dish. Miss a step, and you’ve introduced a bug. Burn the onions, and you’ve hit a runtime error.

Seen this way, recipes are languages, and cooking is compilation.

Recipes as Grammar

A recipe might say: “Sauté onions in butter until golden.” Even without thinking, you break it down: • Action: sauté • Ingredient: onions • Resource: butter • Condition: until golden

That’s parsing. You’ve taken natural language and structured it into a sequence the kitchen can execute. If you were to formalize it, you could even describe recipes in a simple grammar:

Recipe ::= Ingredients Steps Step ::= Action Ingredient (Condition)?

The idea isn’t to make cooking robotic. It’s to notice that the same mental steps compilers use to translate source code are happening every time you follow instructions in the real world.

... continue reading