brainwash is an optimizing interpreter for the Brainfuck programming language written in C. It is developed with speed, low memory footprint, functionality and portability in mind.
Some features and/or design details:
+ (-) command is executed, it will assume its minimum (maximum) value (i.e. cells wrap-around)., (comma) command is executed after the end of input, brainwash will leave the cell values intact.! and # that sometimes act as commands and other times don't (comments). When both the code and its input are read from stdin, ! is (a command) used to separate them. When the -d option is used, # is (a command) used to print, to stderr, a memory snapshot of the surrounding cells (useful for debugging).-O option, resulting in faster interpretation.#!, brainwash treats this line as a shebang and ignores it. This makes it possible to have executable Brainfuck programs.Note: As of version 0.3, it is possible to choose between cells of type signed integer and unsigned character (1 byte ranging from 0 to 255) prior to compilation. Please refer to the installation for details on how to do this.
For gzip (.gz):
tar -xvzf brainwash-0.3.tar.gz
For bzip2 (.bz2):
tar -xvjf brainwash-0.3.tar.bz2
Change to the source directory:
cd brainwash-0.3/src/
For cells of type signed integer (default), issue:
make
Alternatively, for cells of type unsigned character, issue:
make char
This will create the brainwash executable under the current working directory.
To remove brainwash from your system, issue:
make clean
The output of ./brainwash -h follows:
brainwash 0.3 Copyright (c) 2004, 2005, 2006 Aggelos Orfanakos usage: ./brainwash [options] [file] options: -O optimize interpretation -d [N] print a memory snapshot of N surrounding cells upon # [11 or less] -i <file> read input from-o <file> write output to -V print version information and exit -h print this help message and exit
brainwash is licensed under the terms of the MIT License.
From here.
Aggelos Orfanakos, http://agorf.gr/