Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

7 May, 2024: fms is rebuilding. Don't expect much in that section for quite a few days, maybe longer.


devel / comp.unix.shell / Re: GNU diff output defaults

SubjectAuthor
* GNU diff output defaultsJanis Papanagnou
+- Re: GNU diff output defaultsChristian Weisgerber
+* Re: GNU diff output defaultsBen Bacarisse
|`* Re: GNU diff output defaultsJanis Papanagnou
| `* Re: GNU diff output defaultsDan Espen
|  `* [OT] Chain-printers (was Re: GNU diff output defaults)Janis Papanagnou
|   `- Re: [OT] Chain-printers (was Re: GNU diff output defaults)silly
+* Re: GNU diff output defaultsDavid W. Hodgins
|`* Re: GNU diff output defaultsDan Espen
| `* Re: GNU diff output defaultsDavid W. Hodgins
|  +* Re: GNU diff output defaultsDan Espen
|  |`- Re: GNU diff output defaultsDavid W. Hodgins
|  `* [OT] Printer control characters (was Re: GNU diff output defaults)Janis Papanagnou
|   `* Re: [OT] Printer control characters (was Re: GNU diff outputDavid W. Hodgins
|    `- Re: [OT] Printer control characters (was Re: GNU diff output defaults)Dan Espen
`* Re: GNU diff output defaultsKeith Thompson
 +* Re: GNU diff output defaultsJanis Papanagnou
 |`* Re: GNU diff output defaultsKeith Thompson
 | `- Re: GNU diff output defaultsJanis Papanagnou
 `- Re: GNU diff output defaultsChristian Weisgerber

1
GNU diff output defaults

<tco2el$h4c8$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5546&group=comp.unix.shell#5546

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: GNU diff output defaults
Date: Sun, 7 Aug 2022 11:59:49 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <tco2el$h4c8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 7 Aug 2022 09:59:49 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="eef1f41e1da10d962c11d0b7fab90904";
logging-data="561544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/n9Deq7mlQ0ZYQwl/cYP1Q"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:n2a21hgCGugF9+B+h7PGgSnaujo=
X-Enigmail-Draft-Status: N1110
X-Mozilla-News-Host: news://news.eternal-september.org:119
 by: Janis Papanagnou - Sun, 7 Aug 2022 09:59 UTC

When using a side-by-side diff output with GNU diff(1) it just
occurred to me that the output didn't fit on the screen window
and I saw that there's a somewhat strange or arbitrary default
width of 130 columns defined

-y, --side-by-side
-W, --width=NUM
output at most NUM (default 130) print columns

Is there a reason for a number like that; I mean I'd have (if
only for historical reasons) expected, say, a value of 80, or,
since "any default value is wrong" considering diff to take the
actual display width as default (if not specified by the user).

It's no issue, but I was surprised about that default.

Janis

Re: GNU diff output defaults

<slrntev6gi.61h.naddy@lorvorc.mips.inka.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5548&group=comp.unix.shell#5548

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: naddy@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 7 Aug 2022 10:55:14 -0000 (UTC)
Message-ID: <slrntev6gi.61h.naddy@lorvorc.mips.inka.de>
References: <tco2el$h4c8$1@dont-email.me>
Injection-Date: Sun, 7 Aug 2022 10:55:14 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="6194"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Sun, 7 Aug 2022 10:55 UTC

On 2022-08-07, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:

> When using a side-by-side diff output with GNU diff(1) it just
> occurred to me that the output didn't fit on the screen window
> and I saw that there's a somewhat strange or arbitrary default
> width of 130 columns defined

Indeed, I would expect 132 columns. I guess they wanted a round
number.

> Is there a reason for a number like that; I mean I'd have (if
> only for historical reasons) expected, say, a value of 80, or,

The DEC VT100 family of video terminals could be switched from the
default 80 columns into 132-column mode.

I have a vague memory that 1980s dot matrix printers also supported
such a condensed mode.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

Re: GNU diff output defaults

<87czdcqhst.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5552&group=comp.unix.shell#5552

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 14:55:46 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <87czdcqhst.fsf@bsb.me.uk>
References: <tco2el$h4c8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="275b5f30ff03be01c7f3360f28ccdb74";
logging-data="650199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LR+WPzy6aiZENEL5qR746yC2iDIySgYo="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:xwfsLSQTx1+ISoEp04XTeh6fQ0o=
sha1:PKeB2nWEHPI+AdDeZCDNntCUJ4g=
X-BSB-Auth: 1.138dc004a9d8fa673482.20220807145546BST.87czdcqhst.fsf@bsb.me.uk
 by: Ben Bacarisse - Sun, 7 Aug 2022 13:55 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> writes:

> When using a side-by-side diff output with GNU diff(1) it just
> occurred to me that the output didn't fit on the screen window
> and I saw that there's a somewhat strange or arbitrary default
> width of 130 columns defined
>
> -y, --side-by-side
> -W, --width=NUM
> output at most NUM (default 130) print columns
>
> Is there a reason for a number like that; I mean I'd have (if
> only for historical reasons) expected, say, a value of 80, or,
> since "any default value is wrong" considering diff to take the
> actual display width as default (if not specified by the user).

80 columns comes from punched cards and, in those days, the most common
size of line printer paper accommodated 132 columns. (This predates
line printers and comes from 14 inch stock and a 10 pitch font. The
other 8 columns being lost to margins and the holes to move the paper
through.)

So 80 and 132 characters were often used widths. 130? Not sure but
it's close enough to 132 that someone might be remembering an old line
printer.

--
Ben.

Re: GNU diff output defaults

<tcojea$k6kd$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5555&group=comp.unix.shell#5555

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 7 Aug 2022 16:49:45 +0200
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <tcojea$k6kd$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me> <87czdcqhst.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 7 Aug 2022 14:49:46 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="eef1f41e1da10d962c11d0b7fab90904";
logging-data="662157"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yZ+0lUGLoXBbLU6WE+voq"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:XCDgZTRMrCWVg8RKBU7q7lXPvMU=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <87czdcqhst.fsf@bsb.me.uk>
 by: Janis Papanagnou - Sun, 7 Aug 2022 14:49 UTC

On 07.08.2022 15:55, Ben Bacarisse wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
>
>> When using a side-by-side diff output with GNU diff(1) it just
>> occurred to me that the output didn't fit on the screen window
>> and I saw that there's a somewhat strange or arbitrary default
>> width of 130 columns defined
>>
>> -y, --side-by-side
>> -W, --width=NUM
>> output at most NUM (default 130) print columns
>>
>> Is there a reason for a number like that; I mean I'd have (if
>> only for historical reasons) expected, say, a value of 80, or,
>> since "any default value is wrong" considering diff to take the
>> actual display width as default (if not specified by the user).
>
> 80 columns comes from punched cards and, in those days, the most common
> size of line printer paper accommodated 132 columns. (This predates
> line printers and comes from 14 inch stock and a 10 pitch font. The
> other 8 columns being lost to margins and the holes to move the paper
> through.)
>
> So 80 and 132 characters were often used widths. 130? Not sure but
> it's close enough to 132 that someone might be remembering an old line
> printer.

I do recall the 80/132 devices quite well (actually I have still a
set of punch-cards and chain-printer output somewhere buried).[*]

But I don't see the point of such a default. In my code I now have
a (IMO unnecessary complex) call of

diff -W$(tput cols) -y ...

This could have been the implicit default to make usage simpler for
any terminal settings by only calling

diff -y ...

and anyone you wants a fixed number can just define that number as
-W80, -W132, -W160, or whatever, anyway.

But okay, it is what it is.

Janis

[*] Wikipedia, though, mentions for the most widespread IBM printer
a width of 120 character positions. (This deviates from my own, but
only faint, memories.)

Re: GNU diff output defaults

<tcom9q$kf6j$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5556&group=comp.unix.shell#5556

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dan1espen@gmail.com (Dan Espen)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 11:38:33 -0400
Organization: A noiseless patient Spider
Lines: 62
Message-ID: <tcom9q$kf6j$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me> <87czdcqhst.fsf@bsb.me.uk>
<tcojea$k6kd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="6afbd8d6ef201fdea834832c1e34bf7f";
logging-data="670931"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19p8QZct+JvMla4FuQnX6uymCI0ZzpzRT8="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:ZzFLS97DbjzN+n0a98S4y1acYo8=
 by: Dan Espen - Sun, 7 Aug 2022 15:38 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> writes:

