HNHacker News
TopNewBestAskShowJobs

FabCH

1,068 karma · joined September 20, 2025

submissionscomments
FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
It's a tradeoff. The length itself is not a problem. It will happily diff normal multi-MB files.

The problem is the degenerative syntax tree that TreeSitter produces in case of, for example a multi-million array of bytes. This causes a stack overflow in the TreeSitter C code which takes down the Rust process with it.

The correct solution would be to prevent TS from crashing, or isolate the C<->Rust boundary better.

Or just, not support that for v0.3. Because if you are diffing the collected works of Shakespeare as a binary blob in a C++ header, maybe diffing isn't your biggest problem.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
The crash will happen in TreeSitter which is a widely used AST library that all modern editors, including neovim, depend on for syntax highlighting and which is also used by many LSPs.

Additionally, here's an appropriate XKCD: https://xkcd.com/378/

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
Good point.

Thanks!

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
Perhaps the terminal is too small? What happens when you hit tab or “v”?
FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
It’s a 5 step pipeline.

In practice, tree hashing is doing a huge amount of work because most diffs are tiny. Half of all diffs are less than 10 lines, so a hash can extremely quickly match large subtrees.

In a profoundly degenerate case of a C++ header file with only a 20MB array of bytes, it detects a degenerate tree and uses Myers O(N) sequence diffing algorithm instead of treating it as a tree.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
It will crash.

But so will every other tool, because it is things like a C++ header file with 128MB of PNG data hardcoded as an array.

Editors don’t even open those files.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
Depending on how proprietary their formats are, it could be done.
FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
At the moment the algorithm for code diffing is a particularly efficient implementation of APTED which is a tree diffing algorithm that doesn’t natively construct anything useful for a three way diff. I have a notebook with a bunch of failed attempts at a good algorithm for a three way merge, but so far nothing particularly impressive.

It’s a long term goal to solve, but it’s the hardest one.

I’ll definitely reach out to you to upstream. Thank you for the kind offer!

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
And this: https://ivankovic.github.io/omnidiff/showcase/index.html?cas...
FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
OmniDiff is character based by default. It will only highlight the changed characters. I suppose I could add an option to additionally highlight the line as well. Thanks for the feedback!

As for packaging. Unfortunately AUR is closed at the moment due to spam. I can add brew commands for Linux, happily.

In terms of “better”. It’s actually somewhat complex, but a simple way to think about it is that if you move a function up or down in the same class, text-based diffs paint that as “Deleted here, Inserted there” where ideally you would want it to say “Moved”.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
It was a tongue-in-cheek joke :)

But it was worth pointing out the difference in license, it is one of the ways in which the projects differ.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
It should… it considers wide to be 200+ columns.

You can force it with “v”.

I am not super set on that value, if the community has a better default for “wide”, happy to modify it.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
If an individual went through all this effort just to release it under MIT, I’d honestly be mostly just surprised someone cared so much. I’d probably just send them my own project relicensed under MIT out of pure curiosity.

But I am counting on the fact that _companies_ would be too worried about legal uncertainty to try this.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
Comparing is slightly complicated but roughly speaking:

Difftastic only diffs code, which is only 2/3 of all diffs.

When only measured on stuff difftastic supports:

Difftastic is perfect on 64% of diffs and near-perfect on 17% more.

Omnidiff is perfect on 90% of diffs and near-perfect on 5% more.

Speed is

p50 - 35ms difftastic vs 4ms OmniDiff p99 - 637ms vs 420ms

Difftastic wins on license. MIT vs AGPL.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
I’m not based in the US so SCOTUS doesn’t set meaningful precedent for my IP.

That said, even under those rules, I would be comfortable arguing before the court that this code has significant human involvement and easily passes the copyright standard.

It’s also why I don’t think someone can just easily create another one and license it under BSD. My code is AI assisted, but all truly important pieces were human made.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
I really do care about copyleft and AGPL. It’s a political choice. I specifically chose it because I know from direct experience that big tech is allergic to it.

