Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

I am not now, nor have I ever been, a member of the demigodic party. -- Dennis Ritchie


devel / comp.lang.c / Re: 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

<uor2g0$1qlf1$1@dont-email.me>

  copy mid

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

  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: Wed, 24 Jan 2024 14:14:39 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <uor2g0$1qlf1$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> <87cytrajvc.fsf@nosuchdomain.example.com>
<uopcv5$1f17i$9@dont-email.me> <87zfwv8x3n.fsf@nosuchdomain.example.com>
<uopip7$1fs5l$6@dont-email.me> <87il3j8tjm.fsf@nosuchdomain.example.com>
<uopmm7$1ggo3$3@dont-email.me> <uoq59c$1m1bm$2@dont-email.me>
<uoq6um$1meme$3@dont-email.me> <8734un8ewf.fsf@nosuchdomain.example.com>
<uoqb2o$1mu4a$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 24 Jan 2024 13:14:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="65507ed2e59e1ed5857440a8f8a39c64";
logging-data="1922529"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KDrlGPk9KZflawIJZfRw+rdA6weGZ0p4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:4FndGOyZeFk0A02DE7Ll4mPHpRQ=
Content-Language: en-GB
In-Reply-To: <uoqb2o$1mu4a$4@dont-email.me>
 by: David Brown - Wed, 24 Jan 2024 13:14 UTC

On 24/01/2024 07:35, Lawrence D'Oliveiro wrote:
> On Tue, 23 Jan 2024 21:43:44 -0800, Keith Thompson wrote:
>
>> In the Shift-JIS encoding, character 0x5C, which is the backslash in
>> ASCII and Unicode, is the Yen sign. That means that if a C source file
>> contains "Hello, world\n", viewing it as Shift-JIS makes it look like
>> "Hello, world¥n", but a C compiler that treats its input as ASCII would
>> see a backslash.
>
> So what exactly does iso646.h offer to deal with this?
>

In Scandinavian language variants of ASCII, the | symbol was replaced by
the letter ø or ö. The name "or" is a significant improvement over the
"??!??!" trigraph for ||.

Re: iso646.h

<uor2uo$1qnml$1@dont-email.me>

  copy mid

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

  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: iso646.h
Date: Wed, 24 Jan 2024 14:22:31 +0100
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <uor2uo$1qnml$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 13:22:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="69fff37576a2b2d46c16a0672ef7c7e8";
logging-data="1924821"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+u3yKNoMfeErK1tHd7GCdY"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:IbJN6DPTqAGDbSNPBF1s+IRrA54=
In-Reply-To: <uoqvas$1q40p$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Wed, 24 Jan 2024 13:22 UTC

This post appears to me as really odd in many respects (details below),
presuming you mean it as it is formulated [as a general comment] (as
opposed to, maybe, some "very specific" C view). - Where did you get
that view from?

On 24.01.2024 13:20, Malcolm McLean wrote:
>
> Mathematically operators are functions, so a mathematican would say that
> "add" is just as much of a function as "gamma". But to a computer
> programmer an operator compiles to a trivial number of machine code
> instructions, whilst a function is a subroutine call.

We generally don't know; neither what an operator compiles into, nor
what a function compiles into, nor what the compilers and optimizers
additionally do. And I'm not even asking who that ominous "computer
programmer" you have in mind actually is.

I do, for example with matrix a, b, c; c = a * b;
(Or even more difficult tasks.) How should these matrix multiplication
be more trivial than a counterpart with functions?

(Someone already mentioned upthread that functions and operators can
be considered as similar (or in practice probably even equal) things.
Of course this is mostly correct, only that you also have to consider
operator precedence in the second case, and functions are typically
allowing more parameters; most operator are dyadic or monadic, else
you need some additional syntactic support.)

> Pow is not usually
> supported in hardware. However it's such a basic mathematical function
> that it has special notation. So some languages say it should be an
> operator. However ASCII won't represent the standard notation.

Generally this operator is defined by one or more ASCII characters.

> SO there
> are good arguments for and against pow as an operators, and different
> language take differnet views.

Yes, other languages support it (often in various ways; ** ^ 'up' ...)

> But I think the C decision is better, as
> C code is for programming computers,

All the languages that I know to support an operator for power() are
there "for programming computers"...

> not for translating formulae into
> machine readable form.

....and all translate formulas (as part of a program) into machine code.

Janis

Re: Python (Re: iso646.h)

<uor3cs$jii$1@reader1.panix.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cro...@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.lang.c
Subject: Re: Python (Re: iso646.h)
Date: Wed, 24 Jan 2024 13:30:04 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <uor3cs$jii$1@reader1.panix.com>
References: <uokhnk$eiln$1@dont-email.me> <uoopm9$1blvh$1@dont-email.me> <uop0r1$1d4d4$1@dont-email.me> <uop48a$1dmoe$1@dont-email.me>
Injection-Date: Wed, 24 Jan 2024 13:30:04 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
logging-data="20050"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
 by: Dan Cross - Wed, 24 Jan 2024 13:30 UTC

In article <uop48a$1dmoe$1@dont-email.me>,
Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
>bart <bc@freeuk.com> wrote:
>> Presumably everyone knows what AND and OR mean. So
>> why not just use AND and OR?
>
>Maybe back in the early days of C even a one byte
>mattered? strlen("AND") is 3 and strlen("&&") is 2.
>So they chose "&&" and then "||" was chosen because
>of symmetry? Just speculation, of course.
>
>Dennis Ritchie has said that he regretted the
>spelling of creat(2) function. Presumably the
>abbreviation was supposed to save one byte of
>storage.

Dennis did not say that; Ken Thompson did. It was a bit of a
gag reply to the question, "if you had to do Unix over again,
what would you change?"

`creat` dates from PDP-7 Unix, and the PDP-7 was word oriented.
It's unclear why it's spelled that way, however; there was also
a `rename` system call that uses the full 6 characters for its
name. Perhaps because internally, `creat` calls a subroutine
called `icreat` which has a full six character name, and there
was a desire for symmetry in the identifiers. Note that
identifiers were limited to six characters on that system,
though `creat` is only 5.

- Dan C.

Re: iso646.h

<uor4rf$1r10t$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 14:54:54 +0100
Organization: A noiseless patient Spider
Lines: 80
Message-ID: <uor4rf$1r10t$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 24 Jan 2024 13:54:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="65507ed2e59e1ed5857440a8f8a39c64";
logging-data="1934365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wURVFvJ7TMwylcl8BI5YcgXHTxUA7cIE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:6i+s0BCCJU8MFajUMgUNV4reGF0=
Content-Language: en-GB
In-Reply-To: <uoqvas$1q40p$1@dont-email.me>
 by: David Brown - Wed, 24 Jan 2024 13:54 UTC

On 24/01/2024 13:20, Malcolm McLean wrote:
> On 23/01/2024 18:34, bart wrote:
>> On 23/01/2024 16:32, Malcolm McLean wrote:
>>> On 22/01/2024 20:34, Lawrence D'Oliveiro wrote:
>>>> On Mon, 22 Jan 2024 09:30:21 +0100, David Brown wrote:
>>>>
>>>>> ... I don't use the matching names in C++ either ...
>>>>
>>>> I do, if/when I do use C++ and C. Don’t you think it improves
>>>> readability:
>>>>
>>> It breaks the rule that, in C, variables and functions are
>>> alphnumeric, whilst operators are symbols. sizeof is an exception,
>>> but a justified one. However it's harder to justify a symbol for
>>> "plus" but a word for "or".
>>
>> But it's OK to justify 'pow' for exponentiation?
>>
> Mathematically operators are functions, so a mathematican would say that
> "add" is just as much of a function as "gamma".

In mathematics, the term "operator" is usually used for functions where
the domain itself involves functions - such as the Laplace
transformation, or the integral operator. Addition is an /operation/,
not an operator, and "+" is a /symbol/. Given an operation and a
domain, you get a function - addition applied to real numbers is a
function, distinct from addition applied to integers or complex numbers.

> But to a computer
> programmer an operator compiles to a trivial number of machine code
> instructions, whilst a function is a subroutine call.

Not at all.

People working in most high level languages do not think in terms of
generated machine code at all, or in terms of subroutine calls. And C
programmers who are looking closely enough at efficiency and generated
code to be interested in the implementation details, should know that
function calls do not equate to machine-code subroutine calls, nor do
operators necessarily compile to small numbers of machine code instructions.

Many operators in C are not mathematical operations. "sizeof" is an
operator, so are indirection operators, structure member access
operators, function calls, and the comma operator. These don't
correspond to machine code instructions in any straightforward manner -
nor do they match subroutine calls. They are specific parts of the
syntax and grammar of the language, and can do things that functions
cannot do in C.

> Pow is not usually
> supported in hardware. However it's such a basic mathematical function
> that it has special notation.

There are vast numbers of things in mathematics that have special notation.

Exponentiation is not particularly common in programming, except for a
few special cases - easily written as "x * x", "x * x * x", "1.0 / x",
or "sqrt(x)", which are normally significantly more efficient than a
generic power function or operator would be.

> So some languages say it should be an
> operator. However ASCII won't represent the standard notation. SO there
> are good arguments for and against pow as an operators, and different
> language take differnet views. But I think the C decision is better, as
> C code is for programming computers, not for translating formulae into
> machine readable form.
>

That is not an argument against having an operator in C called "pow".
It is simply not useful enough for there to be a benefit in adding it to
the language as an operator, when it could (and was) easily be added as
a function in the standard library.

(It could not have been added as "**", because - as Keith said in
another post - "x ** y" already has a meaning in C. While I believe it
would be possible to distinguish the uses based on the type of "y",
other than for the literal 0, having "x ** y" mean two /completely/
different things depending on the type of "y" would not be a good idea
for C.)

Re: iso646.h

<uor650$1r462$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.furie.org.uk!pasdenom.info!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 14:17:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <uor650$1r462$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> <87cytrajvc.fsf@nosuchdomain.example.com>
<uoqgdv$1nog8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 24 Jan 2024 14:17:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ddf97977398e498ad3bf239c36b9ae19";
logging-data="1937602"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EMifw985UYv+MKDx3fYiRQ+6HCbKMIiI="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:U+cjLppgTNZN+DhWio3R3Uwvsz4=
 by: Lew Pitcher - Wed, 24 Jan 2024 14:17 UTC

On Wed, 24 Jan 2024 09:06:22 +0100, Janis Papanagnou wrote:

> On 23.01.2024 21:13, Keith Thompson wrote:
>> [...] There's no hard rule that operators must be
>> punctuation, just a general trend.)
>
> Anyone still writing "MULTIPLY a BY b GIVEN c" ? :-)

ITYM

MULTIPLY A BY B GIVING C.

and, yes, COBOL programmers are still in demand, mostly by
financial institutions that have hundreds of millions
of lines of COBOL code to maintain.

> (Luckily I've never programmed in COBOL, even after
> it allowed "COMPUTE c = a * b" (or some such).)

I have (lucky me :-) ).

While I don't tout COBOL as the "be all and end all" of
programming languages, it still can perform a lot of
useful work, especially in fields where exact calculations
are required and rounding and truncation of mathematical
operations are well defined. Such as financial institutions.

These days, it even supports object oriented code.
FWIW, the last ISO COBOL language standard was issued in 2023.

Are you certain that you want your taxes to be calculated in
floatingpoint? ;-)

--
Lew Pitcher
"In Skills We Trust"

Re: Python (Re: iso646.h)

<1bbk9a4wi2.fsf@pfeifferfamily.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pfeif...@cs.nmsu.edu (Joe Pfeiffer)
Newsgroups: comp.lang.c
Subject: Re: Python (Re: iso646.h)
Date: Wed, 24 Jan 2024 07:49:25 -0700
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <1bbk9a4wi2.fsf@pfeifferfamily.net>
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>
<uop5rs$1dv1c$1@dont-email.me> <uop6tv$1e5f9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="c0c83f1db0078d62c7ffe6c3000a6e4a";
logging-data="1947987"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VVoirmorXHdKOT3itKHWfRxe5rapDQ8Y="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:j3497jbrqdvUTic+TrRE3ZZojRk=
sha1:ltxxdhEIVjBLgSxMc/ouC1pbdTo=
 by: Joe Pfeiffer - Wed, 24 Jan 2024 14:49 UTC

kalevi@kolttonen.fi (Kalevi Kolttonen) writes:

> bart <bc@freeuk.com> wrote:
>> On 23/01/2024 19:32, Kalevi Kolttonen wrote:
>>> bart <bc@freeuk.com> wrote:
>>>> Presumably everyone knows what AND and OR mean. So
>>>> why not just use AND and OR?
>>>
>>> Maybe back in the early days of C even a one byte
>>> mattered?
>>
>> Plenty of languages already existed that used 'and', 'or' and 'not'.
>
> I actually know that but it could have mattered
> to Dennis Ritchie to be as succinct as possible.
>
> In the same spirit as UNIX has "ls" not "list", "cp"
> not "copy" and "mv" not "move".
>
>> My first language did so as well, and was implemented on a smaller
>> machine than the first C compiler.
>>
>> If compact code was advantageous, then you have to wonder about the
>> considerable amount of punctuation in C.
>
> True.
>
>>> strlen("AND") is 3 and strlen("&&") is 2.
>>> So they chose "&&" and then "||" was chosen because
>>> of symmetry? Just speculation, of course.
>>
>> Why two & and two |? Was '|' even commonly available on keyboards at the
>> time? I'm pretty sure 'o' and 'r' were!
>
> I really do not know. I never thought of that but
> it does seem strange especially if one claims
> that they wanted to save storage.

Back when I was learning Unix and C (late 1970s), the consensus belief
in my department was that they were simply poor typists. So many
commands that use two letters, one that can be typed with each hand, or
commands that are one letter repeated (I've got a dd copying a disk
image even as we speak).

Re: Python (Re: iso646.h)

<uor94c$1rlqj$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: Python (Re: iso646.h)
Date: Wed, 24 Jan 2024 15:07:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Sender: <untosten@0.0.0.0>
Message-ID: <uor94c$1rlqj$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> <uop48a$1dmoe$1@dont-email.me> <uop5rs$1dv1c$1@dont-email.me> <uop6tv$1e5f9$1@dont-email.me> <1bbk9a4wi2.fsf@pfeifferfamily.net>
Injection-Date: Wed, 24 Jan 2024 15:07:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="111deffd720e9e88b98404b661b2ef46";
logging-data="1955667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/K8Lf/N8rVtYrnvrITCKsvxeBOCmy83s="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.6.11-200.fc39.x86_64 (x86_64))
Cancel-Lock: sha1:jM+st5QO+m79EmE3J5KkMdTn2dQ=
 by: Kalevi Kolttonen - Wed, 24 Jan 2024 15:07 UTC

Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
> Back when I was learning Unix and C (late 1970s), the consensus belief
> in my department was that they were simply poor typists. So many
> commands that use two letters, one that can be typed with each hand, or
> commands that are one letter repeated (I've got a dd copying a disk
> image even as we speak).

That could well be. Or maybe they wanted terse
commands so that everybody could enter them quicker.

I am actually a big fan of those short commands. It
is not difficult to remember them and they are
so fast to enter.

br,
KK

Re: Python (Re: iso646.h)

<uor9n1$dcn$1@reader1.panix.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!weretis.net!feeder6.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cro...@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.lang.c
Subject: Re: Python (Re: iso646.h)
Date: Wed, 24 Jan 2024 15:17:53 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <uor9n1$dcn$1@reader1.panix.com>
References: <uokhnk$eiln$1@dont-email.me> <uop5rs$1dv1c$1@dont-email.me> <uop6tv$1e5f9$1@dont-email.me> <1bbk9a4wi2.fsf@pfeifferfamily.net>
Injection-Date: Wed, 24 Jan 2024 15:17:53 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
logging-data="13719"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
 by: Dan Cross - Wed, 24 Jan 2024 15:17 UTC

In article <1bbk9a4wi2.fsf@pfeifferfamily.net>,
Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
>kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
>[snip]
>>> Why two & and two |? Was '|' even commonly available on keyboards at the
>>> time? I'm pretty sure 'o' and 'r' were!
>>
>> I really do not know. I never thought of that but
>> it does seem strange especially if one claims
>> that they wanted to save storage.
>
>Back when I was learning Unix and C (late 1970s), the consensus belief
>in my department was that they were simply poor typists. So many
>commands that use two letters, one that can be typed with each hand, or
>commands that are one letter repeated (I've got a dd copying a disk
>image even as we speak).

The two-letter command thing dates from Multics, where most
commands had a "long" form (e.g., `list`) and a short form
(`ls`).

It is true that they were using teletypes like the ASR-33, which
were both slow and difficult to type on (more force required per
keystroke compared to modern keyboards), so brevity was prized.
Also, line rates were very slow, 110 or 300 BAUD; economy of
expression giving brevity lead to greater throughput.

One sees this carry through to B: in Dennis Ritchie's paper on
the history of C, one sees that many of the characteristics of
B were designed to economize on space, as the PDP-7 was a small
machine. https://www.bell-labs.com/usr/dmr/www/chist.html

- Dan C.

Re: iso646.h

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!newsfeed.xs3.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 07:34:51 -0800
Organization: None to speak of
Lines: 24
Message-ID: <87y1ce7nj8.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>
<87cytrajvc.fsf@nosuchdomain.example.com>
<uopcv5$1f17i$9@dont-email.me>
<87zfwv8x3n.fsf@nosuchdomain.example.com>
<uopip7$1fs5l$6@dont-email.me>
<87il3j8tjm.fsf@nosuchdomain.example.com>
<uopmm7$1ggo3$3@dont-email.me> <uoq59c$1m1bm$2@dont-email.me>
<uoq6um$1meme$3@dont-email.me>
<8734un8ewf.fsf@nosuchdomain.example.com>
<uoqb2o$1mu4a$4@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="1a14796772ccb3100f0d224a23edc517";
logging-data="1962942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+LvQvgsD1GeQeFAdsb4g+i"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:jI8aqzPovWl51fcX64jGDYF1lJI=
sha1:+36Sh9E4CnGstRl3Bh6rZ2lrMhI=
 by: Keith Thompson - Wed, 24 Jan 2024 15:34 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Tue, 23 Jan 2024 21:43:44 -0800, Keith Thompson wrote:
