Perl 'Expert' Quiz-of-the-Week #15
Mark Jason Dominus <[email protected]> Wed, 18 Jun 2003 23:40:45 -0400
| Newsgroups | gmane.comp.lang.perl.qotw.quiz-of-the-week |
|---|---|
| Organization | Plover Systems |
| Message-ID | <[email protected]> |
IMPORTANT: Please do not post solutions, hints, or other spoilers
until at least 60 hours after the date of this message.
Thanks.
IMPORTANTE: Por favor, no enviéis soluciones, pistas, o cualquier otra
cosa que pueda echar a perder la resolución del problema hasta
que hayan pasado por lo menos 60 horas desde el envío de este
mensaje. Gracias.
IMPORTANT: S'il vous plaît, attendez au minimum 60 heures après la
date de ce message avant de poster solutions, indices ou autres
révélations. Merci.
WICHTIG: Bitte schicken Sie keine Lösungen, Tipps oder Hinweise für
diese Aufgabe vor Ablauf von 60 Stunden nach dem Datum dieser
Mail. Danke.
BELANGRIJK: Stuur aub geen oplossingen, hints of andere tips in de
eerste 60 uur na het verzendingstijdstip van dit
bericht. Waarvoor dank.
VNIMANIE: Pozhalujsta ne shlite reshenija, nameki na reshenija, i
voobshe lyubye podskazki v techenie po krajnej mere 60 chasov
ot daty etogo soobshenija. Spasibo.
Qing3 Zhu4Yi4: Qing3 Ning2 Deng3Dao4 Jie1Dao4 Ben3 Xin4Xi2 Zhi1Hou4 60
Xiao3Shi2, Zai4 Fa1Biao3 Jie3Da2, Ti2Shi4, Huo4 Qi2Ta1 Hui4
Xie4Lou4 Da2An4 De5 Jian4Yi4. Xie4Xie4.
----------------------------------------------------------------
It's late, and as you know, I was up late last night. So I looked
through my question file for a question that would be very quick to
ask. Here it is:
Implement the 'patch' program.
Typical versions of 'patch' have a zillion options and features. It's
up to you how much of 'patch' to implement.
As you probably know, there is a program called 'diff' that generates
a description of the differences between file A and file B. 'patch'
is the reverse. It transforms file A into file B, using the
description that was previously generated by 'diff'.
Some people say that it was 'patch' that made source code sharing and
distribution possible. If you had a large software package, and you
wanted to release a new version, people did not have to download the
whole thing. Instead, you could prepare a 'patch file' with the
'diff' output describing the changes between the old and the new
versions of all the files. People would then download just the patch
file, which was typically much smaller than the entire source code,
and use 'patch' to apply the changes to their own, previously
downloaded copy of the code.
'patch' was invented by some guy named Larry Wall. I wonder what ever
became of him?
----------------------------------------------------------------
Incidentally, if you don't like this, you should seriously consider
the 'regular' quiz this week. It probably should have been an
'expert' quiz---it can be done using only Llama book features, but
just barely.