Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Sendmail may be safely run set-user-id to root. -- Eric Allman, "Sendmail Installation Guide"


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

<up3t8f$3hqqb$1@dont-email.me>

  copy mid

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

  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: richard....@gmail.invalid (Richard Harnden)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Sat, 27 Jan 2024 21:40:31 +0000
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <up3t8f$3hqqb$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>
<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> <up2qse$3c81p$1@dont-email.me>
<up3ode$3h68j$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: Sat, 27 Jan 2024 21:40:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6232fe8ff19966481b7cb0e60e0ba3dd";
logging-data="3730251"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1969bODnH0okq0HVBrFWizQcUllZVyUhck="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tdjJp/dqjiQgAN3vGRU6ddJQlWc=
In-Reply-To: <up3ode$3h68j$1@dont-email.me>
Content-Language: en-GB
 by: Richard Harnden - Sat, 27 Jan 2024 21:40 UTC

On 27/01/2024 20:17, Malcolm McLean wrote:
> You can of course encode any data format as any other as long as you can
> write enough. But standard output can't take images or audio, for example.

What?

stdout is perfectly happy with anything, eg:

$ cat a.out | xxd | head -1
00000000: cffa edfe 0c00 0001 0000 0000 0200 0000 ................

Re: Python (Re: iso646.h)

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

  copy mid

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

  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: Python (Re: iso646.h)
Date: Sat, 27 Jan 2024 22:12:56 +0000
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <87h6iyl91z.fsf@bsb.me.uk>
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> <uop48a$1dmoe$1@dont-email.me>
<87h6j3ak2i.fsf@nosuchdomain.example.com>
<uopcts$1f17i$8@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="45fcda2c27b3c19340f7166fc976a1be";
logging-data="3744559"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dcpAfYpCMO6WoMpfVfWhXEl0KnVUe9yw="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:KDv8qbqfRoSDLwxWkyf4Wm+lXC4=
sha1:RzNbnBAZmqCr7p+Yt5VkQ3KfRYo=
X-BSB-Auth: 1.b58790fce8e0db2de2fe.20240127221256GMT.87h6iyl91z.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 27 Jan 2024 22:12 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Tue, 23 Jan 2024 12:09:09 -0800, Keith Thompson wrote:
>
>> C's predecessor language B ...
>
> Let me see if I understand the genealogy:
>
> B was an adaptation of Martin Richards’ BCPL. BCPL was a low-level,
> typeless language designed for system programming. It originated before
> byte-addressable machines became popular.

> In fact, Richards looked at
> adapting BCPL to the PDP-11, and came away unimpressed with the latter’s
> architecture.

I didn't know that. Do you have a reference I can read?

> So B was BCPL adapted by the Bell Labs crew to work on a byte-addressable
> machine.

Not really. B also worked on words. There were no language changes
aimed at byte addressing. Both B and early BCPL accessed bytes with
library functions. I say early BCPL because, while B evolved in to C,
BCPL also evolved and later acquired a byte access operator, "%", along
with the word access one: "!".

> But it still didn’t have types. And types turned out to be rather
> important to the implementation of a decent OS and accompanying
> software.

Yes. Early C had types, but there were hardly checked. Their main
purposes were to allow structures to be defined and to allow convenient
access to operations that in B and BCPL needed different operators.
Apart from the obvious byte, short, int and long accesses expressed
using * and [..], C could also express integer and floating point
addition with the same operator symbols. BCPL needed separate symbols
for that and could not do mix-mode arithmetic with any ease at all.

> So the Bell Labs came up with the successor language C, which did have
> types.

--
Ben.

Re: Compose Key (was Re: iso646.h)

