Diff - History

History

The diff utility was developed in the early 1970s on the Unix operating system which was emerging from Bell Labs in Murray Hill, New Jersey. The final version, first shipped with the 5th Edition of Unix in 1974, was entirely written by Douglas McIlroy. This research was published in a 1976 paper co-written with James W. Hunt who developed an initial prototype of diff. The algorithm this paper described became known as the Hunt–McIlroy algorithm.

McIlroy's work was preceded and influenced by Steve Johnson's comparison program on GECOS and Mike Lesk's proof program. proof also originated on Unix and, like diff, produced line-by-line changes and even used angle-brackets (">" and "<") for presenting line insertions and deletions in the program's output. The heuristics used in these early applications were, however, deemed unreliable. The potential usefulness of a diff tool provoked McIlroy into researching and designing a more robust tool that could be used in a variety of tasks but perform well in the processing and size limitations of the PDP-11's hardware. His approach to the problem resulted from collaboration also with individuals at Bell Labs including Alfred Aho, Elliot Pinson, Jeffrey Ullman, and Harold S. Stone.

In the context of Unix, the use of the ed line editor provided diff with the natural ability to create machine-usable "edit scripts". These edit scripts, when saved to a file, can, along with the original file, be reconstituted by ed into the modified file in its entirety. This greatly reduced the secondary storage necessary to maintain multiple versions of a file. McIlroy considered writing a post-processor for diff where a variety of output formats could be designed and implemented, but he found it more frugal and simpler to have diff be responsible for generating the syntax and reverse-order input accepted by the ed command. In 1985, Larry Wall composed a separate utility, patch, that generalized and extended the ability to modify files with diff output. Modes in Emacs also allow for converting the format of patches and even editing patches interactively.

In diff's early years, common uses included comparing changes in the source of software code and markup for technical documents, verifying program debugging output, comparing filesystem listings and analyzing computer assembly code. The output targeted for ed was motivated to provide compression for a sequence of modifications made to a file. The Source Code Control System (SCCS) and its ability to archive revisions emerged in the late 1970s as a consequence of storing edit scripts from diff.

Read more about this topic:  Diff

Famous quotes containing the word history:

    The history of our era is the nauseating and repulsive history of the crucifixion of the procreative body for the glorification of the spirit.
    —D.H. (David Herbert)

    What we call National-Socialism is the poisonous perversion of ideas which have a long history in German intellectual life.
    Thomas Mann (1875–1955)

    There is a history in all men’s lives,
    Figuring the natures of the times deceased,
    The which observed, a man may prophesy,
    With a near aim, of the main chance of things
    As yet not come to life.
    William Shakespeare (1564–1616)