> On 07.08.2022 15:55, Ben Bacarisse wrote:
>> Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
>>
>>> When using a side-by-side diff output with GNU diff(1) it just
>>> occurred to me that the output didn't fit on the screen window
>>> and I saw that there's a somewhat strange or arbitrary default
>>> width of 130 columns defined
>>>
>>> -y, --side-by-side
>>> -W, --width=NUM
>>> output at most NUM (default 130) print columns
>>>
>>> Is there a reason for a number like that; I mean I'd have (if
>>> only for historical reasons) expected, say, a value of 80, or,
>>> since "any default value is wrong" considering diff to take the
>>> actual display width as default (if not specified by the user).
>>
>> 80 columns comes from punched cards and, in those days, the most common
>> size of line printer paper accommodated 132 columns. (This predates
>> line printers and comes from 14 inch stock and a 10 pitch font. The
>> other 8 columns being lost to margins and the holes to move the paper
>> through.)
>>
>> So 80 and 132 characters were often used widths. 130? Not sure but
>> it's close enough to 132 that someone might be remembering an old line
>> printer.
>
> I do recall the 80/132 devices quite well (actually I have still a
> set of punch-cards and chain-printer output somewhere buried).[*]
>
> But I don't see the point of such a default. In my code I now have
> a (IMO unnecessary complex) call of
>
> diff -W$(tput cols) -y ...
>
> This could have been the implicit default to make usage simpler for
> any terminal settings by only calling
>
> diff -y ...
>
> and anyone you wants a fixed number can just define that number as
> -W80, -W132, -W160, or whatever, anyway.
>
> But okay, it is what it is.
>
> Janis
>
> [*] Wikipedia, though, mentions for the most widespread IBM printer
> a width of 120 character positions. (This deviates from my own, but
> only faint, memories.)

My memories are pretty clear.
I can't recall a shop with 120 character printers and I was in a LOT of
shops.

I spent 2 years in a 1440 shop. The 1443 printer was 144 or 120
characters. Never saw one of those with 120 characters either.

--
Dan Espen

Re: GNU diff output defaults

<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5557&group=comp.unix.shell#5557

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 12:34:45 -0400
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <op.1qjhn7hwa3w0dxdave@hodgins.homeip.net>
References: <tco2el$h4c8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="1d2fdf2da69f50ddb7abae8a0758a695";
logging-data="683826"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RTo+Hj22CjQI6KqdfG10x+rBNO0CL0LI="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:S0Wp7tGvNGJCxXVRhHdc54lcsSQ=
 by: David W. Hodgins - Sun, 7 Aug 2022 16:34 UTC

On Sun, 07 Aug 2022 05:59:49 -0400, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:

> When using a side-by-side diff output with GNU diff(1) it just
> occurred to me that the output didn't fit on the screen window
> and I saw that there's a somewhat strange or arbitrary default
> width of 130 columns defined
>
> -y, --side-by-side
> -W, --width=NUM
> output at most NUM (default 130) print columns
>
> Is there a reason for a number like that; I mean I'd have (if
> only for historical reasons) expected, say, a value of 80, or,
> since "any default value is wrong" considering diff to take the
> actual display width as default (if not specified by the user).
>
> It's no issue, but I was surprised about that default.

The fanfold paper used on older printers had 133 characters per line with the
first being used for carriage control. I guess they dropped a couple of characters
to allow for paper being not quite centered.

Regards, Dave Hodgins

[OT] Chain-printers (was Re: GNU diff output defaults)

<tcopqd$ks7p$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5558&group=comp.unix.shell#5558

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: [OT] Chain-printers (was Re: GNU diff output defaults)
Date: Sun, 7 Aug 2022 18:38:37 +0200
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <tcopqd$ks7p$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me> <87czdcqhst.fsf@bsb.me.uk>
<tcojea$k6kd$1@dont-email.me> <tcom9q$kf6j$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 7 Aug 2022 16:38:38 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="632c8cfe475668d65aa6e67c1b2b4e5e";
logging-data="684281"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sko04Tai56+95I36GVzvi"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:2m9/jHUaFim9lnZlJb2AXSLn7ig=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <tcom9q$kf6j$1@dont-email.me>
 by: Janis Papanagnou - Sun, 7 Aug 2022 16:38 UTC

On 07.08.2022 17:38, Dan Espen wrote:
>
> My memories are pretty clear.
> I can't recall a shop with 120 character printers and I was in a LOT of
> shops.
>
> I spent 2 years in a 1440 shop. The 1443 printer was 144 or 120
> characters. Never saw one of those with 120 characters either.

From the Wikipedia, IBM 1403 printer (for IBM 360 and other systems):

The IBM 1403 has the following models:

Model 1: 100 print positions, maximum of 600 lines per minute, or
1285 with the Numerical Print Special Feature.
Model 2: 132 print positions, maximum of 600 lines per minute, or
1285 with the Numerical Print Special Feature, or 750 with Universal
Character Set.
Model 3: 132 print positions, maximum of 1100 lines per minute, or
1400 with the Preferred or Universal Character Sets.
Model 4: 100 print positions, maximum of 465 lines per minute.
Model 5: 132 print positions, maximum of 465 lines per minute.
Model 6: 120 print positions, maximum of 340 lines per minute,
single-carriage.
Model 7: 120 print positions, maximum of 600 lines per minute,
single-carriage.

Obviously there's 100, 120, and 132 columns, it seems - the latter
(132) was what I remember to have been used in our computing centers
(that had been running CDC 175, Siemens 7.x (IBM clone, with HW from
Asia, IIRC), and TR 440, all with the same sort of chain-printers).

Janis

Re: [OT] Chain-printers (was Re: GNU diff output defaults)

<tcordt$10p8$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5559&group=comp.unix.shell#5559

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!jMTLk+HdJpY2gI9mO2uqUw.user.46.165.242.91.POSTED!not-for-mail
From: silly@hotair.club
Newsgroups: comp.unix.shell
Subject: Re: [OT] Chain-printers (was Re: GNU diff output defaults)
Date: Sun, 7 Aug 2022 17:06:05 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <tcordt$10p8$1@gioia.aioe.org>
References: <tcopqd$ks7p$1@dont-email.me>
Injection-Info: gioia.aioe.org; logging-data="33576"; posting-host="jMTLk+HdJpY2gI9mO2uqUw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: silly@hotair.club - Sun, 7 Aug 2022 17:06 UTC

One of my jobs in the late 70s was printing junk mail on these printers.
The outfit I worked for had apparently bought an IBM 370 system along
with the printers, punchcard readers and reel-to-reel tape storage for
pennies at auction. A room with 6 of these printers going is very loud;
should have been wearing earplugs but none of us did. Mostly we printed
offers for insurance and credit cards on pre-printed fan-fold forms; only
the text that varied -- names, addresses, terms of offer -- were printed
so getting things to line up was sometimes tricky. We went through a
lot of ribbons with these printers; usually they broke before all the dry
ink was worn off. Other times the forms would tear. In both cases the
tapes would have to be wound back a bit and the job restarted. Many of
the forms varied only slightly from eachother; the worst thing one could
do was run the entire print job on the wrong forms..

LOL -- think I still have my IBM printer smock from that place.

Re: GNU diff output defaults

<tcoria$l0uu$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5560&group=comp.unix.shell#5560

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dan1espen@gmail.com (Dan Espen)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 13:08:26 -0400
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <tcoria$l0uu$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me>
<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="6afbd8d6ef201fdea834832c1e34bf7f";
logging-data="689118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5h5JgLUvYz4LJxf/MTnoRpMD2gl4maHw="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:phlFgEf0XpZw1KMNxk0/2o7w7i4=
 by: Dan Espen - Sun, 7 Aug 2022 17:08 UTC

"David W. Hodgins" <dwhodgins@nomail.afraid.org> writes:

> On Sun, 07 Aug 2022 05:59:49 -0400, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>
>> When using a side-by-side diff output with GNU diff(1) it just
>> occurred to me that the output didn't fit on the screen window
>> and I saw that there's a somewhat strange or arbitrary default
>> width of 130 columns defined
>>
>> -y, --side-by-side
>> -W, --width=NUM
>> output at most NUM (default 130) print columns
>>
>> Is there a reason for a number like that; I mean I'd have (if
>> only for historical reasons) expected, say, a value of 80, or,
>> since "any default value is wrong" considering diff to take the
>> actual display width as default (if not specified by the user).
>>
>> It's no issue, but I was surprised about that default.
>
> The fanfold paper used on older printers had 133 characters per line with the
> first being used for carriage control. I guess they dropped a couple of characters
> to allow for paper being not quite centered.

Never did the printer have 133 characters per line.
One of the ways a program could indicate carriage control was thru
putting a character in the first byte of the output stream.
On S/360 that first character was converted to some bits in the write
CCW. Only 132 characters were sent to the printer.

--
Dan Espen

Re: GNU diff output defaults

<op.1qjk3vbta3w0dxdave@hodgins.homeip.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5562&group=comp.unix.shell#5562

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 13:48:57 -0400
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <op.1qjk3vbta3w0dxdave@hodgins.homeip.net>
References: <tco2el$h4c8$1@dont-email.me>
<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net> <tcoria$l0uu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="1d2fdf2da69f50ddb7abae8a0758a695";
logging-data="698534"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XwwCB9hthfFHalaz/wggiudKRkPv30xs="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:rvdiUjXWF2nh7mNl/e3TwDoukT4=
 by: David W. Hodgins - Sun, 7 Aug 2022 17:48 UTC

On Sun, 07 Aug 2022 13:08:26 -0400, Dan Espen <dan1espen@gmail.com> wrote:
> Never did the printer have 133 characters per line.
> One of the ways a program could indicate carriage control was thru
> putting a character in the first byte of the output stream.
> On S/360 that first character was converted to some bits in the write
> CCW. Only 132 characters were sent to the printer.

133 characters were sent to the printer. The first byte was not printed. A blank
in that character was for single spacing, 0 for double spacing, 1 for page advance,
and + for write without advancing for highlighting or underlining, using the
standard page ribbon.

