GithubHelp home page GithubHelp logo

algorithm--diff's Introduction

The module is a direct port from the Perl 5 version and should be close to 100% similair
other then some Perl 6 idioms.

Listed below is the original README:

This is a module for computing the difference between two files, two
strings, or any other two lists of things.  It uses an intelligent
algorithm similar to (or identical to) the one used by the Unix "diff"
program.  It is guaranteed to find the *smallest possible* set of
differences.

This package contains a few parts.

Algorithm::Diff is the module that contains several interfaces for which
computing the differences betwen two lists.

The several "diff" programs also included in this package use
Algorithm::Diff to find the differences and then they format the output.

Algorithm::Diff also includes some other useful functions such as "LCS",
which computes the longest common subsequence of two lists.

A::D is suitable for many uses.  You can use it for finding the smallest
set of differences between two strings, or for computing the most
efficient way to update the screen if you were replacing "curses".

Algorithm::DiffOld is a previous version of the module which is included
primarilly for those wanting to use a custom comparison function rather
than a key generating function (and who don't mind the significant
performance penalty of perhaps 20-fold).

diff.pl implements a "diff" in Perl that is as simple as (was
previously) possible so that you can see how it works.  The output
format is not compatible with regular "diff".  It needs to be
reimplemented using the OO interface to greatly simplify the code.

diffnew.pl implements a "diff" in Perl with full bells and whistles.  By
Mark-Jason, with code from cdiff.pl included.

cdiff.pl implements "diff" that generates real context diffs in either
traditional format or GNU unified format.  Original contextless
"context" diff supplied by Christian Murphy.  Modifications to make it
into a real full-featured diff with -c and -u options supplied by Amir
D. Karger.

Yes, you can use this program to generate patches.

OTHER RESOURCES

"Longest Common Subsequences", at
http://www.ics.uci.edu/~eppstein/161/960229.html

This code was adapted from the Smalltalk code of Mario Wolczko
<[email protected]>, which is available at
ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st

THANKS SECTION

Thanks to Ned Konz's for rewriting the module to greatly improve
performance, for maintaining it over the years, and for readilly handing
it over to me so I could plod along with my improvements.

(From Ned Konz's earlier versions):

Thanks to Mark-Jason Dominus for doing the original Perl version and
maintaining it over the last couple of years. Mark-Jason has been a huge
contributor to the Perl community and CPAN; it's because of people like
him that Perl has become a success.

Thanks to Mario Wolczko <[email protected]> for writing and making
publicly available his Smalltalk version of diff, which this Perl
version is heavily based on.

Thanks to Mike Schilli <[email protected]> for writing sdiff and
traverse_balanced and making them available for the Algorithm::Diff
distribution.

(From Mark-Jason Dominus' earlier versions):

Huge thanks to Amir Karger for adding full context diff supprt to
"cdiff.pl", and then for waiting patiently for five months while I let
it sit in a closet and didn't release it.  Thank you thank you thank
you, Amir!

Thanks to Christian Murphy for adding the first context diff format
support to "cdiff.pl".

algorithm--diff's People

Contributors

froggs avatar kensanata avatar lizmat avatar moritz avatar rbt avatar retupmoca avatar takadonet avatar thundergnat avatar zoffixznet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.