Sign in →
CloudLab Works emblem: Waku the orca ringed by CloudLab and WorksCLOUDLAB WORKScrossed whale bones, one end a wrenchCloud City, headwaters of the agentic cloud revolution!

Code as Poetry

Verse in the syntax of the languages the lab actually runs: a loop, a guard clause, a comment doing the work a line break would elsewhere. None of it compiles — that was never the point.

Worked example: Poem IV, line by line

The form's whole method is here in five lines: pick a language feature that already has a meaning, and don't translate it — let it stand for itself. Rust's borrow checker distinguishes owning a value from merely referencing it; that distinction, and only that one, is the entire poem.

struct Heart;

fn devotion(mine: &Heart) {
  // I do not need to consume you to know you
  // Immutably borrowed, completely safe
  let _view = mine;
}

fn main() {
  let my_heart = Heart;

  devotion(&my_heart);

  // Because I only borrowed your presence,
  // you remain entirely whole when I leave
  let _stills_yours = my_heart;
}
  1. struct Heart; — a unit struct: no fields, nothing to extract or spend. The heart isn't data to be read out; it's just a thing that exists.
  2. fn devotion(mine: &Heart) — the function signature takes a reference to a Heart, not the Heart itself. In Rust this is a real, load-bearing distinction: a reference borrows; only a bare Heart parameter would take ownership.
  3. The two comments inside devotion state the poem's claim directly, and the code backs it: let _view = mine binds a look at the value, never the value.
  4. devotion(&my_heart) in main passes a borrow across the call. Ownership of my_heart never leaves the caller's scope — the compiler enforces this; a version that instead moved the value would fail to compile if main tried to use my_heart again afterward.
  5. let _stills_yours = my_heart is only legal because nothing upstream ever took ownership. The line that proves the poem's argument and the line that would fail to compile if the argument were false are the same line.