TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Graphtage: A New Semantic Diffing Tool

104 pointsby mdeliasover 4 years ago

8 comments

nerdponxover 4 years ago
Hideous screenshots aside, Graphtage itself looks very useful. Can it generate Git-compatible diffs for use as a Git difftool?<p>Also-- for &quot;standalone&quot; tools like this that are written in Python, I highly recommend Pipx for installing them: <a href="https:&#x2F;&#x2F;pipxproject.github.io&#x2F;pipx&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pipxproject.github.io&#x2F;pipx&#x2F;</a>. It installs each tool into a separate self-contained virtual environment and symlinks the executable itself to a &quot;bin&quot; directory, which prevents tools with different dependencies from conflicting.
ivan_ahover 4 years ago
This is very interesting and a much needed tool. I have been searching for a tool like this for a long time. There are so many tree-like structures that I&#x27;m sure there will be interesting use cases...<p>I was recently working on a similar tool[1] but specific to the domain of &quot;content trees&quot; that consist of content nodes organized into a hierarchical structure. In my case each tree node has a persistent `content_id` associate with the underlying content file and independent of its position within the tree, which allows me to detect &quot;move&quot; operations[2] (a node with the same `content_id` appearing in a different place in the tree).<p>The use case is for educational content: Kolibri channels[3] are these huge trees that consist of thousands of nodes and it&#x27;s difficult to know what has changed when we create new versions of the channels. I tried all kinds of general-purpose diffing tools and failed miserably so I started working on treediffer. It&#x27;s almost done; I hope to finish it later this fall, and will look at graphtage to see how it works.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;learningequality&#x2F;treediffer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;learningequality&#x2F;treediffer</a> [2] <a href="https:&#x2F;&#x2F;treediffer.readthedocs.io&#x2F;en&#x2F;latest&#x2F;diff_formats.html#example-of-node-moved" rel="nofollow">https:&#x2F;&#x2F;treediffer.readthedocs.io&#x2F;en&#x2F;latest&#x2F;diff_formats.htm...</a> [3] <a href="https:&#x2F;&#x2F;kolibri-demo.learningequality.org&#x2F;en&#x2F;learn&#x2F;#&#x2F;topics" rel="nofollow">https:&#x2F;&#x2F;kolibri-demo.learningequality.org&#x2F;en&#x2F;learn&#x2F;#&#x2F;topics</a>
lewisjoeover 4 years ago
Has anybody went through React&#x27;s HTML diffing algorithm? If this one&#x27;s good, we could write a JS version and use it for HTML diffing in browsers.
评论 #24318411 未加载
hinkleyover 4 years ago
I was staring at a diff today and longing for better semantic diffing.<p>I’d changed a shell script, with a chain of commands. I added a second call to the same command with different args and the diff was just... bad.<p><pre><code> something &amp;&amp; fizz foo &amp;&amp; another something &amp;&amp; fizz bar &amp;&amp; fizz foo &amp;&amp; another </code></pre> It decided that “bar &amp;&amp; fizz” was my edit, and I just stared at it (it was already a tough day). Even if they had just weighted punctuation characters differently, it would have gotten the right answer, as it would with adding new functions or array entries, which it always gets wrong too.<p>Sort it out please.
tingletechover 4 years ago
interesting &quot;This tool was partially developed with funding from the Defense Advanced Research Projects Agency (DARPA) on the SafeDocs project.&quot;<p>I like the idea that it can do semantic diffs across different formats.
setpatchaddressover 4 years ago
I would recommend deleting the screenshots, though. I looked at them and thought &quot;so what? that&#x27;s been done many times before&quot; until I read the text more carefully.
评论 #24314053 未加载
sendbitsover 4 years ago
super cool, having worked on related problems independently (tree-based file compression &amp; arbitrary graph-based file compares) <i>and</i> currently been in search of better way to compare web scrapes over time<p>kudos for putting the two concepts together &#x2F; will give it a go
anotheryouover 4 years ago
I want one that can also find non-perfectly matching moved lines :)<p>looks cool already though, got to try it some time.
评论 #24312967 未加载