Minimized BF

From Esolang
Jump to navigation Jump to search

Minimized BF is brainfuck with only 4 commands +>[], created by User:None1. Despite the fact that it has only 4 commands, it's still very powerful and almost Turing complete.

Memory

This esolang runs on a circular tape with 256 8 bit cells, overflow and underflow wraps around.

Commands

Minimized BF doesn't need the - command because 255 + commands is equivalent to one - command. It doesn't need the < command, because 255 < commands is equivalent to one < command.

I/O

Unlike brainfuck, this esolang has no commands for I/O, but it still has I/O. Before a program runs, the input is read from a file and into the tape clockwise as a C-Style string, starting from the pointer. After the program terminates, the tape starting from pointer's initial position clockwise as a C-Style string is written into the output file.

Example Programs

Hello World (unoptimized)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
++++++++++++++++++++++++++++++++>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
+++++++++++++++++++++++++++++++++>

Cat Program


Truth Machine

See the page Ruck for a Truth Machine in Minimized BF.