<pan$4cf4c$2d92e2a2$9044bfb4$943c3815@invalid.invalid>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@invalid.invalid (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: Compose Key (was Re: iso646.h)
Date: Sat, 27 Jan 2024 22:38:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <pan$4cf4c$2d92e2a2$9044bfb4$943c3815@invalid.invalid>
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>
<20240124124839.903@kylheku.com> <uotm3h$2ack6$1@dont-email.me>
<87plxp47oo.fsf@nosuchdomain.example.com> <uouf2s$2em2l$1@dont-email.me>
<uoufm9$2ei7i$4@dont-email.me> <up0hbv$2tdei$1@dont-email.me>
<up17rb$313qt$5@dont-email.me> <up36qs$3e4cr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 27 Jan 2024 22:38:56 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="c6b845f908bdf8e2fdbae83a5494c001";
logging-data="3737614"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/v70DR6E8X4EdcFMlLMhtPebAh0YwdMFk="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:kDmN2Vs26VV+mSEr9Dvb545nv7c=
X-Face: Llanfair­pwllgwyngyllÃ
ƒ‚Ã
ƒƒ‚­gogery­chwyrnÃ
ƒƒ
? ?‚­drobwll­llan
Ã
? ?ƒƒ‚­tysilio­go
g
o­goch
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACh0lEQVRYw71Z21bD
MAzzevbfkr4cHjrSXJyL044+MDa6WLEl2SkvkrZ1AbAvXO+bUGSCPYnsuIVGMpm
ZLnjX718GhAKNsp8lON2F9VrhELwIgJlBepkZjA78rVK+FkmNhEJK76UsJlz8+E
rJsjrpYouhLo/SC6qPHgakFOR8wV9+8rCfO/I/oVnmUZUp42/LW2XkLj9TCFNM9
jp5g2EmHZgpYZjCOkYU7sXVogRylJqpdggoFLG1g09Flah/7kErCxzR9HgXPYsq
0glb9cxjIz2Vsk9AmAoCSxECpD713joMKjQqLAtmMqJmXjdVvlMnMQCVITotJd1
z+fh1f1NNo+vuc1KnhWUmY7t03vydTud9BbXCtN3L2PL3bK7JCNG0GHzuZxafyB
fxevCxpm1vrwZltqw6SILCcdoCE6PGQC8wZWDA9Or7Qp5s3lAZezys0nDazs9S9
R0TjwEiksRxLkNPC1NMMWPs1bj0Ei0Yuo+JVtFLuzP1NRJ16qXWN8DhhtmS4PDg
O6mqRxs4bEJrYt087mSIow/1VzW2oFlMQuiuIy/KsUagvhdw6hSjJGlIavbLF8x
j3X47bccLcUSi0dkWh1nUZNhANT1tHKUXrNxNLbd9KPb9wDDVrKwmPQMOPQ1oy6
k5I1DwzDeRJd3jVIhDAUxq3ngzJG4CCkNXZxZVMcjefoK2J0gUY2S3rxz/RuTFx
2zHd9U+obimJXMG4edsk/2j5pTU5G1MmzbRLxkfq5EiT1GGsidvMGzi+1goGb2l
GCrN+nGnV8xj3q3JLRDVPL96vUc7Z4aJ3TN1mVqWAMJMfG+Jxh6TQqP+92iZkCU
xtglds1AB6r0aiSHKcnFck+p/c/0CbacFLQcajGcAAAAASUVORK5CYII=
 by: Blue-Maned_Hawk - Sat, 27 Jan 2024 22:38 UTC

I just use the compose key for all nonascii because i find it more
convenient to have everything in one place.

--
Blue-Maned_Hawk│shortens to
Hawk│/
blu.mɛin.dÊ°ak/
│he/him/his/himself/Mr.
blue-maned_hawk.srht.site
Despite the fact that you're killing everybody, here's a million dollars.

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

<up46nn$3jb0p$1@dont-email.me>

  copy mid

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

  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: Functional Programming (was Re: iso646.h)
Date: Sun, 28 Jan 2024 00:22:15 +0000
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <up46nn$3jb0p$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 00:22:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9a7809988b6259339b9054d3ca5e0b8";
logging-data="3779609"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fYkdteOdg/evA9JZtC9skJRM4bMaNQGk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:i0Tf7igR0FxeXLbBLQndyzGxMM4=
Content-Language: en-GB
In-Reply-To: <up3q8k$3hbk7$6@dont-email.me>
 by: Malcolm McLean - Sun, 28 Jan 2024 00:22 UTC

On 27/01/2024 20:49, Lawrence D'Oliveiro wrote:
> On Sat, 27 Jan 2024 16:44:28 +0100, David Brown wrote:
>
>> On 27/01/2024 02:10, James Kuyper wrote:
>>
>>> On 1/26/24 12:31, Janis Papanagnou wrote:
>>
>>>> All side effects can be a problem (and should be avoided unless
>>>> "necessary").
>>>
>>> Virtually everything useful that a computer program does qualifies as a
>>> side effect. Side effects cannot be avoided, they can only be
>>> controlled.
>>>
>> Try telling that to Haskell programmers :-)
>
> The dirty little secret of pure-functional programming is that I/O cannot
> be treated in a purely functional fashion.
>
So the model is input - calculation - output.

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

Re: Python (Re: iso646.h)

<up4764$3j7tk$2@dont-email.me>

  copy mid

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

  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: Python (Re: iso646.h)
Date: Sun, 28 Jan 2024 00:29:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <up4764$3j7tk$2@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> <uop48a$1dmoe$1@dont-email.me>
<87h6j3ak2i.fsf@nosuchdomain.example.com> <uopcts$1f17i$8@dont-email.me>
<87h6iyl91z.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 00:29:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="3776436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rMsiD2kA611twR/V4m4Ze"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:Ir//NzCV5W8NkaDWeW7+A2N6iRc=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 00:29 UTC

On Sat, 27 Jan 2024 22:12:56 +0000, Ben Bacarisse wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> In fact, Richards looked at adapting BCPL to the PDP-11, and came away
>> unimpressed with the latter’s architecture.

>I didn't know that. Do you have a reference I can read?

I was trying to look for one, but couldn’t find it. I recall it had
something to do with a report by Richards into the portability of BCPL.

>> So B was BCPL adapted by the Bell Labs crew to work on a
>> byte-addressable machine.
>
> Not really. B also worked on words.

Yeah. According to this
<https://user-web.icecube.wisc.edu/~dglo/c_class/history.html>, it was
used on the PDP-7, and turned out to be unsuitable for the byte-
addressable PDP-11.

Elsewhere I read that B was a very close port of BCPL.

> I say early BCPL because, while B evolved in to C,
> BCPL also evolved and later acquired a byte access operator, "%", along
> with the word access one: "!".

There a was a language used at DEC, called BLISS, which was typeless like
BCPL. But it accessed things as generalized bitfields (I think assuming
the compiler would suitably optimize constant values for offsets and bit
widths). So it worked fine on byte-addressable machines. It was used for
some system software on VMS.

Re: iso646.h

<up478e$3j7tk$3@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 00:31:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <up478e$3j7tk$3@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>
<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> <up2qse$3c81p$1@dont-email.me>
<up3ode$3h68j$1@dont-email.me> <up3t8f$3hqqb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 00:31:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="3776436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lgql9N2WniU0xwDeoP0ii"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:mwXdiaCIWXYKx59ChsT1JY0uud0=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 00:31 UTC

On Sat, 27 Jan 2024 21:40:31 +0000, Richard Harnden wrote:

> $ cat a.out | xxd | head -1 00000000: cffa edfe 0c00 0001 0000 0000 0200
> 0000 ................

UUOC!

Re: iso646.h

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

  copy mid

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

  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: Sat, 27 Jan 2024 16:33:19 -0800
Organization: None to speak of
Lines: 33
Message-ID: <87sf2i1els.fsf@nosuchdomain.example.com>
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>
<up17f9$313qt$4@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<up1j9s$331cv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="8434623738c8ca97fb8c62709c865b07";
logging-data="3782473"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WGnzfm/ZOb9lYr2io7SaQ"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:tg5pN1l7wGcvJjrkHLvXDv5bd9Q=
sha1:nUKRakwDAPtXEniIp6fphaTOigs=
 by: Keith Thompson - Sun, 28 Jan 2024 00:33 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sat, 27 Jan 2024 01:27:55 +0100, Janis Papanagnou wrote:
>
>> On 27.01.2024 00:52, Lawrence D'Oliveiro wrote:
>>
>>> On Fri, 26 Jan 2024 22:46:25 +0100, Janis Papanagnou wrote:
>>>
>>>> Also the stream hierarchy offers design and implementation paths that
>>>> you just don't have with printf().
>>>
>>> And that you don’t need, frankly.
>>
>> Don't be so fast with your judgment. Of course we use it to elegantly
>> and scaleably solve tasks in C++.
>
> But not localization, which is an important issue. printf-style formatting
> allows rearrangement of parts of a message to suit grammar purposes, C++-
> style output operators do not.

I'm reasonably sure you saw my previous followup, in which I pointed out
that (a) ISO C does not support reordering arguments to printf, and (b)
in any language, you can reorder arguments by building a string that you
then send to output.

C++ also lets you define output operators for any type, something that's
much more difficult with printf-style output.

[...]

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

<up47gj$3jfg4$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.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: Sun, 28 Jan 2024 00:35:30 +0000
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <up47gj$3jfg4$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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 00:35:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9a7809988b6259339b9054d3ca5e0b8";
logging-data="3784196"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tPAYqCMGROjqaQO0UGFIi1avUP6t7BfQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Y0ZX1GnMQTJZy/a71v77fjHd+zE=
Content-Language: en-GB
In-Reply-To: <up3r9c$3hbk7$10@dont-email.me>
 by: Malcolm McLean - Sun, 28 Jan 2024 00:35 UTC

On 27/01/2024 21:06, Lawrence D'Oliveiro wrote:
> On Sat, 27 Jan 2024 11:13:16 +0000, Malcolm McLean wrote:
>
>> What I am saying is that standard output can take integers, floats and
>> strings.
>
> You forgot booleans. Also enumerations can be useful.
>
Yes, and we could say fixed point, complex, etc.
It's not inherently a bad idea to extend our little stdout interface to
include booleans. But in fact there are too many output formats you
might need.
Fixed point - in C or C++ there's no standard for that, so now you are
going the OO route. As you would with enumerations as the symbol doesn't
exist at runtime.
It's not that there is no case to be made for the OO approach. What I am
saying is that in practice the locked down restricted interface will
work better.
--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

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

<up4a0t$3jopf$4@dont-email.me>

  copy mid

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

  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: Functional Programming (was Re: iso646.h)
Date: Sun, 28 Jan 2024 01:18:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <up4a0t$3jopf$4@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>
<up46nn$3jb0p$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 01:18:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="3793711"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181lfAboPpJHDAI4fFG7VHS"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:lh4BMWiGSsFZLUAINGGPnxTHLiA=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 01:18 UTC

On Sun, 28 Jan 2024 00:22:15 +0000, Malcolm McLean wrote:

> On 27/01/2024 20:49, Lawrence D'Oliveiro wrote:
>
>> The dirty little secret of pure-functional programming is that I/O
>> cannot be treated in a purely functional fashion.
>>
> So the model is input - calculation - output.

So “functional” is really “procedural-functional-procedural”.

And what happens with interactive code? You need a loop around that
sequence--another procedural construct. And maybe a conditional exit--yet
another procedural construct.

Re: iso646.h

<up4a8j$3jopf$5@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 01:22:28 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <up4a8j$3jopf$5@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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 01:22:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="3793711"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HxYdmyoaQGDHSuXNFopCn"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:MwVrT4bJaSVFmdfanG8MhZwu2/Q=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 01:22 UTC

