From Esolang
Jump to navigation Jump to search

Braimmental is a simple combination of Brainfuck and Emmental by User:BoundedBeans that drastically changes how to write programs in either one.


Syntax is like normal brainfuck, except that inside of loops, the code becomes Emmental. That's not all, however. If you want to redefine an Emmental command, you have to give it a Braimmental program, starting with the normal outer brainfuck layer and inner Emmental. This creates an alternating depth structure that gets worse the more you want to nest loops.

Transferring of data

The tape is made out of bytes, but is unbounded in both directions. The area to the left of the pointer represents the queue in Emmental, up until the point where there are three zeroed cells in a row, which ends it. The front of the queue is closer to the pointer, while the back of the queue is farther. The stack is at the pointer and to the right, where the pointer is at the top of the stack. Whenever a loop starts, it converts the tape to the stack and queue, and at the end of the loop, it checks if the top of the stack is not zero, and if that is true, restarts the loop and repeating the Emmental program. This allows for some weird things, like shifting cells easily. In redefined Emmental commands, when they are run it converts it back to the tape, and any loops in that convert it to the stack and queue, and so on.




Hello world=

(This exits the loop at the end because the stack is empty, and therefore is considered to have zero at the top.)