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
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
| Digits | Group |
|---|---|
1x | Heap: odd loads, even stores |
2x | Stack moves: pop, copy, swap, reverse, roll, by position from the top |
3 length digits | Push a number of several digits; 9 continues it |
4 digit | Push one digit |
5x 6x | Read and print, odd as a number, even as a character |
7x | Control: if, otherwise, while, do-while, break, function, call, return, end |
8x | Arithmetic: not, less than, power, plus, minus, modulo, plus one, minus one, times, division |
0...0 | A comment, ended by the same digits |
Example
The truth machine is INPUT N, then a do-while that copies and prints the number.
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
See also
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 bespokeSource
- 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