esolang

MindVomit

A brainfuck with more commands and less room. Loops come in three bracket shapes, so they nest three deep at most.

Mayedl10, 2022 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 7 known programs · Test method

Run it

Expected: HI!

The idea

Mayedl10 made MindVomit in 2022 as a "Brainfuck+-". It has more than brainfuck, with one variable, an if block, a goto and commands that jump the pointer to a value or back to 0. It also has less. A loop cannot hold another loop of the same bracket, so with (, [ and { there are three levels and no more. A loop remembers the slot it started on and repeats until that slot is 0, wherever the pointer has gone since.

Read the story

Every program has to end in x, which quits, or ?, which runs it again forever.

The machine

32,768 slots of one byte each, a pointer and one variable, all 0 at the start.

CommandDoes
> < + -Move the pointer, change the slot
o nPrint the slot as a character; print a line break
iRead a number into the slot
b :Pointer to 0; pointer to the slot's value
; z rSlot to its own position; slot to 0; every slot to 0
g wSlot to the variable; variable to the slot
L ... JRun the inside only if the slot is not 0
( ) [ ] { }Loop until the remembered slot is 0
~ #Mark a goto point; jump to the last one
x ?Quit; start again

Example

The alphabet reads 65 into the first slot, prints it and keeps it in the variable.
Expected: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Expected: #

The alphabet reads 65 into the first slot, prints it and keeps it in the variable. Then 25 times it steps right, writes the variable, adds one, prints and keeps the new value. In the last line the slot is 1 at the L, so the 34 pluses inside run and it prints character 35. Without the first + it prints nothing.

Patterns it teaches

  • Turing tarpit: brainfuck with a few conveniences and a hard limit on nesting.

Further

MindVomit builds on Brainfuck.

Brainfuck derivatives

Cell-based

Write your own in Run Convert a program from MindVomit

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: mindvomit.

Command line

shib run mindvomit -e '+++++++(>++++++++++o<-)x'
shib manual mindvomit

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/mindvomit.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org