#command-line #customizable #interpreting #content #file #byte #raw

app sour

A customizable command line brainfuck interpreter

7 releases

0.2.5 Mar 3, 2023
0.2.4 Feb 1, 2023
0.2.2 Jan 31, 2023
0.1.0 Jan 28, 2023

#827 in Programming languages

32 downloads per month

MIT license

7KB
110 lines

🚀 Sour

A customizable command line brainfuck interpreter.

Installation

Building with Cargo:

$ git clone https://github.com/naakaamura/sour.git
$ cd sour
$ cargo build --release

Installing from Crates.io:

$ cargo install sour

Usage

Usage: sour [OPTIONS] <CONTENT>

Arguments:
  <CONTENT>  The brainfuck content or path to brainfuck file

Options:
  -s, --size <SIZE>  The memory buffer size [default: 30000]
  -r, --raw          Whether to output raw bytes or encode to ASCII
  -h, --help         Print help
  -V, --version      Print version

Examples

Interpreting from a file

$ sour hello-world.bf
# OUTPUT: Hello, world!

Interpreting raw byte values from a file

$ sour hello-world.bf -r
# OUTPUT: 72 101 108 108 111 44 32 87 111 114 108 100 33

Interpreting from raw brainfuck content

$ sour +++++.
# OUTPUT: ♣

Interpreting with a custom memory buffer size

$ sour <CONTENT> -s 69420

Dependencies

~1.2–1.8MB
~35K SLoC