We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Monotonic Doublefuck

From Esolang
Jump to navigation Jump to search

Monotonic Doublefuck is an esolang User:ChuckEsoteric08 which is a derivative of brainfuck made to explore monotonic computation.

Specification

Monotonic Doublefuck works on a binary tape infinite to the right, with cells initizaled as zeros

Command list
Command Description
> Move tape pointer to the right
< Move tape pointer to the left
[ If current cell is zero jump past matching ]
] Jump to matching [
xy Both x and y are bits. It adds bit x to the left of current cell and adds bits y to the right of current bit.

Computational class

Monotonic Doublefuck is Turing-complete as Bitwise Cyclic Tag can be translated into it. It uses following layout:

00000 1101x 1101x ... 1101x 10x 10x ... 10x 000

Here 10x reprsents existing data bit and 1101x represents deleted bit

Program starts with:

>>>>>

All data bits except the last are translated like that:

  • 0 is 10>>
  • 1 is 11>>

Last bit is translated like that:

  • 0 is 10<
  • 1 is 11<

Then it is followed by:

[<<<]>>>[

And then instructions are translated:

  • 0 is >[>>>>>]11<[<<<<<]>>>>
  • 10 is >[>>>>>]>[>[>>>]10>]<<[<<<]<[<<<<<]>>>>
  • 11 is >[>>>>>]>[>[>>>]11>>>>]<<<<<[<<<]<[<<<<<]>>>>

Translated code ends with ].