Adding too much coloured highlighting to difftastic kinda makes it hard to spot the changed bits.
I've tried making type names bold (same as keywords) and it looks pretty good though.
miniblog.
Experimenting with syntax highlighting for difftastic.
I'm trying hard to stay within the limited terminal colours. It works everywhere and requires no detection of terminal capabilities or theme.
It's a very limited palette though. Using bold for keywords saves a colour.
Difftastic 0.16 is out! In this release:
* Substantially improved performance (a little over 2x)
* Improvements for Bash, OCaml and JSX
* Added Scala support
* Better handling of diff sliders
I keep getting surprised by .lines() semantics in Rust.
"" -> empty
"foo" -> one line
"foo\n" -> one line
"foo\nbar" -> two lines
I end up using .split('\n') everywhere instead, but .lines() is so convenient it feels like a footgun.
I do wish Rust had a `expect(life()).toEqual(42)` syntax for tests.
`assert_eq!(life(), 42)` just gives "assertion failed: 41 == 42" and it's hard to see which was the expected value. This is particularly hard with larger values.
Diff sliders are a really interesting problem for AST diffs. Here's a surprising example.
At first, it looks like the first `|` should be highlighted. However the first `|` is the outer `match` case, and the inner | is syntactically an or-pattern!
Which languages have the shortest/longest half-life?
If you didn't write any code in language X for five years, how easily could you continue maintaining an old project?
Linux 5.18 may drop support for the a.out executable format!
https://www.phoronix.com/scan.php?page=news_item&px=Linux-Remove-a.out
I really like instruction counts for measuring performance. It's not perfect, but it's a very stable metric, even if I'm listening to music whilst developing and benchmarking.
The Rise of the Stupid Network: a remarkable 1997 essay on what ISPs as dumb bit pipes enables, moving innovation to client devices on the internet, and avoiding the scarcity mindset from when hardware was expensive:
https://www.hyperorg.com/misc/stupidnet.html
TIL about Rust's NonZeroUsize, which is an integer that is never zero. Rust can optimise Option<NonZeroUsize> to be the same size in memory as usize!
The irony of getting bad diff displays in difftastic unit tests is not lost on me.
Maybe I've been staring at difftastic output for too long, but I find this before/after display from my tests to be pretty hard to read.
Finding meaning in open source projects, the principle of charity, and avoiding a mindset of scarcity.
Really great reflections on the motivations of open sourcing Rails.
https://world.hey.com/dhh/i-won-t-let-you-pay-me-for-my-open-source-d7cf4568
TIL that npm does not allow you to unpublish popular packages!
How Racket started, the etymology of MzScheme, and why the GUI has older commits than the stdlib!
Showing 886-900 of 7,549 posts





