5D 5D Brainfuck With Multiverse Time Travel With Multiverse Time Travel

From Esolang
Jump to navigation Jump to search
5D 5D Brainfuck With Multiverse Time Travel With Multiverse Time Travel
Paradigm(s) Imperative
Designed by User:SoundOfScripting
Appeared in 2020
Memory system Cell-based
Dimensions Five-Five-dimensional (in spirit-spirit)
Computational class Turing complete
Reference implementation Unimplemented
Influenced by 5D Brainfuck With Multiverse Time Travel
File extension(s) .5d5dbfwmvttwmvtt


5D 5D Brainfuck With Multiverse Time Travel With Multiverse Time Travel is a superset of 5D Brainfuck With Multiverse Time Travel with parallel universes and time travel. It is based on 5D 5D Chess With Multiverse Time Travel With Multiverse Time Travel.

Behavior

Like 5D Brainfuck With Multiverse Time Travel, 5D 5D Brainfuck With Multiverse Time Travel With Multiverse Time Travel operates on an array of 5D Brainfuck With Multiverse Time Travel program cells initialized to the 5D 5D Brainfuck With Multiverse Time Travel With Multiverse Time Travel program's source code (treated as a 5D Brainfuck With Multiverse Time Travel program). Multiple pointers to memory, and to the program, may coexist in each timeline. The state of the tape is stored as a timeline, allowing programs to rewind time. In addition, programs may create and traverse parallel universes, which are timelines that all execute simultaneously, "below" their parent timeline. Each timeline has its own pointer.

The following graphic demonstrates the behavior of parallel timelines. Note that this does not include time travel, as that would make the graphic impossible to read.

main timeline    split
-------------------+---------------------------------------------->
                   |     split      2nd timeline dies
      2nd timeline +-------+-----------X /------------------------>
                           |            / 3rd timeline replaces 2nd
              3rd timeline +-----------/

Once the main timeline halts (by running out of instructions to run), all other timelines are killed.

Programs consist of single-character instructions, as follows:

Instruction Description
> Move all memory pointers in this timeline 1 cell to the right.
< Move all memory pointers in this timeline pointer 1 cell to the left.
+ Increment all cells pointed to in this timeline (increments the raw binary of the program cell in UTF-8).
- Decrement all cells pointed to in this timeline (decrements the raw binary of the program cell in UTF-8).
. Output the output of all program cells pointed to in this timeline.
, Input a character and store it in the input of all program cells pointed to in this timeline.
[ Move this instruction pointer to the matching ] if all program cells pointed to in this timeline are the null program.
] Move this instruction pointer back to the matching [ if any program cells pointed to in this timeline are not the null program.
~ Rewind the current tape back in time by 1 step.
( Spawn a parallel timeline below the current timeline, with a copy of the tape and all pointers in it. This instruction pointer jumps to the matching ). Spawn a new instruction pointer within the newly spawned timeline, beginning execution immediately after this instruction.
) If this is executed outside of the main timeline, kill this timeline and all the memory/instruction pointers currently in it. Otherwise, do nothing.
v Move all memory pointers in this timeline to the same location in the next ("lower") parallel universe.
^ Move all memory pointers in this timeline to the same location in the previous ("higher") parallel universe.

Notes

It is not necessary for [] and () braces to be matched with each other, as long as each opening brace matches with its own closing brace. This means that [(]) is valid syntax, and so is ([)].

Yes, the language is not strictly five-five-dimensional.

If a program cell would halt execution, it becomes unusable.

Implementation-dependent behavior

The program's program cell count, wrapping behavior, cell size, and behavior upon input reaching EoF are implementation-dependent.

Race conditions caused by simultaneous instructions are undefined, and implementation-dependent.

Computational class

Being an extension to 5D Brainfuck With Multiverse Time Travel, the language is trivially terrible.

Examples

uuhhhh.....