The ribbon had to match the paper being used. The ribbon had columns, with one
colums having a hole for every line on the page, and the others being used for
vertical tabs and page advances.

Regards, Dave Hodgins

Re: GNU diff output defaults

<tcpli4$nsvh$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5566&group=comp.unix.shell#5566

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dan1espen@gmail.com (Dan Espen)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 20:32:04 -0400
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <tcpli4$nsvh$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me>
<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net>
<tcoria$l0uu$1@dont-email.me>
<op.1qjk3vbta3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="ddb90d2ad0c9f2e5f9932d450c7fba99";
logging-data="783345"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EZtjm7/RPOy74DdzPmRvgAvcQJ5+EN24="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:3+ix3lQuAZiH4jIViKHu2PMFQi0=
 by: Dan Espen - Mon, 8 Aug 2022 00:32 UTC

"David W. Hodgins" <dwhodgins@nomail.afraid.org> writes:

> On Sun, 07 Aug 2022 13:08:26 -0400, Dan Espen <dan1espen@gmail.com> wrote:
>> Never did the printer have 133 characters per line.
>> One of the ways a program could indicate carriage control was thru
>> putting a character in the first byte of the output stream.
>> On S/360 that first character was converted to some bits in the write
>> CCW. Only 132 characters were sent to the printer.
>
> 133 characters were sent to the printer. The first byte was not printed. A blank
> in that character was for single spacing, 0 for double spacing, 1 for page advance,
> and + for write without advancing for highlighting or underlining, using the
> standard page ribbon.

Nope.

That's how COBOL printing using RECFM FBA would look.
That's not what got sent the printer.

IOCS took that first character and converted it to the opcode for a CCW.
Check your green card.

With COBOL you didn't have to use the first byte. Make the print file
FB and WRITE using AFTER ADVANCING.

> The ribbon had to match the paper being used. The ribbon had columns, with one
> colums having a hole for every line on the page, and the others being used for
> vertical tabs and page advances.

The ribbon is where the ink was.

That's a carriage control tape.

--
Dan Espen

Re: GNU diff output defaults

<op.1qj4ypeea3w0dxdave@hodgins.homeip.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5567&group=comp.unix.shell#5567

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 20:57:51 -0400
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <op.1qj4ypeea3w0dxdave@hodgins.homeip.net>
References: <tco2el$h4c8$1@dont-email.me>
<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net> <tcoria$l0uu$1@dont-email.me>
<op.1qjk3vbta3w0dxdave@hodgins.homeip.net> <tcpli4$nsvh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="73764e932117c7d275aabe6308f75f13";
logging-data="789038"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183WZDD1lzg+A4Y9zTaZiFFLNqfWTkwwfQ="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:7YbQiY0HPIQtW8VVaiQObSio/vo=
 by: David W. Hodgins - Mon, 8 Aug 2022 00:57 UTC

On Sun, 07 Aug 2022 20:32:04 -0400, Dan Espen <dan1espen@gmail.com> wrote:

> "David W. Hodgins" <dwhodgins@nomail.afraid.org> writes:
>
>> On Sun, 07 Aug 2022 13:08:26 -0400, Dan Espen <dan1espen@gmail.com> wrote:
>>> Never did the printer have 133 characters per line.
>>> One of the ways a program could indicate carriage control was thru
>>> putting a character in the first byte of the output stream.
>>> On S/360 that first character was converted to some bits in the write
>>> CCW. Only 132 characters were sent to the printer.
>>
>> 133 characters were sent to the printer. The first byte was not printed. A blank
>> in that character was for single spacing, 0 for double spacing, 1 for page advance,
>> and + for write without advancing for highlighting or underlining, using the
>> standard page ribbon.
>
> Nope.
>
> That's how COBOL printing using RECFM FBA would look.
> That's not what got sent the printer.

On the first computer/printer I used, it did. The computer was a DOS Honeywell
model 100/5. This was in 1975. I spent time helping out in the computer room for
bonus marks in my Fortran programming course, feeding the cards through the
punch or optical card readers, changing the paper on the printer, and with
forms, punching and changing the paper tape that controller the printer's
advancing.

> IOCS took that first character and converted it to the opcode for a CCW.
> Check your green card.
>
> With COBOL you didn't have to use the first byte. Make the print file
> FB and WRITE using AFTER ADVANCING.

Just because the programming language hid the first byte from the programmer,
doesn't mean it wasn't generated for sending to the printer.

Later, when I worked on an IBM 370, some times we'd print to a file instead of
the printer. In a file browser the first byte was visible.

>> The ribbon had to match the paper being used. The ribbon had columns, with one
>> colums having a hole for every line on the page, and the others being used for
>> vertical tabs and page advances.
>
> The ribbon is where the ink was.
>
> That's a carriage control tape.

