Brainfuckとは?
難解言語。ふむふむ。8文字だけで構成。
| > | Move the pointer to the right |
| < | Move the pointer to the left |
| + | Increment the memory cell at the pointer |
| - | Decrement the memory cell at the pointer |
| . | Output the character signified by the cell at the pointer |
| , | Input a character and store it in the cell at the pointer |
| [ | Jump past the matching ] if the cell at the pointer is 0 |
| ] | Jump back to the matching [ if the cell at the pointer is nonzero |
//Hello, World!をコードで書くと。
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
Brainfuck 環境構築
1.Linux -Brainfuck-
//Linuxの場合
//ubuntuの例
sudo apt-get install bf
$ bf test.bf
Hello World
3.その他 -Brainfuck-
//Python
pip install brainfuck.
pip install brainfuck-interpreter
//Rust
//インストール
cargo install brain-brainfuck
//実行
cargo run --bin brainfuck -- filename