On Sun, 28 Jan 2024 00:35:30 +0000, Malcolm McLean wrote:

> On 27/01/2024 21:06, Lawrence D'Oliveiro wrote:
>
>> On Sat, 27 Jan 2024 11:13:16 +0000, Malcolm McLean wrote:
>>
>>> What I am saying is that standard output can take integers, floats and
>>> strings.
>>
>> You forgot booleans. Also enumerations can be useful.
>>
> Yes, and we could say fixed point, complex, etc.

Booleans and enumerations (enumerations can be considered a generalization
of booleans) are ones that could usefully be displayed in symbolic form.
Python example:

for i in (1, 2, 3) :
print("%d = %d? %s" % (i, 2, i == 2))
#end for

produces output:

1 = 2? False
2 = 2? True
3 = 2? False

Re: iso646.h

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

  copy mid

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

  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: Sat, 27 Jan 2024 17:26:40 -0800
Organization: None to speak of
Lines: 28
Message-ID: <87jznu1c4v.fsf@nosuchdomain.example.com>
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>
<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>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8434623738c8ca97fb8c62709c865b07";
logging-data="3795946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18spqY7/B3jxKuMLm8vLeoX"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:AfhcF/UJ0ChrmVMIGwZEdwQA4oo=
sha1:OZm5zD2MFCxAW1FBwvZfmPz4sgM=
 by: Keith Thompson - Sun, 28 Jan 2024 01:26 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> On 27/01/2024 21:06, Lawrence D'Oliveiro wrote:
>> On Sat, 27 Jan 2024 11:13:16 +0000, Malcolm McLean wrote:
>>
>>> What I am saying is that standard output can take integers, floats and
>>> strings.
>> You forgot booleans. Also enumerations can be useful.
>>
> Yes, and we could say fixed point, complex, etc.
> It's not inherently a bad idea to extend our little stdout interface
> to include booleans. But in fact there are too many output formats you
> might need.
> Fixed point - in C or C++ there's no standard for that, so now you are
> going the OO route. As you would with enumerations as the symbol
> doesn't exist at runtime.
> It's not that there is no case to be made for the OO approach. What I
> am saying is that in practice the locked down restricted interface
> will work better.

I think you mean it will work Malcolm-better.

Apparently inflexibility and vulnerability to type errors are
Malcolm-better than the alternative.

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

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

  copy mid

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

  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: Sat, 27 Jan 2024 17:31:42 -0800
Organization: None to speak of
Lines: 19
Message-ID: <87fryi1bwh.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@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>
<up17f9$313qt$4@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<up1j9s$331cv$1@dont-email.me> <up397j$3ec59$3@dont-email.me>
<41btN.183056$yEgf.182064@fx09.iad> <up3fu1$3fhg6$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8434623738c8ca97fb8c62709c865b07";
logging-data="3795946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184HQMCWV3SSeKocsbLO0Yr"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:ahkHdXXOR6yOFaxmYprawfK3UJU=
sha1:Ixu7NKfh3qRWahIFF/jhJ0mXL4I=
 by: Keith Thompson - Sun, 28 Jan 2024 01:31 UTC

David Brown <david.brown@hesbynett.no> writes:
> For my own use, I've sometimes used classes letting you do :
>
> debug_log << "X = " << x << " = 0x" << hex(x, 8) << "\n";
>
> "hex(x, 8)" returns a value of a class holding "x" and the number of
> digits 8, and then there is an overload for the << operator on this
> class. No extra state needs to be stored in the logging class, I can
> make as many of these formatters as I like, and the intermediary
> classes all disappear in the optimisation.

Or hex() could just return a std::string.

[...]

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

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.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: Sat, 27 Jan 2024 17:34:00 -0800
Organization: None to speak of
Lines: 22
Message-ID: <87bk961bsn.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@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>
<up17f9$313qt$4@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<up1j9s$331cv$1@dont-email.me> <up397j$3ec59$3@dont-email.me>
<41btN.183056$yEgf.182064@fx09.iad> <up3qqr$3hbk7$8@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8434623738c8ca97fb8c62709c865b07";
logging-data="3795946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18X8Z02Dk0Yd89GNbwsX/2i"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:UbKCev1at/SOTyKG0/2yMmM4gEc=
sha1:uZiKprSlxeiqj3n3bLoXLsdEK/Y=
 by: Keith Thompson - Sun, 28 Jan 2024 01:34 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sat, 27 Jan 2024 17:26:24 GMT, Scott Lurndal wrote:
>> David Brown <david.brown@hesbynett.no> writes:
>>>
>>>Standard printf formatting also does not allow such re-arrangements.
>>>
>> Depends on what standard you use. POSIX certainly does.
>
> C and POSIX go together like a horse and carriage; one without the other
> is a lot less useful.

Which is why horseless carriages never caught on.

Perhaps you could have picked a better analogy. In any case, there are
plenty of non-POSIX C environments -- and comp.unix.programmer is a
great place to discuss POSIX. (Which is not to suggest that we can't
mention POSIX here.)

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

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

  copy mid

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

  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: Sat, 27 Jan 2024 17:34:47 -0800