>
>> In the Shift-JIS encoding, character 0x5C, which is the backslash in
>> ASCII and Unicode, is the Yen sign. That means that if a C source file
>> contains "Hello, world\n", viewing it as Shift-JIS makes it look like
>> "Hello, world¥n", but a C compiler that treats its input as ASCII would
>> see a backslash.
>
> So what exactly does iso646.h offer to deal with this?

Trigraphs, digraphs, and <iso646.h> are all solutions for systems that
don't support all ASCII printable characters.

Are you arguing for the sake of arguing, or is there something here that
you don't understand?

Did you read the section of the C99 Rationale that I cited earlier?
If not, please do.

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

<20240124073957.735@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 15:43:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <20240124073957.735@kylheku.com>
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me>
<uomjfr$sopf$1@dont-email.me>
<pan$9db66$eb4f51b7$5c95cec0$b076ca4d@invalid.invalid>
<uomu7t$uj61$3@dont-email.me> <uonkbh$15dsi$1@dont-email.me>
<uoq9ad$1mp2u$1@dont-email.me>
Injection-Date: Wed, 24 Jan 2024 15:43:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b53ada80e44a49509d1cc2e54e523b05";
logging-data="1966313"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186zCxVNTzVyzT3nryrObniNIrcO4BBkeg="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:AKnmmi+K6z61HeTrrjR6cpERAqc=
 by: Kaz Kylheku - Wed, 24 Jan 2024 15:43 UTC

On 2024-01-24, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Tue, 23 Jan 2024 06:54:56 +0100, Janis Papanagnou wrote:
>
>> ... in my professional contexts there where even [coding] standards
>> defined that you had to follow.
>
> What about the open-source code that your company takes without paying? Do
> you demand that that code follow your rules as well? Do you send it back
> to the developers to demand they rewrite it for you?

In my experience, when you patch third-party code, you closely adhere to
*its* conventions, to keep it consistent.

If you're a person who maintains an diverse open source stack for an
organization, you end up working with numerous coding conventions.

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

Re: Python (Re: iso646.h)

<uorbbr$1s2e2$1@dont-email.me>

  copy mid

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

  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: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: Python (Re: iso646.h)
Date: Wed, 24 Jan 2024 15:46:04 +0000
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <uorbbr$1s2e2$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <uop5rs$1dv1c$1@dont-email.me>
<uop6tv$1e5f9$1@dont-email.me> <1bbk9a4wi2.fsf@pfeifferfamily.net>
<uor9n1$dcn$1@reader1.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 15:46:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c2c105cd8d24f169cc51794302af1cd4";
logging-data="1968578"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0NDrQEZ6S2OJjI1k3HxULUrAkxkNg/Tc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GJcYBZVQ61S+FXne1hikidVa3Ic=
Content-Language: en-GB
In-Reply-To: <uor9n1$dcn$1@reader1.panix.com>
 by: bart - Wed, 24 Jan 2024 15:46 UTC

On 24/01/2024 15:17, Dan Cross wrote:
> In article <1bbk9a4wi2.fsf@pfeifferfamily.net>,
> Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
>> kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
>> [snip]
>>>> Why two & and two |? Was '|' even commonly available on keyboards at the
>>>> time? I'm pretty sure 'o' and 'r' were!
>>>
>>> I really do not know. I never thought of that but
>>> it does seem strange especially if one claims
>>> that they wanted to save storage.
>>
>> Back when I was learning Unix and C (late 1970s), the consensus belief
>> in my department was that they were simply poor typists. So many
>> commands that use two letters, one that can be typed with each hand, or
>> commands that are one letter repeated (I've got a dd copying a disk
>> image even as we speak).
>
> The two-letter command thing dates from Multics, where most
> commands had a "long" form (e.g., `list`) and a short form
> (`ls`).
>
> It is true that they were using teletypes like the ASR-33, which
> were both slow and difficult to type on (more force required per
> keystroke compared to modern keyboards), so brevity was prized.
> Also, line rates were very slow, 110 or 300 BAUD; economy of
> expression giving brevity lead to greater throughput.

I think you're just making excuses.

I used ASR33s extensively and had no trouble typing on them. (Other than
a small latency between pressing a key and having it printed that you
got used to, but it didn't affect your typing speed.)

A 110 baud speed means max 10 characters per second, about 120 words per
minute. That's twice as fast as an expert typist on a modern keyboard.

So it's hardly as though that was the limiting factor.

It's also laughable that I get shouted down when I complain about all
the extra junk you have to type here:

cc prog.c -o prog -lm

compared with a minimal:

cc prog

but the use of 2-letter abbbreviations to save having to type out a 3 or
4-letter word (which is easier and quicker to type type than random
punctuation) gets lauded.

Re: Python (Re: iso646.h)

<sqasN.52145$U1cc.14513@fx04.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!paganini.bofh.team!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx04.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Python (Re: iso646.h)
Newsgroups: comp.lang.c
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> <uop5rs$1dv1c$1@dont-email.me> <uop6tv$1e5f9$1@dont-email.me> <1bbk9a4wi2.fsf@pfeifferfamily.net>
Lines: 47
Message-ID: <sqasN.52145$U1cc.14513@fx04.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 24 Jan 2024 15:56:08 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 24 Jan 2024 15:56:08 GMT
X-Received-Bytes: 2626
 by: Scott Lurndal - Wed, 24 Jan 2024 15:56 UTC

Joe Pfeiffer <pfeiffer@cs.nmsu.edu> writes:
>kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
>
>> bart <bc@freeuk.com> wrote:
>>> On 23/01/2024 19:32, Kalevi Kolttonen wrote:
>>>> bart <bc@freeuk.com> wrote:
>>>>> Presumably everyone knows what AND and OR mean. So
>>>>> why not just use AND and OR?
>>>>
>>>> Maybe back in the early days of C even a one byte
>>>> mattered?
>>>
>>> Plenty of languages already existed that used 'and', 'or' and 'not'.
>>
>> I actually know that but it could have mattered
>> to Dennis Ritchie to be as succinct as possible.
>>
>> In the same spirit as UNIX has "ls" not "list", "cp"
>> not "copy" and "mv" not "move".
>>
>>> My first language did so as well, and was implemented on a smaller
>>> machine than the first C compiler.
>>>
>>> If compact code was advantageous, then you have to wonder about the
>>> considerable amount of punctuation in C.
>>
>> True.
>>
>>>> strlen("AND") is 3 and strlen("&&") is 2.
>>>> So they chose "&&" and then "||" was chosen because
>>>> of symmetry? Just speculation, of course.
>>>
>>> Why two & and two |? Was '|' even commonly available on keyboards at the
>>> time? I'm pretty sure 'o' and 'r' were!
>>
>> I really do not know. I never thought of that but
>> it does seem strange especially if one claims
>> that they wanted to save storage.
>
>Back when I was learning Unix and C (late 1970s), the consensus belief
>in my department was that they were simply poor typists.

It's difficult to type quickly on an ASR-33, I suspect that
would have part of the reason for short commands. Two
letter commands were common on the burroughs mainframes
in the 60s and 70s and likely on other systems as well.

Re: iso646.h

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!nyheter.lysator.liu.se!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 07:58:44 -0800
Organization: None to speak of
Lines: 38
Message-ID: <87r0i67mff.fsf@nosuchdomain.example.com>
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me>
<uomjfr$sopf$1@dont-email.me> <uont40$16rlc$1@dont-email.me>
<20240123131544.17@kylheku.com> <uoqfl1$1nk81$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="1a14796772ccb3100f0d224a23edc517";
logging-data="1972210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xDnBxINx5a6ki/LCB/YLb"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:73Jv/G4jzinFh46k+54cOWgOF/M=
sha1:L/A7JxNtFf06gensLKnKBYE3tzU=
 by: Keith Thompson - Wed, 24 Jan 2024 15:58 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> On 23.01.2024 22:30, Kaz Kylheku wrote:
[...]
>> Clearly, the purpose of this header is to allow C to be written with the
>> ISO 646 character set. The choices of identifiers do not look like
>> evidence of readability having been highly prioritized.

Not quite, see below.

> I don't quite understand your thought. The "6-bit characters" OSes
> that I used had no lowercase letters, as opposed to IA5/ASCII/ISO646.
>
> To be sure I had also re-inspected the ASCII character set and it
> seems that all C characters (including these operators) are anyway
> in the ASCII domain. It's beyond me why they've used the name
> "iso646.h".

ISO/IEC 646 is the international standard corresponding to ASCII, a
7-bit character set. C originated on systems that supported the entire
ASCII character set, so the designers felt free to use any printable
ASCII characters (the only ones not used are '$', '`', and '@').

Trigraphs, digraphs, and <iso646.h> were all introduced to support
systems that *don't* support the full ASCII character set. Writing C
code in EBCDIC can be difficult, since for example some versions don't
have '[' and ']'. Some national 7-bit character sets replaced some
ASCII characters with accented letters. The Japanese Shift-JIS has the
Yen sign in the slot that ASCII uses for '\'. Prior to 1995, when
digraphs and <iso646.h> was introduced, some implementers had provided
their own alternate spellings.

Again, see Annex MSE.4 of the C99 Rationale:
http://www.open-std.org/jtc1/sc22/WG14/www/C99RationaleV5.10.pdf

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

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

  copy mid

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

  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: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 08:15:32 -0800
Organization: None to speak of
Lines: 21
Message-ID: <87jzny7lnf.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>
<87cytrajvc.fsf@nosuchdomain.example.com>
<uopcv5$1f17i$9@dont-email.me>
<87zfwv8x3n.fsf@nosuchdomain.example.com>
<uoqifs$1o2c1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="1a14796772ccb3100f0d224a23edc517";
logging-data="1972210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NmbVoyxDXCxpnjIUg2dTr"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:kraIDGRyA7uBo58JTCQu9XYHR5Y=
sha1:smmXHG754DS58nf4sHTQQt4szNY=
 by: Keith Thompson - Wed, 24 Jan 2024 16:15 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> On 24.01.2024 00:10, Keith Thompson wrote:
>> The header was introduced to make it easier (or possible) to write C
>> code on systems/keyboards that don't support certain characters like '&'
>> and '|' -- similar to digraphs and trigraphs.
>
> I think this is the most likely explanation; the restricted _keyboards_
> (and not the restricted [ASCII] character set). Matches my experiences
> with old keyboards I used decades ago.

Both keyboard and displays, I think. A Japanese keyboard might send
0x5c (the ASCII code for '\`) when you type the Yen character, and the
corresponding display might show that same byte value as the Yen
character. It might not have had the ability to display the '\' glyph,
but the C compiler might still have treated 0x5c as backslash. (I've
never used such a system, so this is speculation.)

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

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 08:27:22 -0800
Organization: None to speak of
Lines: 34
Message-ID: <87frym7l3p.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>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="1a14796772ccb3100f0d224a23edc517";
logging-data="1972210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bqGYXVGEjFgdJaDdc44aM"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:D5TeZ50wPV8tVqRJVl9I9t1iHxg=
sha1:vAiPiQTxoQlYl5xRRQWl3hdIH8M=
 by: Keith Thompson - Wed, 24 Jan 2024 16:27 UTC

David Brown <david.brown@hesbynett.no> writes:
[...]
> (It could not have been added as "**", because - as Keith said in
> another post - "x ** y" already has a meaning in C. While I believe
> it would be possible to distinguish the uses based on the type of "y",
> other than for the literal 0, having "x ** y" mean two /completely/
> different things depending on the type of "y" would not be a good idea
> for C.)

The problem with a "**" exponentation operator is lexical. It's common
to have two consecutive unary "*" operators in declarations and
expression:
char **argv;
char c = **argv;
Adding a "**" operator would have made the above invalid due to the
"maximal munch" rule, before the type of the argument is even
considered.

See also x+++++y, which might be intended as x++ + ++y, but is scanned
as x ++ ++ + y, a syntax error.

C could have added "**" very early, but then we'd have to write
"* *argv" or "*(*argv)".

We have "&&", which could have caused a similar issue for unary "&", but
&(&x) is semantically invalid.

(C++, in 2011 IIRC, introduced special handling for the >> token, which
occurs in things like std::vector<std::vector<int>>).

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

<uordpj$2eh$1@reader1.panix.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder6.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cro...@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.lang.c
Subject: Re: Python (Re: iso646.h)
Date: Wed, 24 Jan 2024 16:27:31 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <uordpj$2eh$1@reader1.panix.com>
References: <uokhnk$eiln$1@dont-email.me> <1bbk9a4wi2.fsf@pfeifferfamily.net> <uor9n1$dcn$1@reader1.panix.com> <uorbbr$1s2e2$1@dont-email.me>
Injection-Date: Wed, 24 Jan 2024 16:27:31 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
logging-data="2513"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
 by: Dan Cross - Wed, 24 Jan 2024 16:27 UTC

In article <uorbbr$1s2e2$1@dont-email.me>, bart <bc@freeuk.com> wrote:
>On 24/01/2024 15:17, Dan Cross wrote:
>> In article <1bbk9a4wi2.fsf@pfeifferfamily.net>,
>> Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
>>> kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
>>> [snip]
>>>>> Why two & and two |? Was '|' even commonly available on keyboards at the
>>>>> time? I'm pretty sure 'o' and 'r' were!
>>>>
>>>> I really do not know. I never thought of that but
>>>> it does seem strange especially if one claims
>>>> that they wanted to save storage.
>>>
>>> Back when I was learning Unix and C (late 1970s), the consensus belief
>>> in my department was that they were simply poor typists. So many
>>> commands that use two letters, one that can be typed with each hand, or
>>> commands that are one letter repeated (I've got a dd copying a disk
>>> image even as we speak).
>>
>> The two-letter command thing dates from Multics, where most
>> commands had a "long" form (e.g., `list`) and a short form
>> (`ls`).
>>
>> It is true that they were using teletypes like the ASR-33, which
>> were both slow and difficult to type on (more force required per
>> keystroke compared to modern keyboards), so brevity was prized.
>> Also, line rates were very slow, 110 or 300 BAUD; economy of
>> expression giving brevity lead to greater throughput.
>
>I think you're just making excuses.

Rather, I'm simply explaining the history.

>I used ASR33s extensively and had no trouble typing on them. (Other than
>a small latency between pressing a key and having it printed that you
>got used to, but it didn't affect your typing speed.)

Anecdotal. I, too, have typed on an ASR-33. I did not find it
pleasant and my hands hurt after a short time.

>A 110 baud speed means max 10 characters per second, about 120 words per
>minute. That's twice as fast as an expert typist on a modern keyboard.
>
>So it's hardly as though that was the limiting factor.
>
>It's also laughable that I get shouted down when I complain about all
>the extra junk you have to type here:
>
> cc prog.c -o prog -lm
>
>compared with a minimal:
>
> cc prog
>
>but the use of 2-letter abbbreviations to save having to type out a 3 or
>4-letter word (which is easier and quicker to type type than random
>punctuation) gets lauded.

That all seems irrelevant to the introduction of two- and three-
letter command names in Unix. Which, as I mentioned, largely
came from Multics.

- Dan C.

Re: iso646.h

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 08:30:11 -0800
Organization: None to speak of
Lines: 11
Message-ID: <87bk9a7kz0.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>
<87cytrajvc.fsf@nosuchdomain.example.com>
<uoqgdv$1nog8$1@dont-email.me> <uor650$1r462$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="1a14796772ccb3100f0d224a23edc517";
logging-data="1972210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VQhOM33GTGNPz3ClSGVmB"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:rThVfRp9H8gJiQ2WN+krg+giAUQ=
sha1:mJJZGkjGsiLICYcfxJFdD1eqebQ=
 by: Keith Thompson - Wed, 24 Jan 2024 16:30 UTC

Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
[...]
> These days, it even supports object oriented code.
> FWIW, the last ISO COBOL language standard was issued in 2023.

ADD 1 TO COBOL GIVING COBOL

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

<uorepe$1slpm$1@dont-email.me>

  copy mid

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

  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: Wed, 24 Jan 2024 17:44:29 +0100
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <uorepe$1slpm$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> <87cytrajvc.fsf@nosuchdomain.example.com>
<uoqgdv$1nog8$1@dont-email.me> <uor650$1r462$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 16:44:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="69fff37576a2b2d46c16a0672ef7c7e8";
logging-data="1988406"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cWL7qUPavvaQel0XuKWIm"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Api71dCYcsqsaZCbMRo/JxtraZc=
In-Reply-To: <uor650$1r462$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Wed, 24 Jan 2024 16:44 UTC

On 24.01.2024 15:17, Lew Pitcher wrote:
> On Wed, 24 Jan 2024 09:06:22 +0100, Janis Papanagnou wrote:

> ITYM
>
> MULTIPLY A BY B GIVING C.

Memories are faint, and I consider it already pathological that
I still recall (basically) the syntax that I've seen just once,
many decades ago, and never programmen myself! ;-)

>
> and, yes, COBOL programmers are still in demand, mostly by
> financial institutions that have hundreds of millions
> of lines of COBOL code to maintain.

Yeah, I've heard so.

>
>> (Luckily I've never programmed in COBOL, even after
>> it allowed "COMPUTE c = a * b" (or some such).)
>
> I have (lucky me :-) ).

Hmm, okaaay... :-)

>
> While I don't tout COBOL as the "be all and end all" of

Sounds prophetic like: "the end of all". LOL :-)

> programming languages, it still can perform a lot of
> useful work, especially in fields where exact calculations
> are required and rounding and truncation of mathematical
> operations are well defined. Such as financial institutions.

Yes, sure.

>
> These days, it even supports object oriented code.
> FWIW, the last ISO COBOL language standard was issued in 2023.

Yes, I had noticed (and was astonished) that it's evolution
is still continued.

>
> Are you certain that you want your taxes to be calculated in
> floatingpoint? ;-)

I'm not sure about that. Quite some years ago I have actually
worked (in the country where I am living) on tax software for
the finance authorities. At least the part I was involved was
written in C++. But I cannot tell what the calculation modules
were based on, floating point or else. Though I'm sure they've
chosen a sophisticated calculation base. I doubt it was COBOL.

Janis

Re: iso646.h

<20240124084454.9@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 16:56:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <20240124084454.9@kylheku.com>
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me>
<uomjfr$sopf$1@dont-email.me> <uont40$16rlc$1@dont-email.me>
<20240123131544.17@kylheku.com> <uoqfl1$1nk81$1@dont-email.me>
Injection-Date: Wed, 24 Jan 2024 16:56:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b53ada80e44a49509d1cc2e54e523b05";
logging-data="1992822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uwJ+NuIZgrCAp2OLF0aq84Vw8yYJqncM="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:MZ+/GrW//ayrFKr6eMg2w4YD41Q=
 by: Kaz Kylheku - Wed, 24 Jan 2024 16:56 UTC

