From 34d47fe7493340f6e02c81587d1fff10a6760d47 Mon Sep 17 00:00:00 2001
From: mehbark <terezi@pyrope.net>
Date: Sat, 22 Mar 2025 21:03:19 -0400
Subject: [PATCH] planning and flushing

---
 src/main.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index 23dcddb..ebad22a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,7 +1,7 @@
 use std::{
     collections::HashMap,
     error::Error,
-    io::{self, Read},
+    io::{self, Read, Write},
 };
 
 use bstr::ByteSlice;
@@ -15,7 +15,9 @@ struct Args {
     #[arg(short, long)]
     count: usize,
     // TODO: higher-order chains
+    // TODO: save chains
 }
+// long-term TODO: live up to name :P
 
 // use bstr because we don't give a cr*p about utf-8!
 fn main() -> Result<(), Box<dyn Error>> {
@@ -26,6 +28,8 @@ fn main() -> Result<(), Box<dyn Error>> {
 
     // printing the first word immediately gives an intuitive idea of how long freq construction takes
     print!("{first_word} ");
+    // (we need to manually flush to have the intended effect)
+    io::stdout().flush()?;
 
     let mut buf = Vec::with_capacity(1 << 16);
     io::stdin().read_to_end(&mut buf)?;