Duocentehexaquinquagesimal
Brainfuck as one number, written in the digits of a golfing language.
Makonede, 2021 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 4 known programs · Test method
Run it
The idea
Makonede made Duocentehexaquinquagesimal in 2021, as the next link in a chain. Unary writes a brainfuck program as a count of zeros, and Golunar writes that count in decimal. Duocentehexaquinquagesimal writes it as a compressed integer of 05AB1E, a golfing language with 256 characters in its code page.
Read the story
The name means 256, but the specification's interpreter puts the code between two of 05AB1E's • and its generator writes base 255. A compressed integer cannot hold the • that closes it, so it has 255 digits, and the examples are written in base 255.
The machine
- Read the program as a number in base 255. The digits are
0to9,AtoZ,atoz, and then the rest of 05AB1E's code page in its order, without•. - Write the number in binary and drop the first 1.
- Every three bits are a brainfuck command.
| Bits | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
|---|---|---|---|---|---|---|---|---|
| Brainfuck | > | < | + | - | . | , | [ | ] |
The brainfuck runs as Try It Online runs it. Cells hold 8 bits and wrap, the tape grows both ways, and the end of the input reads 0.
Example
The cat is ,[.,], which is 56,623 in Golunar.
The cat is ,[.,], which is 56,623 in Golunar. In base 255 that is 222 × 255 + 13, and the digits 222 and 13 are ß and D.
The Hello World is 28 digits. Inside is a 72 command brainfuck program that needs cells that wrap.
The reverse cat ;&Oo is ,[>,]<[.<]. The adder 3Σª;â is ,>,[<+>-]<., which adds two bytes. The digits 0 and 1 are 48 and 49, and 97 is a.
Patterns it teaches
- Encoding tricks: a whole program held in one number.
See also
Duocentehexaquinquagesimal builds on Brainfuck.
Brainfuck equivalents
Brainfuck derivatives
Write your own in Run Convert a program from Duocentehexaquinquagesimal
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: duocentehexaquinquagesimal.
Command line
shib run duocentehexaquinquagesimal -e 'ßD' --input 'cat'shib manual duocentehexaquinquagesimalSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/duocentehexaquinquagesimal.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org