On 2024-01-24, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> To be sure I had also re-inspected the ASCII character set and it
> seems that all C characters (including these operators) are anyway
> in the ASCII domain. It's beyond me why they've used the name
> "iso646.h".

Because the macro names in that header are in the ISO 646
invariant set, expanding to tokens that use characters outside
of the invariant set.

ISO 646 looks liken a effort to standardize the "zoo" of regional ASCII
variants.

It defines a base character set which looks exactly like ASCII (correct
me if I'm wrong) of which there are national variants. It's like a
"mini ISO Latin" in 7 bits.

The Wikipedia page on it is quite good.

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

Re: iso646.h

<uorg3o$1stiv$1@dont-email.me>

  copy mid

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

  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: Wed, 24 Jan 2024 18:07:03 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <uorg3o$1stiv$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me>
<uomjfr$sopf$1@dont-email.me> <uont40$16rlc$1@dont-email.me>
<20240123131544.17@kylheku.com> <uoqfl1$1nk81$1@dont-email.me>
<20240124084454.9@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 17:07:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="69fff37576a2b2d46c16a0672ef7c7e8";
logging-data="1996383"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EnXr0hFbRNGS+UFiA4klU"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:zcpi5Bl5rNSaWGSK3iA2v192RqY=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <20240124084454.9@kylheku.com>
 by: Janis Papanagnou - Wed, 24 Jan 2024 17:07 UTC

On 24.01.2024 17:56, Kaz Kylheku wrote:
> On 2024-01-24, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>> To be sure I had also re-inspected the ASCII character set and it
>> seems that all C characters (including these operators) are anyway
>> in the ASCII domain. It's beyond me why they've used the name
>> "iso646.h".
>
> Because the macro names in that header are in the ISO 646
> invariant set, expanding to tokens that use characters outside
> of the invariant set.

I forgot about the "national variants" and the, how was it called,
IRV (International Reference Version, or some such)?.

>
> ISO 646 looks liken a effort to standardize the "zoo" of regional ASCII
> variants.
>
> It defines a base character set which looks exactly like ASCII (correct
> me if I'm wrong) of which there are national variants. It's like a
> "mini ISO Latin" in 7 bits.

A common ASCII subset with specific code points around [ ^ ] | etc.

The inherent problem with that is that even many standard symbols
from the C language were a problem; [ ] ^ { } ~ | which are in the
IRV but (prevalently) not in the national variants.

You cannot write legible C code with national non-IRV ASCII variants.

Janis

Re: iso646.h

<uorge6$1svji$1@dont-email.me>

  copy mid

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

  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: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 18:12:38 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uorge6$1svji$1@dont-email.me>
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me>
<uomjfr$sopf$1@dont-email.me> <uont40$16rlc$1@dont-email.me>
<20240123131544.17@kylheku.com> <uoqfl1$1nk81$1@dont-email.me>
<20240124084454.9@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 17:12:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="69fff37576a2b2d46c16a0672ef7c7e8";
logging-data="1998450"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z5fTN8PvI938xAhSrs0ed"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:UCVc9KCl9ylNnx2yloLxpeXryfk=
In-Reply-To: <20240124084454.9@kylheku.com>
 by: Janis Papanagnou - Wed, 24 Jan 2024 17:12 UTC

On 24.01.2024 17:56, Kaz Kylheku wrote:
>
> The Wikipedia page on it is quite good.

The German Wikipedia has a table that is better legible IMO
https://de.wikipedia.org/wiki/ISO_646

Janis

Re: iso646.h

<uorh4g$1sonk$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 12:24:32 -0500
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <uorh4g$1sonk$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> <GVTrN.46982$U1cc.26176@fx04.iad>
<uop3ml$1d8ao$2@dont-email.me> <uop7p7$1eahb$1@dont-email.me>
<uopcfr$1f17i$6@dont-email.me> <20240123140604.828@kylheku.com>
<uopf3q$1fgi6$1@dont-email.me> <uoqgmf$1nog8$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 17:24:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9784eae7c916e6c05aac88b38cd3ce4e";
logging-data="1991412"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18L3x4vvWz0hRSIcifyxhR/wH+MmeXNzko="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:zOuf/J16lb2ZCpOcHNfzbynSLAo=
Content-Language: en-US
In-Reply-To: <uoqgmf$1nog8$3@dont-email.me>
 by: James Kuyper - Wed, 24 Jan 2024 17:24 UTC

On 1/24/24 03:10, Janis Papanagnou wrote:
> On 23.01.2024 23:37, Kalevi Kolttonen wrote:
>>
>> [...] I am
>> pretty sure that not all computer languages
>> provide guarantees about the order of evaluation.
>
> What?!

Could you explain what surprises you about that statement? As quoted,
it's a general statement which includes C: "Except as specified later,
side effects and value computations of subexpressions are unsequenced."

Now, logical-AND and logical-OR are two cases where the order of
evaluation is, in fact, specified. Are you expressing surprise that
there are other languages where that's not the case? I can't remember
where, but I'm fairly sure I've seen a language where the closest
equivalent of C's (expression1 && expression2) causes both
sub-expressions to be evaluated, in an arbitrary order, before
evaluating the equivalent of && itself. Unfortunately, I don't remember
where.

Re: iso646.h

<mMbsN.253591$Wp_8.104164@fx17.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: iso646.h
Newsgroups: comp.lang.c
References: <uokhnk$eiln$1@dont-email.me> <uol92t$l82b$3@dont-email.me> <uomjfr$sopf$1@dont-email.me> <uoopm9$1blvh$1@dont-email.me> <uop0r1$1d4d4$1@dont-email.me> <87cytrajvc.fsf@nosuchdomain.example.com> <uoqgdv$1nog8$1@dont-email.me> <uor650$1r462$1@dont-email.me> <uorepe$1slpm$1@dont-email.me>
Lines: 14
Message-ID: <mMbsN.253591$Wp_8.104164@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 24 Jan 2024 17:27:46 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 24 Jan 2024 17:27:46 GMT
X-Received-Bytes: 1346
 by: Scott Lurndal - Wed, 24 Jan 2024 17:27 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>On 24.01.2024 15:17, Lew Pitcher wrote:
>> On Wed, 24 Jan 2024 09:06:22 +0100, Janis Papanagnou wrote:

>> programming languages, it still can perform a lot of
>> useful work, especially in fields where exact calculations
>> are required and rounding and truncation of mathematical
>> operations are well defined. Such as financial institutions.
>
>Yes, sure.

On one of the Burroughs mainframe lines, the disk
defragmentation utility (called SQUASH) was written
in COBOL68.

Re: iso646.h

<uorhuv$1t7db$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 18:38:38 +0100
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <uorhuv$1t7db$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> <GVTrN.46982$U1cc.26176@fx04.iad>
<uop3ml$1d8ao$2@dont-email.me> <uop7p7$1eahb$1@dont-email.me>
<uopcfr$1f17i$6@dont-email.me> <20240123140604.828@kylheku.com>
<uopf3q$1fgi6$1@dont-email.me> <uoqgmf$1nog8$3@dont-email.me>
<uorh4g$1sonk$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 17:38:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="69fff37576a2b2d46c16a0672ef7c7e8";
logging-data="2006443"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jeYL8xnD22xdfYeYRC0o1"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:rg9EFYCUwKCvBdzqdkxPnTVJ7po=
In-Reply-To: <uorh4g$1sonk$2@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Wed, 24 Jan 2024 17:38 UTC

On 24.01.2024 18:24, James Kuyper wrote:
> On 1/24/24 03:10, Janis Papanagnou wrote:
>> On 23.01.2024 23:37, Kalevi Kolttonen wrote:
>>>
>>> [...] I am
>>> pretty sure that not all computer languages
>>> provide guarantees about the order of evaluation.
>>
>> What?!
>
> Could you explain what surprises you about that statement?

It sounds so wrong, not matching anything I've experienced in the
programming languages I heard about and about compiler construction
that I can only express my astonishment about such a statement. The
poster's statement itself is not explained, though, and if anything,
the poster should first explain what makes him "pretty sure" about
it before we can exchange arguments.

I may have been lucky that such a fundamental property as operational
semantics defining evaluation order have been part of all languages I
met, especially in the context of expressions connected by operators
we were speaking about here.

> [...]
>
> Now, logical-AND and logical-OR are two cases where the order of
> evaluation is, in fact, specified. Are you expressing surprise that
> there are other languages where that's not the case? I can't remember
> where, but I'm fairly sure I've seen a language where the closest
> equivalent of C's (expression1 && expression2) causes both
> sub-expressions to be evaluated, in an arbitrary order, before
> evaluating the equivalent of && itself. Unfortunately, I don't remember
> where.

In functional languages without side effects it might not be an issue.

The closest I met were theoretical expressions (like e.g. Dijktra's
Guards, or how they were called) in per se non-deterministic contexts.

Janis

Re: iso646.h

<uori6m$1t8p7$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: iso646.h
Date: Wed, 24 Jan 2024 18:42:45 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uori6m$1t8p7$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> <GVTrN.46982$U1cc.26176@fx04.iad>
<uop3ml$1d8ao$2@dont-email.me> <uop7p7$1eahb$1@dont-email.me>
<uopcfr$1f17i$6@dont-email.me> <20240123140604.828@kylheku.com>
<uopf3q$1fgi6$1@dont-email.me> <uoqgmf$1nog8$3@dont-email.me>
<uorh4g$1sonk$2@dont-email.me> <uorhuv$1t7db$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 17:42:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="69fff37576a2b2d46c16a0672ef7c7e8";
logging-data="2007847"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19E+i7tl+m72Ttyi0uKQ1LF"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:bOw/b7NhojZSzSh6LjfDIuI8cL0=
In-Reply-To: <uorhuv$1t7db$1@dont-email.me>
 by: Janis Papanagnou - Wed, 24 Jan 2024 17:42 UTC

On 24.01.2024 18:38, Janis Papanagnou wrote:
> [...]
>
> The closest I met were theoretical expressions (like e.g. Dijktra's
> Guards, or how they were called) in per se non-deterministic contexts.

Ah, I forgot; and I think also in Intercal... - wasn't (at least) the
"politeness check" non-deterministic? - ...in case it matters. :-)

>
> Janis
>


devel / comp.lang.c / Re: iso646.h

Pages:1234567891011121314151617181920212223242526
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor