¿
Brainfuck packed two commands to a byte, one in each hex digit.
None1, 2024 · Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
None1 made ¿ in 2024. It is brainfuck with another spelling. A program starts with ¿, the byte BF, and ends with ï, the byte EF, or it does not run at all. Every byte in between is two hex digits, and each digit is one of brainfuck's eight commands. Odd digits name the commands in the high place and even digits in the low place, so 74 is .-.
Read the story
Most bytes that do something are not printable. The specification gives its Hello, World! as a hex dump of 55 bytes, the two markers and 53 bytes of commands.
The machine
| Brainfuck | High digit | Low digit |
|---|---|---|
+ | 1 | 0 |
, | 3 | 2 |
- | 5 | 4 |
. | 7 | 6 |
< | 9 | 8 |
> | B | A |
[ | D | C |
] | F | E |
A digit in the wrong place does nothing. The brainfuck underneath is the specification's Python interpreter. It has a million cells of bytes that wrap; , stores 0 at the end of input and . prints the cell as a character.
Example
The cat is three bytes between the markers.
The cat is three bytes between the markers. < is 3C, ,[; r is 72, .,; ð is F0, ]+. Together they make ,[.,]+, and the last + only fills the byte.
Printable bytes can still spell a program. @ is 40, a high digit that does nothing and a low +. Ú is DA, [>; ( and $ are a low < and a low -; ú is FA, ]>; q is 71, a high .. This is ++++++++[>++++++++<-]>+., which prints 65, an A.
Patterns it teaches
- Turing tarpit: brainfuck's eight commands and nothing more.
- Encoding tricks: each hex digit is a command, and its place picks which half of the table it reads.
Further
See also
¿ builds on Brainfuck.
Binary
Brainfuck equivalents
Write your own in Run Convert a program from ¿
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: ubf.
Command line
shib run ubf -e '¿<rðï' --input 'Hi there'shib manual ubfSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/ubf.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org