Tutorial
You arrive at the caravan grounds just as dusk blues the awnings.
An indigo-coated woman steps into your path before you reach the gate. "Juniper," she says, brisk as a bell strike. "I run the Wandering Moon-Market. We open at moonrise, and my script is still in pieces. Can you help?" She says it like a question with only one sensible answer.
At the nearest stall, a baker knocks flour from her wrists and rescues a tray of star buns before they scorch. Farther down the lane, someone with a stubborn kettle scratches out a line, grimaces, and tears the page cleanly in half. You know the smell here: lamp oil, sweet yeast, hot metal. A market this close to opening should already have its voice.
Juniper puts the problem in your hands: half-written stall cards, repeated barks, scene details with no machinery behind them. No one suggests a tool. You look at the scraps, the signboard, the flour-marked cards, the torn omen notes, and know what they want. Ranty suits this kind of work because it starts as prose, turns to rules only when the prose asks for them, and stays close to the page all the way through. You have patched stranger performances together with worse ink and less time.
These pages are for people who make stories first and code second. When the syntax gets strange, the pace slows on purpose. You do not need to memorize everything at once. You only need to help Juniper solve one opening-night problem after another.
How to use this tutorial
- Code blocks marked
ranty exampleare meant to run exactly as written. - Every tutorial sample is shown as input first and result second.
- The very first example is labeled
InputandOutputto show the pattern; later runnable examples usually leave that pairing implicit. - Some lessons include a brief wrong turn before the fix. Those use plain text labels such as
Wrong attemptandWhat happened. - Every runnable example is paired with an expected output block and is checked by the docs verifier with a fixed seed.
- Each lesson picks up the same Moon-Market scramble, so the tutorial reads like one job instead of ten detached puzzles.
- Each lesson ends with a quiet reference paragraph for the broader docs, and a few sections keep a narrow
See alsonote only when it is genuinely specific to that subsection. - Some outputs are finished in-world lines. Others are quick workshop checks on the exact sign, card, queue cue, notebook page, or final script you are fixing in that moment.
The road ahead
- Text, Comments, Escapes, and Hinting
- Accessors, Variables, Constants, and Nothing
- Lists, Tuples, Maps, and Access Paths
- Arithmetic, Logic, and Conditionals
- Function Calls, Functions, and Ranges
- Blocks, Selectors, and Sinking
- Repetition State, Control Flow, and Attributes
- Pipes and Argument Spreading
- Output Editing and Formatting
- Prototypes, Modules, and Determinism
By the end, Juniper will have her sign, the baker her stall cards, the tea seller his omen kit, and you a small but expressive generator to steal ideas from for your own scenes, storylets, rumors, room descriptions, or NPC barks.