Ah. I'd forgotten the term. Thanks for the correction.

Regards, Dave Hodgins

Re: GNU diff output defaults

<87pmhbr17u.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5568&group=comp.unix.shell#5568

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 18:08:37 -0700
Organization: None to speak of
Lines: 38
Message-ID: <87pmhbr17u.fsf@nosuchdomain.example.com>
References: <tco2el$h4c8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="559e44cd194322b5996970021b37a898";
logging-data="789513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rAxi1isCgJ/CTnDoY7OPO"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:+1BTwL7ToxH20wZVifC6w/4Q/D8=
sha1:eyxkIJfbvuR0NJMWP6xiELGi268=
 by: Keith Thompson - Mon, 8 Aug 2022 01:08 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
> When using a side-by-side diff output with GNU diff(1) it just
> occurred to me that the output didn't fit on the screen window
> and I saw that there's a somewhat strange or arbitrary default
> width of 130 columns defined
>
> -y, --side-by-side
> -W, --width=NUM
> output at most NUM (default 130) print columns
>
> Is there a reason for a number like that; I mean I'd have (if
> only for historical reasons) expected, say, a value of 80, or,
> since "any default value is wrong" considering diff to take the
> actual display width as default (if not specified by the user).
>
> It's no issue, but I was surprised about that default.

As discussed, VT100-based terminals and line printers commonly have a
132-column mode. 80 columns is likely to be too narrow for a
side-by-side diff. When the option was first added, it's likely that 80
and 132 columns were the only options on a lot of systems.

I think there's a strong hesitancy to make a text-processing command's
behavior depend on the current terminal characteristics. `ls` using
columns when writing to a tty is a notable exception.

It might be nice for diff to have an option to check the terminal width
itself, but as you say downthread you can roll your own:

diff -W$(tput cols) -y ...

Another useful option might be to use the actual maximum widths of the
input files (and again, you can roll your own).

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

[OT] Printer control characters (was Re: GNU diff output defaults)

<tcps72$r8mu$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5569&group=comp.unix.shell#5569

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: [OT] Printer control characters (was Re: GNU diff output defaults)
Date: Mon, 8 Aug 2022 04:25:38 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <tcps72$r8mu$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me>
<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net> <tcoria$l0uu$1@dont-email.me>
<op.1qjk3vbta3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 8 Aug 2022 02:25:39 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="27c2ceb6b6e6723b55b4b4475b9a77ef";
logging-data="893662"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9Ngxx4exDGblGAnJREJNw"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:B/hmQor8omPZsdDrdfuZzbYm/4w=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <op.1qjk3vbta3w0dxdave@hodgins.homeip.net>
 by: Janis Papanagnou - Mon, 8 Aug 2022 02:25 UTC

On 07.08.2022 19:48, David W. Hodgins wrote:
>
> 133 characters were sent to the printer. The first byte was not
> printed. A blank in that character was for single spacing, 0 for
> double spacing, 1 for page advance, and + for write without advancing
> for highlighting or underlining, using the standard page ribbon.

I faintly recall that we had two printer-channels/queues, if we've
sent to the "raw" one the application data in character column 1
had triggered printer control operations like the ones you wrote.
It gave fancy "output" e.g. in form of many many empty pages - a
very fast way to produce toilet paper. The speed was amazing.

Janis

Re: GNU diff output defaults

<tcptcc$rb9v$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5570&group=comp.unix.shell#5570

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Mon, 8 Aug 2022 04:45:31 +0200
Organization: A noiseless patient Spider
Lines: 65
Message-ID: <tcptcc$rb9v$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me>
<87pmhbr17u.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 8 Aug 2022 02:45:32 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="27c2ceb6b6e6723b55b4b4475b9a77ef";
logging-data="896319"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CgnxviE1ATUPojj4hsusv"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:suIGNgZylrIQmrga/PIzDQtbQPc=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <87pmhbr17u.fsf@nosuchdomain.example.com>
 by: Janis Papanagnou - Mon, 8 Aug 2022 02:45 UTC

On 08.08.2022 03:08, Keith Thompson wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
>> When using a side-by-side diff output with GNU diff(1) it just
>> occurred to me that the output didn't fit on the screen window
>> and I saw that there's a somewhat strange or arbitrary default
>> width of 130 columns defined
>>
>> -y, --side-by-side
>> -W, --width=NUM
>> output at most NUM (default 130) print columns
>>
>> Is there a reason for a number like that; I mean I'd have (if
>> only for historical reasons) expected, say, a value of 80, or,
>> since "any default value is wrong" considering diff to take the
>> actual display width as default (if not specified by the user).
>>
>> It's no issue, but I was surprised about that default.
>
> As discussed, VT100-based terminals and line printers commonly have a
> 132-column mode. 80 columns is likely to be too narrow for a
> side-by-side diff. When the option was first added, it's likely that 80
> and 132 columns were the only options on a lot of systems.

