A programming language where the program is an ecosystem, and the instruction pointer is alive — and hungry.
The character 蛊 is a pictogram: worms (虫) sealed inside a vessel (皿). In the ancient ritual, venomous creatures were locked in a jar to devour one another; the one that survived became the Gu — a living instrument. That is this language. A Gu program is a vessel: a walled map with burrows full of rabbits, patches of grass, and one Wolf. Execution is nothing but the life inside. What the creatures' hunger does to the vessel is the computation.
There are no variables in Gu, no statements, no expressions:
- The Wolf is the instruction pointer. It trots through corridors, and the shape of the corridors is the control flow.
- Burrows are the registers. A burrow's value is its population of rabbits.
- Decrement is a hunt. The only conditional in the language is the outcome of a hunt: a sated Wolf trots on; a hungry Wolf turns off the trail.
- Output is a howl. Halting is the Wolf falling asleep in its den.
- Grass makes populations grow every 8th tick, without anyone touching anything: in Gu, the passage of time is an arithmetic operator.
Everything is deterministic. Same vessel, same offerings, same life — tick for tick.
Gu is Turing-complete by direct construction: burrows are unbounded counters,
+ is increment, the hunt gate ? is decrement-and-branch-if-zero, and
corridor topology is goto. That is a Minsky register machine, drawn as a farm
(see spec/SPEC.md §7).
Here is the countdown program, whole — nine rabbits live inside the wall, and the Wolf runs laps announcing the census until the burrow is empty:
##########
####9B####
#W n? #
# Z## #
# #
##########
$ gu examples/countdown.gu
9
8
...
0
gu: the Wolf sleeps in its den after 167 ticks
cargo build --release
./target/release/gu examples/hello.gu # Hello, World!
echo "any text" | ./target/release/gu examples/cat.gu
echo -n 1 | ./target/release/gu examples/truth-machine.gu
./target/release/gu examples/fibonacci.gu # 1 1 2 3 5 8 13 21 ...
./target/release/gu examples/primes.gu # 2 3 5 7 11 13 17 ...
./target/release/gu --watch examples/seasons.gu # watch a vessel live
./target/release/gu --gif run.gif examples/countdown.gu
The interpreter is zero-dependency Rust (vessel parser, engine, terminal
render, and a built-in gif encoder — LZW included). --watch renders the
vessel live in the terminal; --gif records any run as an animated GIF.
Every Gu program is something you can watch:
You do not have to draw vessels by hand. tools/guc.py compiles a tiny
register-machine assembly into a Gu farm:
init A 1
init B 1
loop:
num A ; howl a fibonacci number
L1: dec A L2 ; T = A
inc T
goto L1
L2: dec B L3 ; A = B, T = A_old + B
inc A
inc T
goto L2
L3: dec T done ; B = T
inc B
goto L3
done:
goto loop
python3 tools/guc.py asm/fibonacci.asm examples/fibonacci.gu
Compiled vessels are looms: every instruction is a staple reaching up to its
burrow at the top; sequential flow snakes through corridor bands below; a
hungry Wolf drops down a private column to the landing strip of its jump
target. Corridors cross freely — a Wolf walks straight through open
intersections — so the whole control-flow graph is drawn on one plane.
asm/primes.asm (trial division, ~40 instructions) compiles to a 235×305
vessel where the Wolf howls every prime in order:
| Glyph | Name | What it does |
|---|---|---|
# |
wall | fences the Wolf in |
|
floor | corridor |
W |
the Wolf | the instruction pointer; exactly one |
B, 0–9 |
burrow | a register; connected cells form one burrow, digits set the starting population |
? |
hunt gate | the Wolf hunts the adjacent burrow: sated (−1) it trots straight on, hungry (empty) it turns right |
+ |
feeding trough | +1 rabbit in the adjacent burrow |
o |
howl stone | output the adjacent population as a byte (mod 256) |
n |
count stone | output the adjacent population as a decimal number |
i |
offering bowl | read one input byte into the adjacent burrow; on EOF the Wolf leaves (halt) |
Z |
den | the Wolf sleeps; halt |
, |
grass | every 8th tick, a burrow beside it with ≥2 rabbits gains one |
Movement: each tick the Wolf steps straight if it can, else left, else right, else back. Bends steer it; dead ends turn it around; gates are the only decisions. Full semantics: spec/SPEC.md.
cat is a meadow ring — the Wolf carries each byte from the offering bowl to the
howl stone until the farmer stops coming:
#######
#W i #
# BBB #
# o #
#######
seasons computes with time alone: nobody feeds the burrow, but there is grass,
so the census the Wolf howls grows lap after lap. Husbandry as arithmetic:
#########
#W #
# #2,## #
# #B### #
# n #
#########
And the truth-machine is a gauntlet of 49 hunt gates and one eternal ring — see examples/truth-machine.gu.
Gu is named for the Gu Masters of Reverend Insanity (蛊真人): cultivators whose every tool, weapon and spell is a living creature, raised and refined inside the aperture of their own body. A Gu program is such an aperture. Its author does not command the creatures; they build a world in which the creatures' hunger cannot help but compute the answer.
Created by greatlove (also known as nobottomline).
- Web playground (the interpreter compiles to WASM as-is)
- Multiple Wolves — deterministic concurrency, wolf packs
- Predation between species — burrow-to-burrow dynamics beyond grass
- An esolangs.org page and a proper gallery of vessels
MIT.

