Crates.io | bfk |
lib.rs | bfk |
version | 0.2.1 |
source | src |
created_at | 2021-07-12 05:06:35.405699 |
updated_at | 2022-09-27 11:03:50.995711 |
description | Brainfuck interpreter |
homepage | https://github.com/nonowarn/bfk |
repository | https://github.com/nonowarn/bfk |
max_upload_size | |
id | 421765 |
size | 25,956 |
$ cargo install bfk
$ cat > hello.bf
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
$ bfk hello.bf
Hello World!
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!
MIT.