Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Who knows `diff`?

30 views
Skip to first unread message

Avoi...@gmail.com

unread,
Oct 11, 2012, 6:58:58 PM10/11/12
to
-> whatis diff ==
diff [] (1) - compare files line by line

AFAICS `diff` doesn't so much show you what the difference is.
Nor does it <get you from FileA to FileB>.

Rather it 'sells you a ticket' to <get you from FileA to FileB>.
You are not supposed to understand the ticket, which `patch`
[or some other bus company] uses to <get you from FileA to FileB>.


man/info says:-------------------------
`RdL'
Delete the lines in range R from the first file; line L is where
they would have appeared in the second file had they not been
deleted. For example, `5,7d3' means delete lines 5-7 of file 1;
or, if changing file 2 into file 1, append lines 5-7 of file 1
after line 3 of file 2.
------------------------------------

AFAIK the English meaning of 'append' in 'add at the END'
and AFAIK the above author [who's crap is being read by a zillion
victims for decades] means 'add/insert'.

You will correct me it I'm wrong.

The above disasterous description is an example of how folksie
english is no substitute for a more formal mathematical notation.

Apparently `diff` has good algorithms for comparing
<* Hunks:: Groups of differing lines>
in various heuriatic, human-like ways; like ignoring different
white-chars and even with regex fcilities.

But can it be used to:
delete all further huncks in File1 which match File2?

== TIA.

PS. I know it's difficult to write a good `man` for a subtle
utility; but how many decades of successive refinement
do you need to correct it?

Report bugs to <bug-gn...@gnu.org>




Richard Kettlewell

unread,
Oct 12, 2012, 4:17:00 AM10/12/12
to
Avoi...@gmail.com writes:
> -> whatis diff ==
> diff [] (1) - compare files line by line
>
> AFAICS `diff` doesn't so much show you what the difference is.
> Nor does it <get you from FileA to FileB>.
>
> Rather it 'sells you a ticket' to <get you from FileA to FileB>.
> You are not supposed to understand the ticket, which `patch`
> [or some other bus company] uses to <get you from FileA to FileB>.

Use “diff -u” if you want someone to be able to read the output.

> man/info says:-------------------------
> `RdL'
> Delete the lines in range R from the first file; line L is where
> they would have appeared in the second file had they not been
> deleted. For example, `5,7d3' means delete lines 5-7 of file 1;
> or, if changing file 2 into file 1, append lines 5-7 of file 1
> after line 3 of file 2.
> ------------------------------------
>
> AFAIK the English meaning of 'append' in 'add at the END'
> and AFAIK the above author [who's crap is being read by a zillion
> victims for decades] means 'add/insert'.

“Append after” doesn’t seem unreasonable.

--
http://www.greenend.org.uk/rjk/

Joe Beanfish

unread,
Oct 12, 2012, 9:26:28 AM10/12/12
to
On Thu, 11 Oct 2012 22:58:58 +0000, Avoid9Pdf wrote:

> -> whatis diff ==
> diff [] (1) - compare files line by line
>
> AFAICS `diff` doesn't so much show you what the difference is. Nor does
> it <get you from FileA to FileB>.

Who said it's supposed to? As the manual states it's purpose it to show
you the diff[erence] between two files. It is not intended to edit
anything. Additionally the patch command can read it's output to
get you from filea to fileb but that's only a fraction of usage cases
for diff.

>
> Rather it 'sells you a ticket' to <get you from FileA to FileB>. You
> are not supposed to understand the ticket, which `patch`
> [or some other bus company] uses to <get you from FileA to FileB>.
>
>
> man/info says:-------------------------
> `RdL'
> Delete the lines in range R from the first file; line L is where
> they would have appeared in the second file had they not been
> deleted. For example, `5,7d3' means delete lines 5-7 of file 1;
> or, if changing file 2 into file 1, append lines 5-7 of file 1
> after line 3 of file 2.
> ------------------------------------
>
> AFAIK the English meaning of 'append' in 'add at the END'

If you're going to be pedantic do your homework first. The definition
of append doesn't include "end". The manual's description quoted above
is accurate and precise.