I actually don’t care about the commercial license. It’s more of an experiment for my own amusement than an actual attempt at building a commercial project.

If it inspires someone to build another one and we still end up with a better differ, I’m ok with that world. As long as the open source community has a better differ.

Note that there already are at least 3 that I am aware of. But they do perform worse on speed and accuracy.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
Not quite.

In the meantime, I added support for all other non-code file formats. Hence the name change.

It’s quite a big chunk of functionality.

FabCH··on Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
It’s much much better with moved code.

Delta adds color to the standard git diff algorithm.

Omnidiff uses a completely different algorithm.

About a third of diffs are significantly better.

FabCH··on Anthropic S-1
Note that only one country has so far banned foreigners from using their models, and it wasn’t China.
FabCH··on Show HN: TUI to manage firewall and HTTP server, in Rust
I personally use a VLAN where I segment all IoT and Smarthome devices and just drop all outgoing internet traffic at the switch level on those VLANs.

However, given the latest Plex exploit incident, I have been thinking how to detect and prevent outgoing anomalous connections…

FabCH··on Show HN: TUI to manage firewall and HTTP server, in Rust
It doesn't do Traefik at this time, because I didn't want to release something I don't test.

But I can do it if you want to beta-test it and file bugs if it doesn't work.

FabCH··on eBay Restricts Listings of Radio Equipment, but Exempts Ham-Band-Only Gear
To be fair to eBay, their banned items policy is quite extensive.

And also for some reason explicitly lists „military aircraft and ships“. Which surely should be allowed just for the comedic value.

FabCH··on Fire at Starlink site in Bulgaria after suspected sabotage in Poland
Exactly.

Secret Squirrels will obviously keep track of who wants to blow up Starlink, but they will not interfere unless it makes sense for the country.

Completely different than parking a tank preventively in front of each base station. Or even just a police car.

FabCH··on Fire at Starlink site in Bulgaria after suspected sabotage in Poland
A more appropriate comparison would be if Russian agents assassinated a local industrialist.

And, well, would you expect the state to proactively assign military protection details to such people?

No. They would have their own body guards, and maybe a police protection if needed. But not army.

The spy and counterspy agency would probably investigate, but they are not going to post a flak cannon next to each Starlink base station.

FabCH··on Fire at Starlink site in Bulgaria after suspected sabotage in Poland
In many countries, foreigners are not even allowed to buy property in the first place.

It’s not exactly uncommon or inconceivable that yes, the property of foreigners doesn’t quite get the same protections.

FabCH··on California closed the Montana license plate loophole
Fair, but there is some standard for issuance as well. VAT rules and certificates of conformity are EU wide.

VAT I guess being the interesting part given the original topic.

FabCH··on California closed the Montana license plate loophole
Not sure why you mentioned EU, but in case you didn’t know, the EU does in fact standardize license plates: https://en.wikipedia.org/wiki/European_vehicle_registration_...
FabCH··on So you think you could be an electrician?
That’s a thing in Switzerland - ITC EFZ.

Federal Certificate of Vocational Training in Information and Communication Technology

It’s a 4 year high-school apprenticeship and you have to work under a licensed professional during your apprenticeship during those 4 years.

I had such apprentices on my team. It’s a good system.

FabCH··on Vote on which of Hacker News' challenges for AI have been met
What code does a village vet clinic need? In all seriousness.

Even IF they need code, they need at best a CRUD app to track patients, that's it. There is no way Fable or Opus 5.5 can't one-shot a village vet clinic app in 30 minutes, and only with "I need a village vet clinic app" as a prompt, and whatever questions it decides to ask along the way with it's "ask user" tool.

Or a florist, to use the example from a sibling comment.

Code is tiny part of "business".

FabCH··on Vote on which of Hacker News' challenges for AI have been met
Code is a tiny part of "business".

Most business is correspondence with people who want money from you and people you want money from.

← PreviousPage 2 of 10Next →