Skip to content

Instantly share code, notes, and snippets.

@fkaa
Created April 18, 2014 02:05
Show Gist options
  • Select an option

  • Save fkaa/11021269 to your computer and use it in GitHub Desktop.

Select an option

Save fkaa/11021269 to your computer and use it in GitHub Desktop.
use std::str;
mod bf;
fn main() {
let program = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
let output = bf::eval(program);
match output {
Ok(x) => {
println!("{}", str::from_utf8(x.as_slice()).unwrap());
},
Err(e) => {
println!("{}", e);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment