Diff is an actively used application created in 1974. In computing, the diff utility is a data comparison tool that calculates and displays the differences between two files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. The diff command displays the changes made in a standard format, such that both humans and machines can understand the changes and apply them: given one file and the changes, the other file can be created. Read more on Wikipedia...
- Diff ranks in the top 20% of languages
- the Diff wikipedia page
- Diff first appeared in 1974
- file extensions for Diff include diff and patch
- See also: unix, grep, emacs-editor, regex, c, bourne-shell, fortran, modula-2, lisp, isbn, doi
- I have 45 facts about Diff. what would you like to know? email me and let me know how I can help.
Example code from Linguist:
diff --git a/lib/linguist.rb b/lib/linguist.rb index d472341..8ad9ffb 100644 --- a/lib/linguist.rb +++ b/lib/linguist.rb
Example code from Wikipedia:
--- /path/to/original timestamp +++ /path/to/new timestamp @@ -1,3 +1,9 @@ +This is an important +notice! It should +therefore be located at +the beginning of this +document! + This part of the document has stayed the same from version to @@ -5,16 +11,10 @@ be shown if it doesn't change. Otherwise, that would not be helping to -compress the size of the -changes. - -This paragraph contains -text that is outdated. -It will be deleted in the -near future. +compress anything. It is important to spell -check this dokument. On +check this document. On the other hand, a misspelled word isn't the end of the world. @@ -22,3 +22,7 @@ this paragraph needs to be changed. Things can be added after it. + +This paragraph contains +important new additions +to this document.
Last updated December 10th, 2019