Organization: None to speak of
Lines: 16
Message-ID: <877cju1brc.fsf@nosuchdomain.example.com>
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> <uorolm$1uaut$1@dont-email.me>
<uotnnt$2akq3$1@dont-email.me> <uou1lg$2c9us$1@dont-email.me>
<875xzh43us.fsf@nosuchdomain.example.com>
<up07tb$2qm2c$1@dont-email.me> <up0lab$2u6hl$2@dont-email.me>
<up0rth$2vbj2$1@dont-email.me> <up10ip$305rf$1@dont-email.me>
<up1efc$32cgl$1@dont-email.me> <up39oe$3ec59$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8434623738c8ca97fb8c62709c865b07";
logging-data="3795946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18M5VA4ZR6RakG6+j03gyH9"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:7TLwWEkao5wDBQEDaKPABSUAL/Y=
sha1:2SxavbGps8m2ziLoT3E1GfJSARw=
 by: Keith Thompson - Sun, 28 Jan 2024 01:34 UTC

David Brown <david.brown@hesbynett.no> writes:
[...]
> Seriously, how hard would it be for you to accept the usage of
> "function" to mean "C function" in this group? How difficult would it
> be for you to try to speak the same language as the rest of us? Do
> you really expect everyone else to adapt to suit your personal choice
> of definitions? How often do you need to go round the same circles
> again and again, instead of trying to communicate with people in a
> sane manner?

You don't really think difficulty is the issue, do you?

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

<up4bt5$3k19q$2@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 01:50:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <up4bt5$3k19q$2@dont-email.me>
References: <uokhnk$eiln$1@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> <up17f9$313qt$4@dont-email.me>
<up197h$31jct$1@dont-email.me> <up1gkb$32k8k$4@dont-email.me>
<up1imc$32upd$1@dont-email.me> <up1j9s$331cv$1@dont-email.me>
<up397j$3ec59$3@dont-email.me> <41btN.183056$yEgf.182064@fx09.iad>
<up3qqr$3hbk7$8@dont-email.me> <87bk961bsn.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 01:50:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="3802426"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uFWDRhQfpD1dZuuOB9LUm"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:Dz40JhONomDw2qEEPjTb+Umfwkk=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 01:50 UTC

On Sat, 27 Jan 2024 17:34:00 -0800, Keith Thompson wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> C and POSIX go together like a horse and carriage; one without the
>> other is a lot less useful.
>
> Which is why horseless carriages never caught on.

No, they never did. Until something was invented ... what was it ...
something to do with “horsepower” ...

Re: iso646.h

<8734ui1aww.fsf@nosuchdomain.example.com>

  copy mid

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

  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: Sat, 27 Jan 2024 17:53:03 -0800
Organization: None to speak of
Lines: 17
Message-ID: <8734ui1aww.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@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>
<up17f9$313qt$4@dont-email.me> <up197h$31jct$1@dont-email.me>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<up1j9s$331cv$1@dont-email.me> <up397j$3ec59$3@dont-email.me>
<41btN.183056$yEgf.182064@fx09.iad> <up3qqr$3hbk7$8@dont-email.me>
<87bk961bsn.fsf@nosuchdomain.example.com>
<up4bt5$3k19q$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="8434623738c8ca97fb8c62709c865b07";
logging-data="3795946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+29z5YY9jQ3yHmYwVbD4pq"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:pAzIBbPpNKhJ+hAg+RbYCE95MJA=
sha1:rMluJVwR2StEbcUnUpNKUiHR6kA=
 by: Keith Thompson - Sun, 28 Jan 2024 01:53 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sat, 27 Jan 2024 17:34:00 -0800, Keith Thompson wrote:
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>> C and POSIX go together like a horse and carriage; one without the
>>> other is a lot less useful.
>>
>> Which is why horseless carriages never caught on.
>
> No, they never did. Until something was invented ... what was it ...
> something to do with “horsepower” ...

*whoosh*

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

<up4ceh$3k4b8$1@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 01:59:43 +0000
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <up4ceh$3k4b8$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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 01:59:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9a7809988b6259339b9054d3ca5e0b8";
logging-data="3805544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uf0gDAjzhO8msRIhc8Lnq6A/c3jswH2c="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:mVY09WiC4BYgFgxKJ+WvP7nj16g=
Content-Language: en-GB
In-Reply-To: <87jznu1c4v.fsf@nosuchdomain.example.com>
 by: Malcolm McLean - Sun, 28 Jan 2024 01:59 UTC

On 28/01/2024 01:26, Keith Thompson wrote:
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>> On 27/01/2024 21:06, Lawrence D'Oliveiro wrote:
>>> On Sat, 27 Jan 2024 11:13:16 +0000, Malcolm McLean wrote:
>>>
>>>> What I am saying is that standard output can take integers, floats and
>>>> strings.
>>> You forgot booleans. Also enumerations can be useful.
>>>
>> Yes, and we could say fixed point, complex, etc.
>> It's not inherently a bad idea to extend our little stdout interface
>> to include booleans. But in fact there are too many output formats you
>> might need.
>> Fixed point - in C or C++ there's no standard for that, so now you are
>> going the OO route. As you would with enumerations as the symbol
>> doesn't exist at runtime.
>> It's not that there is no case to be made for the OO approach. What I
>> am saying is that in practice the locked down restricted interface
>> will work better.
>
> I think you mean it will work Malcolm-better.
>
> Apparently inflexibility and vulnerability to type errors are
> Malcolm-better than the alternative.
>
Exactly.
Inflexibility can be better. Because in reality most program work with a
restricted set of data types which it makes sense to pass to a text
stream, and so you only need three atomic types.

