BESPOKE

Prose in Execution


On this page:

This page contains example programs written in Bespoke, along with explanations of how they work. Each program aims to read as natural prose while doing something interesting computationally.

Hello, World!

more peppermint tea?
ah yes, it's not bad
I appreciate peppermint tea
it's a
refreshing beverage

but you immediately must try the gingerbread
I had it
sometime, forever ago
oh, and it was so good!
made the way a gingerbread must clearly be
baked

in fact, I've got a suggestion
I may go outside
to Marshal Mellow's
Bakery
so we both receive one

This warm tea-shop conversation is actually a complete "Hello, World!" program. Each word contributes its letter-count to the instruction stream; the actual meaning of the words is irrelevant to the machine, yet every detail has been chosen so that the prose sounds natural.

The program pushes the codepoints of each letter in "Hello, World!" onto the stack and outputs them one by one using OUTPUT CH.

Fibonacci

read a note I wrote you
it says "someone shall love you,
as big as past lovers
did,
put in a collection"
surely it will be
in truth, somebody here is probably
isolated
existing in pain without you

This short poem takes a number N as input and outputs the first N Fibonacci numbers, one per line. The stack holds the two most recent values while a counter decrements toward zero. The CONTROL WHILE loop continues as long as the counter is positive.

Truth Machine

there I stumble
falling up
even whilst I go down
falling out

The classic truth machine: reads a single character from input. If it is '0', output 0 once and halt. If it is '1', output 1 forever. Four words, four instructions — and a vague sense of existential vertigo.

ASCII Loop

love
mysterious, strange, cryptic as ever
defies an explicit meaning
has you in
place, frozen
spinning around, and left delirious
spouting complete gibberish
without end

Loops forever, printing every printable ASCII character in sequence, starting from the space character (32) and cycling back. The poem mirrors this endless repetition — something spinning, something without end.