Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If you're not part of the solution, you're part of the precipitate.


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
Re: iso646.h

<uphfjc$29ukk$4@dont-email.me>

  copy mid

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

  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: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Fri, 2 Feb 2024 01:13:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uphfjc$29ukk$4@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>
<upekt5$1nomb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 01:13:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2132941f276938b37dd44911619c6d41";
logging-data="2423444"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PmzAboHTUp3pj8lWgXyjX"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:bCl3KcRpwjCSsOIe2EKfG7Z5cxA=
 by: Lawrence D'Oliv - Fri, 2 Feb 2024 01:13 UTC

On Wed, 31 Jan 2024 23:25:25 +0000, Malcolm McLean wrote:

> In ASCII, 0 means NUL, or "ignore".

Fun fact: one of the names for hex 7F was “rubout”. On seven-track paper
tape, if you made a mistake typing your program, intead of throwing away
the tape and starting again, you could go back and punch out all the holes
at that position to produce a “rubout” character. The meaning was “ignore
this character”.

Re: iso646.h

<uphftb$2a4gu$1@dont-email.me>

  copy mid

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

  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: Re: iso646.h
Date: Fri, 2 Feb 2024 02:18:35 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <uphftb$2a4gu$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>
<865xzaas3m.fsf@linuxsc.com> <upd0pj$1elmk$1@dont-email.me>
<updl0s$1i2he$3@dont-email.me> <updopb$1iv0b$1@dont-email.me>
<20240131182636.00003173@yahoo.com> <upe1tt$1kjfd$1@dont-email.me>
<upe39q$1kjiu$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 01:18:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0efdbe88cee32a9d06745f6c44243c55";
logging-data="2429470"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xXHNVObdS6q+cUrcxads8"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:WY1rdDjgRqgqmut1SHC11zoE8W8=
In-Reply-To: <upe39q$1kjiu$5@dont-email.me>
 by: Janis Papanagnou - Fri, 2 Feb 2024 01:18 UTC

On 31.01.2024 19:24, David Brown wrote:
> On 31/01/2024 19:01, Janis Papanagnou wrote:
>
>> All I can say is that the Unix shell was a reliable companion
>> wherever we had to automate tasks on Unix systems or on Cygwin
>> enhanced Windows.
>
> Automation is certainly easier with good scripting - whatever the
> language or shell.

Sure. And shell was always available as part of standard Unix.
That was not (not always) true for other languages, like Perl
(for example).

Janis

Re: iso646.h

<uphhmb$2abr1$1@dont-email.me>

  copy mid

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

  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: Re: iso646.h
Date: Fri, 2 Feb 2024 02:48:58 +0100
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <uphhmb$2abr1$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>
<865xzaas3m.fsf@linuxsc.com> <upd0pj$1elmk$1@dont-email.me>
<updl0s$1i2he$3@dont-email.me> <updopb$1iv0b$1@dont-email.me>
<upe310$1kjiu$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 01:48:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0efdbe88cee32a9d06745f6c44243c55";
logging-data="2436961"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KA+dnIrwEW7PHKXyObU5f"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:uJH0BKahGANaHKAfaIliJ58EmFM=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <upe310$1kjiu$4@dont-email.me>
 by: Janis Papanagnou - Fri, 2 Feb 2024 01:48 UTC

On 31.01.2024 19:20, David Brown wrote:
> On 31/01/2024 16:25, Janis Papanagnou wrote:
>> On 31.01.2024 15:21, David Brown wrote:
>>> On 31/01/2024 09:36, Malcolm McLean wrote:
>>>> [ I snipped a couple of "I actually don't know/need it" things ]
>>>>
>>>> But now it's effectively a programming language, and, from the example
>>>> code, a very poorly designed one which is cryptic and fussy and liable
>>>> to be hard to maintain. So it's better to use a language like Perl to
>>>> achieve the same thing, and I did have a few Perl scripts handy for
>>>> repetitive jobs of that nature in my Unix days.
>>>
>>> That gave me a laugh! You think bash is cryptic, fussy and poorly
>>> designed, and choose /Perl/ as the alternative :-)
>>
>> I don't think it's that clear a joke. The Unix shell is extremely
>> error prone to program, and you should not let a newbie write shell
>> programs without careful supervision. ("newbie" [in shell context]
>> = less than 10 years of practical experience. - Am I exaggerating?
>> Maybe. But not much.)
>
> I'm not a great fan of shell programming - anything advanced, and I tend
> to reach for Python. But I think that is a matter of familiarity and
> practice. But if you consider bash programming as difficult to get
> right, I'll not argue.