Tpye errors are of course a nuisance with printf(). But that's because
of the quirks of C, not because it takes a restricted set of types, and
you can write a different restricted interface without this problem.

The fact is that printf(), which works basically as I recommend, is
widely used as the interface to standard output, and often OO
alternatives are available and not used for various reasons.

So the world is in fact "Malcolm better".

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

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

<up4cr9$3k4b8$2@dont-email.me>

  copy mid

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

  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: Functional Programming (was Re: iso646.h)
Date: Sun, 28 Jan 2024 02:06:33 +0000
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <up4cr9$3k4b8$2@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>
<up46nn$3jb0p$1@dont-email.me> <up4a0t$3jopf$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 02:06:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9a7809988b6259339b9054d3ca5e0b8";
logging-data="3805544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0+s8rCasQixjR2LuBIQVYNn253h1QYTs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:LjCwEK2UGK8ri2aPekvcXvC+5G8=
In-Reply-To: <up4a0t$3jopf$4@dont-email.me>
Content-Language: en-GB
 by: Malcolm McLean - Sun, 28 Jan 2024 02:06 UTC

On 28/01/2024 01:18, Lawrence D'Oliveiro wrote:
> On Sun, 28 Jan 2024 00:22:15 +0000, Malcolm McLean wrote:
>
>> On 27/01/2024 20:49, Lawrence D'Oliveiro wrote:
>>
>>> The dirty little secret of pure-functional programming is that I/O
>>> cannot be treated in a purely functional fashion.
>>>
>> So the model is input - calculation - output.
>
> So “functional” is really “procedural-functional-procedural”.
>
> And what happens with interactive code? You need a loop around that
> sequence--another procedural construct. And maybe a conditional exit--yet
> another procedural construct.
>
Exactly. Some programs essentially calculate something. The data is
input, transformed, and you get output. But others don't. They provide a
virual world which the user can manipulate. The calculations and data
transformations are often pretty trivial, and all the programming effort
is in supporting the user interface. And so you need a different
conceptual model.
--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: iso646.h

<up4f8b$3kfg0$1@dont-email.me>

  copy mid

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

  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: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Sat, 27 Jan 2024 18:47:39 -0800
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <up4f8b$3kfg0$1@dont-email.me>
References: <uokhnk$eiln$1@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> <up17f9$313qt$4@dont-email.me>
<up197h$31jct$1@dont-email.me> <up1gkb$32k8k$4@dont-email.me>
<up1imc$32upd$1@dont-email.me> <up1j9s$331cv$1@dont-email.me>
<up397j$3ec59$3@dont-email.me> <41btN.183056$yEgf.182064@fx09.iad>
<up3qqr$3hbk7$8@dont-email.me> <87bk961bsn.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 02:47:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9fe4cfb1338e5b9f0f0e57f1cea759c7";
logging-data="3816960"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FkDXm3KgxITd/TOWkQuGYnzxZtjhfTxI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VwvMjV9ZkKaW21P35FHRSucXMi4=
Content-Language: en-US
In-Reply-To: <87bk961bsn.fsf@nosuchdomain.example.com>
 by: Chris M. Thomasson - Sun, 28 Jan 2024 02:47 UTC

On 1/27/2024 5:34 PM, Keith Thompson wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>> On Sat, 27 Jan 2024 17:26:24 GMT, Scott Lurndal wrote:
>>> David Brown <david.brown@hesbynett.no> writes:
>>>>
>>>> Standard printf formatting also does not allow such re-arrangements.
>>>>
>>> Depends on what standard you use. POSIX certainly does.
>>
>> C and POSIX go together like a horse and carriage; one without the other
>> is a lot less useful.
>
> Which is why horseless carriages never caught on.

:^D

>
> Perhaps you could have picked a better analogy. In any case, there are
> plenty of non-POSIX C environments -- and comp.unix.programmer is a
> great place to discuss POSIX. (Which is not to suggest that we can't
> mention POSIX here.)
>

Re: iso646.h

<up4sc0$3psd2$1@dont-email.me>

  copy mid

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

  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: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Sun, 28 Jan 2024 01:31:28 -0500
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <up4sc0$3psd2$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 06:31:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3b0ef6111eedf09629c49021295eaefc";
logging-data="3994018"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DrxzDlvJ/TCNRaTt2/7MRnYTqQD0mq4g="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:CRBBw4w6NkrHRK+swuk0uKZifcs=
Content-Language: en-US
In-Reply-To: <up38cs$3ec59$2@dont-email.me>
 by: James Kuyper - Sun, 28 Jan 2024 06:31 UTC

