[HN Gopher] Fifty Years of Diff
___________________________________________________________________
Fifty Years of Diff
Author : todsacerdoti
Score : 50 points
Date : 2024-06-15 21:45 UTC (2 days ago)
(HTM) web link (exple.tive.org)
(TXT) w3m dump (exple.tive.org)
| 082349872349872 wrote:
| _Patch_ (1), IIRC, was Larry Wall's, who has also made one or two
| other small contributions over the years :-)
| aaron695 wrote:
| diff is a np problem and a real np problem in that most (all?)
| implementations are not good enough for everyday use. You will
| regularly get situations where it fails.
|
| Compared to most np problems that just sit in a lab where they
| save a dollar on a working multi million operation by adding $$
| worth of complexity.
|
| It'd be interesting to see all the diff's of the world in an
| arena battling it out. Computer Science seems unable to invent
| new things since 1980 so we should be improving on what they
| discovered at least.
| fanf2 wrote:
| This made me wonder, what use was diff without patch?
|
| But then I remembered diff -e which produces an ed script. In the
| 5th and 6th edition the -e option was simply -
| https://man.cat-v.org/unix-6th/1/diff I guess the reason for the
| non-ed output is to include the text of the deleted lines.
|
| The diff3 utility (which arrived in the 7th edition
| https://man.cat-v.org/unix_7th/1/diff3) can be used as a sort of
| combined diff and patch, again with the help of ed, but it seems
| a bit awkward.
|
| I think merge arrived as part of RCS? at least, that's the way it
| is packaged now. (POSIX has neither RCS nor merge
| https://pubs.opengroup.org/onlinepubs/9699919799/idx/im.html)
| Curiously I can't find any sign of a merge facility in SCCS -
| maybe I am missing something; SCCS terminology is a bit weird.
|
| The crucial ingredients for pre-git open source workflows are
| context diffs, plus patch. Including the context makes the diff a
| lot easier to review without applying it, and it allows patch to
| be much more robust against concurrent changes. As far as I can
| tell, diff -c first appeared in 4BSD in 1980
| https://www.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/man/cat1...
| It predates the start of the CSRG SCCS history of diff.c
| https://svnweb.freebsd.org/csrg/usr.bin/diff/diff/diff.c?vie...
| As the maintainer of unifdef I am greatly amused by diff's
| -Dstring cpp mode.
| 1vuio0pswjnm7 wrote:
| A favourite utility of mine.
|
| Unfortonately, busybox diff does not have the -y or -e options.
___________________________________________________________________
(page generated 2024-06-17 23:01 UTC)