bfk

Crates.iobfk
lib.rsbfk
version0.2.1
sourcesrc
created_at2021-07-12 05:06:35.405699
updated_at2022-09-27 11:03:50.995711
descriptionBrainfuck interpreter
homepagehttps://github.com/nonowarn/bfk
repositoryhttps://github.com/nonowarn/bfk
max_upload_size
id421765
size25,956
Yusaku Hashimoto (nonowarn)

documentation

README

Brainfuck interpreter

Install

$ cargo install bfk

Usage

$ cat > hello.bf
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
$ bfk hello.bf
Hello World!

Create your own fuck

For example, Replace +-><,.[] with abcdefgh. This is replaced Hello World program in Brainfuck.

aaaaaaaagcaaaagcaacaaacaaacaddddbhcacacbccagdhdbhccfcbbbfaaaaaaaffaaafccfdbfdfaaafbbbbbbfbbbbbbbbfccafcaaf

By providing replacing character to language option, This interpreter runs it as a transformed Brainfuck program.

$ cat > hello.abc.bf
aaaaaaaagcaaaagcaacaaacaaacaddddbhcacacbccagdhdbhccfcbbbfaaaaaaaffaaafccfdbfdfaaafbbbbbbfbbbbbbbbfccafcaaf
$ bfk --language=abcdefgh hello.abc.bf
Hello World!

Even emojis.

$ cat > hello.emoji.bf
😀😀😀😀😀😀😀😀😂😄😀😀😀😀😂😄😀😀😄😀😀😀😄😀😀😀😄😀😁😁😁😁😃🤣😄😀😄😀😄😃😄😄😀😂😁🤣😁😃🤣😄😄😅😄😃😃😃😅😀😀😀😀😀😀😀😅😅😀😀😀😅😄😄😅😁😃😅😁😅😀😀😀😅😃😃😃😃😃😃😅😃😃😃😃😃😃😃😃😅😄😄😀😅😄😀😀😅
$ bfk --language=😀😃😄😁😆😅😂🤣 hello.emoji.bf
Hello World!

LICENSE

MIT.

Commit count: 27

cargo fmt