Dialect 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 
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 
925973669722270280516592327343992579166227546099835941334220 zeros (approximately 1.5*10^509)