I'm aware of that, that's why I wrote elsethread "-W80, -W132, -W160",
with 160 to mean two screen contents side by side, which might also
be a [non-]"sensible" default.

I still think that any fixed default number is arbitrary and can only
be wrong (wrong = correct only by coincidence).
(On Unix systems we have such defaults in other places as well.)

>
> I think there's a strong hesitancy to make a text-processing command's
> behavior depend on the current terminal characteristics. `ls` using
> columns when writing to a tty is a notable exception.

There's yet more commands than that; pr(1) immediately comes to mind.

>
> It might be nice for diff to have an option to check the terminal width
> itself, but as you say downthread you can roll your own:
>
> diff -W$(tput cols) -y ...

The point is that making that a default will be "correct" for any
terminal size (as opposed to one hard coded value that can anyway
be simply specified as all the other arbitrary constant values).
(If one wants any fixed value it can be written in compact form.)

>
> Another useful option might be to use the actual maximum widths of the
> input files (and again, you can roll your own).

I think taking the maximum width of data/file contents might not
be a good choice. Think about the consequences!
Usually it's the physical display that you see that should be the
limiting factor. (Whether line-wraps or truncation is appropriate
in that case could be defined by an option. See also "pr -<N>",
vim: set nowrap, and other data displaying programs.)

But as it is with design issues that are already implemented;
changing that now would break code that relies on that. <sigh>

Janis

Re: [OT] Printer control characters (was Re: GNU diff output defaults)

<op.1qkbnqaxa3w0dxdave@hodgins.homeip.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5571&group=comp.unix.shell#5571

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.unix.shell
Subject: Re: [OT] Printer control characters (was Re: GNU diff output
defaults)
Date: Sun, 07 Aug 2022 23:22:28 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <op.1qkbnqaxa3w0dxdave@hodgins.homeip.net>
References: <tco2el$h4c8$1@dont-email.me>
<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net> <tcoria$l0uu$1@dont-email.me>
<op.1qjk3vbta3w0dxdave@hodgins.homeip.net> <tcps72$r8mu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="73764e932117c7d275aabe6308f75f13";
logging-data="904706"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186xRvI86nWH4DGiiR0kwVPAJ9osqTvyDU="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:EPe4U8l9N3b85OKbfmuC75gA6uU=
 by: David W. Hodgins - Mon, 8 Aug 2022 03:22 UTC

On Sun, 07 Aug 2022 22:25:38 -0400, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> I faintly recall that we had two printer-channels/queues, if we've
> sent to the "raw" one the application data in character column 1
> had triggered printer control operations like the ones you wrote.
> It gave fancy "output" e.g. in form of many many empty pages - a
> very fast way to produce toilet paper. The speed was amazing.

I remember similar pranks. Putting a 2 in the fba, which since the tape didn't
have a hole in column 2 would dump out the box of fan fold paper. Really
annoyed whoever was operator at the time it ran, especially if they'd just
put in a new box.

Regards, Dave Hodgins

Re: [OT] Printer control characters (was Re: GNU diff output defaults)

<tcq1vf$rk8d$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5572&group=comp.unix.shell#5572

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dan1espen@gmail.com (Dan Espen)
Newsgroups: comp.unix.shell
Subject: Re: [OT] Printer control characters (was Re: GNU diff output defaults)
Date: Mon, 08 Aug 2022 00:03:59 -0400
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <tcq1vf$rk8d$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me>
<op.1qjhn7hwa3w0dxdave@hodgins.homeip.net>
<tcoria$l0uu$1@dont-email.me>
<op.1qjk3vbta3w0dxdave@hodgins.homeip.net>
<tcps72$r8mu$1@dont-email.me>
<op.1qkbnqaxa3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="ddb90d2ad0c9f2e5f9932d450c7fba99";
logging-data="905485"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+rOE4WwGLqSwpIUURHdDCT/8loee7MJ+M="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:jdoPBTmTjVwaKqOqp1F2M6p0l9c=
 by: Dan Espen - Mon, 8 Aug 2022 04:03 UTC

"David W. Hodgins" <dwhodgins@nomail.afraid.org> writes:

> On Sun, 07 Aug 2022 22:25:38 -0400, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> I faintly recall that we had two printer-channels/queues, if we've
>> sent to the "raw" one the application data in character column 1
>> had triggered printer control operations like the ones you wrote.
>> It gave fancy "output" e.g. in form of many many empty pages - a
>> very fast way to produce toilet paper. The speed was amazing.
>
> I remember similar pranks. Putting a 2 in the fba, which since the tape didn't
> have a hole in column 2 would dump out the box of fan fold paper. Really
> annoyed whoever was operator at the time it ran, especially if they'd just
> put in a new box.