On 1/27/24 10:44, David Brown wrote:
> On 27/01/2024 02:10, James Kuyper wrote:
>> On 1/26/24 12:31, Janis Papanagnou wrote:
>
>>> All side effects can be a problem (and should be avoided
>>> unless "necessary").
>>
>> Virtually everything useful that a computer program does qualifies as a
>> side effect. Side effects cannot be avoided, they can only be controlled.
>>
>
> Try telling that to Haskell programmers :-)

I was talking very specifically in reference to C's definition of
"side-effect". I'm not particularly familiar with Haskell - does it have
a different definition of "side effect", or does it somehow get
something useful done without qualifying under C's definition? If so, how?

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

<up5e54$3t99q$2@dont-email.me>

  copy mid

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

  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: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Functional Programming (was Re: iso646.h)
Date: Sun, 28 Jan 2024 12:35:00 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <up5e54$3t99q$2@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 11:35:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f1cb5a483529a30a7360981bcf31d1cc";
logging-data="4105530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Exwyju23vn+2zAmGzh0WbK68g1m6an94="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:DS3bHr/ITYfO8SQDMEAsADnr2U4=
In-Reply-To: <up3q8k$3hbk7$6@dont-email.me>
Content-Language: en-GB
 by: David Brown - Sun, 28 Jan 2024 11:35 UTC

On 27/01/2024 21:49, Lawrence D'Oliveiro wrote:
> On Sat, 27 Jan 2024 16:44:28 +0100, David Brown wrote:
>
>> On 27/01/2024 02:10, James Kuyper wrote:
>>
>>> On 1/26/24 12:31, Janis Papanagnou wrote:
>>
>>>> All side effects can be a problem (and should be avoided unless
>>>> "necessary").
>>>
>>> Virtually everything useful that a computer program does qualifies as a
>>> side effect. Side effects cannot be avoided, they can only be
>>> controlled.
>>>
>> Try telling that to Haskell programmers :-)
>
> The dirty little secret of pure-functional programming is that I/O cannot
> be treated in a purely functional fashion.

It can - you just have to have the IO world as an input and an output to
your function.

I must admit that I have never done any IO in a functional programming
language. All my usage has been with "pure" functions, and it is also
quite out of date.

Re: iso646.h

<up5egb$3t99q$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.bbs.nz!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: Sun, 28 Jan 2024 12:40:59 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <up5egb$3t99q$3@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> <up4sc0$3psd2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 11:40:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f1cb5a483529a30a7360981bcf31d1cc";
logging-data="4105530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XaMVGaXWs2JGGCPS7ixl80qeAYx/7BDo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:RSYtBSjtNq0G79RmGnkTByGtGvc=
Content-Language: en-GB
In-Reply-To: <up4sc0$3psd2$1@dont-email.me>
 by: David Brown - Sun, 28 Jan 2024 11:40 UTC

On 28/01/2024 07:31, James Kuyper wrote:
> On 1/27/24 10:44, David Brown wrote:
>> On 27/01/2024 02:10, James Kuyper wrote:
>>> On 1/26/24 12:31, Janis Papanagnou wrote:
>>
>>>> All side effects can be a problem (and should be avoided
>>>> unless "necessary").
>>>
>>> Virtually everything useful that a computer program does qualifies as a
>>> side effect. Side effects cannot be avoided, they can only be controlled.
>>>
>>
>> Try telling that to Haskell programmers :-)
>
> I was talking very specifically in reference to C's definition of
> "side-effect". I'm not particularly familiar with Haskell - does it have
> a different definition of "side effect", or does it somehow get
> something useful done without qualifying under C's definition? If so, how?
>

Pure functional programming does not have side-effects, at least not in
the way we are familiar with in C. There are various techniques used by
different functional programming languages to do things like IO, but
that's all way off-topic (and beyond my knowledge and understanding).

Re: iso646.h

<up5f1m$3t99q$4@dont-email.me>

  copy mid

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

  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: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Sun, 28 Jan 2024 12:50:14 +0100
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <up5f1m$3t99q$4@dont-email.me>
References: <uokhnk$eiln$1@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> <up17f9$313qt$4@dont-email.me>
<up197h$31jct$1@dont-email.me> <up1gkb$32k8k$4@dont-email.me>
<up1imc$32upd$1@dont-email.me> <up1j9s$331cv$1@dont-email.me>
<up397j$3ec59$3@dont-email.me> <41btN.183056$yEgf.182064@fx09.iad>
<up3fu1$3fhg6$2@dont-email.me> <87fryi1bwh.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 11:50:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f1cb5a483529a30a7360981bcf31d1cc";
logging-data="4105530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yUC+AIy7DEXwACCA6XRbPDO7rHVoTW4c="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:dfc+DGFQc6FaLofJIKMuS8sErfQ=
In-Reply-To: <87fryi1bwh.fsf@nosuchdomain.example.com>
Content-Language: en-GB
 by: David Brown - Sun, 28 Jan 2024 11:50 UTC

On 28/01/2024 02:31, Keith Thompson wrote:
> David Brown <david.brown@hesbynett.no> writes:
>> For my own use, I've sometimes used classes letting you do :
>>
>> debug_log << "X = " << x << " = 0x" << hex(x, 8) << "\n";
>>
>> "hex(x, 8)" returns a value of a class holding "x" and the number of
>> digits 8, and then there is an overload for the << operator on this
>> class. No extra state needs to be stored in the logging class, I can
>> make as many of these formatters as I like, and the intermediary
>> classes all disappear in the optimisation.
>
> Or hex() could just return a std::string.
>

Yes. That can make the coding a lot simpler, and very flexible. But it
comes at a cost - in my type of work, I don't want any dynamic memory
unless it is absolutely unavoidable, and I want results to be as
efficient as practically possible. On the other hand, I don't need the
generality that you would have in a larger and more general purpose
framework. That all means tighter connections between the "log" class
and the functions handling these outputs.

(One possibility that is not bad is to have support for handling
fixed-length strings, rather than std::string. Real implementations of
this kind of thing are more complicated, with templates and all, and
well outside of c.l.c.)

Re: iso646.h

<up5f80$3t99q$5@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 12:53:36 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <up5f80$3t99q$5@dont-email.me>
References: <uokhnk$eiln$1@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> <up17f9$313qt$4@dont-email.me>
<up197h$31jct$1@dont-email.me> <up1gkb$32k8k$4@dont-email.me>
<up1imc$32upd$1@dont-email.me> <up1j9s$331cv$1@dont-email.me>
<up397j$3ec59$3@dont-email.me> <41btN.183056$yEgf.182064@fx09.iad>
<up3qqr$3hbk7$8@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 11:53:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f1cb5a483529a30a7360981bcf31d1cc";
logging-data="4105530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MHfO9aDW4gCjCEBrAYspYs5WwZ+xL11M="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:OUVfkIE3NmUqoCW3vc7iay8qU6E=
Content-Language: en-GB
In-Reply-To: <up3qqr$3hbk7$8@dont-email.me>
 by: David Brown - Sun, 28 Jan 2024 11:53 UTC

On 27/01/2024 21:59, Lawrence D'Oliveiro wrote:
> On Sat, 27 Jan 2024 17:26:24 GMT, Scott Lurndal wrote:
>
>> David Brown <david.brown@hesbynett.no> writes:
>>>
>>> Standard printf formatting also does not allow such re-arrangements.
>>>
>> Depends on what standard you use. POSIX certainly does.
>
> C and POSIX go together like a horse and carriage; one without the other
> is a lot less useful.

To the nearest percent, 0% of all systems running C programs support
POSIX (or Windows, or any other "big" system). The world of small
embedded systems totally outweigh "big" systems by many orders of
magnitude. And perhaps 80% of such small systems are programmed in C.

It's fine to use POSIX functions when your target is POSIX. But the
target for C programmers is not always POSIX.

Re: iso646.h

<up5fk6$3t99q$6@dont-email.me>

  copy mid

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

  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: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Sun, 28 Jan 2024 13:00:06 +0100
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <up5fk6$3t99q$6@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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 12:00:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f1cb5a483529a30a7360981bcf31d1cc";
logging-data="4105530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GBje+1AKQIB0g3wgFbYqaWLiGDpU4agQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:7LEBgMoYaut5pYCFIDIzzNcGQJE=
In-Reply-To: <up4ceh$3k4b8$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Sun, 28 Jan 2024 12:00 UTC

On 28/01/2024 02:59, Malcolm McLean wrote:
> On 28/01/2024 01:26, Keith Thompson wrote:
>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>> On 27/01/2024 21:06, Lawrence D'Oliveiro wrote:
>>>> On Sat, 27 Jan 2024 11:13:16 +0000, Malcolm McLean wrote:
>>>>
>>>>> What I am saying is that standard output can take integers, floats and
>>>>> strings.
>>>> You forgot booleans. Also enumerations can be useful.
>>>>
>>> Yes, and we could say fixed point, complex, etc.
>>> It's not inherently a bad idea to extend our little stdout interface
>>> to include booleans. But in fact there are too many output formats you
>>> might need.
>>> Fixed point - in C or C++ there's no standard for that, so now you are
>>> going the OO route. As you would with enumerations as the symbol
>>> doesn't exist at runtime.
>>> It's not that there is no case to be made for the OO approach. What I
>>> am saying is that in practice the locked down restricted interface
>>> will work better.
>>
>> I think you mean it will work Malcolm-better.
>>
>> Apparently inflexibility and vulnerability to type errors are
>> Malcolm-better than the alternative.
>>
> Exactly.
> Inflexibility can be better. Because in reality most program work with a
> restricted set of data types which it makes sense to pass to a text
> stream, and so you only need three atomic types.
>
> Tpye errors are of course a nuisance with printf(). But that's because
> of the quirks of C, not because it takes a restricted set of types, and
> you can write a different restricted interface without this problem.
>
> The fact is that printf(), which works basically as I recommend, is
> widely used as the interface to standard output, and often OO
> alternatives are available and not used for various reasons.
>
> So the world is in fact "Malcolm better".
>

You mean the Malcolm-world is Malcolm-better with these restrictions,
because in the Malcolm-world the only programming tasks that are done
are Malcolm-tasks, and the programmers are all Malcolm-programmers.

At least that's all cleared up nicely, and the rest of the world can go
back to using more than three types, and generating outputs that are not
just ASCII text.


devel / comp.lang.c / iso646.h

Pages:1234567891011121314151617181920212223242526
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor