UnaryDialect of programming language Brainfuck
Unary is a dialect of Brainfuck, in which the program is written using one character. Unary was created in 2005 by Lode Vandevenne as a language which actually used only one token. In this meaning it’s even more minimalistic than Spoon which uses two tokens.
Unary program is created from Brainfuck in the following way. First, replace each Brainfuck command with a binary code using the following conversion table:
> -> 1000
< -> 1001
+ -> 1010
- -> 1011
. -> 1100
, -> 1101
[ -> 1110
] -> 1111
Concatenate individual binary codes into one binary number, and convert it into unary system using
0 as the token.
To execute Unary program, an inverse transformation is applied to the code before it is executed as Brainfuck program.
Unfortunately, even small tasks produce unnaturally large Unary codes for their solutions, and even the native Unary processor fails to proceed them correctly.
Hello, World!:Example for versions Müller's Brainfuck 2.0
This example is a translation of this example into Unary. The program itself is too large, so it is given in shortened way.
A string of 708184005756841022918598670049178934705323143517361395031673227349803938380 119378597780037353721967636097362645175347036417214959141923667629285233360 306016978751166690464736541968556 zeroes (approximately 7*10^182).
Fibonacci numbers:Example for versions Müller's Brainfuck 2.0
The program itself is too large, so it is given in shortened way. This example is a translation of Brainfuck example.
A string of 146778148267671308907956810331954494567788969820594569869966345643952713144 716974835554679004232198811425384864927587749892052914319949694507679080918 662111668706252645905597146857061868763596677983948203224834326028677131466 814323099384842068831692029352209655371798175735992788874417787727414767365 600708388513171998134124513036377960362194431944262896105838957344640161915 106378867996851411865254464299481964724009334722033995112813417289458551426 925973669722270280516592327343992579166227546099835941334220 zeros (approximately 1.5*10^509)