esolang

Braincrash

Brainfuck with two symbols, a space that waits and a ! that acts.

TehZ, 2011 · Turing complete: yes · ●●○ moderate · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: cat

The idea

TehZ made Braincrash in 2011 out of brainfuck and a turning wheel. A command pointer runs round the eight brainfuck commands in the order +-><.,[] and moves on by one after every character of the program. A space only moves it on; a ! runs whatever command it points at. To write a program you put the wheel under your line and press ! each time it shows the command you want. A program is always at least as long as the brainfuck it stands for, and usually several times longer.

The machine

CharacterDoes
!Run the brainfuck command under the pointer
anything elseNothing

Line feeds do not count. Below the wheel is ordinary brainfuck with byte cells that wrap. The Hello, World! program is the 72 command brainfuck program +[-->-[>>+>-----<<]<--<---]>-.>>>+.>>..+++[.>]<<<<.+++.------.<<-.>>>>+., which walks left of where it starts. So this implementation gives the tape 30,000 cells on each side.

Example

The cat is ,[.,].
Expected: A

The cat is ,[.,]. The second program is ++++++++[>++++++++<-]>+., which multiplies 8 by 8, adds one and prints 65. Each + in a row costs a full turn of the wheel, eight characters.

Further

Ideas it shows

Braincrash builds on Brainfuck.

Turning tarpits

Brainfuck equivalents

Write your own in Run Convert a program from Braincrash

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run braincrash -e '     !!     !! !' --input 'abc'
shib manual braincrash

Source

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

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

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