[{"data":1,"prerenderedAt":448},["ShallowReactive",2],{"project-50325253":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":46,"post_text":48,"what":49,"said":100,"maker_in_thread":250,"shape":258,"grid":262,"attempts":411,"same_week":412,"maker_shows":33,"maker_hidden":440,"reader_version":441,"card":442},"50325253","OmniDiff","Opensource, super fast, content aware Git difftool, in Rust","title","Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust","https:\u002F\u002Fgithub.com\u002Fivankovic\u002Fomnidiff","github.com","FabCH",1793538150,2026,213,51,262,4366,7,"notable","dev_tools","git difftool","cli",[21,24,25,26,27],"diff tool","tree-sitter diff","rust diff","semantic diff","debated",0.058,{"positive":31,"neutral":32,"mixed":33,"critical":34},9,11,1,8,29,{"execution":37,"docs":39,"performance":41,"idea":42,"design":45},{"positive":33,"critical":38},2,{"positive":40,"critical":33},0,{"positive":40,"critical":40},{"positive":43,"critical":44},3,4,{"positive":38,"critical":33},[33,33,40,43,40,43,43,47,40,40,43,43,47,43,40,47,40,43,47,47,33,47,40,43,40,40,40,33,33,33,40,40,40,43,43,47,43,40,47,33],5,"I have been researching what the ultimate diff tool would look like, based on actual diffs in open source repositories.\n\nOmniDiff can diff: code (25 languages), config, images, PDFs, archives, cursors, fonts...\n\nIt's fast. It can diff C++ files of tens of thousands of lines in under 100ms, on a 2023 ThinkPad T14s.\n\nIt's open source. AGPLv3.\n\nIt'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. Inc",{"problem":50,"audience":63,"pricing":69,"motivation":70,"time_to_build":69,"stack":77,"openness":97,"stage":98,"team_size":99},{"value":51,"source":52,"evidence":53},"Produces more accurate diffs, including for moved code and non-code files like images, PDFs and fonts","maker",[54,56,59],{"id":55},"post",{"id":57,"by":11,"text":58},"50325706","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…",{"id":60,"by":61,"text":62},"50328043","nickjj","Delta has a really nice way to show diffs with its diff-so-fancy mode, it's more similar to GitHub's UI where not only the line is colored up differently but there's a different…",{"value":64,"source":65,"evidence":66},"Developers using git who want better diffs","inferred",[67,68],{"id":60,"by":61,"text":62},{"id":57,"by":11,"text":58},null,{"value":71,"source":52,"evidence":72},"Research into the ultimate diff tool based on real open source diffs; copyleft political choice",[73,74],{"id":55},{"id":75,"by":11,"text":76},"50326680","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…",[78,82,91],{"value":79,"source":52,"evidence":80},"Rust",[81],{"id":55},{"value":83,"source":52,"evidence":84},"TreeSitter",[85,88],{"id":86,"by":11,"text":87},"50333673","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.",{"id":89,"by":11,"text":90},"50334315","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,…",{"value":92,"source":52,"evidence":93},"APTED tree diffing algorithm",[94],{"id":95,"by":11,"text":96},"50329292","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…","open_source","beta","solo",{"praise":101,"objections":137,"requests":164,"questions":191,"alternatives":222},[102,115,126],{"value":103,"source":104,"evidence":105},"Produces much more minimal, accurate diffs, with good handling of moved code","commenter",[106,110,111],{"id":107,"by":108,"text":109},"50327910","arkenflame","Really well done, I like this a lot. It produces much more minimal diffs than other tools I've tried. One feature I miss from difftastic is showing diffs side-by-side on wide…",{"id":57,"by":11,"text":58},{"id":112,"by":113,"text":114},"50329954","andunie","This looks really good. It does look like you put a ton of effort into it, I'll give it a try. I feel like the moved code cases would look great in…",{"value":116,"source":104,"evidence":117},"Copyleft AGPL license appreciated",[118,122],{"id":119,"by":120,"text":121},"50330621","enriquto","cool to see fresh Rust software with copyleft license ! I feel safer, as a user, enjoying the freedoms that the AGPL provides me. (No evil middleman will be able to give me…",{"id":123,"by":124,"text":125},"50328615","shock","I support the choice of AGPL. I wish more software used it. Whenever I use AI to write code, in my experience it invariably chooses the MIT license. For example, for all the…",{"value":127,"source":104,"evidence":128},"Visual demos look impressive",[129,133],{"id":130,"by":131,"text":132},"50334814","z0al","Wow.. that looks great",{"id":134,"by":135,"text":136},"50328455","bita_nidir","Wow, I've often wished I had a tool like this. Thanks! Since most people do click-and-run most of the time (based on decades long research, n=1), I'll just add paste the link for…",[138,142,147,153],{"value":139,"source":104,"evidence":140},"Packaging is harder to install than delta, no Arch or brew on Linux easily",[141],{"id":60,"by":61,"text":62},{"value":143,"source":52,"evidence":144},"Crashes on very large degenerate files like huge byte arrays",[145,146],{"id":86,"by":11,"text":87},{"id":89,"by":11,"text":90},{"value":148,"source":104,"evidence":149},"Git difftool setup produced a single-column output for one user",[150],{"id":151,"by":113,"text":152},"50331105","I don't know what I did wrong, but using this as a git difftool (following the config) I didn't get any of the cool things from the demos, I got a weird single-column diff output…",{"value":154,"source":104,"evidence":155},"AGPL license limits adoption compared to MIT",[156,160],{"id":157,"by":158,"text":159},"50326498","anilgulecha","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…",{"id":161,"by":162,"text":163},"50334162","lejalv","Servitude to their masters",[165,169,173,180,184],{"value":166,"source":104,"evidence":167},"Side-by-side on wide terminals, unified when narrow",[168],{"id":107,"by":108,"text":109},{"value":170,"source":104,"evidence":171},"Highlight whole lines, not only changed characters",[172],{"id":60,"by":61,"text":62},{"value":174,"source":104,"evidence":175},"Three-way merge support",[176],{"id":177,"by":178,"text":179},"50329116","davvid","Nicely done OP. Does it do 3-way diffs for merges as well? The instructions only mention the two-way `git difftool` configuration so maybe that'll be a future feature? Any…",{"value":181,"source":104,"evidence":182},"Upstream into git mergetools",[183],{"id":177,"by":178,"text":179},{"value":185,"source":104,"evidence":186},"Figma or Photoshop file support",[187],{"id":188,"by":189,"text":190},"50329443","smallnix","Very cool! I'd love to see support for figma or Photoshop, perhaps it's already possible via export to an image format, but native would be cool.",[192,203,214],{"value":193,"source":104,"evidence":194},"How does it compare to difftastic and delta",[195,198,202],{"id":196,"by":131,"text":197},"50334517","How does it compare to Difftastic[1]? Both built on top of TreeSitter and solve similar problems. [1] https:\u002F\u002Fdifftastic.wilfred.me.uk\u002F",{"id":199,"by":200,"text":201},"50325592","paaloeye","How is it better or worse compared to https:\u002F\u002Fgithub.com\u002Fdandavison\u002Fdelta ?",{"id":60,"by":61,"text":62},{"value":204,"source":104,"evidence":205},"Can it be used with git diff without changing global config",[206,210],{"id":207,"by":208,"text":209},"50330909","gslepak","Is there a way to use it with git without having to change your global git config? I.e. `git diff | omnidiff` or something? You can do this with delta: `git diff | delta…",{"id":211,"by":212,"text":213},"50331938","forgotpwd16","https:\u002F\u002Fgithub.com\u002Fivankovic\u002Fomnidiff#usage ``` OmniDiff also works directly with git diff and git log -p, through GIT_EXTERNAL_DIFF. This path needs no difftool config:…",{"value":215,"source":104,"evidence":216},"Examples of where it is better",[217,221],{"id":218,"by":219,"text":220},"50334515","eviks","Do you have any examples illustrating how it's better?",{"id":60,"by":61,"text":62},[223,231,236,243],{"value":224,"source":104,"evidence":225},"difftastic",[226,227],{"id":196,"by":131,"text":197},{"id":228,"by":229,"text":230},"50326856","cocoto","How does it compare with diffstatic?",{"value":232,"source":104,"evidence":233},"delta",[234,235],{"id":199,"by":200,"text":201},{"id":207,"by":208,"text":209},{"value":237,"source":104,"evidence":238},"mergiraf",[239],{"id":240,"by":241,"text":242},"50334539","XYen0n","You could try https:\u002F\u002Fmergiraf.org\u002F",{"value":244,"source":104,"evidence":245},"diffsitter",[246],{"id":247,"by":248,"text":249},"50327518","IshKebab","> 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\u002Ffuture…",{"comments":251,"answered":32,"key":252},24,[253,254,257],{"id":86,"text":87},{"id":255,"text":256},"50333881","Good point. Thanks!",{"id":89,"text":90},{"commenters":259,"max_depth":34,"maker_replies":251,"first_comment_mins":260,"lifespan_hours":261},34,37,21,[263,267,268,272,274,278,280,284,286,288,290,293,296,298,302,305,307,308,309,312,314,315,316,319,321,323,326,328,330,333,335,336,338,340,341,343,345,347,349,351,354,356,359,362,363,365,366,369,371,374,376,378,380,383,385,386,387,389,390,392,393,396,399,401,403,408],[264,40,33,265,266,40],"50333302","project\u002Fcritical\u002Fexecution","blahgeek",[86,40,40,265,11,33],[269,40,33,270,271,40],"50333828","project\u002Fcritical\u002Fdocs","xeyownt",[255,40,40,273,11,33],"maker\u002Fpositive\u002Fnone",[275,40,43,276,277,40],"50334106","project\u002Fneutral\u002Fperformance","grey-area",[89,40,40,279,11,33],"project\u002Fneutral\u002Fexecution",[281,40,40,282,283,40],"50334191","commenter\u002Fneutral\u002Fnone","dmitrygr",[285,40,40,279,11,33],"50334294",[196,33,43,287,131,40],"project\u002Fneutral\u002Fnone",[289,33,40,276,11,33],"50334593",[291,33,43,292,131,40],"50334689","project\u002Fneutral\u002Fidea",[294,33,40,295,11,33],"50334799","project\u002Fneutral\u002Fdesign",[130,33,47,297,131,40],"project\u002Fpositive\u002Fdesign",[299,38,40,300,301,40],"50332660","other\u002Fneutral\u002Fnone","BobbyTables2",[303,38,40,300,304,40],"50333258","zem",[306,38,40,300,219,40],"50334447",[240,38,40,300,241,40],[207,43,43,279,208,40],[310,43,43,279,311,40],"50331804","nh2",[211,43,43,313,212,40],"project\u002Fneutral\u002Fdocs",[177,44,47,273,178,40],[95,44,40,292,11,33],[317,44,43,279,318,40],"50331827","catlifeonmars",[320,44,40,279,11,33],"50333695",[119,47,47,322,120,40],"project\u002Fpositive\u002Fidea",[324,47,40,325,162,40],"50334138","commenter\u002Fpositive\u002Fnone",[327,47,40,282,219,40],"50334474",[329,47,40,282,11,33],"50334489",[60,331,43,332,61,40],6,"project\u002Fmixed\u002Fexecution",[334,331,40,295,11,33],"50328145",[134,18,47,297,135,40],[337,18,40,295,11,33],"50328526",[112,34,47,339,113,40],"project\u002Fpositive\u002Fnone",[151,34,33,265,113,40],[342,34,40,279,11,33],"50333704",[107,31,47,344,108,40],"project\u002Fpositive\u002Fexecution",[346,31,40,295,11,33],"50327990",[228,348,43,287,229,40],10,[350,348,40,276,11,33],"50326933",[352,348,40,282,353,40],"50327892","LVB",[355,348,40,282,11,33],"50328005",[357,348,40,282,358,40],"50331078","folmar",[360,348,40,300,361,40],"50332253","fishgoesblub",[161,348,40,300,162,40],[157,32,33,364,158,40],"project\u002Fcritical\u002Fidea",[75,32,40,292,11,33],[367,32,33,364,368,40],"50326737","ipsi",[370,32,40,292,11,33],"50326779",[372,32,33,364,373,40],"50327638","dspillett",[375,32,40,282,11,33],"50327734",[377,32,40,282,373,40],"50329940",[379,32,40,282,11,33],"50334420",[381,32,40,282,382,40],"50330089","noir_lord",[384,32,40,300,11,33],"50334429",[123,32,47,322,124,40],[247,32,33,364,248,40],[199,388,43,287,200,40],12,[57,388,40,276,11,33],[391,388,47,339,200,40],"50325812",[218,388,43,295,219,40],[394,395,43,287,200,40],"50325839",13,[397,395,40,398,11,33],"50325888","maker\u002Fneutral\u002Fidea",[188,400,47,322,189,40],14,[402,400,40,292,11,33],"50329473",[404,405,33,406,407,40],"50329636",15,"project\u002Fcritical\u002Fdesign","burner-account",[409,405,40,410,11,33],"50334350","maker\u002Fneutral\u002Fdesign",[],[413,418,423,428,432,436],{"id":414,"name":415,"points":416,"category":417},"50326821","HackerBooks",1242,"learning_science",{"id":419,"name":420,"points":421,"category":422},"50306442","nesformer",292,"ai",{"id":424,"name":425,"points":426,"category":427},"50311686","Episodle",243,"games",{"id":429,"name":430,"points":431,"category":417},"50290533","Outcrop",187,{"id":433,"name":434,"points":435,"category":20},"50294506","dontallow",154,{"id":437,"name":438,"points":439,"category":422},"50297697","DOOMFORMER",131,false,"v2",{"id":443,"name":5,"line":6,"ai":440,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":444,"top":18,"kw":445,"maker":11,"domain":10,"tier":19,"attempts":40,"strip":446,"url":9,"mix":447,"praise":103,"objection":139,"sub":21},50325253,0.06,[21,24,25,26,27],"1103033500335305035515030001110003353051",[31,32,33,34],1794036713316]