brainfuck interpreter
brainfuck cli rust
5

Configure Feed

Select the types of activity you want to include in your feed.

evaluator: switch from print! to eprint! to keep program stdout clean

digi.rip (Jun 8, 2026, 6:48 PM EDT) 6ef2e5d0 7abdcd09

+6 -6
+6 -6
src/evaluator.rs
··· 332 332 if self.tracing { 333 333 std::io::stdout().flush().ok(); 334 334 if self.delay > 0 { 335 - print!("{}ms elapsed...", self.delay); 335 + eprint!("{}ms elapsed...", self.delay); 336 336 } 337 - print!( 337 + eprint!( 338 338 "\nTape: {}[{}] ", 339 339 self.data_pointer, self.tape[self.data_pointer] 340 340 ); 341 - print!("\nInst: '{}' @ {}", current.byte as char, self.inst_pointer); 341 + eprint!("\nInst: '{}' @ {}", current.byte as char, self.inst_pointer); 342 342 } 343 343 344 344 match current.byte { ··· 357 357 358 358 b',' => { 359 359 if self.tracing { 360 - print!("\nInput: "); 360 + eprint!("\nInput: "); 361 361 std::io::stdout().flush().ok(); 362 362 } 363 363 ··· 370 370 371 371 b'.' => { 372 372 if self.tracing { 373 - print!("\nOutput: ") 373 + eprint!("\nOutput: ") 374 374 } 375 375 376 376 if self.output_type == IOFormat::Ascii { ··· 400 400 } 401 401 402 402 if self.tracing { 403 - println!(); 403 + eprintln!(); 404 404 } 405 405 406 406 self.inst_pointer += 1;