miniblog.

A deep dive on how Go generics are implemented, with monomorphisation of call sites with primitive types for performance: https://eli.thegreenplace.net/2022/faster-sorting-with-go-generics/ The Go proposals call this 'stenciling', but I've not heard that term before. AFAICT it's monomorphisation.
Repology is an excellent resource for summarising all the different packages available for a piece of software. I added a badge to the difftastic manual. This informs users, and it also seems to motivate people to say "I want to do my favourite platform!"
Photo
I'm still pleasantly surprised when difftastic does a good job. Here's an example I saw today: adding a new variable with or_else() is extremely readable!
Photo
I've released difftastic 0.25! * Added 3 languages (Janet, Lua and Nix), improved parsing for 4 languages, and improved syntax highlighting for 2 languages * Clarified output when even the raw text is unchanged * A ton of bugfixes found by new users :)
Photo Photo
Difftastic already supported more than 20 languages, but I've been impressed at how many requests / patches I've received for additional languages! I've added a new section in the manual to make adding new languages easier: https://difftastic.wilfred.me.uk/adding_a_parser.html
Nix is a more popular project than I realised! It's the 11th most used language for pull requests on GitHub: https://madnight.github.io/githut/#/pull_requests/2021/4 and I've had multiple people ask for Nix support in difftastic. Screenshot shows difftastic comparing different versions of the relevant recipe.
Photo
I've seen several users write "diffstatic" rather than "difftastic". I'm not going to typosquat on https://crates.io/, but it's a shame that Cargo doesn't have a "did you mean ...?" feature.
nREPL is supported in several languages, not just Clojure! https://metaredux.com/posts/2019/01/12/nrepl-beyond-clojure.html Interacting with a live instance isn't handled by LSP, so it's interesting to see language-agnostic protocols in this space.
Here's a scary example from the tree-sitter-c bug tracker: before running the preprocessor, there's no guarantee that C code will parse! (Typically it will I think, but no guarantees.)
Photo
tree-sitter has been amazingly successful at getting developer tools to work together. Neovim has a bunch of people contributing to parsers when they notice highlighting issues. That benefits the whole ecosystem: semgrep, difftastic, even Emacs!
TIL there are multiple developer tools called asdf! (1) https://github.com/fare/asdf (Common Lisp build tool) (2) https://asdf-vm.com/ (manages installed PL runtimes, like a generic nvm or rbenv) I'm surprised multiple folks like the name, I'd worry that it's easy to forget.
Difftastic 0.24 is out! * Languages: Added Dart and improved Clojure * Display: Fixed a ton of corner cases, and added a warning when comparing a file with itself(!) * Performance: Improved large files or comparing directories
Photo Photo Photo
It's hard to demonstrate how difftastic works in screenshots, so I've prepared a <60 second ASCII screencast of usage! (Feedback welcome.) https://asciinema.org/a/xtAkVWdP8zciEMiZPE2ZhzJhN
Dogfooding difftastic: comparing the results of the sample files using difftastic. So I'm diffing the results of my diff tool by using my diff tool :)
Photo
Rust has a ton of ways you can convert a &str to a String: .into(), .to_string(), .to_owned(). I'm never sure which one reads best. Maybe .to_owned() shows your intention the most clearly?
Integration tests are inherently scary. You want to make them as similar as possible to your production environment, which massively increases the risk that one day they will talk to production directly.
If the latest version is the cutting edge or even bleeding edge, would a legacy version be a dull edge?
Let's Be Real About Dependencies: https://wiki.alopex.li/LetsBeRealAboutDependencies Contrasting C/C++ dependencies with languages with first-class packages (Rust, Go, JS) and finding similar level of dependencies! Perhaps modern package managers just make this more obvious.
After thoroughly confusing myself for a minute, I've added a feature to difftastic to warn you if both arguments are the same. With hindsight, I should have done this much earlier.
Photo
Sometimes I suspect you could send a pull request to any project replacing `foo` with `foo + 1` anywhere by saying "fix off-by-one error". `foo + 1` rarely looks wrong.
Showing 261-280 of 384 posts