hagler ~/learn$cat glossary.md

Glossary, in Kid Language

Kitchen word first, programmer word second, one sentence each.

Kitchen pictureProgrammer wordWhat it means
One cooksingle-threadedJavaScript does one instruction at a time. Always.
Standing and staring at the toasterblocking / synchronousWaiting in a way that freezes everything else.
Leaving a ticket and walking awayasynchronousWaiting in a way that lets other work happen.
The ticket you leavecallbackA function to run later, when something finishes.
The ticket railevent loopThe list the cook checks whenever hands are free.
A receipt for a smoothiePromiseA value that isn’t ready yet. Starts the moment it’s made.
Still blending / here you go / sorry, outpending / fulfilled / rejectedThe three states of a Promise.
“Pause this story until it’s ready”awaitWait for a Promise inside an async function.
A recipe cardEffectA plan for producing a value. Does nothing until run.
“You get” lineSuccess type (slot 1)What the Effect produces if all goes well.
“Can go wrong” lineError type (slot 2)The named, expected failures.
“Needs” lineRequirements type (slot 3)The services the Effect needs before it can run.
Nothing on that lineneverNothing can go wrong, or nothing is needed.
Handing the card to the kitchenrunning (Effect.runPromise)Actually doing the plan. Done once, at the edge of the program.
“Do this step and hand me the result”yield* inside Effect.genRun one sub-recipe and get its value.
Out of mangoerror (expected)A known failure, written on the card, must be handled.
Kitchen firedefect (unexpected)A bug. Not on the card. Crashes loudly on purpose.
A name tag on a problemtagged error (Data.TaggedError)An error class with a _tag string so you can tell it apart.
Crossing an error off the cardEffect.catchTagHandle one specific error; its name leaves the type.
Try againretryRun the card again on failure, per some rule.
Give up after a whiletimeoutFail with a timeout error if it takes too long.
An appliance the recipe asks forservice (Context.Service)A described capability, like “a Blender that can blend.”
The kitchen supplying the appliancelayer (Layer.succeed)A way to build or provide a service.
A pretend blender for practicetest implementationA fake service used to test a recipe without side effects.
Plugging in the applianceprovide (Effect.provide)Satisfy a requirement; the “Needs” line shrinks.
A bookmark in a half-done recipefiberA lightweight running Effect that can be paused, resumed, or stopped.
Several recipes in progressconcurrencyMany things underway with one cook. Not the same as many cooks.
Pulling the bookmark outinterruptionStopping a fiber cleanly; its cleanup still runs.
First one done winsraceRun two; keep the first result; interrupt the other.
Borrow it, always return itacquire / release (Effect.acquireRelease)Get a resource and guarantee cleanup on every ending.
The due datescopeThe window during which a borrowed resource is held.

hagler ~$