I've released difftastic 0.57! In this release:
* A bunch of improvements around detection and display of binary files.
* Fixed some diffing issues with (ironically) text files.
* Better diff results for Scheme.
https://github.com/Wilfred/difftastic/releases/tag/0.57.0
miniblog.
I'm delighted that so many people are getting value in difftastic, but there has been a significant increase in new issues recently! Hopefully this is a temporary bump from HN.
It's a genuine risk from creating a generic tool: if 1% of devs use it, that's a huge userbase.
The Bitter Lesson: how implementing generic search and scaling compute outperforms custom logic in many situations: http://www.incompleteideas.net/IncIdeas/BitterLesson.html
Thinking more about the "auto eval definitions" approach, I think it breaks down when debugging. If I want to step through the existing definition, it'd be really awkward to re-evaluate the definition at my cursor.
The lisp model of programming is generally: write a function, evaluate it, interactively call it with some arguments, iterate. Jupyter notebooks are similar.
Why not automatically evaluate definitions (not expressions) whilst working? It seems like it could be a satisfying way to work with code.
I've release difftastic 0.56! In this release:
* Added support for Scheme and Smali
* Improved JS, TypeScript, QML and Perl parsers
* File permission changes are now reported
https://github.com/Wilfred/difftastic/releases/tag/0.56.0
I've been reading about the object-capability model as seen in the E programming language.
It reminds me of dependency injection, but used pervasively. Rather than calling static methods, you pass in object arguments and call methods in them.
https://en.wikipedia.org/wiki/Object-capability_model
I'm flattered that SemanticDiff has a blog post comparing it with difftastic! https://semanticdiff.com/blog/semanticdiff-vs-difftastic/
It's a pretty even-handed post, and it touches on some of the different design decisions. For example, SemanticDiff considers 0xA and 10 to be the same when diffing.
Are there any open source serverless platforms? It feels like something I ought to be able to run in Docker on my personal VMs, but I've not heard of anything.
(I appreciate the irony of serverless on your own server, but the programming model seems generally applicable.)
A bunch of useful Emacs tips for handling the region, but I definitely did not know that Emacs can calculate lunar phases!
https://susam.net/from-lunar-phases-to-yank-pop.html
Fun example of a bunch of YAML gotchas all in a single file: https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell
I don't have much data on difftastic usage, and I suspect most users get it from the packages provided by their distro.
There's been a clear uptick in stars since I built a homepage in the last month or two though!
(The first big bump is when it hit Hacker News.)
Why do so few CLI tools use colour inside their error messages? For example, rustc uses colour well in the error display, but there's no special styling of the content in backticks.
By contrast, markdown website almost always style backtick text differently from prose.
E.g. `field` is not specially styled here.
Apparently over half of the income for the Python Software Foundation comes from PyCon US!
https://www.python.org/psf/sponsorship/
TIL cargo is exploring a Rust script mode, essentially a concatenation of Cargo.toml and main.rs https://blog.rust-lang.org/inside-rust/2024/02/13/this-development-cycle-in-cargo-1-77.html#cargo-script
I've been using a 'golden tests' library for testing my parser, and it's just delightful. Rather than writing a verbose assertion about the resulting AST, I can just re-run my tests until the output looks good!
I'm using https://github.com/jfecher/golden-tests currently, which can automatically update the output in the file.
Example commit: https://github.com/Wilfred/garden/commit/cea75238ff9de0b74caf20c64096c2fa46cdc30a
The Ruby on Rails guides use "please" when suggesting other resource to read or best practices to follow. For example: https://guides.rubyonrails.org/autoloading_and_reloading_constants.html
I've not seen this docs convention before. I certainly see the appeal for describing best practices: "your collaborators will appreciate it!"
Are there any good tools for generating boilerplate code?
If I'm a web framework author, I'd love to provide a *discoverable* tool for defining a new controller. This is especially important if files need specific naming conventions or to be in certain directories.
I've seen tools like yeoman and create-react-app, but they seem to focus on new projects. There's also no VS Code integration that I'm aware of.
I'm still experimenting with patch display in difftastic.
The change to the imports are clearer in the patch mode, but the side-by-side mode does make the if/else changes more readable.
Patches are probably worthwhile anyway due to their machine readability.
I'm experimenting with a patch-style display format for difftastic.
What do you think? Do the colours work? What about the last example, where there's only whitespace changes and the syntactic diff has nothing to highlight?
Showing 101-120 of 135 posts