miniblog.

A cute feature in Pharo 9: dynamic rewriting of deprecated methods! The code and runtime are so closely integrated that you can use test execution to automatically update call sites.
Visual Studio is adding GMail-style predictive code completion, using an ML transformer model. Unlike GitHub Copilot, it seems to focus on smaller code snippets and leverages the surrounding code context. The examples generated seem less surprising.
Some high end GPUs are being bricked by a new game: https://www.tomshardware.com/news/evga-replacing-all-dead-rtx-3090s-from-new-world Sounds like it draws too much power, then something overheats or dies internally. Hardware dying from software seems really old fashioned, so it's interesting to see it happen on modern components.
Rust has a lot of integer types, but I kinda like distinguishing u64 from usize. It communicates intent. A usize is probably going to be used as an index, whereas a u64 is probably just a measurement of something.
There are a ton of LSP implementations for lots of languages. Do you have a favourite? What makes a language server particularly good?
I've been learning more about refactoring operations ("code actions") in the Language Server Protocol and they're more limited than I realised. An action is basically a name and an edit. There's no scope for prompting the user or offering GUI options.
I've released difftastic 0.5! It now works with arbitrary git commands, which makes it far more useful. Parsing is improved, diffing is *way* smarter, and it's faster too! Full changelog: https://github.com/Wilfred/difftastic/blob/master/CHANGELOG.md#05 (It's also less crashy, but it still panics on binary files.)
Photo
Syntactic diffs can get confused by adding whole functions. I've added two functions and modified the function afterwards. Difftastic would associate the parens of the new function with the outer parens of the modified function! This is "correct" (minimal edits) but unhelpful.
PhotoPhotoPhoto
It's now possible to use difftastic for all your git diffing operations! I'm using `git log -p` in this screenshot. (It crashes horribly if you add/remove whole files, or modify binary files, but it's really nice to dogfood and spot issues!)
Photo
I tried a Fibonacci heap for my implementation of Dijkstra's algorithm, but it ended up being slower! Apparently this is a common thing and Fibonacci heaps are very rare in practice:
Pharo 9.0 is released, and there's a ton in this release: https://github.com/pharo-project/pharo-changelogs/blob/master/Pharo90ChangeLogs.md The community is growing and the tooling is improving at a really impressive rate. Pharo is increasingly its own language too, the way Racket separated from Scheme.
Here's an example where highlighting changed words in a comment is kinda distracting. I think the right solution is to compute a levenshtein distance and only highlight changed words if the lines are sufficiently similar.
Photo
I'm dogfooding difftastic and I'm always pleasantly surprised when it works. Here's a nice example from optimisation today: I've removed an outer if statement. Note that it's lined up line 47 on the left with line 41 on the right, even though they have different indentation.
Photo
I've been adding heuristics to difftastic for showing comment changes. See before and after. It's a messy problem: do I split on spaces or word boundaries? Do I handle "reflowing" single-line comments where a word is added to a sentence and several comments change?
PhotoPhoto
Difftastic is getting closer to being a tool that I can recommend for daily usage! I've just tagged v0.4: https://crates.io/crates/difftastic This release includes much smarter diff logic, considering newlines and nesting depth to produce more comprehensible diffs. It's faster too :)
Showing 151-165 of 345 posts