Absurd Brainfuck

From Esolang
Jump to navigation Jump to search

Absurd Brainfuck is a Brainfuck-derivative by User:Tailcalled. It is called 'absurd' because the side effects flow in the opposite direction of the data. In other words, when you change a cell, you change what it *was*, not what it is. This can lead to undecidable or paradoxical scenarios, of course, especially when using the , command.

Commands

Absurd Brainfuck has the commands of Brainfuck, but with a "slightly" different effect.

   +    Changes the current cell to be one higher in the past
   -    Changes the current cell to be one lower in the past
   >    Goes to the next cell in the past
   <    Goes to the previous cell in the past
   .    Outputs the current value of the current cell.
   ,    Reads a value and puts it in the current cell in the past.
   [p]  Executes p until the value of the current cell is 0.

Memory

Absurd Brainfuck has an infinite tape in *both* directions.

Computational Class

Aside from one command, all temporal effects are reversible, so one can calculate the effect of reversing them, and those commands are trivial substitutions for Brainfuck ones. Absurd Brainfuck is a Turing machine with non-deterministic effects when it comes to the input. However, many languages are non-deterministic when it comes to input; the difference is that in Absurd Brainfuck inputs can easily cause undefined behaviour or contradictions, and only specific deterministic inputs cause the program to continue unimpeded.