Brainfart is an over-engineered Brainfuck interpreter, written in PHP.
It's a weekend pet project, nowhere near complete and slow as hell (by design).
>Moves the memory pointer to the right.
<Moves the memory pointer to the left.
+Increments the byte at the memory pointer by one.
-Decrements the byte at the memory pointer by one.
Input / Output operations
.Outputs the byte at the memory pointer.
,Accepts one byte of input and stores it at the memory pointer.
[ If the byte at the memory pointer is zero, jump to the command after the matching
:<alpha><brainfuck>; will replace occurrences of
Hello World!\n (hopefully)
!! separates input from commands. If present, whatever is left of it will be interpreted as comma separated input.
@@ will turn off peephole optimization. This may or may not weaken performance.
$$ will force a string output, instead of the default array.
~Sleep for as many seconds as the value of the byte at the memory pointer. This will definitely weaken performance.
Consecutive similar memory pointer commands will be grouped.
+++++ will be interpreted as a single command that increments the byte at the memory pointer by five.
This may or may not improve performance.
There are probably a ton of bugs. They are all intentional, to make coding in Brainfart a bit more challenging and fun.
Brainfart is licensed under the WTFPL, see
license for the full text.