Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Make it right before you make it faster.


devel / comp.lang.c / iso646.h

SubjectAuthor
* iso646.hLawrence D'Oliveiro
+- Re: iso646.hLew Pitcher
+* Re: iso646.hJames Kuyper
|`- Re: iso646.hLawrence D'Oliveiro
`* Re: iso646.hDavid Brown
 +* Re: iso646.hScott Lurndal
 |`* Re: iso646.hLawrence D'Oliveiro
 | `* Re: iso646.hKeith Thompson
 |  `* Re: iso646.hLawrence D'Oliveiro
 |   `* Re: iso646.hKeith Thompson
 |    `* Re: iso646.hLawrence D'Oliveiro
 |     `- Re: iso646.hKaz Kylheku
 `* Re: iso646.hLawrence D'Oliveiro
  +- Re: iso646.hKaz Kylheku
  +* Re: iso646.hBlue-Maned_Hawk
  |`* Re: iso646.hLawrence D'Oliveiro
  | +- Re: iso646.hKaz Kylheku
  | `* Re: iso646.hJanis Papanagnou
  |  `* Re: iso646.hLawrence D'Oliveiro
  |   +- Re: iso646.hJanis Papanagnou
  |   `- Re: iso646.hKaz Kylheku
  +- Re: iso646.hTim Rentsch
  +* Re: iso646.hJanis Papanagnou
  |`* Re: iso646.hLawrence D'Oliveiro
  | `- Re: iso646.hJanis Papanagnou
  +* Re: iso646.hDavid Brown
  |`* Re: iso646.hKaz Kylheku
  | +- Re: iso646.hbart
  | +* Re: iso646.hJanis Papanagnou
  | |+* Re: iso646.hKeith Thompson
  | ||`* Re: iso646.hLawrence D'Oliveiro
  | || +* Re: iso646.hKeith Thompson
  | || |`* Re: iso646.hDavid Brown
  | || | `- Re: iso646.hJanis Papanagnou
  | || +* Re: iso646.hLew Pitcher
  | || |`* Re: iso646.hLawrence D'Oliveiro
  | || | +- Re: iso646.hLew Pitcher
  | || | +* Re: iso646.hKaz Kylheku
  | || | |`- Re: iso646.hChris M. Thomasson
  | || | `- Re: iso646.hScott Lurndal
  | || `- Re: iso646.hKaz Kylheku
  | |`* Re: iso646.hKaz Kylheku
  | | +- Re: iso646.hJanis Papanagnou
  | | `* Re: iso646.hJanis Papanagnou
  | |  `- Re: iso646.hKaz Kylheku
  | `- Re: iso646.hDavid Brown
  +- Re: iso646.hbart
  `* Re: iso646.hMalcolm McLean
   +* Re: iso646.hLew Pitcher
   |+- Re: iso646.hKaz Kylheku
   |+* Re: iso646.hLawrence D'Oliveiro
   ||+* Re: iso646.hKeith Thompson
   |||`* Re: iso646.hLawrence D'Oliveiro
   ||| +* Re: iso646.hKeith Thompson
   ||| |+- Re: iso646.hLawrence D'Oliveiro
   ||| |`- Re: iso646.hMalcolm McLean
   ||| `- Re: iso646.hJanis Papanagnou
   ||`- Re: iso646.hJanis Papanagnou
   |`* C/CPP macro conventions (was Re: iso646.h)Janis Papanagnou
   | `* Re: C/CPP macro conventions (was Re: iso646.h)Kaz Kylheku
   |  +- Re: C/CPP macro conventions (was Re: iso646.h)Janis Papanagnou
   |  +- Re: C/CPP macro conventions (was Re: iso646.h)David Brown
   |  `- Re: C/CPP macro conventions (was Re: iso646.h)Blue-Maned_Hawk
   +* Re: iso646.hbart
   |+* Re: iso646.hScott Lurndal
   ||`* Re: iso646.hJames Kuyper
   || +* Re: iso646.hKalevi Kolttonen
   || |+* Re: iso646.hLawrence D'Oliveiro
   || ||`* Re: iso646.hKaz Kylheku
   || || +* Re: iso646.hKalevi Kolttonen
   || || |`* Re: iso646.hJanis Papanagnou
   || || | `* Re: iso646.hJames Kuyper
   || || |  +* Re: iso646.hJanis Papanagnou
   || || |  |+- Re: iso646.hJanis Papanagnou
   || || |  |+* Re: iso646.hKalevi Kolttonen
   || || |  ||`* Re: iso646.hKalevi Kolttonen
   || || |  || `* Re: iso646.hLawrence D'Oliveiro
   || || |  ||  `- Re: iso646.hDavid Brown
   || || |  |`* Re: iso646.hKeith Thompson
   || || |  | `- Re: iso646.hKalevi Kolttonen
   || || |  +- Re: iso646.hLawrence D'Oliveiro
   || || |  `* Re: iso646.hKaz Kylheku
   || || |   `* Re: iso646.hJames Kuyper
   || || |    +* Re: iso646.hDavid Brown
   || || |    |+* Re: iso646.hJanis Papanagnou
   || || |    ||`* Re: iso646.hDavid Brown
   || || |    || `- Re: iso646.hJanis Papanagnou
   || || |    |`* Re: iso646.hbart
   || || |    | `- Re: iso646.hDavid Brown
   || || |    `- Re: iso646.hTim Rentsch
   || || `- Re: iso646.hJanis Papanagnou
   || |`- Unix shell conditionals (was Re: iso646.h)Janis Papanagnou
   || `* Re: iso646.hScott Lurndal
   ||  +* Re: iso646.hKaz Kylheku
   ||  |`* Re: iso646.hbart
   ||  | `- Re: iso646.hKaz Kylheku
   ||  +- Re: iso646.hKeith Thompson
   ||  `* Re: iso646.hJames Kuyper
   ||   `- Re: iso646.hJanis Papanagnou
   |+* Python (Re: iso646.h)Kalevi Kolttonen
   ||+* Re: Python (Re: iso646.h)bart
   ||+* Re: Python (Re: iso646.h)Keith Thompson
   ||+* Re: Python (Re: iso646.h)Lawrence D'Oliveiro
   ||`- Re: Python (Re: iso646.h)Dan Cross
   |+* Re: iso646.hKeith Thompson
   |`* Re: iso646.hMalcolm McLean
   `* Re: iso646.hLawrence D'Oliveiro

Pages:1234567891011121314151617181920212223242526
[OT] Unix shells and POSIX shell (was Re: iso646.h)

<upe60i$1latn$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32158&group=comp.lang.c#32158

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Wed, 31 Jan 2024 20:11:12 +0100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <upe60i$1latn$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<865xzaas3m.fsf@linuxsc.com> <20240131124332.00002c05@yahoo.com>
<gDtuN.273514$Wp_8.83091@fx17.iad> <20240131174249.00006e06@yahoo.com>
<updr44$1jcmu$1@dont-email.me> <20240131181820.00007acc@yahoo.com>
<updtj6$1jqdh$1@dont-email.me> <yjvuN.94320$STLe.5998@fx34.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 31 Jan 2024 19:11:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5a0200bb1792f9cd6df6086476ea85d9";
logging-data="1747895"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RYkGTkCgw2bt7sHYDixEl"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:INqOoqVIEFgy2M0rtY6kPo8FykI=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <yjvuN.94320$STLe.5998@fx34.iad>
 by: Janis Papanagnou - Wed, 31 Jan 2024 19:11 UTC

On 31.01.2024 18:20, Scott Lurndal wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>> On 31.01.2024 17:18, Michael S wrote:
>>> On Wed, 31 Jan 2024 17:05:23 +0100
>>> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>
>> (See for example 'man ksh' Section "Input/Output". But careful; ksh
>> has additional non-standard additions. So a peek into the POSIX docs
>> might serve you better.)
>
> FWIW, the POSIX shell language was based on a subset of ksh88.

Yes. POSIX was based pretty much on ksh88. The differences are not
very large. If you're interested to know about the few differences
have a look into the book of Bolsky and Korn (it's in the appendix).

For more than three decades, though, there's ksh93 around. This is
what we typically mean when we speak about ksh. (But careful, since
the first version of ksh93 there had been a lot changes until now.)

Quite some time passed, though, until the commercial Unixes changed
their default ksh to ksh93. (I haven't any more access to commercial
Unixes, so I cannot tell about the current state.) See what you get.

On Linux you got only a ksh clone, first basically based on ksh88
(but I anyway never used it but downloaded the original AT&T ksh93).
Meanwhile, I think, you should get a ksh93 on Linux per default.
But I suggest to use the ksh93u+m (the version maintained by Martijn
Dekker), instead; it has a lot errors fixed.

A lot has changed between ksh88 and ksh93 already, and the current
ksh93 version developed even further. (Its man page shows details.)

Janis

Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)

<5bxuN.131493$q3F7.74522@fx45.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32159&group=comp.lang.c#32159

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Newsgroups: comp.lang.c
References: <uokhnk$eiln$1@dont-email.me> <up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me> <865xzaas3m.fsf@linuxsc.com> <20240131124332.00002c05@yahoo.com> <gDtuN.273514$Wp_8.83091@fx17.iad> <20240131174249.00006e06@yahoo.com> <updr44$1jcmu$1@dont-email.me> <20240131181820.00007acc@yahoo.com> <updtj6$1jqdh$1@dont-email.me> <yjvuN.94320$STLe.5998@fx34.iad> <upe60i$1latn$1@dont-email.me>
Lines: 18
Message-ID: <5bxuN.131493$q3F7.74522@fx45.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 31 Jan 2024 19:28:01 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 31 Jan 2024 19:28:01 GMT
X-Received-Bytes: 1822
 by: Scott Lurndal - Wed, 31 Jan 2024 19:28 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>On 31.01.2024 18:20, Scott Lurndal wrote:

<snip commentary about POSIX adopting most of ksh88>

>On Linux you got only a ksh clone, first basically based on ksh88
>(but I anyway never used it but downloaded the original AT&T ksh93).
>Meanwhile, I think, you should get a ksh93 on Linux per default.
>But I suggest to use the ksh93u+m (the version maintained by Martijn
>Dekker), instead; it has a lot errors fixed.

The AT&T ksh93 has been distributed for a long time. My 2012
install of Fedora Core 20, OSX, and my recent Ubuntu install use:

$ Version AJM 93u+ 2012-08-01

It's been decades since pdksh/mksh were defaults.

Re: iso646.h

<upe7sm$1lg8f$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32160&group=comp.lang.c#32160

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: richard....@gmail.invalid (Richard Harnden)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 19:43:18 +0000
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <upe7sm$1lg8f$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me>
<up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me>
<up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<upas3j$10bft$1@dont-email.me> <upb5q3$11vej$1@dont-email.me>
<K79uN.374649$p%Mb.218835@fx15.iad> <upb8c8$12do6$1@dont-email.me>
<upbj9c$14443$2@dont-email.me> <updj1q$1hif4$1@dont-email.me>
Reply-To: nospam.harnden@invalid.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 31 Jan 2024 19:43:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7e0f08b4ebcc03e0162d08a9ad22991e";
logging-data="1753359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Lfbf2TyFUdk2w9g+7ArlFcqgsrY6y9Fo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:DwsZ0TlNLrKMBpuiVTYsn2StRYc=
Content-Language: en-GB
In-Reply-To: <updj1q$1hif4$1@dont-email.me>
 by: Richard Harnden - Wed, 31 Jan 2024 19:43 UTC

On 31/01/2024 13:47, Janis Papanagnou wrote:
> On 30.01.2024 20:39, Richard Harnden wrote:
>>
>> Nobody uses printf to output binary data. fwrite(3) would be common, as
>> would write(2).
>
> Right. I'm using the OS'es write(2), but also printf with ANSI escapes,
> e.g. sprintf (buf, "\033[%d;%dH", ...

I meant 'binary' as in has \0s

It seems to work fine with ESC's and utf8 (and i abuse it thus often)
.... but, from what James said, that is not actually guarenteed.

>
>>
>> Maybe you could use printf("%c%c%c" ... but it'd be beyond tedious.
>
> Since I recall to have used it in some thread I want to clarify that
> it was just meant as an example countering an incorrect argument of
> "not being able to output binary data on stdout", or some such.
>
> Janis
>

Re: iso646.h

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32161&group=comp.lang.c#32161

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 12:14:57 -0800
Organization: None to speak of
Lines: 30
Message-ID: <87le85s1j2.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me>
<up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me> <upas3j$10bft$1@dont-email.me>
<upb5q3$11vej$1@dont-email.me> <K79uN.374649$p%Mb.218835@fx15.iad>
<upb8c8$12do6$1@dont-email.me> <upbj9c$14443$2@dont-email.me>
<updj1q$1hif4$1@dont-email.me> <upe7sm$1lg8f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="e9ab33cd51e38659416bab92bcd2f21f";
logging-data="1765885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IzKGFtUvJfE/dxxxj7rnE"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:ARpeV3hq98LKttwvhswkHCYYkyA=
sha1:yS3jGiwWZKxEtFeE86i20eeJdzI=
 by: Keith Thompson - Wed, 31 Jan 2024 20:14 UTC

Richard Harnden <richard.nospam@gmail.invalid> writes:
> On 31/01/2024 13:47, Janis Papanagnou wrote:
>> On 30.01.2024 20:39, Richard Harnden wrote:
>>>
>>> Nobody uses printf to output binary data. fwrite(3) would be common, as
>>> would write(2).
>> Right. I'm using the OS'es write(2), but also printf with ANSI
>> escapes,
>> e.g. sprintf (buf, "\033[%d;%dH", ...
>
> I meant 'binary' as in has \0s

I don't think that's what "binary" means.

Loosely, "text" consists only of printable characters and a selected few
control characters like tabs and newlines, while "binary" can
potentially have any of 256 byte values (strictly speaking,
2**CHAR_BIT).

Terminal control sequences (almost always based on VT100 these days) are
typically not printable, but tend to avoid null characters, which means
you can very probably use printf to print them (assuming you're on a
POSIX-like system).

[...]

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

Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)

<upe9qc$3n9$1@reader1.panix.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32162&group=comp.lang.c#32162

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!fdn.fr!2.eu.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!weretis.net!feeder6.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cro...@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Wed, 31 Jan 2024 20:16:12 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <upe9qc$3n9$1@reader1.panix.com>
References: <uokhnk$eiln$1@dont-email.me> <updtj6$1jqdh$1@dont-email.me> <yjvuN.94320$STLe.5998@fx34.iad> <upe60i$1latn$1@dont-email.me>
Injection-Date: Wed, 31 Jan 2024 20:16:12 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
logging-data="3817"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
 by: Dan Cross - Wed, 31 Jan 2024 20:16 UTC

In article <upe60i$1latn$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>[snip]
>On Linux you got only a ksh clone, first basically based on ksh88
>(but I anyway never used it but downloaded the original AT&T ksh93).
>Meanwhile, I think, you should get a ksh93 on Linux per default.
>[snip]

I'm not sure I understand this. Linux is just the kernel; to
get a useful operating system, you need a number of other
components such as utilities, system libraries, a load, and
other tools. A number of such distributions are based on GNU
tools; at least one is based on BSD tools. So writing, "On
Linux you got only a ksh clone..." doesn't make much sense to me
and seems like a category error.

Certainly, one can install `ksh93` in a Linux distribution.

- Dan C.

Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)

<20240131222235.00005a49@yahoo.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32163&group=comp.lang.c#32163

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5...@yahoo.com (Michael S)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Wed, 31 Jan 2024 22:22:35 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <20240131222235.00005a49@yahoo.com>
References: <uokhnk$eiln$1@dont-email.me>
<updtj6$1jqdh$1@dont-email.me>
<yjvuN.94320$STLe.5998@fx34.iad>
<upe60i$1latn$1@dont-email.me>
<upe9qc$3n9$1@reader1.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="458330ddd435bd841a14cd8bf85c2e26";
logging-data="1769985"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UYft3zgDbnuIjA73pxsKioYq3g/oxseI="
Cancel-Lock: sha1:cbSeUkDYCwmpcWfrx29snN7z4pM=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
 by: Michael S - Wed, 31 Jan 2024 20:22 UTC

On Wed, 31 Jan 2024 20:16:12 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:

> In article <upe60i$1latn$1@dont-email.me>,
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> >[snip]
> >On Linux you got only a ksh clone, first basically based on ksh88
> >(but I anyway never used it but downloaded the original AT&T ksh93).
> >Meanwhile, I think, you should get a ksh93 on Linux per default.
> >[snip]
>
> I'm not sure I understand this. Linux is just the kernel; to
> get a useful operating system, you need a number of other
> components such as utilities, system libraries, a load, and
> other tools. A number of such distributions are based on GNU
> tools; at least one is based on BSD tools. So writing, "On
> Linux you got only a ksh clone..." doesn't make much sense to me
> and seems like a category error.
>
> Certainly, one can install `ksh93` in a Linux distribution.
>
> - Dan C.
>

Come on, in informal everyday's language the word Linux is very often
used as a shortcut for Gnu/Linux.

Re: iso646.h

<20240131122033.700@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32165&group=comp.lang.c#32165

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 20:25:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20240131122033.700@kylheku.com>
References: <uokhnk$eiln$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me>
<up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me>
<up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<upas3j$10bft$1@dont-email.me> <upb5q3$11vej$1@dont-email.me>
<K79uN.374649$p%Mb.218835@fx15.iad> <upb8c8$12do6$1@dont-email.me>
<upbj9c$14443$2@dont-email.me> <updj1q$1hif4$1@dont-email.me>
<upe7sm$1lg8f$1@dont-email.me> <87le85s1j2.fsf@nosuchdomain.example.com>
Injection-Date: Wed, 31 Jan 2024 20:25:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ac11a0f15b99b508eef528081b2e1338";
logging-data="1770445"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fsqAn7c8QnXsyq19YvxU+S2xRtZZSOO0="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:D1OfDyI+UuLQnkzVKFM3f5Y9e+I=
 by: Kaz Kylheku - Wed, 31 Jan 2024 20:25 UTC

On 2024-01-31, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> Terminal control sequences (almost always based on VT100 these days) are
> typically not printable, but tend to avoid null characters, which means
> you can very probably use printf to print them (assuming you're on a
> POSIX-like system).

They use text. For instance, a cursor position is both accepted and
reported in a decimal format like 13;17. All the commands and
delimiting characters are textual, except for part of the CSI (control
sequence introducer). The 7 bit CSI uses two characters, ESC and [.
Except for that one ESC, everything is printable.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)

<PoyuN.82520$TSTa.49523@fx47.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32168&group=comp.lang.c#32168

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx47.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Newsgroups: comp.lang.c
References: <uokhnk$eiln$1@dont-email.me> <updtj6$1jqdh$1@dont-email.me> <yjvuN.94320$STLe.5998@fx34.iad> <upe60i$1latn$1@dont-email.me> <upe9qc$3n9$1@reader1.panix.com> <20240131222235.00005a49@yahoo.com>
Lines: 31
Message-ID: <PoyuN.82520$TSTa.49523@fx47.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 31 Jan 2024 20:50:55 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 31 Jan 2024 20:50:55 GMT
X-Received-Bytes: 2016
 by: Scott Lurndal - Wed, 31 Jan 2024 20:50 UTC

Michael S <already5chosen@yahoo.com> writes:
>On Wed, 31 Jan 2024 20:16:12 -0000 (UTC)
>cross@spitfire.i.gajendra.net (Dan Cross) wrote:
>
>> In article <upe60i$1latn$1@dont-email.me>,
>> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>> >[snip]
>> >On Linux you got only a ksh clone, first basically based on ksh88
>> >(but I anyway never used it but downloaded the original AT&T ksh93).
>> >Meanwhile, I think, you should get a ksh93 on Linux per default.
>> >[snip]
>>
>> I'm not sure I understand this. Linux is just the kernel; to
>> get a useful operating system, you need a number of other
>> components such as utilities, system libraries, a load, and
>> other tools. A number of such distributions are based on GNU
>> tools; at least one is based on BSD tools. So writing, "On
>> Linux you got only a ksh clone..." doesn't make much sense to me
>> and seems like a category error.
>>
>> Certainly, one can install `ksh93` in a Linux distribution.
>>
>> - Dan C.
>>
>
>Come on, in informal everyday's language the word Linux is very often
>used as a shortcut for Gnu/Linux.
>

Other than providing a compiler and C library, GNU has nothing to
do with linux. There are other compilers, and other C libraries.

Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)

<20240131230048.0000513c@yahoo.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32169&group=comp.lang.c#32169

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5...@yahoo.com (Michael S)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Wed, 31 Jan 2024 23:00:48 +0200
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <20240131230048.0000513c@yahoo.com>
References: <uokhnk$eiln$1@dont-email.me>
<updtj6$1jqdh$1@dont-email.me>
<yjvuN.94320$STLe.5998@fx34.iad>
<upe60i$1latn$1@dont-email.me>
<upe9qc$3n9$1@reader1.panix.com>
<20240131222235.00005a49@yahoo.com>
<PoyuN.82520$TSTa.49523@fx47.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="458330ddd435bd841a14cd8bf85c2e26";
logging-data="1769985"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/p2qBFZAPf7xuby8uPfyMwKLPuN/VMVQc="
Cancel-Lock: sha1:5lkM24zXvrsoSI6RPLTehiYVGtI=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
 by: Michael S - Wed, 31 Jan 2024 21:00 UTC

On Wed, 31 Jan 2024 20:50:55 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:

> Michael S <already5chosen@yahoo.com> writes:
> >On Wed, 31 Jan 2024 20:16:12 -0000 (UTC)
> >cross@spitfire.i.gajendra.net (Dan Cross) wrote:
> >
> >> In article <upe60i$1latn$1@dont-email.me>,
> >> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> >> >[snip]
> >> >On Linux you got only a ksh clone, first basically based on ksh88
> >> >(but I anyway never used it but downloaded the original AT&T
> >> >ksh93). Meanwhile, I think, you should get a ksh93 on Linux per
> >> >default. [snip]
> >>
> >> I'm not sure I understand this. Linux is just the kernel; to
> >> get a useful operating system, you need a number of other
> >> components such as utilities, system libraries, a load, and
> >> other tools. A number of such distributions are based on GNU
> >> tools; at least one is based on BSD tools. So writing, "On
> >> Linux you got only a ksh clone..." doesn't make much sense to me
> >> and seems like a category error.
> >>
> >> Certainly, one can install `ksh93` in a Linux distribution.
> >>
> >> - Dan C.
> >>
> >
> >Come on, in informal everyday's language the word Linux is very often
> >used as a shortcut for Gnu/Linux.
> >
>
> Other than providing a compiler and C library, GNU has nothing to
> do with linux. There are other compilers, and other C libraries.

https://en.wikipedia.org/wiki/GNU/Linux_naming_controversy

Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)

<upedjn$5qt$1@reader1.panix.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32171&group=comp.lang.c#32171

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cro...@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Wed, 31 Jan 2024 21:20:55 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <upedjn$5qt$1@reader1.panix.com>
References: <uokhnk$eiln$1@dont-email.me> <20240131222235.00005a49@yahoo.com> <PoyuN.82520$TSTa.49523@fx47.iad> <20240131230048.0000513c@yahoo.com>
Injection-Date: Wed, 31 Jan 2024 21:20:55 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
logging-data="5981"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
 by: Dan Cross - Wed, 31 Jan 2024 21:20 UTC

In article <20240131230048.0000513c@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
>On Wed, 31 Jan 2024 20:50:55 GMT
>scott@slp53.sl.home (Scott Lurndal) wrote:
>
>> Michael S <already5chosen@yahoo.com> writes:
>> >On Wed, 31 Jan 2024 20:16:12 -0000 (UTC)
>> >cross@spitfire.i.gajendra.net (Dan Cross) wrote:
>> >
>> >> In article <upe60i$1latn$1@dont-email.me>,
>> >> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>> >> >[snip]
>> >> >On Linux you got only a ksh clone, first basically based on ksh88
>> >> >(but I anyway never used it but downloaded the original AT&T
>> >> >ksh93). Meanwhile, I think, you should get a ksh93 on Linux per
>> >> >default. [snip]
>> >>
>> >> I'm not sure I understand this. Linux is just the kernel; to
>> >> get a useful operating system, you need a number of other
>> >> components such as utilities, system libraries, a load, and
>> >> other tools. A number of such distributions are based on GNU
>> >> tools; at least one is based on BSD tools. So writing, "On
>> >> Linux you got only a ksh clone..." doesn't make much sense to me
>> >> and seems like a category error.
>> >>
>> >> Certainly, one can install `ksh93` in a Linux distribution.
>> >
>> >Come on, in informal everyday's language the word Linux is very often
>> >used as a shortcut for Gnu/Linux.
>>
>> Other than providing a compiler and C library, GNU has nothing to
>> do with linux. There are other compilers, and other C libraries.
>
>https://en.wikipedia.org/wiki/GNU/Linux_naming_controversy

I really don't care what Stallman thinks about the naming. DMR
is said to have once quipped in the Unix room, when Stallman was
complaining about the Plan 9 license, "Stallman won't be happy
until we call it Plan-Guh-Nine."

That said, when one's talking about whether ksh93 is shipped
with "Linux" or not, it's surely important to talk about what
distribution one is referring to!

- Dan C.

Re: iso646.h

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32172&group=comp.lang.c#32172

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 13:26:33 -0800
Organization: None to speak of
Lines: 22
Message-ID: <87h6itry7q.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me> <upas3j$10bft$1@dont-email.me>
<upb5q3$11vej$1@dont-email.me> <K79uN.374649$p%Mb.218835@fx15.iad>
<upb8c8$12do6$1@dont-email.me> <upbj9c$14443$2@dont-email.me>
<updj1q$1hif4$1@dont-email.me> <upe7sm$1lg8f$1@dont-email.me>
<87le85s1j2.fsf@nosuchdomain.example.com>
<20240131122033.700@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="e9ab33cd51e38659416bab92bcd2f21f";
logging-data="1790578"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pVFW8fgIYEkbjwxWIlzAF"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:fekceftHMdYe6Kg9hz6TjqGuPr8=
sha1:O+bVbQlqMsMSMCW2xuTcATim66w=
 by: Keith Thompson - Wed, 31 Jan 2024 21:26 UTC

Kaz Kylheku <433-929-6894@kylheku.com> writes:
> On 2024-01-31, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>> Terminal control sequences (almost always based on VT100 these days) are
>> typically not printable, but tend to avoid null characters, which means
>> you can very probably use printf to print them (assuming you're on a
>> POSIX-like system).
>
> They use text. For instance, a cursor position is both accepted and
> reported in a decimal format like 13;17. All the commands and
> delimiting characters are textual, except for part of the CSI (control
> sequence introducer). The 7 bit CSI uses two characters, ESC and [.
> Except for that one ESC, everything is printable.

I'd describe "printable except for ESC" as binary. And some sequences
use other non-printable characters like ASCII BEL (Ctl-G) (perhaps not
VT100 standard, but for example commands to change fonts and colors for
xterm).

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

Re: iso646.h

<upekt5$1nomb$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32176&group=comp.lang.c#32176

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm....@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 23:25:25 +0000
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <upekt5$1nomb$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me>
<up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me>
<up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<upas3j$10bft$1@dont-email.me> <upb5q3$11vej$1@dont-email.me>
<K79uN.374649$p%Mb.218835@fx15.iad> <upb8c8$12do6$1@dont-email.me>
<upbj9c$14443$2@dont-email.me> <updj1q$1hif4$1@dont-email.me>
<upe7sm$1lg8f$1@dont-email.me> <87le85s1j2.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 31 Jan 2024 23:25:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c521d791a94ac00a8e77759a40faab4e";
logging-data="1827531"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kO34kDa+k8u/yXRZC4dYrkNX9yNybJSU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ri0sfaS5Qy/t6aRlNLm8JhCeGb8=
In-Reply-To: <87le85s1j2.fsf@nosuchdomain.example.com>
Content-Language: en-GB
 by: Malcolm McLean - Wed, 31 Jan 2024 23:25 UTC

On 31/01/2024 20:14, Keith Thompson wrote:
> Richard Harnden <richard.nospam@gmail.invalid> writes:
>> On 31/01/2024 13:47, Janis Papanagnou wrote:
>>> On 30.01.2024 20:39, Richard Harnden wrote:
>>>>
>>>> Nobody uses printf to output binary data. fwrite(3) would be common, as
>>>> would write(2).
>>> Right. I'm using the OS'es write(2), but also printf with ANSI
>>> escapes,
>>> e.g. sprintf (buf, "\033[%d;%dH", ...
>>
>> I meant 'binary' as in has \0s
>
> I don't think that's what "binary" means.
>
> Loosely, "text" consists only of printable characters and a selected few
> control characters like tabs and newlines, while "binary" can
> potentially have any of 256 byte values (strictly speaking,
> 2**CHAR_BIT).
>
> Terminal control sequences (almost always based on VT100 these days) are
> typically not printable, but tend to avoid null characters, which means
> you can very probably use printf to print them (assuming you're on a
> POSIX-like system).
>
> [...]
>
In ASCII, 0 means NUL, or "ignore". So an ASCII sequence may contain any
number of embedded zero bytes, which the receiver ignores. That's
because for technical reasons some communications channels have to send
data every cycle, and if there is no data, they will send a signal
indistinguishable from all bits zero.

--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: iso646.h

<874jetrsa1.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32177&group=comp.lang.c#32177

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 15:34:46 -0800
Organization: None to speak of
Lines: 26
Message-ID: <874jetrsa1.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me> <upas3j$10bft$1@dont-email.me>
<upb5q3$11vej$1@dont-email.me> <K79uN.374649$p%Mb.218835@fx15.iad>
<upb8c8$12do6$1@dont-email.me> <upbj9c$14443$2@dont-email.me>
<updj1q$1hif4$1@dont-email.me> <upe7sm$1lg8f$1@dont-email.me>
<87le85s1j2.fsf@nosuchdomain.example.com>
<upekt5$1nomb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="637459c0b3f26f70a97e9a2f25534b92";
logging-data="1829589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/q1pFV/uJlcvVD9jHUI25o"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:y4u43IPG7lkHyRH9Y+pJ5vcEy2I=
sha1:PZvmKgXcxMtiqXw62BVzjrbWKeo=
 by: Keith Thompson - Wed, 31 Jan 2024 23:34 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> On 31/01/2024 20:14, Keith Thompson wrote:
[...]
>> Terminal control sequences (almost always based on VT100 these days)
>> are typically not printable, but tend to avoid null characters, which
>> means you can very probably use printf to print them (assuming you're
>> on a POSIX-like system).
>> [...]
>>
> In ASCII, 0 means NUL, or "ignore". So an ASCII sequence may contain
> any number of embedded zero bytes, which the receiver ignores. That's
> because for technical reasons some communications channels have to
> send data every cycle, and if there is no data, they will send a
> signal indistinguishable from all bits zero.

Not particularly relevant. A quick experiment with xterm indicates that
embedding null bytes in a control sequence prevents it from being
recognized. There may be some standards that require embedded zero
bytes to be ignored, but xterm doesn't any such standard. Similarly, if
you embed null bytes in text written to a file, the result is corrupted
text file.

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

Re: iso646.h

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32178&group=comp.lang.c#32178

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 23:36:43 +0000
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <87v879qdmc.fsf@bsb.me.uk>
References: <uokhnk$eiln$1@dont-email.me>
<87frym7l3p.fsf@nosuchdomain.example.com>
<uot08a$278i2$1@dont-email.me> <uotmed$2ack6$2@dont-email.me>
<up17f9$313qt$4@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1t0r$37v5a$4@dont-email.me> <up2mor$3bjgb$1@dont-email.me>
<up2ogd$3bs86$1@dont-email.me> <up3r9c$3hbk7$10@dont-email.me>
<up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="2374c69b06d439842f949a708c48d57b";
logging-data="1832665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BUfi/IWi/PWzao+yBg8avThdl7W6D/fo="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:oF2BlPZsjG6Mwg+Z27pRXxej+cw=
sha1:kuvU5nQhU0NmX8L25x2uBLvc1iU=
X-BSB-Auth: 1.53540afa2fa0044cb1ab.20240131233643GMT.87v879qdmc.fsf@bsb.me.uk
 by: Ben Bacarisse - Wed, 31 Jan 2024 23:36 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> On 30/01/2024 07:27, Tim Rentsch wrote:
>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>
>>> On 29/01/2024 20:10, Tim Rentsch wrote:
>>>
>>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>>>
>>>> [...]
>>>>
>>>>> I've never used standard output for binary data.
>>>>> [...] it strikes me as a poor design decision.
>>>>
>>>> How so?
>>>
>>> Because the output can't be inspected by humans, and because it might
>>> have unusual effects if passed though systems designed to handle
>>> human-readable text.

Maybe you are not used to a system where it's trivial to inspect such
data. When "some_prog" produces data that are not compatible with the
current terminal settings, "some_prog | hd" shows a hex dump instead.
The need to do this does not make "some_prog" poorly designed. It may
simply mean that the output is /intended/ for further processing.

> For instance in some systems designed to receive
>>> ASCII text, there is no distinction between the nul byte and "waiting
>>> for next data byte". Obviously this will cause difficuties if the data
>>> is binary.
>>> Also many binary formats can't easily be extended, so you can pass one
>>> image and that's all. While it is possible to devise a text format
>>> which is similar, in practice text formats usually have enough
>>> redundancy to be easily extended.
>>>
>>> So it's harder to correct errors, more prone to errors, and harder to
>>> extend.
>> Your reasoning is all gobbledygook. Your comments reflect only
>> limitations in your thinking, not any essential truth about using
>> standard out for binary data.
>>
> I must admit that it's nothing I have ever done or considered doing.
>
> However standard output is designed for text and not binary ouput.

What is your evidence? stdout was just designed for output (as far as I
can tell) and, anyway, what is the distinction you are making between
binary and text? iconv --from ACSII --to EBCDIC-UK will produce
something that is "logically" text on stdout, but it might look like
binary to you.

An example where it's really useful not to care: I have a suite of tools
for doing toy cryptanalysis. Some apply various transformations and/or
filters to byte streams and others collect and output (on stderr)
various statistics. Plugging them together in various pipelines is very
handy when investigating an encrypted text. The output is almost always
"binary" in the sense that there would be not point in looking at on a
terminal.

According to you, these tools are poorly designed. I don't think so.
How would you design them? Endless input and output file names to be
juggled and tidied up afterwards?

> That you couldn't actually mount a defence of your position whilst I could
> also strongly implies that I am right.

There is also the possibility that readers are just exhausted by the
fire-hose of bizarre, unsubstantiated options coming from you. I've
been tied up with personal matters recently, but I've seen many posts
from you where I have been tempted to make a one-word reply like "no",
"nonsense" or "daft", but I see that you would have taken these to be
string confirmation that you are right!

--
Ben.

Re: iso646.h

<upem91$1o053$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32179&group=comp.lang.c#32179

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm....@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 23:48:49 +0000
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <upem91$1o053$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <uotmed$2ack6$2@dont-email.me>
<up17f9$313qt$4@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1t0r$37v5a$4@dont-email.me> <up2mor$3bjgb$1@dont-email.me>
<up2ogd$3bs86$1@dont-email.me> <up3r9c$3hbk7$10@dont-email.me>
<up47gj$3jfg4$1@dont-email.me> <87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me> <865xzaas3m.fsf@linuxsc.com>
<upd0pj$1elmk$1@dont-email.me> <877cjptqcc.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 31 Jan 2024 23:48:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c521d791a94ac00a8e77759a40faab4e";
logging-data="1835171"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/H+2+3w88ekQVhsbiDvPrlGouUsK5/Bco="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:MMMPE/BorRXFkCOgmGVpldL7YU0=
In-Reply-To: <877cjptqcc.fsf@nosuchdomain.example.com>
Content-Language: en-GB
 by: Malcolm McLean - Wed, 31 Jan 2024 23:48 UTC

On 31/01/2024 16:33, Keith Thompson wrote:
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>> On 31/01/2024 07:18, Tim Rentsch wrote:
> [...]
>>> It is FAR more cumbersome to accomplish what this command
>>> is doing without sending binary data through standard out.
>>> Anyone who doesn't understand this doesn't understand Unix.
>>>
>> Yes. I don't do that sort of thing.
>
> You don't. Others do. What was your point again?
>
There's kind of an implication that it's something I ought to be doing.

--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: iso646.h

<upeo6c$1oa6o$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32180&group=comp.lang.c#32180

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Thu, 1 Feb 2024 00:21:32 +0000
Organization: A noiseless patient Spider
Lines: 147
Message-ID: <upeo6c$1oa6o$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me>
<87frym7l3p.fsf@nosuchdomain.example.com> <uot08a$278i2$1@dont-email.me>
<uotmed$2ack6$2@dont-email.me> <up17f9$313qt$4@dont-email.me>
<up197h$31jct$1@dont-email.me> <up1t0r$37v5a$4@dont-email.me>
<up2mor$3bjgb$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me>
<up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me>
<up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<87v879qdmc.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 00:21:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="19d35866713dfba03207e755d1c79dd1";
logging-data="1845464"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0YmWbxnSUZ/JDA3gSCURKfXcbXVJ/2IQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:da50wK97/QSeJIi98RDBlrfkzxY=
Content-Language: en-GB
In-Reply-To: <87v879qdmc.fsf@bsb.me.uk>
 by: bart - Thu, 1 Feb 2024 00:21 UTC

On 31/01/2024 23:36, Ben Bacarisse wrote:
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>
>> On 30/01/2024 07:27, Tim Rentsch wrote:
>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>>
>>>> On 29/01/2024 20:10, Tim Rentsch wrote:
>>>>
>>>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>>>>
>>>>> [...]
>>>>>
>>>>>> I've never used standard output for binary data.
>>>>>> [...] it strikes me as a poor design decision.
>>>>>
>>>>> How so?
>>>>
>>>> Because the output can't be inspected by humans, and because it might
>>>> have unusual effects if passed though systems designed to handle
>>>> human-readable text.
>
> Maybe you are not used to a system where it's trivial to inspect such
> data. When "some_prog" produces data that are not compatible with the
> current terminal settings, "some_prog | hd" shows a hex dump instead.
> The need to do this does not make "some_prog" poorly designed. It may
> simply mean that the output is /intended/ for further processing.
>
>> For instance in some systems designed to receive
>>>> ASCII text, there is no distinction between the nul byte and "waiting
>>>> for next data byte". Obviously this will cause difficuties if the data
>>>> is binary.
>>>> Also many binary formats can't easily be extended, so you can pass one
>>>> image and that's all. While it is possible to devise a text format
>>>> which is similar, in practice text formats usually have enough
>>>> redundancy to be easily extended.
>>>>
>>>> So it's harder to correct errors, more prone to errors, and harder to
>>>> extend.
>>> Your reasoning is all gobbledygook. Your comments reflect only
>>> limitations in your thinking, not any essential truth about using
>>> standard out for binary data.
>>>
>> I must admit that it's nothing I have ever done or considered doing.
>>
>> However standard output is designed for text and not binary ouput.
>
> What is your evidence? stdout was just designed for output (as far as I
> can tell) and, anyway, what is the distinction you are making between
> binary and text? iconv --from ACSII --to EBCDIC-UK will produce
> something that is "logically" text on stdout, but it might look like
> binary to you.
>
> An example where it's really useful not to care: I have a suite of tools
> for doing toy cryptanalysis. Some apply various transformations and/or
> filters to byte streams and others collect and output (on stderr)
> various statistics. Plugging them together in various pipelines is very
> handy when investigating an encrypted text. The output is almost always
> "binary" in the sense that there would be not point in looking at on a
> terminal.
>
> According to you, these tools are poorly designed. I don't think so.
> How would you design them? Endless input and output file names to be
> juggled and tidied up afterwards?

I think they're poorly designed too.

From the POV of interactive console programs, they /are/ poor. But the
mistake is thinking that they are actual programs or commands, when
really they are just filters. They are not designed to be standalone
commands.

Even 'cat', if I type it by itself, just sits there. (I wonder what use
it has in a sequence like ... | cat | ...; what does it add to the data?)

AFAICS, this stuff mainly works inside scripts. Or do people here spend
all day manually piping stuff between programs?

As for alternatives, I don't know. There are any number of ways this
could be done. But if everyone has become inured to this piping
business, they will not be receptive to anything different.

Here however are some ideas:

* Have versions of these tools for use as filters with no UI, just
a default input and output, and versions for interactive use with
helpful prompts. Or even just a sensibly named output! Instead of
every program writing a.out.

* Have a concept of a current block of data, analogous to a clipboard.
Then separate commands can load data, sort it, count it, display it,
write it etc, with no need for intermediate named files.

But I'd be happier if this was all contained within a separate
application from an OS shell program.

Such things are ludicrously easy to write. I just did one in 15 minutes
and 50 lines of code, but set up for line-based text files. This is it
in action; the test input contains 4 lines "one two three four":

Type exit quit or q to finish

> load fred
Data loaded

> lc
4 lines

> list
1 one
2 two
3 three
4 four

> rev
Reversed

> list
1 four
2 three
3 two
4 one

> sort
Sorted

> upper

> list
1 FOUR
2 ONE
3 THREE
4 TWO

> save bill
Written to bill

> q

There are any number of transformations that can be applied without
needed to name and write intermediate files. The commands can even just
invoke the same filters I mentioned, but now within a friendlier UI.

A more sophisticated version can permanently show the data without my
having to type 'list'.

Re: iso646.h

<HSBuN.86399$m4d.19963@fx43.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32183&group=comp.lang.c#32183

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!nntp.comgw.net!peer03.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: iso646.h
Newsgroups: comp.lang.c
References: <uokhnk$eiln$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me> <up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me> <87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me> <87v879qdmc.fsf@bsb.me.uk> <upeo6c$1oa6o$1@dont-email.me>
Lines: 52
Message-ID: <HSBuN.86399$m4d.19963@fx43.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 00:47:35 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 00:47:35 GMT
X-Received-Bytes: 2657
 by: Scott Lurndal - Thu, 1 Feb 2024 00:47 UTC

bart <bc@freeuk.com> writes:
>On 31/01/2024 23:36, Ben Bacarisse wrote:
>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

>> According to you, these tools are poorly designed. I don't think so.
>> How would you design them? Endless input and output file names to be
>> juggled and tidied up afterwards?
>
>I think they're poorly designed too.

Of course you do. They're not bart programs.

>
> From the POV of interactive console programs, they /are/ poor.

You don't provide any reason why - do elucidate!

>But the
>mistake is thinking that they are actual programs or commands, when
>really they are just filters. They are not designed to be standalone
>commands.
>
>Even 'cat', if I type it by itself, just sits there.

It is _designed_ to do that. If that's not the behavior you
want, don't use that command.

If you read the command documentation, you would understand
what the behavior of the command would be in that context
and realize that it would be pointless.

Although, it is actually useful, since it echos back what
you type, for e.g. checking serial lines, terminal emulators,
etc.

>(I wonder what use
>it has in a sequence like ... | cat | ...; what does it add to the data?)

The manual page provides the answer to that question, and it
should be obvious even to the meanest programmer.

>
>AFAICS, this stuff mainly works inside scripts. Or do people here spend
>all day manually piping stuff between programs?

Yes and Yes.

>
>As for alternatives, I don't know.

Indeed.

Re: iso646.h

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32184&group=comp.lang.c#32184

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!nntp.comgw.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 16:49:48 -0800
Organization: None to speak of
Lines: 23
Message-ID: <87zfwlqa8j.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1t0r$37v5a$4@dont-email.me> <up2mor$3bjgb$1@dont-email.me>
<up2ogd$3bs86$1@dont-email.me> <up3r9c$3hbk7$10@dont-email.me>
<up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me> <865xzaas3m.fsf@linuxsc.com>
<upd0pj$1elmk$1@dont-email.me>
<877cjptqcc.fsf@nosuchdomain.example.com>
<upem91$1o053$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="637459c0b3f26f70a97e9a2f25534b92";
logging-data="1851947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YwdOzdB/PmD9p24AjfiJ/"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:88x80HlW+ZnZhOtdGaIh/1JhKmM=
sha1:5RP3lLOSXO6I9quACley+ll0rWM=
 by: Keith Thompson - Thu, 1 Feb 2024 00:49 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> On 31/01/2024 16:33, Keith Thompson wrote:
>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>> On 31/01/2024 07:18, Tim Rentsch wrote:
>> [...]
>>>> It is FAR more cumbersome to accomplish what this command
>>>> is doing without sending binary data through standard out.
>>>> Anyone who doesn't understand this doesn't understand Unix.
>>>>
>>> Yes. I don't do that sort of thing.
>> You don't. Others do. What was your point again?
>>
> There's kind of an implication that it's something I ought to be doing.

Nope.

You seemed to be implying that it's something nobody else ought to be
doing. If that's not what you meant, we can just drop this.

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

Re: iso646.h

<RUBuN.86400$m4d.49465@fx43.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32185&group=comp.lang.c#32185

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: iso646.h
Newsgroups: comp.lang.c
References: <uokhnk$eiln$1@dont-email.me> <87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me> <865xzaas3m.fsf@linuxsc.com> <upd0pj$1elmk$1@dont-email.me> <877cjptqcc.fsf@nosuchdomain.example.com> <upem91$1o053$1@dont-email.me>
Lines: 19
Message-ID: <RUBuN.86400$m4d.49465@fx43.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 00:49:53 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 00:49:53 GMT
X-Received-Bytes: 1768
 by: Scott Lurndal - Thu, 1 Feb 2024 00:49 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>On 31/01/2024 16:33, Keith Thompson wrote:
>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>> On 31/01/2024 07:18, Tim Rentsch wrote:
>> [...]
>>>> It is FAR more cumbersome to accomplish what this command
>>>> is doing without sending binary data through standard out.
>>>> Anyone who doesn't understand this doesn't understand Unix.
>>>>
>>> Yes. I don't do that sort of thing.
>>
>> You don't. Others do. What was your point again?
>>
>There's kind of an implication that it's something I ought to be doing.

No, we're saying that what you do or don't do is irrelevent. Nobody is
forcing you to do anything other than acknowledge that it is a useful
capability that others use regularly.

Re: iso646.h

<uper1v$1oma0$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32186&group=comp.lang.c#32186

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!nntp.comgw.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm....@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Thu, 1 Feb 2024 01:10:22 +0000
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <uper1v$1oma0$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1t0r$37v5a$4@dont-email.me> <up2mor$3bjgb$1@dont-email.me>
<up2ogd$3bs86$1@dont-email.me> <up3r9c$3hbk7$10@dont-email.me>
<up47gj$3jfg4$1@dont-email.me> <87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me> <865xzaas3m.fsf@linuxsc.com>
<upd0pj$1elmk$1@dont-email.me> <877cjptqcc.fsf@nosuchdomain.example.com>
<upem91$1o053$1@dont-email.me> <87zfwlqa8j.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 01:10:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c521d791a94ac00a8e77759a40faab4e";
logging-data="1857856"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OuQLCjaWQ+FGtWzj1MLl8PVRzFdK99I0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:OQVV6oDX0Y2fWQy+CNvvuZPnzlg=
Content-Language: en-GB
In-Reply-To: <87zfwlqa8j.fsf@nosuchdomain.example.com>
 by: Malcolm McLean - Thu, 1 Feb 2024 01:10 UTC

On 01/02/2024 00:49, Keith Thompson wrote:
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>> On 31/01/2024 16:33, Keith Thompson wrote:
>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>>> On 31/01/2024 07:18, Tim Rentsch wrote:
>>> [...]
>>>>> It is FAR more cumbersome to accomplish what this command
>>>>> is doing without sending binary data through standard out.
>>>>> Anyone who doesn't understand this doesn't understand Unix.
>>>>>
>>>> Yes. I don't do that sort of thing.
>>> You don't. Others do. What was your point again?
>>>
>> There's kind of an implication that it's something I ought to be doing.
>
> Nope.
>
> You seemed to be implying that it's something nobody else ought to be
> doing. If that's not what you meant, we can just drop this.
>
No. It's something which has no value in and of itself, so you should
only do it or learn much about it if faced with a practical need to set
up or debug and troubleshoot such systems. Unlike some other types of
computer programming. But I don't want to imply that there is never a
need for it or that you're a lesser person if you do have a need for it.
But it's nothing to be proud of either. It's like knowing how to use MS
Word if you are doing a PhD. Often you would and we even had formal
courses run by the university on Word for long documents. But it doesn't
make you a scientist.

But as you say, I think I've made the point. And you weren't the person
to imply that I ought to know more about Unix pipelines than I do.
--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: iso646.h

<20240131163750.525@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32187&group=comp.lang.c#32187

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Thu, 1 Feb 2024 01:23:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <20240131163750.525@kylheku.com>
References: <uokhnk$eiln$1@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me>
<up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<upas3j$10bft$1@dont-email.me> <upb5q3$11vej$1@dont-email.me>
<K79uN.374649$p%Mb.218835@fx15.iad> <upb8c8$12do6$1@dont-email.me>
<upbj9c$14443$2@dont-email.me> <updj1q$1hif4$1@dont-email.me>
<upe7sm$1lg8f$1@dont-email.me> <87le85s1j2.fsf@nosuchdomain.example.com>
<20240131122033.700@kylheku.com> <87h6itry7q.fsf@nosuchdomain.example.com>
Injection-Date: Thu, 1 Feb 2024 01:23:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5a0ac715860476fe0387f500eaa77814";
logging-data="1860792"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cEh3KFvjjAkDOqXnrIOykHcmRIVM69kE="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:5X1hG2tdvNsm3YtTGFvBW7S9UJM=
 by: Kaz Kylheku - Thu, 1 Feb 2024 01:23 UTC

On 2024-01-31, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> Kaz Kylheku <433-929-6894@kylheku.com> writes:
>> On 2024-01-31, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>>> Terminal control sequences (almost always based on VT100 these days) are
>>> typically not printable, but tend to avoid null characters, which means
>>> you can very probably use printf to print them (assuming you're on a
>>> POSIX-like system).
>>
>> They use text. For instance, a cursor position is both accepted and
>> reported in a decimal format like 13;17. All the commands and
>> delimiting characters are textual, except for part of the CSI (control
>> sequence introducer). The 7 bit CSI uses two characters, ESC and [.
>> Except for that one ESC, everything is printable.
>
> I'd describe "printable except for ESC" as binary. And some sequences
> use other non-printable characters like ASCII BEL (Ctl-G) (perhaps not
> VT100 standard, but for example commands to change fonts and colors for
> xterm).

But ESC is related text; it's a character described in ASCII used for
signaling in the middle of text, which is what it's doing here.

I'd say that if the terminal control sequences contained features like:

- records delimited by length (number of bytes) rather than any stable
delimiter, with an emphasis on either fixed length data structures,
or else length + data encodings for variable ones.

- numbers encoded in binary: for instance screen coordinates (5,257)
being encoded as bytes 05 00 01 01 (little endian, 16 bit)
rathe than the text "5;257"

.... then that would be "binary data".

In the terminal sequences, when the byte 27/0x1B occurs, it is
always being ESC.

In binary data, when such a byte value occurs, it might be anything,
with any meaning. It could be part of a number, e.g. lower byte of
0x1D1B. It could be some flags meaning 00011101, with various meanings.

Binary data has the characteristic that it's not concerned with the
character interpretation of many of the bytes, other than ones which are
embedded text fields. Thus in many parts of the binary data, any
character can potentially occur by chance. An 8 bit flags field can
reproduce any character, given the right combination of the flag values.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: iso646.h

<upes68$1oqhv$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32188&group=comp.lang.c#32188

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Thu, 1 Feb 2024 01:29:44 +0000
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <upes68$1oqhv$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me>
<up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me>
<up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<87v879qdmc.fsf@bsb.me.uk> <upeo6c$1oa6o$1@dont-email.me>
<HSBuN.86399$m4d.19963@fx43.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 01:29:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="19d35866713dfba03207e755d1c79dd1";
logging-data="1862207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/w1hUJ0K533i94o0IOGaMRsd5E6E4gvyk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:A12+8TJpVNGktqU5E8C6B9PM9mE=
Content-Language: en-GB
In-Reply-To: <HSBuN.86399$m4d.19963@fx43.iad>
 by: bart - Thu, 1 Feb 2024 01:29 UTC

On 01/02/2024 00:47, Scott Lurndal wrote:
> bart <bc@freeuk.com> writes:
>> On 31/01/2024 23:36, Ben Bacarisse wrote:
>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>
>>> According to you, these tools are poorly designed. I don't think so.
>>> How would you design them? Endless input and output file names to be
>>> juggled and tidied up afterwards?
>>
>> I think they're poorly designed too.
>
> Of course you do. They're not bart programs.
>
>>
>> From the POV of interactive console programs, they /are/ poor.
>
> You don't provide any reason why - do elucidate!

They only do one thing, like you can't first do A, then B. They don't
give any prompts. They often apparently do nothing (so you can't tell if
they're busy, waiting for input, or hanging). There is no dialog.

But I'm sure this has been mentioned a few times.

NONE of my console apps are that poor. But then I've written programs
with proper CLIs and GUIs that had to used by non-programmers.

>> AFAICS, this stuff mainly works inside scripts. Or do people here spend
>> all day manually piping stuff between programs?
>
> Yes and Yes.

OK. I spent most creative time on my machine doing actual coding.

Re: iso646.h

<iyCuN.273755$Wp_8.40142@fx17.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32189&group=comp.lang.c#32189

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: iso646.h
Newsgroups: comp.lang.c
References: <uokhnk$eiln$1@dont-email.me> <up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me> <upas3j$10bft$1@dont-email.me> <upb5q3$11vej$1@dont-email.me> <K79uN.374649$p%Mb.218835@fx15.iad> <upb8c8$12do6$1@dont-email.me> <upbj9c$14443$2@dont-email.me> <updj1q$1hif4$1@dont-email.me> <upe7sm$1lg8f$1@dont-email.me> <87le85s1j2.fsf@nosuchdomain.example.com> <20240131122033.700@kylheku.com> <87h6itry7q.fsf@nosuchdomain.example.com> <20240131163750.525@kylheku.com>
Lines: 26
Message-ID: <iyCuN.273755$Wp_8.40142@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 01 Feb 2024 01:34:06 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 01 Feb 2024 01:34:06 GMT
X-Received-Bytes: 2354
 by: Scott Lurndal - Thu, 1 Feb 2024 01:34 UTC

Kaz Kylheku <433-929-6894@kylheku.com> writes:
>On 2024-01-31, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>> Kaz Kylheku <433-929-6894@kylheku.com> writes:
>>> On 2024-01-31, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>>>> Terminal control sequences (almost always based on VT100 these days) are
>>>> typically not printable, but tend to avoid null characters, which means
>>>> you can very probably use printf to print them (assuming you're on a
>>>> POSIX-like system).
>>>
>>> They use text. For instance, a cursor position is both accepted and
>>> reported in a decimal format like 13;17. All the commands and
>>> delimiting characters are textual, except for part of the CSI (control
>>> sequence introducer). The 7 bit CSI uses two characters, ESC and [.
>>> Except for that one ESC, everything is printable.
>>
>> I'd describe "printable except for ESC" as binary. And some sequences
>> use other non-printable characters like ASCII BEL (Ctl-G) (perhaps not
>> VT100 standard, but for example commands to change fonts and colors for
>> xterm).
>
>But ESC is related text; it's a character described in ASCII used for
>signaling in the middle of text, which is what it's doing here.

So are most of the other ASCII codes less than 0x20. Including
file and record delimiters and shift-in/shift-out.

Re: iso646.h

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32190&group=comp.lang.c#32190

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 31 Jan 2024 17:36:17 -0800
Organization: None to speak of
Lines: 46
Message-ID: <87sf2dq832.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@dont-email.me> <up2mor$3bjgb$1@dont-email.me>
<up2ogd$3bs86$1@dont-email.me> <up3r9c$3hbk7$10@dont-email.me>
<up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me> <86zfwnc34o.fsf@linuxsc.com>
<up97vr$l025$1@dont-email.me> <86il3bb7rb.fsf@linuxsc.com>
<upaej6$u5ag$1@dont-email.me> <865xzaas3m.fsf@linuxsc.com>
<upd0pj$1elmk$1@dont-email.me>
<877cjptqcc.fsf@nosuchdomain.example.com>
<upem91$1o053$1@dont-email.me>
<87zfwlqa8j.fsf@nosuchdomain.example.com>
<uper1v$1oma0$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="637459c0b3f26f70a97e9a2f25534b92";
logging-data="1862800"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189EIjeizq62JjfcmLv45zy"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:vWYgDLdwdsF76CpTz9ZOo0HUK5U=
sha1:Z4W2JTfS/A8XWNB98MACUNHrlIc=
 by: Keith Thompson - Thu, 1 Feb 2024 01:36 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> On 01/02/2024 00:49, Keith Thompson wrote:
>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>> On 31/01/2024 16:33, Keith Thompson wrote:
>>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>>>> On 31/01/2024 07:18, Tim Rentsch wrote:
>>>> [...]
>>>>>> It is FAR more cumbersome to accomplish what this command
>>>>>> is doing without sending binary data through standard out.
>>>>>> Anyone who doesn't understand this doesn't understand Unix.
>>>>>>
>>>>> Yes. I don't do that sort of thing.
>>>> You don't. Others do. What was your point again?
>>>>
>>> There's kind of an implication that it's something I ought to be doing.
>> Nope.
>> You seemed to be implying that it's something nobody else ought to be
>> doing. If that's not what you meant, we can just drop this.
>>
> No. It's something which has no value in and of itself,

Demonstrably wrong.

> so you should
> only do it or learn much about it if faced with a practical need to
> set up or debug and troubleshoot such systems. Unlike some other types
> of computer programming. But I don't want to imply that there is never
> a need for it or that you're a lesser person if you do have a need for
> it. But it's nothing to be proud of either. It's like knowing how to
> use MS Word if you are doing a PhD. Often you would and we even had
> formal courses run by the university on Word for long documents. But
> it doesn't make you a scientist.
>
> But as you say, I think I've made the point. And you weren't the
> person to imply that I ought to know more about Unix pipelines than I
> do.

So your point is that you want to be condescending about something you
don't understand very well.

Got it.

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

Re: iso646.h

<upetj9$1p0ag$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32191&group=comp.lang.c#32191

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm....@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Thu, 1 Feb 2024 01:53:44 +0000
Organization: A noiseless patient Spider
Lines: 98
Message-ID: <upetj9$1p0ag$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me>
<87frym7l3p.fsf@nosuchdomain.example.com> <uot08a$278i2$1@dont-email.me>
<uotmed$2ack6$2@dont-email.me> <up17f9$313qt$4@dont-email.me>
<up197h$31jct$1@dont-email.me> <up1t0r$37v5a$4@dont-email.me>
<up2mor$3bjgb$1@dont-email.me> <up2ogd$3bs86$1@dont-email.me>
<up3r9c$3hbk7$10@dont-email.me> <up47gj$3jfg4$1@dont-email.me>
<87jznu1c4v.fsf@nosuchdomain.example.com> <up4ceh$3k4b8$1@dont-email.me>
<up5fk6$3t99q$6@dont-email.me> <up5u8c$blo$1@dont-email.me>
<up6655$1l8b$2@dont-email.me> <up6b3v$2ff9$1@dont-email.me>
<86zfwnc34o.fsf@linuxsc.com> <up97vr$l025$1@dont-email.me>
<86il3bb7rb.fsf@linuxsc.com> <upaej6$u5ag$1@dont-email.me>
<87v879qdmc.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Feb 2024 01:53:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c521d791a94ac00a8e77759a40faab4e";
logging-data="1868112"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++NTR8a8JpLPaPwKs2CyBGORCyPwC23l0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:svHCNwPzQzDaal15X2+QbNTVCTU=
In-Reply-To: <87v879qdmc.fsf@bsb.me.uk>
Content-Language: en-GB
 by: Malcolm McLean - Thu, 1 Feb 2024 01:53 UTC

On 31/01/2024 23:36, Ben Bacarisse wrote:
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>
>> On 30/01/2024 07:27, Tim Rentsch wrote:
>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>>
>>>> On 29/01/2024 20:10, Tim Rentsch wrote:
>>>>
>>>>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>>>>
>>>>> [...]
>>>>>
>>>>>> I've never used standard output for binary data.
>>>>>> [...] it strikes me as a poor design decision.
>>>>>
>>>>> How so?
>>>>
>>>> Because the output can't be inspected by humans, and because it might
>>>> have unusual effects if passed though systems designed to handle
>>>> human-readable text.
>
> Maybe you are not used to a system where it's trivial to inspect such
> data. When "some_prog" produces data that are not compatible with the
> current terminal settings, "some_prog | hd" shows a hex dump instead.
> The need to do this does not make "some_prog" poorly designed. It may
> simply mean that the output is /intended/ for further processing.
>
>> For instance in some systems designed to receive
>>>> ASCII text, there is no distinction between the nul byte and "waiting
>>>> for next data byte". Obviously this will cause difficuties if the data
>>>> is binary.
>>>> Also many binary formats can't easily be extended, so you can pass one
>>>> image and that's all. While it is possible to devise a text format
>>>> which is similar, in practice text formats usually have enough
>>>> redundancy to be easily extended.
>>>>
>>>> So it's harder to correct errors, more prone to errors, and harder to
>>>> extend.
>>> Your reasoning is all gobbledygook. Your comments reflect only
>>> limitations in your thinking, not any essential truth about using
>>> standard out for binary data.
>>>
>> I must admit that it's nothing I have ever done or considered doing.
>>
>> However standard output is designed for text and not binary ouput.
>
> What is your evidence? stdout was just designed for output (as far as I
> can tell) and, anyway, what is the distinction you are making between
> binary and text? iconv --from ACSII --to EBCDIC-UK will produce
> something that is "logically" text on stdout, but it might look like
> binary to you.
>
> An example where it's really useful not to care: I have a suite of tools
> for doing toy cryptanalysis. Some apply various transformations and/or
> filters to byte streams and others collect and output (on stderr)
> various statistics. Plugging them together in various pipelines is very
> handy when investigating an encrypted text. The output is almost always
> "binary" in the sense that there would be not point in looking at on a
> terminal.
>
> According to you, these tools are poorly designed. I don't think so.
> How would you design them? Endless input and output file names to be
> juggled and tidied up afterwards?
>
I'd write a monolithic program.
Load the encryoted text into memory, and then pass it to subroutines to
do the various analyses.
You can of course process it, and then pass the processed output to
other programs. And that does have a point if the program which is
acceoting the processed outout is doing something which has no necessary
connection to cryptanalysis. So for example a program to produce a pie
chart from a list of letter frequencies. But if it's transforming the
encrypted text in intricate and specialised ways, then analysing the
transformed text in other specialised and intricate ways, then firstly
you've probably introduced coupling and dependency between the two
programs, and secondly you're probably at some point going to want to
modify the second program in the pipeline to look at the raw data.

So whilst of course you can get this to work, it's not very robust. If
additionally the data is binary or text which can't be inspected by a
human, then you can't easily construct test inputs to get the individual
programs working and debugged independently of the others.

But you are right that creating temporary binary files isn't ideal
either. The files tend to hang about and then people wonder what they
mean and if they are an essential component of something. In reality
when getting a video game together, you need a lot of temporary binary
files - you can't have raw sources, pipelines, and a final executable.
And our Azure build pipeline works that way too. It doesn't pipe C
source to the compilers, it gathers the source, does the pre-processing,
and creates temporary files which the compilers are invoked upon. Then
it deletes them. It is indeed endless input and output file names to be
juggled and tidied up afterward.

--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm


devel / comp.lang.c / iso646.h

Pages:1234567891011121314151617181920212223242526
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor