TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Graphtage: A New Semantic Diffing Tool

104 点作者 mdelias超过 4 年前

8 条评论

nerdponx超过 4 年前
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_ah超过 4 年前
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>
lewisjoe超过 4 年前
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 未加载
hinkley超过 4 年前
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.
tingletech超过 4 年前
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.
setpatchaddress超过 4 年前
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 未加载
sendbits超过 4 年前
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
anotheryou超过 4 年前
I want one that can also find non-perfectly matching moved lines :)<p>looks cool already though, got to try it some time.
评论 #24312967 未加载