Not specifically bash programming, the same is true for ksh, etc.;
it's the underlying shell design that has a lot of pitfalls. And
it's not only about familiarity with the tool - of course being
familiar with the concepts is necessary. But there's still enough
pits where even years long programmers stumble into. (I'm saying
that as someone who did 35+ years ksh programming, I gave courses,
defined shell coding standards, followed 20+ years the problems
that users had in comp.unix.shell, and even saw experienced shell
book authors (and I'm not even mentioning bloggers), to fail in
some instances of the language.)

But of course, with knowledge and discipline, you can write also
fine shell programs.

Despite the shell inherent issues I like it because I can solve
some types of tasks reliably in Unix context.

>
> Perl is famously known as a "write-only" language. Sure, it is possible
> to write good, clear, maintainable Perl code - but few people do that.

I've programmed just a few times in Perl, mostly only extending
existing programs. But a friend of mine is leading a Perl user
group in our city; his programs (despite some cryptic elements)
are still quite legible.

>
> Thus the idea that finding bash cryptic or difficult and using Perl
> instead is the joke.

Well, in shell it's all that '1>&2' and '${f##*/}' and whatnot
stuff that can only be called cryptic. I wouldn't count regexps
because that's the base in any proper scripting language. What
remains for Perl to be cryptic? The variable type prefixes are
the most prominent punctuation elements that pop into my head.
If one wants better legible yet simple scripts he could resort
to Awk; but its focus is different from shell. (Perl supports
both, but is not everywhere available.)

Janis

Re: iso646.h

<vcYuN.420683$83n7.154816@fx18.iad>

  copy mid

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

  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!fx18.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> <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> <upb7ts$12b6n$1@dont-email.me> <upco3j$1db7v$7@dont-email.me> <updiud$1hgpi$1@dont-email.me> <uphbp8$29h5e$1@dont-email.me>
Lines: 27
Message-ID: <vcYuN.420683$83n7.154816@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Fri, 02 Feb 2024 02:12:43 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Fri, 02 Feb 2024 02:12:43 GMT
X-Received-Bytes: 2034
 by: Scott Lurndal - Fri, 2 Feb 2024 02:12 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Wed, 31 Jan 2024 14:45:49 +0100, David Brown wrote:
>
>> On 31/01/2024 07:07, Lawrence D'Oliveiro wrote:
>>
>>> On Tue, 30 Jan 2024 17:25:31 +0100, David Brown wrote:
>>>
>>>> Mixing binary data with formatted text data is very unlikely to be
>>>> useful.
>>>
>>> PDF does exactly that. To the point where the spec suggests putting
>>> some random unprintable bytes up front, to distract format sniffers
>>> from thinking they’re looking at a text file.
>>
>> PDF files start with the "magic" indicator "%PDF", which is enough for
>> many programs to identify them correctly.
>
>Sure, if you were looking for PDF files specifically.
>
>But consider the more generic case of file-transfer tools that try to
>automatically convert between line-endings for text files on different
>platforms: if they mistook a PDF file for text, they could screw it up
>royally.

Just another reason not to use the system with two-byte line endings.

Not a problem on unix.

Re: iso646.h

<uphj4e$2ai9g$1@dont-email.me>

  copy mid

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

  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: Re: iso646.h
Date: Fri, 2 Feb 2024 03:13:34 +0100
Organization: A noiseless patient Spider
Lines: 77
Message-ID: <uphj4e$2ai9g$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> <upes68$1oqhv$1@dont-email.me>
<upgb44$23tto$1@dont-email.me> <upgj2i$25d37$1@dont-email.me>
<uph4da$28ebd$1@dont-email.me> <uph7i6$28ugb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 02:13:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0efdbe88cee32a9d06745f6c44243c55";
logging-data="2443568"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VTDTAUh1yogVCITBV91g6"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:ET0X4MRiHsL10nQE5uMlgTyeZXE=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <uph7i6$28ugb$1@dont-email.me>
 by: Janis Papanagnou - Fri, 2 Feb 2024 02:13 UTC

On 01.02.2024 23:56, bart wrote:
> On 01/02/2024 22:02, David Brown wrote:
>> On 01/02/2024 18:06, bart wrote:
>
>>> You can't send output A to stdout, then B to stdout, and certainly
>>> can't interleave messages to the console on stdout, as that would
>>> then be all mixed up with the possibly binary data, and if
>>> redirected, you won't see it.
>>
>> $ cat A
>> one
>> two
>> three
>>
>> $ cat B
>>
>> cat
>> dog
>> cow
>>
>> $ (cat A; cat B) | wc -l
>> 6
>>
>> That's the output of two commands, "cat A" and "cat B", each going to
>> their stdout, and they are concatenated into a single pipe going to
>> the "wc -l" command to count the lines.

I see you're trying to teach shell basics to Bart; interesting.

>
> I see you don't get it. This is the equivalent of a program which is

What is meant by "This"? (I cannot find code or description.)

> supposed to do this:
>
> print A to TTY
> print B to LPT
> print C to TTY
> print D to LPT

Is that the task? Are A-D program names? Any other requirements
or restrictions you impose?

cat A
cat B | lpr # of course you don't need cat here: lpr B
cat C
cat D | lpr # of course you don't need cat here: lpr D

You want stdout collected? Do it as David suggested, e.g.

{ cat A ; lpr B ; cat C ; lpr D ;} | processor-for-A-and-C

Or you want to split A, B, C, or D to different channels or tools?
Then use 'tee', and/or use redirection to files, and/or to processes.

>
> but instead is written as this:
>
> print A to TTY
> print B to TTY
> print C to TTY
> print D to TTY
>
> and you are expected to redirect all TTY output to LPT.
>
> At least, on LPT, B and D can each start with a separate title page; on
> stdout directed to a file, it will be all mixed up.

See above. - Any other task? - Or did you mean something else?

(It's hard to believe that there's something possible in the DOS
cmd/bat/bart world that wouldn't be possible in Unix shell - besides
blue screens of course.)

Janis

Re: iso646.h

<JeYuN.420684$83n7.159115@fx18.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.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> <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> <uphfjc$29ukk$4@dont-email.me>
Lines: 11
Message-ID: <JeYuN.420684$83n7.159115@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Fri, 02 Feb 2024 02:15:05 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Fri, 02 Feb 2024 02:15:05 GMT
X-Received-Bytes: 1496
 by: Scott Lurndal - Fri, 2 Feb 2024 02:15 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Wed, 31 Jan 2024 23:25:25 +0000, Malcolm McLean wrote:
>
>> In ASCII, 0 means NUL, or "ignore".
>
>Fun fact: one of the names for hex 7F was “rubout”.

Additional fun fact. Rubout was the legend on the keycap on
the ASR-33 used to rub out the prior character (the A in ASR
means it has the reader/punch). On paper tape, it means ignore
the prior character.

Re: iso646.h

<uphjrr$2al2n$1@dont-email.me>

  copy mid

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

  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: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Fri, 2 Feb 2024 03:26:02 +0100
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <uphjrr$2al2n$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> <87v879qdmc.fsf@bsb.me.uk>
<upeo6c$1oa6o$1@dont-email.me> <upga71$23qjh$1@dont-email.me>
<upgdic$24dp0$1@dont-email.me> <87zfwkorwp.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 02:26:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0efdbe88cee32a9d06745f6c44243c55";
logging-data="2446423"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lL9AWmnajBmWGDr/AA7LP"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:X3ZOnivaJ4OqyGcZ+SbiDYmZJnc=
In-Reply-To: <87zfwkorwp.fsf@nosuchdomain.example.com>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Fri, 2 Feb 2024 02:26 UTC

> bart <bc@freeuk.com> writes:
> [...]
>> I've just realised why it is that your filter programs don't show
>> prompts or any kinds of messages: because those are sent to stdout,
>> and therefore will screw up any data that is being sent there as the
>> primary output.

Erm, no. Filter programs just don't need a prompt.

And if you have a program that want to provide a prompt, and provide
data on standard output, you usually wouldn't use stdout for that;
use stderr or /dev/tty, depending on the intention of the tool.

And even if you intend to use a prompt on stdout (what really sounds
as a weak idea) you can program a test whether your file descriptor is
attached to the tty if you like.

To demonstrate that, here's some ksh code...

$ ( exec 0>&- ; [[ -t 0 ]] ; echo $? ) # stdin closed
1 # error
$ ( [[ -t 0 ]] ; echo $? ) # stdin attached to tty
0 # okay
$ ls x | ( [[ -t 0 ]] ; echo $? ) # stdin attached to pipe
1 # error

Janis

Re: iso646.h

<uphkrj$2aote$1@dont-email.me>

  copy mid

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

  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: Re: iso646.h
Date: Fri, 2 Feb 2024 03:42:58 +0100
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <uphkrj$2aote$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <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>
<upb7ts$12b6n$1@dont-email.me> <upco3j$1db7v$7@dont-email.me>
<updiud$1hgpi$1@dont-email.me> <uphbp8$29h5e$1@dont-email.me>
<vcYuN.420683$83n7.154816@fx18.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 02:42:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0efdbe88cee32a9d06745f6c44243c55";
logging-data="2450350"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+v9jWaeYQ7JLWp2p2GXH1x"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:IIfHbJq876PGALpwDQIPXxcXXlM=
In-Reply-To: <vcYuN.420683$83n7.154816@fx18.iad>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Fri, 2 Feb 2024 02:42 UTC

On 02.02.2024 03:12, Scott Lurndal wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>> But consider the more generic case of file-transfer tools that try to
>> automatically convert between line-endings for text files on different
>> platforms: if they mistook a PDF file for text, they could screw it up
>> royally.
>
> Just another reason not to use the system with two-byte line endings.

That cannot always be avoided.

>
> Not a problem on unix.

There are several situations where it matters to consider CR/LF or when
some OS setting may handle these line terminators. Even if you're only
staying in your Unix universe. The "funniest" thing is if you process
files that have been edited by different people on different platforms.
(I know that I am not the first one who has written a CR-LF-CRLF tool
to check and fix (in some consistent way) the line endings of files.)

Janis

Re: iso646.h

<fBZuN.70308$GX69.6577@fx46.iad>

  copy mid

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

  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!fx46.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> <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> <upb7ts$12b6n$1@dont-email.me> <upco3j$1db7v$7@dont-email.me> <updiud$1hgpi$1@dont-email.me> <uphbp8$29h5e$1@dont-email.me> <vcYuN.420683$83n7.154816@fx18.iad> <uphkrj$2aote$1@dont-email.me>
Lines: 26
Message-ID: <fBZuN.70308$GX69.6577@fx46.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Fri, 02 Feb 2024 03:47:23 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Fri, 02 Feb 2024 03:47:23 GMT
X-Received-Bytes: 2072
 by: Scott Lurndal - Fri, 2 Feb 2024 03:47 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>On 02.02.2024 03:12, Scott Lurndal wrote:
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>
>>> But consider the more generic case of file-transfer tools that try to
>>> automatically convert between line-endings for text files on different
>>> platforms: if they mistook a PDF file for text, they could screw it up
>>> royally.
>>
>> Just another reason not to use the system with two-byte line endings.
>
>That cannot always be avoided.
>
>>
>> Not a problem on unix.
>
>There are several situations where it matters to consider CR/LF or when
>some OS setting may handle these line terminators. Even if you're only
>staying in your Unix universe. The "funniest" thing is if you process
>files that have been edited by different people on different platforms.
>(I know that I am not the first one who has written a CR-LF-CRLF tool
>to check and fix (in some consistent way) the line endings of files.)

vim can load and save with either line ending, switching if the
user wishes.

Re: iso646.h

<877cjnpl7q.fsf@nosuchdomain.example.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.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: Thu, 01 Feb 2024 20:02:33 -0800
Organization: None to speak of
Lines: 27
Message-ID: <877cjnpl7q.fsf@nosuchdomain.example.com>
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>
<upas3j$10bft$1@dont-email.me> <upb5q3$11vej$1@dont-email.me>
<upb7ts$12b6n$1@dont-email.me> <upco3j$1db7v$7@dont-email.me>
<updiud$1hgpi$1@dont-email.me> <uphbp8$29h5e$1@dont-email.me>
<vcYuN.420683$83n7.154816@fx18.iad> <uphkrj$2aote$1@dont-email.me>
<fBZuN.70308$GX69.6577@fx46.iad>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a25c07b6296b5291e04aff5e5cd7fea7";
logging-data="2593696"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189H+QrSWNBgWIkHenz6c2E"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:IAy1UZV8miVUTn47HL/5qWOryv0=
sha1:0d8fq6GdIyXmj/uD2gj3ZfcEmuk=
 by: Keith Thompson - Fri, 2 Feb 2024 04:02 UTC

scott@slp53.sl.home (Scott Lurndal) writes:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
>>There are several situations where it matters to consider CR/LF or when
>>some OS setting may handle these line terminators. Even if you're only
>>staying in your Unix universe. The "funniest" thing is if you process
>>files that have been edited by different people on different platforms.
>>(I know that I am not the first one who has written a CR-LF-CRLF tool
>>to check and fix (in some consistent way) the line endings of files.)
>
> vim can load and save with either line ending, switching if the
> user wishes.

Yes, but if a file has a mix of LF and CRLF line endings, it shows an
annoying "^M" on the end of each CRLF line. If all lines are LF, or all
lines are CRLF, it doesn't.

There's probably a way to change that, but when I've run into the
problem in the past I've been able to modify the files.

(Vague relevance: All C compilers I've tried don't complain about mixed
LF and CRLF line endings.)

--
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)

<uphsna$2fg0v$5@dont-email.me>

  copy mid

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

  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: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Fri, 2 Feb 2024 04:57:14 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uphsna$2fg0v$5@dont-email.me>
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> <5bxuN.131493$q3F7.74522@fx45.iad>
<upg1qm$22d24$1@dont-email.me> <upg42u$22q13$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 04:57:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2132941f276938b37dd44911619c6d41";
logging-data="2605087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bv2CqK0eG4nWV3z8Qnfmr"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:jGeCj+9Bdb2C1RTQeMJn9VG41Ps=
 by: Lawrence D'Oliv - Fri, 2 Feb 2024 04:57 UTC

On Thu, 1 Feb 2024 12:50:36 +0000, bart wrote:

> For all I know, this is the usenet equivalent of Mornington Crescent ...

You can’t get far in C without knowing POSIX. C on Windows is, let’s face
it, a crippled language.

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

<uphspp$2fg0v$6@dont-email.me>

  copy mid

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

  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: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Fri, 2 Feb 2024 04:58:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uphspp$2fg0v$6@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>
<upe60i$1latn$1@dont-email.me> <upfsor$219kb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 04:58:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2132941f276938b37dd44911619c6d41";
logging-data="2605087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/H7qMsbRixqZfQzr9i9WoH"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:0xbEcFDIuWyShJ3Yf8UPNmbSPwA=
 by: Lawrence D'Oliv - Fri, 2 Feb 2024 04:58 UTC

On Thu, 1 Feb 2024 11:45:47 +0100, David Brown wrote:

> .. dash (Ubuntu uses this, IIRC) ...

On Debian and derivatives (including Ubuntu), dash is the go-to for a
minimal, strictly POSIX-compliant shell.

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

<uphssi$2fg0v$7@dont-email.me>

  copy mid

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

  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: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Fri, 2 Feb 2024 05:00:03 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uphssi$2fg0v$7@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>
<upe60i$1latn$1@dont-email.me> <86o7d09v4h.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 05:00:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2132941f276938b37dd44911619c6d41";
logging-data="2605087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6zOgLP9NtErz6LhNEHeRc"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:q1U1RoizY8DShZiEpJ/wGe0CI/4=
 by: Lawrence D'Oliv - Fri, 2 Feb 2024 05:00 UTC

On Thu, 01 Feb 2024 05:22:54 -0800, Tim Rentsch wrote:

> I would greatly appreciate it if for future such [OT] threads that they
> be started in a newsgroup where they are more relevant to the subjects
> usually discussed there. Thank you.

Friendly tip: all the good USENET news readers have facilities to allow
you to ignore messages you don’t want to see. Use them.

Re: Alternative Shells (was Re: iso646.h)

<upht4f$2fg0v$8@dont-email.me>

  copy mid

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

  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: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Alternative Shells (was Re: iso646.h)
Date: Fri, 2 Feb 2024 05:04:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <upht4f$2fg0v$8@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>
<865xzaas3m.fsf@linuxsc.com> <20240131124332.00002c05@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 05:04:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2132941f276938b37dd44911619c6d41";
logging-data="2605087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JspgUG1JV42DetR4l32hr"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:kD7LNl8lnNtsKoe0iTc178Aprts=
 by: Lawrence D'Oliv - Fri, 2 Feb 2024 05:04 UTC

On Wed, 31 Jan 2024 12:43:32 +0200, Michael S wrote:

> Frankly, Unix redirection racket looks like something hacked together
> rather than designed as result of the solid thinking process.
> As long as there were only standard input and output it was sort of
> logical. But when they figured out that it is insufficient, they had
> chosen a quick hack instead of constructing a solution that wouldn't
> offend engineering senses of any non-preconditioned observer.

One thing with *nix-type OSes versus others is that shells are not
specially-privileged system components in any sense, they are just
ordinary user programs like any other.

If you have some clever ideas for an alternative command language that
doesn’t offend your sensibilities, feel free to code it up and show us how
it’s done.

Re: iso646.h

<uphtbs$2fg0v$9@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Fri, 2 Feb 2024 05:08:13 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uphtbs$2fg0v$9@dont-email.me>
References: <uokhnk$eiln$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>
<uphfjc$29ukk$4@dont-email.me> <JeYuN.420684$83n7.159115@fx18.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 05:08:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2132941f276938b37dd44911619c6d41";
logging-data="2605087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18brjd6hvMYweBER09pQk4/"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:zH9VqCHja9Sd2Gph90ULHosO6JQ=
 by: Lawrence D'Oliv - Fri, 2 Feb 2024 05:08 UTC

On Fri, 02 Feb 2024 02:15:05 GMT, Scott Lurndal wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>>On Wed, 31 Jan 2024 23:25:25 +0000, Malcolm McLean wrote:
>>
>>Fun fact: one of the names for hex 7F was “rubout”.
>
> Additional fun fact. Rubout was the legend on the keycap on the ASR-33
> used to rub out the prior character (the A in ASR means it has the
> reader/punch). On paper tape, it means ignore the prior character.

No, you had to overpunch the character to be ignored. Did that key
automatically backspace the tape for you, or did you have to do it
manually?

Re: Functional Programming (was Re: iso646.h)

<uphtmj$2fg0v$10@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Functional Programming (was Re: iso646.h)
Date: Fri, 2 Feb 2024 05:13:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uphtmj$2fg0v$10@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me>
<uomjfr$sopf$1@dont-email.me> <uoopm9$1blvh$1@dont-email.me>
<uop0r1$1d4d4$1@dont-email.me> <uoqvas$1q40p$1@dont-email.me>
<uor4rf$1r10t$1@dont-email.me> <87frym7l3p.fsf@nosuchdomain.example.com>
<uot08a$278i2$1@dont-email.me> <uotmed$2ack6$2@dont-email.me>
<uoto3n$2an28$1@dont-email.me> <uou05d$2bvjr$2@dont-email.me>
<uou170$2c7ed$1@dont-email.me> <uouf96$2em2l$2@dont-email.me>
<uov1f5$2heei$1@dont-email.me> <up0l1l$2u6hl$1@dont-email.me>
<up0qad$2v1n8$1@dont-email.me> <up1l5p$337rb$1@dont-email.me>
<up38cs$3ec59$2@dont-email.me> <up3q8k$3hbk7$6@dont-email.me>
<up5e54$3t99q$2@dont-email.me> <up6e34$2vq9$6@dont-email.me>
<up7p0t$csr3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 05:13:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2132941f276938b37dd44911619c6d41";
logging-data="2605087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19107vR1jTTOs1DaMoQ/2FK"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:gh4lReMTVESnxwvflbAFV6vowBg=
 by: Lawrence D'Oliv - Fri, 2 Feb 2024 05:13 UTC

On Mon, 29 Jan 2024 09:52:45 +0100, David Brown wrote:

> (Facebook uses Haskell for their filters and other data handling.

I’m sure that may work OK for a filter expressed as a pure function. How
does it work for one where the filter has internal state which is changed
as a result of prior input, and which alters the production of subsequent
output?

Re: iso646.h

<upi4t5$2gn4l$1@dont-email.me>

  copy mid

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

  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: Fri, 2 Feb 2024 07:16:52 +0000
Organization: A noiseless patient Spider
Lines: 84
Message-ID: <upi4t5$2gn4l$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>
<865xzaas3m.fsf@linuxsc.com> <upd0pj$1elmk$1@dont-email.me>
<updl0s$1i2he$3@dont-email.me> <updopb$1iv0b$1@dont-email.me>
<upe310$1kjiu$4@dont-email.me> <uphhmb$2abr1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 07:16:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="423b3af7700dc69447a4c3cdf5f93e4f";
logging-data="2645141"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SuU+dT0BFHVZynzjdDmXZdA3SYBq+BcA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:34DrqT3Ak9/SoGF9jSr2XAyMN1o=
In-Reply-To: <uphhmb$2abr1$1@dont-email.me>
Content-Language: en-GB
 by: Malcolm McLean - Fri, 2 Feb 2024 07:16 UTC

On 02/02/2024 01:48, Janis Papanagnou wrote:
> On 31.01.2024 19:20, David Brown wrote:
>> On 31/01/2024 16:25, Janis Papanagnou wrote:
>>> On 31.01.2024 15:21, David Brown wrote:
>>>> On 31/01/2024 09:36, Malcolm McLean wrote:
>>>>> [ I snipped a couple of "I actually don't know/need it" things ]
>>>>>
>>>>> But now it's effectively a programming language, and, from the example
>>>>> code, a very poorly designed one which is cryptic and fussy and liable
>>>>> to be hard to maintain. So it's better to use a language like Perl to
>>>>> achieve the same thing, and I did have a few Perl scripts handy for
>>>>> repetitive jobs of that nature in my Unix days.
>>>>
>>>> That gave me a laugh! You think bash is cryptic, fussy and poorly
>>>> designed, and choose /Perl/ as the alternative :-)
>>>
>>> I don't think it's that clear a joke. The Unix shell is extremely
>>> error prone to program, and you should not let a newbie write shell
>>> programs without careful supervision. ("newbie" [in shell context]
>>> = less than 10 years of practical experience. - Am I exaggerating?
>>> Maybe. But not much.)
>>
>> I'm not a great fan of shell programming - anything advanced, and I tend
>> to reach for Python. But I think that is a matter of familiarity and
>> practice. But if you consider bash programming as difficult to get
>> right, I'll not argue.
>
> Not specifically bash programming, the same is true for ksh, etc.;
> it's the underlying shell design that has a lot of pitfalls. And
> it's not only about familiarity with the tool - of course being
> familiar with the concepts is necessary. But there's still enough
> pits where even years long programmers stumble into. (I'm saying
> that as someone who did 35+ years ksh programming, I gave courses,
> defined shell coding standards, followed 20+ years the problems
> that users had in comp.unix.shell, and even saw experienced shell
> book authors (and I'm not even mentioning bloggers), to fail in
> some instances of the language.)
>
> But of course, with knowledge and discipline, you can write also
> fine shell programs.
>
> Despite the shell inherent issues I like it because I can solve
> some types of tasks reliably in Unix context.
>
>>
>> Perl is famously known as a "write-only" language. Sure, it is possible
>> to write good, clear, maintainable Perl code - but few people do that.
>
> I've programmed just a few times in Perl, mostly only extending
> existing programs. But a friend of mine is leading a Perl user
> group in our city; his programs (despite some cryptic elements)
> are still quite legible.
>
>>
>> Thus the idea that finding bash cryptic or difficult and using Perl
>> instead is the joke.
>
> Well, in shell it's all that '1>&2' and '${f##*/}' and whatnot
> stuff that can only be called cryptic. I wouldn't count regexps
> because that's the base in any proper scripting language. What
> remains for Perl to be cryptic? The variable type prefixes are
> the most prominent punctuation elements that pop into my head.
> If one wants better legible yet simple scripts he could resort
> to Awk; but its focus is different from shell. (Perl supports
> both, but is not everywhere available.)
>
In Perl you have an implict variable called $_. Some Perl statements
will operate on $_ without it actually being specified, and you then
have to reference $_ exoictitly to obtain the result. It's highly
confusing for anyone used to a conventional language with only one type
of named varibales. And that's one of the main decisions which makes
Perl hard to read.

However often you can write slightly less idiomatic Perl code which
doesn't make use of this feature, and then it's clearer. Or you can lay
the code out so that all the places where $_ are used in the same way
are together and make it a bit easier to work out what is going on.
There are thing you can do and Perl doesn't have to look like a
confusing mess.

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

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

<upi50r$2gn4l$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.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: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Fri, 2 Feb 2024 07:18:51 +0000
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <upi50r$2gn4l$2@dont-email.me>
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> <5bxuN.131493$q3F7.74522@fx45.iad>
<upg1qm$22d24$1@dont-email.me> <upg42u$22q13$1@dont-email.me>
<uphsna$2fg0v$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 07:18:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="423b3af7700dc69447a4c3cdf5f93e4f";
logging-data="2645141"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19peBmUFYWwF6ItZuhVAfjWOFldQAmI9O0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Rp6Va/7QOUWdL3FpZ1SqAAbWOBY=
Content-Language: en-GB
In-Reply-To: <uphsna$2fg0v$5@dont-email.me>
 by: Malcolm McLean - Fri, 2 Feb 2024 07:18 UTC

On 02/02/2024 04:57, Lawrence D'Oliveiro wrote:
> On Thu, 1 Feb 2024 12:50:36 +0000, bart wrote:
>
>> For all I know, this is the usenet equivalent of Mornington Crescent ...
>
> You can’t get far in C without knowing POSIX. C on Windows is, let’s face
> it, a crippled language.
>
My program Crossword Designer is a Windows program and is written
entirely in C.
--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: Functional Programming (was Re: iso646.h)

<upi8lr$2h7rf$1@dont-email.me>

  copy mid

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

  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: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Functional Programming (was Re: iso646.h)
Date: Fri, 2 Feb 2024 09:21:15 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <upi8lr$2h7rf$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me>
<uomjfr$sopf$1@dont-email.me> <uoopm9$1blvh$1@dont-email.me>
<uop0r1$1d4d4$1@dont-email.me> <uoqvas$1q40p$1@dont-email.me>
<uor4rf$1r10t$1@dont-email.me> <87frym7l3p.fsf@nosuchdomain.example.com>
<uot08a$278i2$1@dont-email.me> <uotmed$2ack6$2@dont-email.me>
<uoto3n$2an28$1@dont-email.me> <uou05d$2bvjr$2@dont-email.me>
<uou170$2c7ed$1@dont-email.me> <uouf96$2em2l$2@dont-email.me>
<uov1f5$2heei$1@dont-email.me> <up0l1l$2u6hl$1@dont-email.me>
<up0qad$2v1n8$1@dont-email.me> <up1l5p$337rb$1@dont-email.me>
<up38cs$3ec59$2@dont-email.me> <up3q8k$3hbk7$6@dont-email.me>
<up5e54$3t99q$2@dont-email.me> <up6e34$2vq9$6@dont-email.me>
<up7p0t$csr3$1@dont-email.me> <uphtmj$2fg0v$10@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 08:21:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c86dda6c8b577cf8da0f36021cd06541";
logging-data="2662255"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199oyj1Opz5wGbLgHt3M/xzmKE6afOAZxA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:P/Nfgvms4O6Mq8TvBMYF2p4Phsg=
Content-Language: en-GB
In-Reply-To: <uphtmj$2fg0v$10@dont-email.me>
 by: David Brown - Fri, 2 Feb 2024 08:21 UTC

On 02/02/2024 06:13, Lawrence D'Oliveiro wrote:
> On Mon, 29 Jan 2024 09:52:45 +0100, David Brown wrote:
>
>> (Facebook uses Haskell for their filters and other data handling.
>
> I’m sure that may work OK for a filter expressed as a pure function. How
> does it work for one where the filter has internal state which is changed
> as a result of prior input, and which alters the production of subsequent
> output?

I have no idea. You could ask in a Haskell group, but that is well
beyond my knowledge and well outside this group's topicality. I can
only tell you it is not only possible in Haskell, but practical and
viewed by a big, rich and experienced company as the best language for
the task. As for /how/ it works, you'll have to look elsewhere.

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

<upi9en$2h7rf$2@dont-email.me>

  copy mid

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

  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: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Fri, 2 Feb 2024 09:34:31 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <upi9en$2h7rf$2@dont-email.me>
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> <5bxuN.131493$q3F7.74522@fx45.iad>
<upg1qm$22d24$1@dont-email.me> <upg42u$22q13$1@dont-email.me>
<uphsna$2fg0v$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 08:34:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c86dda6c8b577cf8da0f36021cd06541";
logging-data="2662255"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CelVEBCwGY6XUiMxc5EmjkpUlJXevBlM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:0Vtww5kHdd3l+V3dB+iD2IeAvxg=
Content-Language: en-GB
In-Reply-To: <uphsna$2fg0v$5@dont-email.me>
 by: David Brown - Fri, 2 Feb 2024 08:34 UTC

On 02/02/2024 05:57, Lawrence D'Oliveiro wrote:
> On Thu, 1 Feb 2024 12:50:36 +0000, bart wrote:
>
>> For all I know, this is the usenet equivalent of Mornington Crescent ...
>
> You can’t get far in C without knowing POSIX. C on Windows is, let’s face
> it, a crippled language.

I've been a professional programmer for thirty years, and while I have
used a number of languages, most of my work has been in C. POSIX is
totally irrelevant to my programming, as is C on Windows.

It is true that C is often used on POSIX targets. It is true that
programming on POSIX systems is often done on C. It is /not/ true that
they are synonymous.

POSIX has been essential for the standardisation of *nix systems, and
gives a good common base that is beyond the C standard but not as
specific as an OS. However, it is in itself pretty irrelevant to most C
programmers. Even if you limit yourself to C programmers targetting
*nix systems, they target Linux, or particular libraries and frameworks
(such as GTK or SDL), or standard C, or gcc+glibc. POSIX makes no
difference - if the functions and features they want are in the
libraries they will be using, they will use them.

/Some/ C programmers write code for POSIX, with an aim to portability
across any POSIX system, but it is surely a very small minority.

(But most C programmers probably have access to the POSIX-extended
printf that started this.)

Re: iso646.h

<upia0v$2h7rf$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Fri, 2 Feb 2024 09:44:15 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <upia0v$2h7rf$3@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> <upes68$1oqhv$1@dont-email.me>
<upgb44$23tto$1@dont-email.me> <upgj2i$25d37$1@dont-email.me>
<uph4da$28ebd$1@dont-email.me> <uph7i6$28ugb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 08:44:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c86dda6c8b577cf8da0f36021cd06541";
logging-data="2662255"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19mKwfRCI2H3RW506t+dxICB4Qf+0FhkvI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:+cwzVxDPS05SPPY6rH+vjwXCLK8=
In-Reply-To: <uph7i6$28ugb$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Fri, 2 Feb 2024 08:44 UTC

On 01/02/2024 23:56, bart wrote:
> On 01/02/2024 22:02, David Brown wrote:

>> I'm not sure we are getting anywhere with you trying to invent more
>> and more complex situations in an attempt to find something that can't
>> be done from a Linux bash shell.
>
> They're remarkably simple situations!

As I said, you can try to invent more and more unrealistic situations to
try to "prove" that bash is useless and Unix is flawed and its designers
were incompetent, along with every other programmer and developer
throughout time, while Bart from Usenet has the perfect solution for
everything.

If you are happy with everything you have made yourself, and think
everything else is unusable, incompetently made, and probably designed
specifically to annoy you personally, why bother with any of it? Why
are you here, complaining about everything? What do you gain from
frothing at the mouth like this, other than high blood pressure?

Ask about C issues. Tell us about C programs. You can even ask about
off-topic stuff - many of us have tried to give you lots of information
about things you are ignorant of. But /please/ stop whining.

Re: iso646.h

<upiado$2h7rf$4@dont-email.me>

  copy mid

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

  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: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Fri, 2 Feb 2024 09:51:04 +0100
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <upiado$2h7rf$4@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> <upetj9$1p0ag$1@dont-email.me>
<upgbd6$23tto$2@dont-email.me> <upge2t$24gnk$1@dont-email.me>
<uph4kp$28ebd$2@dont-email.me> <uph6hf$28p5f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 08:51:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c86dda6c8b577cf8da0f36021cd06541";
logging-data="2662255"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uaNp5AbdgsQAvSk2po8cs8gKMJWS9qPY="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:4JIWbitQktCemYNwqQMMkaA1BZg=
In-Reply-To: <uph6hf$28p5f$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Fri, 2 Feb 2024 08:51 UTC

On 01/02/2024 23:38, Malcolm McLean wrote:
> I'm sure you're capable of going through the exercise and then you might
> gain a bit of insight on how to design such software systems. And, no,
> arguing that you'd go for a monolithic program doesn't necessarily mean
> that you are a "quivering jelly" at the thought of writing several
> simpler ones. And in fact to start you off I actually mentioned a few
> advantages of the pipeline approach.

I am perfectly aware of the advantages and disadvantages of monolithic
approaches.

I am also perfectly aware that you won't read that previous sentence,
understand it, or consider it before making up your next pointless straw
man or making up another lecture on something you know nothing about
while the rest of us do.

>
> There are advantages and drawbacks to both. But I can't force you to
> think about what those might be if you won't, and from experience just
> telling you provokes your natural contentiousness and isn't very effective.
>

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

<upihra$2ii1u$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.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: [OT] Unix shells and POSIX shell (was Re: iso646.h)
Date: Fri, 2 Feb 2024 10:57:46 +0000
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <upihra$2ii1u$2@dont-email.me>
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> <5bxuN.131493$q3F7.74522@fx45.iad>
<upg1qm$22d24$1@dont-email.me> <upg42u$22q13$1@dont-email.me>
<uphsna$2fg0v$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 2 Feb 2024 10:57:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d7467001ca9d065f45d6d0880dd56f89";
logging-data="2705470"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wrwkHQ3lshTMj+iepMwjKcTq42rurM1Q="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:m6hwk5aMLQDTWVXjY4oMuNvJMds=
Content-Language: en-GB
In-Reply-To: <uphsna$2fg0v$5@dont-email.me>
 by: bart - Fri, 2 Feb 2024 10:57 UTC

On 02/02/2024 04:57, Lawrence D'Oliveiro wrote:
> On Thu, 1 Feb 2024 12:50:36 +0000, bart wrote:
>
>> For all I know, this is the usenet equivalent of Mornington Crescent ...
>
> You can’t get far in C without knowing POSIX. C on Windows is, let’s face
> it, a crippled language.

It sounds like you're the one who would be crippled without your beloved
POSIX.

There has of course been a huge amount of software written in C on Windows.

Re: iso646.h

<upijur$2j3rt$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!weretis.net!feeder8.news.weretis.net!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: Re: iso646.h
Date: Fri, 2 Feb 2024 12:33:46 +0100
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <upijur$2j3rt$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> <upf9ug$1uf0j$1@dont-email.me>
<upg4ol$22tss$1@dont-email.me> <upg65m$235lp$1@dont-email.me>
<upgc4f$2454d$1@dont-email.me> <upgekv$24gnk$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 11:33:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="477ce05e86656f73ba155ebb4f46fbc9";
logging-data="2723709"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192O+lSNJXN4RgR1M0yDgSA"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:2eZhe3C8e132BHklRydbkE+KP38=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <upgekv$24gnk$2@dont-email.me>
 by: Janis Papanagnou - Fri, 2 Feb 2024 11:33 UTC

On 01.02.2024 16:50, Malcolm McLean wrote:
> On 01/02/2024 15:07, Janis Papanagnou wrote:
>>
>> I don't know binary format details about jpg, so I cannot help you here.
>>
> JPEG is an extremely common binary file format and JPEG files will be
> found on most general purpose computers.

Really?!

> All you need to know for the purposes of the discussion is that the
> first four bytes are segment identifiers and must have the values I

All I wanted to know is what you intended to do. The intended
task.

> gave, whilst bytes five and six are a big endian 16 bit number that
> represents a segment length, and that potentially any of those values
> could be unexpected and you might want to inspect them.

And from subsequent posts I assume you want to test the values
to determine the file type.

> So how would you achieve that in a convenient and non-error prone way?

If I'd be interested in the file type of the data I'd do what
has already been suggested by others, use the 'file' command.
It's the purpose of that command to try to determine the file
type by objective means, or, if that is not unambiguously
possible, by heuristic means.

In case I want to do a more thorough data analysis of such
binary code it applies what I've written upthread about the
need for knowledge about the binary data structures (and use
the tools I mentioned).

Janis

Re: iso646.h

<upikd9$2j68u$1@dont-email.me>

  copy mid

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

  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: Re: iso646.h
Date: Fri, 2 Feb 2024 12:41:28 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <upikd9$2j68u$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <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> <upf9ug$1uf0j$1@dont-email.me>
<upg4ol$22tss$1@dont-email.me> <upg65m$235lp$1@dont-email.me>
<upgc4f$2454d$1@dont-email.me> <upgekv$24gnk$2@dont-email.me>
<JGPuN.297652$PuZ9.135961@fx11.iad> <upgmdd$2605r$1@dont-email.me>
<878r44q73s.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 11:41:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="477ce05e86656f73ba155ebb4f46fbc9";
logging-data="2726174"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191IW9muaCUeRoFPJpSbw6G"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:xC6A8AS/ecrnyepeaQoMIQalA50=
In-Reply-To: <878r44q73s.fsf@nosuchdomain.example.com>
 by: Janis Papanagnou - Fri, 2 Feb 2024 11:41 UTC

On 01.02.2024 21:09, Keith Thompson wrote:
> [...] I would use semicolons instead:
>
> $ if file /tmp/garage.jpg | grep JPEG > /dev/null ; then echo "it is a jpeg" ; fi
> it is a jpeg
>
> (I might also use "grep -q" rather than redirecting to /dev/null.)

And probably also avoid multi-line code (to prevent the ^J confusion)

file /tmp/garage.jpg | grep -q JPEG && echo "it is a jpeg"

Janis


devel / comp.lang.c / iso646.h

Pages:1234567891011121314151617181920212223242526
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor