Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Successful and fortunate crime is called virtue. -- Seneca


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

<up5fog$3t99q$7@dont-email.me>

  copy mid

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

  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 13:02:24 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <up5fog$3t99q$7@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> <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> <877cju1brc.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 12:02:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f1cb5a483529a30a7360981bcf31d1cc";
logging-data="4105530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19exNDMHdkw1fFkS3/9WzVhAFrPWiDKzsU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:JZleCJWoXDQU9BgWpKs4GJq2RS0=
In-Reply-To: <877cju1brc.fsf@nosuchdomain.example.com>
Content-Language: en-GB
 by: David Brown - Sun, 28 Jan 2024 12:02 UTC

On 28/01/2024 02:34, Keith Thompson wrote:
> 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?
>

No, it was just a figure of speech.

Re: Localization (was Re: iso646.h)

<up5q1o$3v9gc$1@dont-email.me>

  copy mid

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

  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: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: Localization (was Re: iso646.h)
Date: Sun, 28 Jan 2024 15:57:59 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <up5q1o$3v9gc$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>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<up1j9s$331cv$1@dont-email.me> <up2kpl$3baan$1@dont-email.me>
<up3qp1$3hbk7$7@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 14:58:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="adbcb231502fa57d41a0f8cccbd0d1d6";
logging-data="4171276"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181bi3znd/EVv9kdtZAPpmn"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:5hy5cxEYFycTGWAr1asx2UuPjV4=
In-Reply-To: <up3qp1$3hbk7$7@dont-email.me>
 by: Janis Papanagnou - Sun, 28 Jan 2024 14:57 UTC

On 27.01.2024 21:58, Lawrence D'Oliveiro wrote:
> On Sat, 27 Jan 2024 11:09:56 +0100, Janis Papanagnou wrote:
>
>> What I [think to] know is that simple word permutations don't help for
>> general cases of localization, so printf would just work for some
>> primitive application special cases.
>
> In a project I worked on some years ago, I devised a custom string-
> templating scheme for localization purposes, using keywords to represent
> the variable bits. We got as far as handling Japanese and Chinese, plus a
> few European languages. [...]

Allow me to say; this sounds very impressive to me!

Janis

Re: iso646.h

<up5u8c$blo$1@dont-email.me>

  copy mid

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

  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 16:09:47 +0000
Organization: A noiseless patient Spider
Lines: 61
Message-ID: <up5u8c$blo$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>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$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 16:09:48 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9a96cb9e186eace9e5fe757c18f0ec3";
logging-data="11960"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186pfv3kjtBrLeKN94R/rRuaDDywKvyh9U="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:CSLdKcS/SYqZogH80ezxEci9yLI=
Content-Language: en-GB
In-Reply-To: <up5fk6$3t99q$6@dont-email.me>
 by: Malcolm McLean - Sun, 28 Jan 2024 16:09 UTC

On 28/01/2024 12:00, David Brown wrote:
> 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.
>
You put non-ASCII text on stdout?
I mean, obviously in a program for international use itself. But in
routine program for general use?

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

[OT] Usefulness of OO/C++/features (was Re: iso646.h)

<up5up9$gsd$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: [OT] Usefulness of OO/C++/features (was Re: iso646.h)
Date: Sun, 28 Jan 2024 17:18:48 +0100
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <up5up9$gsd$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>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<f%atN.183055$yEgf.134580@fx09.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 16:18:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="44d34a19665680419e4f6e363fe94975";
logging-data="17293"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JVXsG9CqlHfvT9UqUaOER"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:zQtyR9QArIIUid2w1mPpRLlQlSc=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <f%atN.183055$yEgf.134580@fx09.iad>
 by: Janis Papanagnou - Sun, 28 Jan 2024 16:18 UTC

On 27.01.2024 18:24, Scott Lurndal wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>
> As someone who as programmed daily in C++ since 1989, usually

I started C++ around the same time, actually since C++'s beginning,
so probably only few years earlier. But today I use C++ only in my
private context since, professionally, I'm not programming any more.

> in performance sensitive code, I've never found the C++ input
> and output operators useful.

I'm sure whether one finds a language (or features of a language)
useful certainly depends on various factors; education, the area
of work, the specific company (including its culture), and own
personality (own experiences, and personal background, where from
one comes).

This is why I think it makes no sense to start a dispute here.
Either you have experienced the advantages, or you haven't, or only
partly.

> The run-time cost both in space
> and time is far more than the *printf formatting functions,
> and they're less flexible when the formatting changes based,
> e.g., on locale.

Runtime costs and memory space considerations had been relevant
in my DSP assembler deep-space-satellite-communication project
(in the late 1980's).

In my C++ projects it was irrelevant whether language feature A
was 10% faster or slower compared to language feature B. There
were other factors that influenced performance; like complexity
of the algorithmic solutions. And there were other requirements
that had precedence anyway; like robust and extensible designs.
Amongst many other things.

So all I can do, if you like - but I don't know whether it helps
you, since your experiences and background certainly differs -,
is to illustrate it with a small project where specifically the
feature of discussion helped to a clear and extensible design,
simply to use and integrate; a flexibility and robust solution.

In C++ I implemented an Application Management Interface - that was
already 30 years ago, before Java provided some library like that -
that made it possible to control any object instance in a software
component by (informally written) "interface.register(item)", and
you could then interrogate or change state of such registered items
asynchronously during runtime by exchanging the de-/linearized data
through some text oriented IPC channel. There was no need to adjust
application logic and no functional dependencies. It was transparent
WRT the type of object (it could be, say, a primitive 'int' counter
or a complex 'Car' object); items of any complexity and type could
be controlled through any stream based communication interface. The
only precondition was that the object class provides operators '<<'
and '>>' for de-/serialization (and these operators were anyway
defined in our contexts, for obvious reasons), and (IIRC) that it
had the property "controllable" (an interface derivation). Thanks
to OO principles and (beside other features) C++'s '<<' operator.

(I don't want to imagine such functionality with printf and all
it's impact to the rest of the program system.)

>
>>
>> Java (as a newer language) has also some advantages, but was in many
>> respects far behind C++ (IMO).
>
> Wow, that's a strong statement. What led you to hold that opinion?

Experience with many programming languages (including Java), and
a pair of open eyes, and an open mind.

>
> Java, as a language, was rather well designed.

(It would have never occurred to me to to make such a statement.)

> The run-time costs,
> however, precluded the use of Java in most of the projects that I've
> worked on since Java was introduced.

This is just one observation. But, yes.

Janis

[OT] Re: Java (was Re: iso646.h)

<up605m$ogg$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: [OT] Re: Java (was Re: iso646.h)
Date: Sun, 28 Jan 2024 17:42:29 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <up605m$ogg$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>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<f%atN.183055$yEgf.134580@fx09.iad> <up3r4r$3hbk7$9@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 16:42:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="331f2cb60212418c205fa1c67917b09e";
logging-data="25104"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GZh75VpG4x+WvClheb0Hx"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:er8UQNnP6/S9QwZEi8syZMkQNNo=
In-Reply-To: <up3r4r$3hbk7$9@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Sun, 28 Jan 2024 16:42 UTC

On 27.01.2024 22:04, Lawrence D'Oliveiro wrote:
> [...]
> In Java, as in Python, all class instances are allocated on the heap.
> Therefore the word “new” becomes superfluous. And so Python gets rid of
> it, reducing class instantiation to what looks like a function call on the
> class name.
>
> Yet Java keeps the requirement to say “new”. Why?

If the "Why?" refers to the word "keeps" then the answer seems
obvious; compatibility, to not break existing code.
If you're asking why "in the first place" they introduced it; I
suppose to differentiate it from simple types, and to indicate
that such objects are subject to the garbage collector (when
getting unused).
Maybe it's useful to know how Simula (first OO language, thus
probably a paragon for other language designs) did it. Here you
had simple types (integer, real, character, etc.), the special
type 'text' (a string class but used also like a primitive one),
and the complex class types. The latter had an own declaration
syntax 'ref(class)name' and own ref-assignments ':-' as opposed
to value-assignments ':=', own comparison operators, and they
are subject to garbage collection. This appears to some degree
to be similar to Java.

But personally I don't mind the 'new' keyword in Java anyway.
Languages shall make it possible to produce readable code; with
Java I can do that (and probably even better than in C), so that
is not what prevents me from choosing Java.

Janis

Re: iso646.h

<up61a9$sj2$1@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 18:02:01 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <up61a9$sj2$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>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 17:02:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="adbcb231502fa57d41a0f8cccbd0d1d6";
logging-data="29282"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180l5xd64lEVBuyTVZz7w6e"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:ujomh0m2tGXTjxMTgmMBGChc30s=
In-Reply-To: <up5fk6$3t99q$6@dont-email.me>
 by: Janis Papanagnou - Sun, 28 Jan 2024 17:02 UTC

On 28.01.2024 13:00, David Brown wrote:
> On 28/01/2024 02:59, Malcolm McLean wrote:
>> [...]
>
> 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.

Meanwhile I understand why Malcolm'isms have been introduced here
(as had been explained to me in another post). :-)

Janis

Re: iso646.h

<up61it$101s$1@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 18:06:36 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <up61it$101s$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>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 17:06:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="adbcb231502fa57d41a0f8cccbd0d1d6";
logging-data="32828"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GP4rzCzJ2iP8Vsdudjmji"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:6VsAOzd0Ymlkp+Nf9MC3/hvv68A=
In-Reply-To: <up5u8c$blo$1@dont-email.me>
 by: Janis Papanagnou - Sun, 28 Jan 2024 17:06 UTC

On 28.01.2024 17:09, Malcolm McLean wrote:
> On 28/01/2024 12:00, David Brown wrote:
[...]
> You put non-ASCII text on stdout?

Of course. - Hadn't that already been explained before?

> I mean, obviously in a program for international use itself. But in
> routine program for general use?

The meaning of "general use" is typically to be a sort of general one,
not one that is (artificially) restricted ("ASCII" vs. "non-ASCII").

Janis

Re: iso646.h

<up62gn$15e5$1@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 18:22:30 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <up62gn$15e5$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 17:22:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="adbcb231502fa57d41a0f8cccbd0d1d6";
logging-data="38341"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xeZ03Dv5auqq+2OEC2EdR"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:zBO7u/pmgydbqY/SjY8lCeFqrbY=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <up3ode$3h68j$1@dont-email.me>
 by: Janis Papanagnou - Sun, 28 Jan 2024 17:22 UTC

On 27.01.2024 21:17, Malcolm McLean wrote:

> Standard output is any sequence of ASCII characters.

Nonsense.

> printf() is the
> main C interface to that, and supports integers, floats and strings, to
> a first approximation.

It's not an approximation; printf() is _restricted_ to these types (and
a few more variants of these few basic types, to be correct).

In an OO context you would not unnecessarily restrict yourself. (Unless
you don't know better.)

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

Standard output is an I/O channel; I can send to it non-text data like
the ones you mention. (Just imagine you couldn't send UTF-8 text data.)

> The OO method is to allow the stream to be extended. So, in one common
> system, we might have a "decimal" stream which takes floats and outputs in
> the format 123.456. Then we could derive a different type of stream from
> that which outputs floats as 1.23456e2. [...]

Nonsense. - You seem to have never really learned or understood OO or
what streams in C++ actually are.

Janis

> [...]

Re: iso646.h

<up63u2$1cu4$1@dont-email.me>

  copy mid

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

  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: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Sun, 28 Jan 2024 18:46:41 +0100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <up63u2$1cu4$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> <up1cel$31tli$3@dont-email.me>
<871qa33bns.fsf@nosuchdomain.example.com> <up1gis$32k8k$3@dont-email.me>
<up1i2k$32sep$1@dont-email.me> <88atN.38355$Wbff.37621@fx37.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 17:46:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="adbcb231502fa57d41a0f8cccbd0d1d6";
logging-data="46020"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mI/SyjwH2wpyfzmXbAKOZ"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:CJaX5ctT78NYXByeoCgkgyiP4SM=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <88atN.38355$Wbff.37621@fx37.iad>
 by: Janis Papanagnou - Sun, 28 Jan 2024 17:46 UTC

On 27.01.2024 17:25, Scott Lurndal wrote:
>
> how is
>
> cout << std::hex << std::setw((bits + 3)/4) << value << std::eol;

You forgot the first "std::" (if you wanted to make it appear complex)

std::cout << std::hex << std::setw((bits + 3)/4) << value << std::endl;

but I prefer for readability anyway the simpler form (implying 'using')

cout << hex << setw((bits + 3)/4) << value << endl;

>
> better than
>
> printf("%*x\n", (bits+3/4), value);

It's an extensible and less error prone framework in C++ as opposed
to a restricted and error prone feature in the C base. (I recently
gave an application example with some typical advantages visible in
another post here.)

But personally I had never been a fan of the stream manipulators;
I always had to look them up in the documentation (when needed).
Luckily they were rarely necessary in my contexts, so it didn't
bother me much. (OTOH, I also have look up the %x.y modifiers in
FP output format, that I also rarely use. So not much difference.)

The question of flexibility of the OO features (compared e.g. to the
restricted C printf() features) had always been of larger relevance.

Janis

Re: iso646.h

<up6655$1l8b$2@dont-email.me>

  copy mid

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

  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 19:24:37 +0100
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <up6655$1l8b$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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 18:24:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f1cb5a483529a30a7360981bcf31d1cc";
logging-data="54539"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+V6VcFTxDIemsXexUj3gm84p2EOcZazqU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:mfGg0FQNBThVB72KNRM8AO+sbKQ=
In-Reply-To: <up5u8c$blo$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Sun, 28 Jan 2024 18:24 UTC

On 28/01/2024 17:09, Malcolm McLean wrote:
> On 28/01/2024 12:00, David Brown wrote:
>> 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.
>>
> You put non-ASCII text on stdout?
> I mean, obviously in a program for international use itself. But in
> routine program for general use?
>

I commonly write out in UTF-8 - it does not have to be "international".
(I assume that by "international" you, as a good Brit, mean "not UK".
After all, a program written solely for use in Norwegian is not
international.)

Sometimes I will have binary data of some kind on the standard output.
It's a lot less common, but it happens. A common example would be code
for generating images or other files for a webserver.

Most of my "real" programs, rather than small utilities, are for
embedded systems where the concept of "standard output" is not really
the same as for PC's.

Re: iso646.h

<up692h$28q6$1@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 20:14:24 +0100
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <up692h$28q6$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> <up0vec$2vv0k$1@dont-email.me>
<up188s$31e8n$1@dont-email.me> <up38aj$3ec59$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 19:14:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="adbcb231502fa57d41a0f8cccbd0d1d6";
logging-data="74566"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198MztShBCnL5DaRSGgvqvN"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:/vInRv8t+NdmkzKoSO2shaY6roc=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <up38aj$3ec59$1@dont-email.me>
 by: Janis Papanagnou - Sun, 28 Jan 2024 19:14 UTC

On 27.01.2024 16:43, David Brown wrote:
> On 26/01/2024 22:30, Janis Papanagnou wrote:
>> On 26.01.2024 19:59, David Brown wrote:
>>>
>> A computer scientist or a sophisticated programmer would know that
>> there are run-times associated in such expressions:
>>
>> cout << "S1" << f1() << "S2" << f2() << "S3" << f3();
>>
>> t1 t2 t3 t4 t5 t6 t7 t8 t9
>>
>
> The experienced or knowledgable C++ programmer (prior to C++17) would
> know that the parts here are not necessarily executed in the order you
> give.

And that was not intended in that representation. It was to show
where "time factors" are "hidden". (And if I had the intention I
could also have chosen 'dt1' instead of the inaccurate 't1' to
indicate that.) Sorry if that confuses you. I hoped that together
with the text it would be more informative (than confusing).
If one sees the time demands, and has read about our consensus
about evaluation order above (it was repeatedly stated!) there
should be no misunderstanding (or so I thought at least).

> [...]
>
>> That's why somewhat experienced programmers would not write above
>> code that way; something like "run_tests()" is (typically) or can be
>> very time consuming, so they'd do
>> t0 = get_time(); res = run_tests(); t1 = get_time();
>> cout << ... etc.
>
> Of course.

You can serialize (as I suggested previously as one example) or
embed functions like take_time(run_tests()) as another example.

>
> In practice, they could still be badly wrong even with that code -
> there's a lot of subtle points to consider when trying to time code, and
> my experience is that very few programmers get it entirely right.

Really? - I mostly had to do with folks, even newbies with a
proper CS education, who had enough experience or knowledge.
Most problems appeared in contexts where the used languages
have inherent design issues; not in any case we could avoid
use of such languages in the first place.

Janis

[...]

Re: iso646.h

<up695s$28q6$2@dont-email.me>

  copy mid

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

  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: Sun, 28 Jan 2024 20:16:12 +0100
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <up695s$28q6$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> <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> <up1hom$32rbe$1@dont-email.me>
<up3c08$3evpe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Jan 2024 19:16:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="adbcb231502fa57d41a0f8cccbd0d1d6";
logging-data="74566"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fsvmWWS5vZEsRRcJLAvQ0"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:27ITjuyOViAaJiRmQrZXPd4B2+A=
In-Reply-To: <up3c08$3evpe$1@dont-email.me>
 by: Janis Papanagnou - Sun, 28 Jan 2024 19:16 UTC

On 27.01.2024 17:46, David Brown wrote:
> [...]

FYI: Too long to read at the moment. (Maybe later, maybe not.)

Janis

Re: iso646.h

<up6b3v$2ff9$1@dont-email.me>

  copy mid

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

  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 19:49:19 +0000
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <up6b3v$2ff9$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>
<up4ceh$3k4b8$1@dont-email.me> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@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 19:49:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9a96cb9e186eace9e5fe757c18f0ec3";
logging-data="81385"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oe2+TTXwsCTdFJUlw66262vCslhzCSDQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:hmLSiTMitSp/8hbIO1mxUBFY/ck=
Content-Language: en-GB
In-Reply-To: <up6655$1l8b$2@dont-email.me>
 by: Malcolm McLean - Sun, 28 Jan 2024 19:49 UTC

On 28/01/2024 18:24, David Brown wrote:
> On 28/01/2024 17:09, Malcolm McLean wrote:
>> On 28/01/2024 12:00, David Brown wrote:
>>> 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.
>>>
>> You put non-ASCII text on stdout?
>> I mean, obviously in a program for international use itself. But in
>> routine program for general use?
>>
>
> I commonly write out in UTF-8 - it does not have to be "international".
> (I assume that by "international" you, as a good Brit, mean "not UK".
> After all, a program written solely for use in Norwegian is not
> international.)
>
I'd expect that most general purpose programs written by Norwegians use
an English interface, even if it isn't really expected that the program
will find an audience beyond some users in Norway. Except of course for
programs which in some way are about Norway.
>
> Sometimes I will have binary data of some kind on the standard output.
> It's a lot less common, but it happens.  A common example would be code
> for generating images or other files for a webserver.
>
> Most of my "real" programs, rather than small utilities, are for
> embedded systems where the concept of "standard output" is not really
> the same as for PC's.
>
I've never used standard output for binary data. It might be necessary
for webservers that serve images. But it strikes me as a poor design
decision.
--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

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

<up6e34$2vq9$6@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!nntp.comgw.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: Functional Programming (was Re: iso646.h)
Date: Sun, 28 Jan 2024 20:40:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <up6e34$2vq9$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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 20:40:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="98121"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vBfm8+TJwTGMgVMdCJEuU"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:LrCkKbQjAygPE+Shqd8jd0uqF3c=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 20:40 UTC

On Sun, 28 Jan 2024 12:35:00 +0100, David Brown wrote:

> On 27/01/2024 21: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.
>
> It can - you just have to have the IO world as an input and an output to
> your function.

You mean, carry around multiple copies of the entire Universe in
individual variables?

Re: iso646.h

<up6e8k$2vq9$7@dont-email.me>

  copy mid

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

  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 20:43:00 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <up6e8k$2vq9$7@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> <up5f80$3t99q$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Jan 2024 20:43:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="98121"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8KUi9pu1H+qVSSztvigCg"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:eB33Pb7kJhCQHj+NiETnHyWTeEI=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 20:43 UTC

On Sun, 28 Jan 2024 12:53:36 +0100, David Brown wrote:

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

And a lot of those “embedded” systems are running Android.

Android ships as many units per year as the entire installed base of
Microsoft Windows.

Re: [OT] Re: Java (was Re: iso646.h)

<up6ebt$2vq9$8@dont-email.me>

  copy mid

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

  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: [OT] Re: Java (was Re: iso646.h)
Date: Sun, 28 Jan 2024 20:44:45 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <up6ebt$2vq9$8@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>
<up1gkb$32k8k$4@dont-email.me> <up1imc$32upd$1@dont-email.me>
<f%atN.183055$yEgf.134580@fx09.iad> <up3r4r$3hbk7$9@dont-email.me>
<up605m$ogg$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 20:44:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="98121"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3gSAZYeJHJfFYHewBJ8XI"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:mff2OdPeOfjpR4WoByPK5kGj0eM=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 20:44 UTC

On Sun, 28 Jan 2024 17:42:29 +0100, Janis Papanagnou wrote:

> On 27.01.2024 22:04, Lawrence D'Oliveiro wrote:
>>
>> In Java, as in Python, all class instances are allocated on the heap.
>> Therefore the word “new” becomes superfluous. And so Python gets rid of
>> it, reducing class instantiation to what looks like a function call on
>> the class name.
>>
>> Yet Java keeps the requirement to say “new”. Why?
>
> If the "Why?" refers to the word "keeps" then the answer seems obvious;
> compatibility, to not break existing code.
> If you're asking why "in the first place" they introduced it; I suppose
> to differentiate it from simple types, and to indicate that such objects
> are subject to the garbage collector (when getting unused).

For simple types, you don’t need to use the type name at all, to create an
instance of the type. So there would be no opportunity to use or not use
the type name. Hence the question about “new” is irrelevant in this case.

Re: Binary Pipelines (was Re: iso646.h)

<up6ejo$2vq9$9@dont-email.me>

  copy mid

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

  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: Binary Pipelines (was Re: iso646.h)
Date: Sun, 28 Jan 2024 20:48:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <up6ejo$2vq9$9@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> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$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 20:48:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="aa3bd129a7fc4eefdc68e712f3fbcc7a";
logging-data="98121"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cfxhpH1HBeaUU1JZTsIVS"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:9Q6n7Z00lwIS06nfLoNfvwJb+2k=
 by: Lawrence D'Oliv - Sun, 28 Jan 2024 20:48 UTC

On Sun, 28 Jan 2024 19:49:19 +0000, Malcolm McLean wrote:

> I've never used standard output for binary data. It might be necessary
> for webservers that serve images. But it strikes me as a poor design
> decision.

Very common in the *nix world. E.g. producing a nicely-typeset view of a
man page:

gunzip -c /usr/share/man/man7/string_copying.7.gz |
groff -kman -Tpdf |
okular - &

That second stage in the pipeline produces PDF output, which the viewer
can display directly, without having to write it to a file.

I mean, how else would you do it?

Re: iso646.h

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

  copy mid

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

  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: Sun, 28 Jan 2024 14:49:53 -0800
Organization: None to speak of
Lines: 29
Message-ID: <87le896pke.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>
<up5f80$3t99q$5@dont-email.me> <up6e8k$2vq9$7@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="140565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+33GtmO+iqaIKDrvD2TWQg"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:ddR2zcF23d/qKGMRACeJwHrMBGk=
sha1:7I7ZMCUwjq6mZXBQXAgFbr3tAeY=
 by: Keith Thompson - Sun, 28 Jan 2024 22:49 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sun, 28 Jan 2024 12:53:36 +0100, David Brown wrote:
>> 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.
>
> And a lot of those “embedded” systems are running Android.
>
> Android ships as many units per year as the entire installed base of
> Microsoft Windows.

A lot (for some interpretations of "a lot") of embedded systems run
Android. Those aren't the one David was talking about.

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

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

  copy mid

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

  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: Sun, 28 Jan 2024 14:54:22 -0800
Organization: None to speak of
Lines: 19
Message-ID: <87h6ix6pcx.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$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> <up5fk6$3t99q$6@dont-email.me>
<up5u8c$blo$1@dont-email.me> <up6655$1l8b$2@dont-email.me>
<up6b3v$2ff9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8434623738c8ca97fb8c62709c865b07";
logging-data="140565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+StZmwlj18hCD0Bg8SeJlz"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:P1O/zRYaAQJNkUFk1+i0HOyHjw0=
sha1:SDQ9tOtEli2S2JHHvyTQHtgJOk0=
 by: Keith Thompson - Sun, 28 Jan 2024 22:54 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
[...]
> I'd expect that most general purpose programs written by Norwegians
> use an English interface, even if it isn't really expected that the
> program will find an audience beyond some users in Norway. Except of
> course for programs which in some way are about Norway.

I'm not sure why you'd expect that.

I've worked on large projects at at least three different jobs that
implement various internationalization methods to show the interface in
any of several supported languages, including Norwegian. (These were
products intended for use by non-engineers, either general consumers or
medical professional.)

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

<up6m08$49oq$1@dont-email.me>

  copy mid

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

  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 22:55:04 +0000
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <up6m08$49oq$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> <up62gn$15e5$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 22:55:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9a96cb9e186eace9e5fe757c18f0ec3";
logging-data="141082"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OeSHJrm5ju9Z+W2vzYmYnhjtreH9aT2g="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:S+NeQbdLECWIrBs7UWzUVRH5cqg=
In-Reply-To: <up62gn$15e5$1@dont-email.me>
Content-Language: en-GB
 by: Malcolm McLean - Sun, 28 Jan 2024 22:55 UTC

On 28/01/2024 17:22, Janis Papanagnou wrote:
> On 27.01.2024 21:17, Malcolm McLean wrote:
>
>> Standard output is any sequence of ASCII characters.
>
> Nonsense.
>
>> printf() is the
>> main C interface to that, and supports integers, floats and strings, to
>> a first approximation.
>
> It's not an approximation; printf() is _restricted_ to these types (and
> a few more variants of these few basic types, to be correct).
>
> In an OO context you would not unnecessarily restrict yourself. (Unless
> you don't know better.)
>
>> 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.
>
> Standard output is an I/O channel; I can send to it non-text data like
> the ones you mention. (Just imagine you couldn't send UTF-8 text data.)
>
>> The OO method is to allow the stream to be extended. So, in one common
>> system, we might have a "decimal" stream which takes floats and outputs in
>> the format 123.456. Then we could derive a different type of stream from
>> that which outputs floats as 1.23456e2. [...]
>
> Nonsense. - You seem to have never really learned or understood OO or
> what streams in C++ actually are.
>
We're talking about the OO approach generally. Not C++.
That is one approach. Our base stream takes floats and produces a stream
of decimals in the format 123.456. We then decide that we don't like
that and write a derived class which uses scientific notation, 1.23456e2.
We can then toggle output between deciml and scientific mode by passing
either a base or a derived stream to an output function.

That one way of implementing OO streams and anyone with even a basic
knowledge of OO should have recognised.

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

Re: iso646.h

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

  copy mid

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

  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: Sun, 28 Jan 2024 15:00:55 -0800
Organization: None to speak of
Lines: 28
Message-ID: <87cytl6p20.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> <up2qse$3c81p$1@dont-email.me>
<up3ode$3h68j$1@dont-email.me> <up62gn$15e5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="7785f266d7a579ac4bdae19d9302dff6";
logging-data="140565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NIUt4fHBeElxXqXr6OlWM"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:74lttYbgoSTFXUFQLNf9FwIDetM=
sha1:8b1OK2TWbSuXMZOOf2QZ6ftz+QU=
 by: Keith Thompson - Sun, 28 Jan 2024 23:00 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> On 27.01.2024 21:17, Malcolm McLean wrote:
[...]
>> printf() is the
>> main C interface to that, and supports integers, floats and strings, to
>> a first approximation.
>
> It's not an approximation; printf() is _restricted_ to these types (and
> a few more variants of these few basic types, to be correct).

printf also supports pointer values with "%p". And it support single
characters, which are not strings.

strings of cousre absolutely do not have to be ASCII. Using printf to
print data with embedded null bytes is tricky -- but of course printf is
not the only interface. We can print arbitrary data with putchar,
fwrite, etc.

And in environments like POSIX that don't distinguish between text and
binary output streams, it can be perfectly sensible (though not 100%
portable) to send binary data to stdout.

[...]

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

<up6pvs$4ug9$1@dont-email.me>

  copy mid

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

  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: Mon, 29 Jan 2024 00:03:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <up6pvs$4ug9$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> <up5f80$3t99q$5@dont-email.me>
<up6e8k$2vq9$7@dont-email.me> <87le896pke.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 29 Jan 2024 00:03:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ab6b8bf6b4ebf5dcda22bbd1afce0bd5";
logging-data="162313"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+g/+KsmSkB/sNcP1HkctEE"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:hpzQuMkviFs1jc9Znvl19ZPLjwQ=
 by: Lawrence D'Oliv - Mon, 29 Jan 2024 00:03 UTC

On Sun, 28 Jan 2024 14:49:53 -0800, Keith Thompson wrote:

> A lot (for some interpretations of "a lot") of embedded systems run
> Android. Those aren't the one David was talking about.

They have a POSIX-type C runtime. Which does support “%«n»$” for
reordering args to the printf routines.

The point being the prevalence of POSIX is a little larger than you give
it credit for.

Re: iso646.h

<up6unn$5l0a$1@dont-email.me>

  copy mid

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

  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: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Mon, 29 Jan 2024 01:24:06 +0000
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <up6unn$5l0a$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> <up5f80$3t99q$5@dont-email.me>
<up6e8k$2vq9$7@dont-email.me> <87le896pke.fsf@nosuchdomain.example.com>
<up6pvs$4ug9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 29 Jan 2024 01:24:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="638e6a40e429a888ceaea18ff735a682";
logging-data="185354"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IBtoCkU4EggqOiZEDatTXU7Yx4Y/KwOU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VKS/opifyNJ7hEpeY/cf+65U1KA=
In-Reply-To: <up6pvs$4ug9$1@dont-email.me>
Content-Language: en-GB
 by: bart - Mon, 29 Jan 2024 01:24 UTC

On 29/01/2024 00:03, Lawrence D'Oliveiro wrote:
> On Sun, 28 Jan 2024 14:49:53 -0800, Keith Thompson wrote:
>
>> A lot (for some interpretations of "a lot") of embedded systems run
>> Android. Those aren't the one David was talking about.
>
> They have a POSIX-type C runtime. Which does support “%«n»$” for
> reordering args to the printf routines.
>
> The point being the prevalence of POSIX is a little larger than you give
> it credit for.

As far as I can see, the way it works is to have a separate format
string for each language target. The format string will contain the bulk
of the message, together with any variably-placed argments.

If those arguments are themselves text, they may also need different
versions per target.

This provides only the crudest form of aid, every language will have its
own exceptions.

A further problem is having type info encoded within each format string,
so that now magnifies the problem of maintenance, especially if those
strings reside in external data files. If the format argument is a
variable, that also limits the ability to detect format errors.

I can't see that it's of great benefit. Internationalisation requires
some extra effort anyway beyond what a language provides, especially a
low-level one.

Can you provide one example of how it will help with just two languages
with differing word order?

Re: iso646.h

<878r487vui.fsf@nosuchdomain.example.com>

  copy mid

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

  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: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Sun, 28 Jan 2024 17:48:53 -0800
Organization: None to speak of
Lines: 29
Message-ID: <878r487vui.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>
<up5f80$3t99q$5@dont-email.me> <up6e8k$2vq9$7@dont-email.me>
<87le896pke.fsf@nosuchdomain.example.com>
<up6pvs$4ug9$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="7785f266d7a579ac4bdae19d9302dff6";
logging-data="188244"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198bnQRKCx8tDiawEzTZEVE"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:2+4LxtZE7GaxdKPZczuTxCKcD6k=
sha1:FM7aD4kHR9e7mx5UqiPgyub+9dI=
 by: Keith Thompson - Mon, 29 Jan 2024 01:48 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sun, 28 Jan 2024 14:49:53 -0800, Keith Thompson wrote:
>> A lot (for some interpretations of "a lot") of embedded systems run
>> Android. Those aren't the one David was talking about.
>
> They have a POSIX-type C runtime. Which does support “%«n»$” for
> reordering args to the printf routines.
>
> The point being the prevalence of POSIX is a little larger than you give
> it credit for.

Again, David wasn't talking about Android systems. He wrote:

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.

The fact that Android systems are POSIX systems doesn't refute his
point. I don't think he considers them to be *small* embedded systems.

(A not terribly relevant piece of information: Android's C runtime
doesn't support printf's "%n" format, supposedly because it's unsafe
which renders it non-conforming.)

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

<up71s2$621e$1@dont-email.me>

  copy mid

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

  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: Mon, 29 Jan 2024 02:17:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <up71s2$621e$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> <up5f80$3t99q$5@dont-email.me>
<up6e8k$2vq9$7@dont-email.me> <87le896pke.fsf@nosuchdomain.example.com>
<up6pvs$4ug9$1@dont-email.me> <878r487vui.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 29 Jan 2024 02:17:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ab6b8bf6b4ebf5dcda22bbd1afce0bd5";
logging-data="198702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vnYoNFleAV57lnR54hAra"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:sCjTS4IW3z/CnhRwBQmWnqOGSXI=
 by: Lawrence D'Oliv - Mon, 29 Jan 2024 02:17 UTC

On Sun, 28 Jan 2024 17:48:53 -0800, Keith Thompson wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> The point being the prevalence of POSIX is a little larger than you
>> give it credit for.
>
> Again, David wasn't talking about Android systems.

No, I was, as an example of the sort of POSIX system he thought was too
minuscule to worry about.


devel / comp.lang.c / iso646.h

Pages:1234567891011121314151617181920212223242526
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor