brainfuck
brainfuck copied to clipboard
A simple brainfuck interpreter in Rust.
Output with `RUST_BACKTRACE=1 cargo test`: ``` ---- bf_utm stdout ---- thread 'bf_utm' panicked at 'called `Result::unwrap()` on an `Err` value: CycleLimit', tests/lib.rs:40:1 stack backtrace: 0: ::fmt 1: core::fmt::write 2: std::io::Write::write_fmt...
It would be cool to add functions to brainfuck. Some things like `+++[- > something < ]>.` could be nicely packaged into a function.
I'm not exactly sure how I see this working yet, but I think we should be able to make the parsing and the display one bit of code. At the...
We really want to make this an optional argument. For example: ```sh brainfuck --limit 1M ... # or brainfuck -l 20 ``` Exact details of the number syntax should be...
Inspired by mossberg/bfcfg we should add this notion to the `Program`. Also adding a graphviz display of the graph would be cool like was done in the mentioned repository.
Right now we simply return an `Option` for a program's get method. This allows us to tell when we have an instruction, but it doesn't let us determine if the...
i think it could be cool to explore this idea of an instrumentation framework for bf. like being able to register callbacks not just after each step, but like before...
In an effort to start some simple optimizations, we could save a bunch of space in some brainfuck programs by determining up front that some `while` loops (aka `[...]` constructs)...