> On 19 Jun 2015, at 11:20 pm, Peter Kelly <pmke...@apache.org> wrote:

> I experimented with this a while back using the Myers diff algorithm

> [1] http://www.xmailserver.org/diff2.pdf

This is a fascinating algorithm BTW, and one of my favourites of all time, 
because of the way in which it re-casts the problem (diffing two files) into a 
totally different form (finding the shortest path through a graph), and 
explains the solution in terms of this latter form. The paper is pretty heavy 
reading, but there’s a good implementation here:

http://www.codeproject.com/Articles/42279/Investigating-Myers-diff-algorithm-Part-of

There’s an implementation of this in Editor/src/util.js (function diff). It’s 
not actually used anywhere any I can’t remember why I added it there, but 
useful nonetheless as as starting point if you’re looking for an implementation.

—
Dr Peter M. Kelly
pmke...@apache.org

PGP key: http://www.kellypmk.net/pgp-key <http://www.kellypmk.net/pgp-key>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

Reply via email to