> Apparently `diff` has good algorithms for comparing <* Hunks::
> Groups of differing lines>
> in various heuriatic, human-like ways; like ignoring different
> white-chars and even with regex fcilities.
>
> But can it be used to:
> delete all further huncks in File1 which match File2?

Diff doesn't edit at all. And your question is unclear. If you're going
to whine about people's writing you better get yours right.

Provide some detail of what you want to accomplish and someone may be
able to help. Leave out the whining, it just hides your actual question.

> PS. I know it's difficult to write a good `man` for a subtle utility;
> but how many decades of successive refinement do you need to correct it?

Who said anyone's refining it? It's generally sufficient to the task.

Rui Maciel

unread,
Oct 12, 2012, 10:07:49 AM10/12/12
to
Avoi...@gmail.com wrote:

> PS. I know it's difficult to write a good `man` for a subtle
> utility; but how many decades of successive refinement
> do you need to correct it?

Well, how many contributions have you made to it in these past decades?


Rui Maciel

Avoi...@gmail.com

unread,
Oct 15, 2012, 3:56:56 PM10/15/12
to
In article <k595q3$dmr$1...@dont-email.me>, Joe Beanfish <joebe...@nospam.duh> wrote:

> On Thu, 11 Oct 2012 22:58:58 +0000, Avoid9Pdf wrote:
> > man/info says:-------------------------
> > `RdL'
> > Delete the lines in range R from the first file; line L is where
> > they would have appeared in the second file had they not been
> > deleted. For example, `5,7d3' means delete lines 5-7 of file 1;
> > or, if changing file 2 into file 1, append lines 5-7 of file 1
> > after line 3 of file 2.
> > ------------------------------------
> >
> > AFAIK the English meaning of 'append' in 'add at the END'
>
> If you're going to be pedantic do your homework first. The definition
> of append doesn't include "end". The manual's description quoted above
> is accurate and precise.
>
What is the difference between "accurate" and "precise"?

I was thinking that it's a SERIOUS problem, if I don't know the
difference between INSERT and APPEND; so when I went on-line,
I shot-off a: `gg1 dictionary+append`

You tell me if I should pay to d/l some of the <entries>, or if
this entry is enough to settle it:--------------
= [29]append verb - definition in British English Dictionary & Thesaurus
...

append verb - definition, audio pronunciation, synonyms and more for
append
verb: to add something to the end of a piece of writing: See more in
British
English ...
dictionary.cambridge.org/dictionary/british/append - 43k - [30]Cached -
[31]Similar pages
-------------------------------------------
Believe me, I think people who correct foreigner's English grammar
are arse-holes, like people who say/write "having said that" instead of
"but".
But for COMPUTING the difference between INSERT and APPEND is critical.

And what does it matter in this context? Well, the utility is decades old,
and each one of the zillion poor vicitims, has to fall in the same hole,
and LEARN that for a central part of the `diff` docos "append" does
not actually mean APPEND.

Please correct me if I'm wrong.
Let's try to improve linux.

== TIA.
------------- google is going to control the world --
Web Results 1 - 10 of about 3,110,000 for dictionary append. (0.18
seconds)

= [14]append - definition of append by the Free Online Dictionary ...

tr.v. ap.pend.ed, ap.pend.ing, ap.pends. 1. To add as a supplement or
appendix:
appended a list of errors to the report. 2. To fix to; attach: append a
charm to the ...
www.thefreedictionary.com/append - 39k - [15]Cached - [16]Similar pages

= [17]Append | Define Append at Dictionary.com

to add as a supplement, accessory, or appendix; subjoin: to append a
note to a
letter. 2. to attach or suspend as a pendant. 3. to sign a document
with; affix: to ...
dictionary.reference.com/browse/append - 70k - [18]Cached - [19]Similar
pages

= [20]5. Data Structures Python v2.7.3 documentation

Extend the list by appending all the items in the given list;
equivalent to a[len(a):]
= L. ..... Another useful data type built into Python is the dictionary
(see Mapping ...
docs.python.org/tutorial/datastructures.html - 81k - [21]Cached -
[22]Similar pages

= [23]Appending values to dictionary in Python - Stack Overflow

I have a dictionary to which I want to append to each drug, a list of
... Just use
append: list1=[1,2,3,4,5] list2=[123,234,456] d={'a':[],'b':[]} ...
stackoverflow.com/.../appending-values-to-dictionary-in-python - 55k -
[24]Cached - [25]Similar pages

= [26]Append - Definition and More from the Free Merriam-Webster ...

to add as a supplement or appendix (as in a book). Examples of APPEND.
<
append the prefix un- to each of these words>. Origin of APPEND. Latin
appendere ...
www.merriam-webster.com/dictionary/append - 119k - [27]Cached -
[28]Similar pages

= [29]append verb - definition in British English Dictionary & Thesaurus
...

append verb - definition, audio pronunciation, synonyms and more for
append
verb: to add something to the end of a piece of writing: See more in
British
English ...
dictionary.cambridge.org/dictionary/british/append - 43k - [30]Cached -
[31]Similar pages

= [32]append - WordReference.com Dictionary of English

Trverb add to the end of a document. origin ME: from L. appendere 'hang
on'. '
append' also found in these Oxford entries: appendix - suffix. Forum
discussions ...
www.wordreference.com/definition/append - 24k - [33]Cached -
[34]Similar pages

= [35]What is append? - A Word Definition From the Webopedia Computer ...

This page describes the term append and lists other pages on the Web
where
you ... Webopedia's cloud computing dictionary will help you understand
the new ...
www.webopedia.com/TERM/A/append.html - 41k - [36]Cached - [37]Similar
pages

= [38]append - Sentence Examples - YourDictionary

How to use append in a sentence. Example sentences with the ...
sentence.yourdictionary.com/append - 19k - [39]Cached - [40]Similar
pages

[41]append - Definition from Longman English Dictionary Online

Definition of append from the Longman Online Dictionary of Contemporary
English. The Longman English Dictionary provides support and resources
for
those ...
www.ldoceonline.com/dictionary/append - 20k - [42]Cached - [43]Similar
pages

Searches related to: dictionary append

[44]dictionary appendix [45]dictionary append python [46]dictionary
prepend [47]python dictionary append value
[48]python dictionary append value to key [49]python dictionary append
example [50]python dictionary append list [51]append english

1 [52]
2 [53]
3 [54]
4 [55]
5 [56]
6 [57]
7 [58]
14. http://www.google.com/url?q=http://www.thefreedictionary.com/append&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CBgQFjAA&usg=AFQjCNFWB4coSuZ0AWgYHtWR7i98fuNlvA
17. http://www.google.com/url?q=http://dictionary.reference.com/browse/append&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CCAQFjAB&usg=AFQjCNHjVTvUcyBxGsMpr0xlVAykz_wm5g
20. http://www.google.com/url?q=http://docs.python.org/tutorial/datastructures.html&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CCgQFjAC&usg=AFQjCNGAQQHlhw1iiioAp0NN1IHtMLHcbw
23. http://www.google.com/url?q=http://stackoverflow.com/questions/3419147/appending-values-to-dictionary-in-python&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CC4QFjAD&usg=AFQjCNFykCQ44aswYw9gA5nGOShh_hMplQ
26. http://www.google.com/url?q=http://www.merriam-webster.com/dictionary/append&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CDAQFjAE&usg=AFQjCNHk-ANsrVy7OlBl40CQ2vtz18UxiA
29. http://www.google.com/url?q=http://dictionary.cambridge.org/dictionary/british/append&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CDMQFjAF&usg=AFQjCNHLj0mYKV5jCGUEHqfcxmXVjEGqAw
35. http://www.google.com/url?q=http://www.webopedia.com/TERM/A/append.html&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CDgQFjAH&usg=AFQjCNHrGNGrYjjNc_TXa2V55vQVtRnA8w
38. http://www.google.com/url?q=http://sentence.yourdictionary.com/append&sa=U&ei=T2B8UO-kCpGXhQfJuYHIBg&ved=0CDsQFjAI&usg=AFQjCNGnYF49R9a-bcrSNt-B42_t48EpIA

The Natural Philosopher

unread,
Oct 15, 2012, 4:00:33 PM10/15/12
to
Avoi...@gmail.com wrote:

>
> I was thinking that it's a SERIOUS problem,


The rewrite the fucking man page.
Thats the beauty of open source. You can.


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.

Keith Keller

unread,
Oct 15, 2012, 4:15:39 PM10/15/12
to
On 2012-10-15, The Natural Philosopher <t...@invalid.invalid> wrote:
> Avoi...@gmail.com wrote:
>
>> I was thinking that it's a SERIOUS problem,
>
> The rewrite the fucking man page.
> Thats the beauty of open source. You can.

We can only hope that such poorly written patches to the documentation
would be rejected out of hand by the original maintainers.

--keith

--
kkeller...@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

Avoi...@gmail.com

unread,
Oct 15, 2012, 5:42:07 PM10/15/12
to
In article <bg7uk9x...@goaway.wombat.san-francisco.ca.us>, Keith Keller <kkeller...@wombat.san-francisco.ca.us> wrote:

> On 2012-10-15, The Natural Philosopher <t...@invalid.invalid> wrote:
> > Avoi...@gmail.com wrote:
> >
> >> I was thinking that it's a SERIOUS problem,
> >
> > The rewrite the fucking man page.
> > Thats the beauty of open source. You can.
>
I wouldn't call it REWRITE. You don't need congress or UNO
to authorise it.

> We can only hope that such poorly written patches to the
> documentation would be rejected out of hand by the original
> maintainers.
>
Well no; it can start out very rough; provided it's cleaned
up over time. I love `mc`, which I've been using since the
days of DOS:nc and it's continually improving, because the
users and developers don't get hysterical when the inevitable
bugs are reported. They don't lapse into primitive tribalism
like football hoodlums.

> --keith

PS. I noticed MY typo:
> AFAIK the English meaning of 'append' in 'add at the END'
} AFAIK the English meaning of 'append' IS 'add at the END'


