It's amazingly awkward to print a syntactic diff correctly. Even the lines before and after the changes may not line up, if whitespace has changed!
Difftastic now inserts blank lines to help things line up. I'm reasonably happy with the result here.
miniblog.
Related Posts
Today I learnt about crossterm, a Rust crate for interacting with terminals in a cross-platform way: https://docs.rs/crossterm/latest/crossterm/
It handles things like is_tty() and terminal::size(), which are hard to support correctly in both Linux and Windows. I might port difftastic.
GNU Coreutils doesn't handle UTF-8 correctly yet: https://catgirl.ai/log/cut-c-harmful/
It's now possible to compile small Rust programs with libgccjit! This will enable Rust on a bunch more architectures.
https://blog.antoyo.xyz/rustc_codegen_gcc-run-core-tests
Admittedly these programs don't run correctly yet, but getting something basic working often takes 80% of the work in PL.

