Tech Tree of the Web

The history of web technology, 1945 to now: 112 ideas and the lines between them. Drag, scroll or press ← → to travel. Open any one for its story.

No. 015 / 112Seen 0 / 112Colophon

The Network

diff, 1974. Era II, The Network.

Era II · 1969–1988

← drag · scroll · arrow keys →

A terminal running GNU diff on two text files, showing its classic change output and side-by-side mode.

A terminal running GNU diff on two text files, showing its classic change output and side-by-side mode. Marco Bernardini, GPL

Key details

When
1974 (Fifth Edition Unix, June 1974); Bell Labs CSTR 41, July 1976
Who
James W. Hunt and M. Douglas McIlroy, building on work by Harold Stone and T. G. Szymanski
Where
Bell Laboratories, Murray Hill, New Jersey (Hunt at Stanford University)
Answered
It answered the need to report the minimal list of line changes between two versions of a file.
Led to
It led to Larry Wall's patch utility, the context and unified diff formats, and the patches that version control and code review still use.

No. 015 · 1974 · Version control · Era II, The Network

diff

Computed the smallest set of line changes between two files, the format patches and reviews still use.

Facts

  1. An Algorithm for Differential File Comparison was published as Bell Laboratories Computing Science Technical Report 41, dated July 1976. 2
  2. The central algorithm of diff solves the longest common subsequence problem to find lines that do not change between files. 2
  3. The paper reports typical times of 1/4 to 3/4 CPU minutes for comparing 3500-line files on a PDP-11/45. 2
  4. diff was part of the 5th Edition of Unix, released in 1974. 1
  5. Wayne Davison developed unified context diffs in August 1990, and they debuted in GNU diff 1.15 in January 1991. 1

Sources

  1. Wikipedia, diff
  2. Hunt and McIlroy, An Algorithm for Differential File Comparison, Bell Labs CSTR 41, 1976
  3. The Unix Heritage Society, Fifth Edition Unix source, diff1.c
Came from
Led to