make build
This will build the binaries inside the bin/
folder
go install
This will compile and install the binary in the bin golangroot folder
This is the syntax the program must be run with:
./go-brainfuck <arguments> <file>
Example usage:
./go-brainfuck -o examples/fibonacci.bf
-h
Prints out a handy short documentation of the program arguments-o
Enables optimization mode, depending on the nature of your program it may make it run faster or slower. It compresses long operational chains (++++++ or ------) into shorter versions that can decrease run time up to 7 times!-d
Enables debugging characters (see Debug characters)-v
Visualizes the memory after each instruction (good for math related debugging, fills up the output)-t time
Waits t time after each instruction (format: "10s", "20ms", "1m", "10y")
Apart from the standard brainfuck characters, you can also use the debug characters by enabling the option in the arguments (see Program arguments)
Here's the list of the available debugging characters that you can use:
=
Prints out the current pointer byte, the next and the previous#
Prints out the whole memory