I've come to realise that the goal of a diff tool isn't to say what's changed. You want it to say what *hasn't* changed.
Unchanged content is crucial for deciding how to group changes into hunks and how to align lines. You need matched content pairs for this.
miniblog.
TIl that >>> is a valid JS operator! https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift
The ability to define small commands for npm with package.json is incredibly convenient and powerful.
I wonder why this hasn't caught on for other languages?
Displaying syntactic diffs is a really hard problem. GumTree has instructions for using it with Docker, so it's easy to try: https://github.com/GumTreeDiff/gumtree/tree/main/docker#usage
I compared some C++ with difftastic. GumTree does pretty well in the first case, but it's highlighting too much in the second.
OpenBSD's pledge is intentionally designed to be simple and easy to add to projects. It's still more granular than I expected: there are several different network permissions, and even a separate permission for tape drives!
Phabricator has 'moved line' detection in its diffs, and a comprehensible UI for it!
Source:
The effectiveness of fuzzing, the limitations of current research, your best options today, and a worked example:
It's odd how few package hosting services also offer docs hosting.
It's such similar data: versioning is important for both code and docs. Linking to dependencies is important for both too.
It's additional implementation work, but there's a lot of overlap.
Tried fuzz-testing difftastic this morning (using cargo fuzz), and didn't find any crashes. I guess that's a good thing? I was slightly disappointed.
Judging by the output, I think the tree-sitter parsers were exercised much more heavily than the tree diffing logic.
I think it'd be really hard to replace git. Even if your notgit had 2x git's usability and 2x performance, there's a learning curve to any VCS tool. Incentivising new users would be tricky.
GitHub is also so widely used that adoption of anything else is hard.
Interesting people keep popping up on the difftastic issue tracker.
Here's a discussion of applying structural diff techniques to language-aware merging:
Difftastic 0.15 is out!
* Vastly improved text diffing. Previously it was treated as a structural diff on a large comment, leading to poor perf and highlighting.
* Significant perf improvements in parsing and display.
* A bunch of parser fixes too!
I'm surprised I've never seen a lisp dialect where it's idiomatic to use trailing parens as you would in C.
(foreach car cars
(drive car)
)
It makes structure very visible when you're trying to add a new expression.
IDEs help, but is the ))) density always compelling?
Intel is replacing significant parts of its compiler with LLVM!
Showing 901-915 of 7,549 posts






