brainfuck
Executes a Brainfuck program read from a file. Brainfuck is a Turing-complete esoteric language with only eight instructions that operate on a tape of 30,000 byte cells.
Instruction Set
Move data pointer right one cell.
Move data pointer left one cell.
Increment the current cell by 1 (wraps at 255).
Decrement the current cell by 1 (wraps at 0).
Output the current cell as an ASCII character.
Read one character from stdin into the current cell.
If the current cell is 0, jump forward to the matching ].
If the current cell is non-zero, jump back to the matching [.
> < + - . , [ ] are treated as comments and ignored.
The tape is 30,000 bytes, all initialised to zero.
| Option | Required | Description |
|---|---|---|
--file | Yes | Path to the Brainfuck program file (.bf) |
ook
Executes an Ook! program read from a file. Ook! is a joke language invented by David Morgan-Mar that is semantically identical to Brainfuck but uses only the word "Ook" combined with punctuation. Each instruction is a two-token pair.
Instruction Mapping
Move pointer right.
Move pointer left.
Increment current cell.
Decrement current cell.
Output current cell as ASCII.
Read character into current cell.
Jump forward if cell is zero.
Jump back if cell is non-zero.
| Option | Required | Description |
|---|---|---|
--file | Yes | Path to the Ook program file (.ook) |
bf-to-ook
Translates a Brainfuck source file into equivalent Ook! source and writes the output to a file. The conversion is a straightforward one-to-one token substitution — every Brainfuck instruction becomes its two-token Ook! equivalent separated by a space.
| Option | Required | Description |
|---|---|---|
--source | Yes | Path to the source Brainfuck file to translate |
--output | Yes | Path to write the generated Ook file |
Command Reference
| Command | Required options | Optional options | Output |
|---|---|---|---|
interpreters brainfuck |
--file |
— | Program output to stdout |
interpreters ook |
--file |
— | Program output to stdout |
interpreters bf-to-ook |
--source --output |
— | Ook source written to --output |