Windy

A 2D esoteric language where code flows like wind. GitHub · SPEC

NORMAL hjkl move · yubn diagonals · i insert · Esc back
stdout

      
stderr

      
Opcode reference (35 opcodes — click to expand)

Every cell is one Unicode codepoint. Outside string mode, the IP decodes its current cell as one of these opcodes; inside string mode (toggled by ") every cell except " pushes its codepoint to the stack instead.

CatGlyphNameEffect
Flow ·NOPDo nothing.
Flow@HALTRemove the executing IP from the live list. When empty, the program ends.
Flow#TRAMPOLINEAdvance an extra step (skip the next cell).
FlowtSPLITSpawn a new IP at (x − dx, y − dy) going (−dx, −dy); empty stack, strmode off.
Wind >MOVE_Edir ← (+1, 0)
WindMOVE_NEdir ← (+1, −1)
Wind ^MOVE_Ndir ← (0, −1)
WindMOVE_NWdir ← (−1, −1)
Wind <MOVE_Wdir ← (−1, 0)
WindMOVE_SWdir ← (−1, +1)
Wind vMOVE_Sdir ← (0, +1)
WindMOVE_SEdir ← (+1, +1)
Wind~TURBULENCEPick a random direction from the eight winds. Use --seed for reproducibility.
SpeedGUSTspeed += 1. The IP advances speed cells per tick; only the destination decodes.
SpeedCALMspeed −= 1; runtime trap (exit 134) if it would yield 0.
Lit09PUSH_DIGITPush the digit's integer value (0–9).
Lit"STR_MODEToggle string mode.
Arith+ADDb ← pop; a ← pop; push a + b
ArithSUBpush a − b
Arith*MULpush a × b
Arith/DIVFloor division. b == 0 ⇒ push 0.
Arith%MODFloor modulo. b == 0 ⇒ push 0.
Arith!NOTpush 1 if a == 0 else 0
Arith`GTpush 1 if a > b else 0
Stack:DUPDuplicate the top.
Stack$DROPDiscard the top.
Stack\SWAPSwap the top two.
Branch_IF_Ha ← pop; dir ← east if a == 0 else west
Branch|IF_Va ← pop; dir ← south if a == 0 else north
I/O.PUT_NUMPop, write decimal repr followed by a space.
I/O,PUT_CHRPop codepoint, write as a Unicode character.
I/O&GET_NUMRead one decimal integer from stdin (EOF → −1).
I/O?GET_CHRRead one Unicode character; push codepoint (EOF → −1).
GridgGRID_GETy ← pop; x ← pop; push G[(x, y)] (missing ⇒ 0x20).
GridpGRID_PUTy ← pop; x ← pop; v ← pop; G[(x, y)] ← v

Stack underflow yields 0 (no trap). Pop from empty, divide by zero, and unknown glyphs are all explicitly defined — see SPEC §7.

Each IP carries a positive-integer speed (default 1) and advances speed cells per tick — only the destination cell decodes (SPEC §3.7). End-of-tick coincidence triggers a collision merge (§3.8): stacks concatenate in birth order, directions sum and clip ((0,0) ⇒ merged IP dies), speed becomes max, strmode resets. Toggle v0 legacy in the toolbar to disable both and reproduce the v0.4 surface.