send status messages to stderr

why would i put this off lol
This commit is contained in:
mehbark 2026-07-08 00:25:47 -04:00
parent a443b3bc5d
commit e8b3dd36cc

View file

@ -19,7 +19,7 @@ fn main() {
.collect(); .collect();
let target = env::args().nth(1).map_or(LetterSet::FULL, LetterSet::from); let target = env::args().nth(1).map_or(LetterSet::FULL, LetterSet::from);
println!("letter count: {}", target.len()); eprintln!("letter count: {}", target.len());
let Some((len, path)) = solve(&mut dictionary, target) else { let Some((len, path)) = solve(&mut dictionary, target) else {
println!("failed :("); println!("failed :(");
process::exit(1); process::exit(1);
@ -33,11 +33,11 @@ fn solve(dictionary: &mut [(String, LetterSet)], target: LetterSet) -> Option<(u
let mut bests = (0..=LetterSet::FULL.to_index()) let mut bests = (0..=LetterSet::FULL.to_index())
.map(|_| (u8::MAX, None)) .map(|_| (u8::MAX, None))
.collect::<Box<[_]>>(); .collect::<Box<[_]>>();
println!("allocated!"); eprintln!("allocated!");
bests[LetterSet::FULL.to_index()] = (0, None); bests[LetterSet::FULL.to_index()] = (0, None);
dictionary.sort_by_key(|(word, ls)| word.len() - usize::from(ls.len())); dictionary.sort_by_key(|(word, ls)| word.len() - usize::from(ls.len()));
println!("sorted!"); eprintln!("sorted!");
score(dictionary, &mut bests, target.negation(), 0); score(dictionary, &mut bests, target.negation(), 0);