Simple and fast Brainfuck interpreter perfectly suited for machine learning needs.
```rust extern crate bfi;
use bfi::{BfMachine, b};
let code = b("++++[->,.<]"); // b
converts an &str
to a byte vector: pub fn b(s: &str) -> Vec<u8>
let input = b("hello");
let mut output = Vec::new();
let mut machine = BfMachine::new(); let res = machine.exec(&code, &input, &mut output);
asserteq!(output, b("hell")); asserteq!(res, Ok(4)); ```
Here they are.
Err(BfError::Memory)
.I like idea of Brainfuck as an environment for reinforcement learning. After searching crates, I haven't found anything decent for interpreting BF in runtime, so I wrote this little thing.