Joe Beanfish

unread,
Oct 16, 2012, 9:39:01 AM10/16/12
to
On Mon, 15 Oct 2012 19:56:56 +0000, Avoid9Pdf wrote:

> In article <k595q3$dmr$1...@dont-email.me>, Joe Beanfish
> <joebe...@nospam.duh> wrote:
>
>> On Thu, 11 Oct 2012 22:58:58 +0000, Avoid9Pdf wrote:
>> > man/info says:-------------------------
>> > `RdL'
>> > Delete the lines in range R from the first file; line L is where
>> > they would have appeared in the second file had they not been
>> > deleted. For example, `5,7d3' means delete lines 5-7 of file 1;
>> > or, if changing file 2 into file 1, append lines 5-7 of file 1
>> > after line 3 of file 2.
>> > ------------------------------------
>> >
>> > AFAIK the English meaning of 'append' in 'add at the END'
>>
>> If you're going to be pedantic do your homework first. The definition
>> of append doesn't include "end". The manual's description quoted above
>> is accurate and precise.
>>
> What is the difference between "accurate" and "precise"?
>
> I was thinking that it's a SERIOUS problem, if I don't know the
> difference between INSERT and APPEND; so when I went on-line,
> I shot-off a: `gg1 dictionary+append`
>
> You tell me if I should pay to d/l some of the <entries>, or if this
> entry is enough to settle it:

So, one third of your citations use the word end. Sooooory. The
majority definitions indicate simply "add" as did all of the ones
I happened to look at before responding before. Maybe append isn't the
*best* choice of words in the manual but the behavior is clear from
the full context.

The point remains. As others have said, you're free to fix it.
Otherwise deal with it and move on with asking your question
instead of writing a full page complaint about trivial terminology
disagreements like every other flamer on the net. See how effective
that was at getting you an answer to your 2 line question buried at
the end of your rant? 7 responses and no answers. Next time just
ask your question and leave the whining out and you'll probably get
a useful answer instead of return flames. Unless of course all you
really want is a flame war. If so, then by all means pick at every
little nit in all the free software and documentation made available
to you.
0 new messages