← thecodex.expert · The Codex Family of Knowledge
Recipes

The same real program, in every language

The syntax comparisons answer “how do I write a loop here”. These answer something harder: given a job a working programmer actually does, what shape does each language push the solution into?

2 live 8 planned Every line compiled and run

Why a second tier

A three-line snippet tells you what a language’s for loop looks like. It cannot tell you that Go will invert your whole control flow, that Java’s two-method iterator contract forces the fetch into the wrong place, or that C makes you encode “there is nothing left” in the return type because nothing else will. Those only show up at forty lines, doing a job worth doing.

Every recipe is the same task in every language, built to one shared design so the differences you see belong to the languages. Each one is compiled and run before it ships, and anything that could not be verified says so on its face.

Iteration and data

Text

Word frequency

Read prose, normalise it, and count what is in it.

not written yet

Extract every match

Regex across a whole document, with capture groups.

not written yet

Files and formats

Read a CSV and total a column

Parsing, type conversion, and the rows that are wrong.

not written yet

Round-trip JSON

Where the standard library stops and a dependency starts.

not written yet

Structure and state

A validated type

Construction that refuses invalid values, plus equality.

not written yet

A state machine

Sum types, enums, and what happens when a case is missed.

not written yet

Errors

Custom error, propagated

Raise it deep, catch it once at the top, keep the context.

not written yet