esolang

Bespoke

Programs that read as poems, where only the length of each word counts.

Josiah Winslow, 2025 · Turing complete: yes · ●●● hard · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: 0

The idea

Josiah Winslow made Bespoke in 2025 after his earlier language Poetic. Each word stands for the digits of its length, so peppermint is 0 and immediately is 1 then 1. The digits are read as instructions for a stack and a heap of numbers of any size. Because any words of the right lengths will do, a program can be written about tea and gingerbread and still print Hello, World!. The specification gives a mnemonic for every instruction whose words have the right lengths, such as PUSH SEVENTH for 4 then 7.

The machine

DigitsGroup
1xHeap: odd loads, even stores
2xStack moves: pop, copy, swap, reverse, roll, by position from the top
3 length digitsPush a number of several digits; 9 continues it
4 digitPush one digit
5x 6xRead and print, odd as a number, even as a character
7xControl: if, otherwise, while, do-while, break, function, call, return, end
8xArithmetic: not, less than, power, plus, minus, modulo, plus one, minus one, times, division
0...0A comment, ended by the same digits

Example

The truth machine is INPUT N, then a do-while that copies and prints the number.
Expected: 1 1 2 3 5 8 13

The truth machine is INPUT N, then a do-while that copies and prints the number. With 0 it prints once; with 1 it never stops. The second program reads n and prints the first n Fibonacci numbers, one per line. The specification says it was the first Bespoke program ever written.

Further

Ideas it shows

Pseudonatural

Stack-based

Write your own in Run Convert a program from Bespoke

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: bespoke.

Command line

shib run bespoke -e 'there I stumble
falling up
even whilst I go down
falling out' --input '0'
shib manual bespoke

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/bespoke.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org