Showing lines of context is a remarkably hard problem for a syntactic diff.
Line 23 on the right is new, but lines 24 and 25 also map to the same line on the left! Initially I thought this was a bug.
It's impossible to show exactly N context lines whilst preserving alignment.
miniblog.
Related Posts
Date of birth pickers are a surprisingly nuanced UI problem.
What do you pick as the initial value? How do you allow users to easily move by large amounts (years) as well as small amounts (the exact day)?
Defaulting to today and even allowing future dates is funny though.
My default assumption is that external libraries are better than what I (or an LLM) would write in a v1.
The extra effort to publish a project generally signifies that the author has spent a good amount of time on the problem. I end up prompting LLMs to prefer external code.
I would have thought that invoking a C compiler would be a solved problem. Looking at Rust's cc crate there's a remarkable long tail of corner cases to fix.
Exotic CPUs, microarchitectures, compiler differences, operating system differences, etc.