My first programming instructor demonstrated the printer trying to empty
a box of paper in seconds. Then he told us, "that is why all carriage
control tapes must have _all_ channels punched".

--
Dan Espen

Re: GNU diff output defaults

<87h72nqsos.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5573&group=comp.unix.shell#5573

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Sun, 07 Aug 2022 21:12:51 -0700
Organization: None to speak of
Lines: 19
Message-ID: <87h72nqsos.fsf@nosuchdomain.example.com>
References: <tco2el$h4c8$1@dont-email.me>
<87pmhbr17u.fsf@nosuchdomain.example.com>
<tcptcc$rb9v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="559e44cd194322b5996970021b37a898";
logging-data="906767"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+AvT41TVsEKECHHI8Viiyl"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:cMX/aeN1gZf7+NAFeldslhQAuJ0=
sha1:0HxYlLcjH4QaaTe9DdWWbdIBTew=
 by: Keith Thompson - Mon, 8 Aug 2022 04:12 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
> On 08.08.2022 03:08, Keith Thompson wrote:
[...]
>> I think there's a strong hesitancy to make a text-processing command's
>> behavior depend on the current terminal characteristics. `ls` using
>> columns when writing to a tty is a notable exception.
>
> There's yet more commands than that; pr(1) immediately comes to mind.

I'm not aware that pr's behavior depends on whether it's writing to a
tty. As I recall, its defaults are optimized for line printers with 66
lines per page.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: GNU diff output defaults

<tcqng8$tg5m$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5579&group=comp.unix.shell#5579

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Mon, 8 Aug 2022 12:11:20 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <tcqng8$tg5m$1@dont-email.me>
References: <tco2el$h4c8$1@dont-email.me>
<87pmhbr17u.fsf@nosuchdomain.example.com> <tcptcc$rb9v$1@dont-email.me>
<87h72nqsos.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 8 Aug 2022 10:11:20 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="27c2ceb6b6e6723b55b4b4475b9a77ef";
logging-data="966838"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pBKrWzXpDg1568XC2obTt"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:AydrI+yRj7uWrRhkv7xpw+Od/cM=
In-Reply-To: <87h72nqsos.fsf@nosuchdomain.example.com>
 by: Janis Papanagnou - Mon, 8 Aug 2022 10:11 UTC

On 08.08.2022 06:12, Keith Thompson wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
>> On 08.08.2022 03:08, Keith Thompson wrote:
> [...]
>>> I think there's a strong hesitancy to make a text-processing command's
>>> behavior depend on the current terminal characteristics. `ls` using
>>> columns when writing to a tty is a notable exception.
>>
>> There's yet more commands than that; pr(1) immediately comes to mind.
>
> I'm not aware that pr's behavior depends on whether it's writing to a
> tty. As I recall, its defaults are optimized for line printers with 66
> lines per page.

....and 72 columns widths (per default). - Yes you are right, I confused
that.

Janis

Re: GNU diff output defaults

<slrntf1uqp.14vv.naddy@lorvorc.mips.inka.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5581&group=comp.unix.shell#5581

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: naddy@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.shell
Subject: Re: GNU diff output defaults
Date: Mon, 8 Aug 2022 12:02:33 -0000 (UTC)
Message-ID: <slrntf1uqp.14vv.naddy@lorvorc.mips.inka.de>
References: <tco2el$h4c8$1@dont-email.me>
<87pmhbr17u.fsf@nosuchdomain.example.com>
Injection-Date: Mon, 8 Aug 2022 12:02:33 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="37888"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Mon, 8 Aug 2022 12:02 UTC

On 2022-08-08, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:

> As discussed, VT100-based terminals and line printers commonly have a
> 132-column mode. 80 columns is likely to be too narrow for a
> side-by-side diff. When the option was first added, it's likely that 80
> and 132 columns were the only options on a lot of systems.

On BSD, adding the w flag will also expand the output of ps(1) from
80 to 132 columns. (Well, 79 to 131 really, because once upon a
time, not every terminal had the newline glitch.)

I still carry these aliases:
alias c132='printf "\033[?3h"; stty columns 132; kill -WINCH $$' # set DECCOLM
alias c80='printf "\033[?3l"; stty columns 80; kill -WINCH $$' # reset DECCOLM

> I think there's a strong hesitancy to make a text-processing command's
> behavior depend on the current terminal characteristics. `ls` using
> columns when writing to a tty is a notable exception.

column(1) also does this. Which is presumably where ls(1) got it
from.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor