News for hackers. Stuff that matters.
Re:Fifty Years of Diff by 082349872349872 on Saturday June 15, 2024 @06:11PM (#40693071)
Patch(1), IIRC, was Larry Wall's, who has also made one or two other small contributions over the years :-)
[dead]
Re:Fifty Years of Diff by alt0_ on Monday June 17, 2024 @08:54PM (#40712956)
> Computer Science seems unable to invent new things since 1980

Can you tell me more about this and why you think that's true?

Re:Fifty Years of Diff by fanf2 on Monday June 17, 2024 @05:36PM (#40711344)
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.

Re:Fifty Years of Diff by beagle3 on Tuesday June 18, 2024 @02:28AM (#40714651)
Diff is incredibly useful on its own. I use diff a lot, and I think 95% of my use of diff is to figure out what has changed without any intention to apply a patch.

Furthermore, it’s likely been 20 years since I used “patch” - I almost never apply an entire diff/patch, but rather parts of it interactively with kdiff3 or beyondcompare

Re:Fifty Years of Diff by 1vuio0pswjnm7 on Monday June 17, 2024 @06:45PM (#40712024)
A favourite utility of mine.

Unfortonately, busybox diff does not have the -y or -e options.

Re:Fifty Years of Diff by anotherpaulg on Monday June 17, 2024 @07:11PM (#40712256)
I’ve been hoping for awhile to train or fine tune an LLM to reliably output diffs. It’s really fundamental to code editing.

https://aider.chat/2023/12/21/unified-diffs.html#unified-dif...

Re:Fifty Years of Diff by 1-more on Monday June 17, 2024 @07:38PM (#40712482)
Hillel Wayne posits that version control is the number one thing computer science/programming/software engineering has to teach to the other engineering disciplines. It wouldn't work without diff. It's really foundational for what it is we do, you know?

https://www.hillelwayne.com/post/what-we-can-learn/

Re:Fifty Years of Diff by mrWiz on Tuesday June 18, 2024 @05:15PM (#40722250)
I wish more engineering tools had an equivalent of diff. Manually redlining schematics and drawings is such a pain.
Re:Fifty Years of Diff by 1-more on Tuesday June 18, 2024 @06:19PM (#40722694)
that's a really interesting idea. Many formats representing drawings like SVG and Kicad Schematics are text formats, not binary. They can be diffed, and it's a matter of rendering the diff as part of the drawing, not as text. I wonder if anyone is working on such a thing.
Re:Fifty Years of Diff by hcs on Tuesday June 18, 2024 @07:04PM (#40723016)
AllSpice.io provides graphical diffs for KiCad schematic and PCB files (and others) in a Gitea-based forge: https://allspice.io/

Disclosure: I work there (mostly on binary formats), it's a paid service

Re:Fifty Years of Diff by 1-more on Monday June 24, 2024 @03:45PM (#40779854)
This sounds rad and I wish you all the very best!!
Re:Fifty Years of Diff by mr_toad on Monday June 17, 2024 @09:45PM (#40713269)
“ It’s the seed crystal of all workable open collaboration, and people living without it don’t even have the language to recognize how bad they’ve got it. “

As someone who has worked with proper version control et. al., but is often forced to work in other environments, I absolutely know how bad I’ve got it.

Re:Fifty Years of Diff by pipeline_peak on Wednesday June 19, 2024 @01:53AM (#40725253)
how did your guys diff birthday cakes turn out?