OmniDiff 開源推出以 Rust 編寫的多格式 Git 差異比較工具
Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust
開發者 FabCH 發佈開源 Git 差異比較工具 OmniDiff,以 Rust 編寫,支援 25 種程式語言及多種其他檔案格式。OmniDiff 可處理設定檔、圖片、PDF、封存檔、遊標和字型;作者稱它在 2023 ThinkPad T14s 上比較數萬行 C++ 檔案可於 100ms 內完成。
Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust (github.com/ivankovic) 29 points by FabCH4 hours ago | hide | past | favorite | 15 comments I have been researching what the ultimate diff tool would look like, based on actual diffs in open source repositories. OmniDiff can diff: code (25 languages), config, images, PDFs, archives, cursors, fonts... It's fast. It can diff C++ files of tens of thousands of lines in under 100ms, on a 2023 ThinkPad T14s. It's open source. AGPLv3. It's based on real diffs. I looked at the 7400 repositories that are listed in Gentoo packages, sampled 2000 diffs and solved them manually to get a good understanding of what is needed, before putting together the diff pipelines for each content type. Incidentally, this also forms the basis of the CI pipeline, so the robustness of the codebase is quite high. I'm still developing it. It's v0.3.0 at this time. But I have been using it daily as my git difftool for months now, and it works well. AI Disclosure: Yes, I do use AI. No, I do not vibecode. help
anilgulecha2 hours ago | next[–] You have a good core idea here. You're pretty much killing your project in infancy with the AGPL+donation license model. Meanwhile, some other projects will take the core idea of "language aware differ" and release BSD, and one of those will win, including perhaps making it into git/future version controls. IMO, you should seek to make this a standard that wins, and hopefully other opportunities that come will be where you make commercial hay. My unsolicited 2c. reply
FabCH1 hour ago | parent | next[–] 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. reply
ipsi1 hour ago | root | parent | next[–] FWIW, there's probably no point in using a copyleft licence if AI is involved[1][2], unless you've got pretty solid proof AI only "assisted" rather than doing the bulk of the work. Otherwise, you don't have copyright on the generated code, and without copyright the licence is meaningless, AFAIK. This is not to say you can't or shouldn't use AI, but it's important to understand the tradeoffs you're making. [1] https://www.scotusblog.com/cases/thaler-v-perlmutter/ [2] https://www.jenner.com/en/news-insights/client-alerts/us-cop... reply
FabCH1 hour ago | root | parent | next[–] 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. reply
dspillett7 minutes ago | root | parent | next[–] > 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. Get one AI to describe what the code does, and another to implement based on that description. You might even get away with a human doing one of the steps. A variation of the classic “clean room reverse engineering” method that was used by Compaq to reimplement IBM's BIOS and start the clone PC market. Some argue that “it doesn't work like that” but it certainly seems to be what some people are doing and as yet no one has been confident enough that their copyright extends through this mechanism that they've tested the theory in court. Note: I'm not saying it is right, but that it might well be perfectly legal. It is definitely possible, practical even. I'd still release stuff under AGPL/similar for the same reasons stated above, but I'd not operate under any illusion that I'd be safe from someone using that method to copy everything they wanted to. reply
IshKebab21 minutes ago | parent | prev | next[–] > Meanwhile, some other projects will take the core idea of "language aware differ" and release BSD, and one of those will win, including perhaps making it into git/future version controls. Diffsitter and Difftastic have been around for a while, both MIT, so I doubt it. reply
paaloeye3 hours ago | prev | next[–] Older submission: https://news.ycombinator.com/item?id=49891989 reply
FabCH3 hours ago | parent | next[–] 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. reply
paaloeye3 hours ago | prev | next[–] How is it better or worse compared to https://github.com/dandavison/delta ? reply
FabCH3 hours ago | parent | next[–] 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. reply
paaloeye3 hours ago | root | parent | next[–] Okay, I'll give it a try then. reply
cocoto1 hour ago | prev | next[–] How does it compare with diffstatic? reply
FabCH1 hour ago | parent | next[–] 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. reply 
hebetude1 hour ago | prev[3 more] [flagged]
cassianoleal59 minutes ago | parent | next[–] > with licenses nobody wants to use Nobody wants to use AGPL-v3? https://github.com/ivankovic/omnidiff/blob/main/LICENSE reply
alexpadula1 hour ago | parent | prev[–] You know hebetube, my mother once said "if you have nothing nice to say: don't say it". You saying those things probably aren't going to make them turn over the license. "Project dead before it started" like who writes those kinds of things over someones work they spent time on. I'd love for you to explain your logic. reply
Consider applying for YC's Winter 2027 batch! Applications are open till November 2. Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact Search:
來源:Hacker News:AI 熱帖 · news.ycombinator.com