Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Maybe it's time to break that. -- Larry Wall in <199710311718.JAA19082@wall.org>


devel / comp.arch / Re: Paper about ISO C

SubjectAuthor
* Paper about ISO Cclamky
+- Re: Paper about ISO CBGB
+* Re: Paper about ISO CDavid Brown
|+* Re: Paper about ISO CBGB
||+* Re: Paper about ISO CMitchAlsup
|||+* Re: Paper about ISO CMitchAlsup
||||`* Re: Paper about ISO CBranimir Maksimovic
|||| `* Re: Paper about ISO CGeorge Neuner
||||  +- Re: Paper about ISO CBranimir Maksimovic
||||  `* Re: Paper about ISO CEricP
||||   `* Re: Paper about ISO CIvan Godard
||||    `* Re: Paper about ISO CEricP
||||     `* Re: Paper about ISO CMitchAlsup
||||      +* Re: Paper about ISO CBGB
||||      |`* Re: Paper about ISO CStephen Fuld
||||      | +* Re: Paper about ISO CIvan Godard
||||      | |+* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | ||+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |||+- Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |||+* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | ||||`- Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |||`- Re: addressing and protection, was Paper about ISO CBill Findlay
||||      | ||`* Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | || +- Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | || `- Re: addressing and protection, was Paper about ISO CBranimir Maksimovic
||||      | |`* Re: addressing and protection, was Paper about ISO CEricP
||||      | | +* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | | |`- Re: addressing and protection, was Paper about ISO CEricP
||||      | | `* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  |+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  || `* Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  ||  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  ||  |+- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  |+* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  ||  ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  || `* Re: addressing and protection, was Paper about ISO CAnton Ertl
||||      | |  ||  ||  `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  |`* Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |  ||  | +- Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |  ||  | `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  |`* Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  | +* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | | `* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  |+* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |  ||+- Re: addressing and protection, was Paper about ISO CChris M. Thomasson
||||      | |  | |  ||+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  |||`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  ||+* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  |||`* Re: addressing and protection, was Paper about ISO CEricP
||||      | |  | |  ||| `- Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  ||`- Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  | |  |`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  `* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |   +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |   `* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |    +* Address space consumption (was: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |    |`- Re: Address space consumption (was: addressing and protection, wasMitchAlsup
||||      | |  | |    +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |    |`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |    `* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |     `* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |      +* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |      |`* Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |      | `- Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |      `* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |       +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       |`* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |`* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |       | | `* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |  `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | |   +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |   +- Re: addressing and protection, was Paper about ISO Cclamky
||||      | |  | |       | |   `* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |       | |    +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    |`* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |       | |    | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | |+* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | ||+* Re: educational computation, was addressing and protection, was Paper about ISO John Levine
||||      | |  | |       | |    | |||`* Re: educational computation, was addressing and protection, was PaperIvan Godard
||||      | |  | |       | |    | ||| `- Re: educational computation, was addressing and protection, was PaperTerje Mathisen
||||      | |  | |       | |    | ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | || `* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | ||  +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | ||  `- Re: addressing and protection, was Paper about ISO CDavid Brown
||||      | |  | |       | |    | |+- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | | |+- Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | | +* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | | | |+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | | ||`- Re: addressing and protection, was Paper about ISO CJimBrakefield
||||      | |  | |       | |    | | | |`* Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | | | `* Re: addressing and protection, was Paper about ISO CTim Rentsch
||||      | |  | |       | |    | | | |  `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | | | `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | `- Re: addressing and protection, was Paper about ISO CAnne & Lynn Wheeler
||||      | |  | |       | |    | `- Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    `* Re: what is cheap these days, addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |       | `* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |       +* RAM size (was: addressing and protection, was Paper about ISO C)Anton Ertl
||||      | |  | |       `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | `* Re: Paper about ISO CBGB
||||      `- Re: Paper about ISO CEricP
|||+* Re: Paper about ISO CBranimir Maksimovic
|||+* Re: Paper about ISO CThomas Koenig
|||+* Re: Paper about ISO Cantispam
|||`- Re: Paper about ISO CQuadibloc
||+* Re: Paper about ISO CThomas Koenig
||`* Re: Paper about ISO CDavid Brown
|+* Re: Paper about ISO CThomas Koenig
|`* Re: Paper about ISO CVictor Yodaiken
`* Re: Paper about ISO CKent Dickey

Pages:123456789101112131415161718192021222324252627282930313233
Re: Paper about ISO C

<2021Oct27.125200@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21687&group=comp.arch#21687

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 10:52:00 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 38
Message-ID: <2021Oct27.125200@mips.complang.tuwien.ac.at>
References: <87fstdumxd.fsf@hotmail.com> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org> <2021Oct12.185057@mips.complang.tuwien.ac.at> <jwvzgre88y4.fsf-monnier+comp.arch@gnu.org> <5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com> <sku3dr$1hb$2@dont-email.me> <5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com> <sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at> <sl8m0n$ipt$1@newsreader4.netcologne.de> <jwvcznsrlmn.fsf-monnier+comp.arch@gnu.org> <sl937s$e89$2@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="e40f03910385704f2499c92e2d83a519";
logging-data="26935"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19b6lmZZuxY9h62jAnXapLX"
Cancel-Lock: sha1:8Or07+VxXoqvgvd6UlL8NibhsUM=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 27 Oct 2021 10:52 UTC

David Brown <david.brown@hesbynett.no> writes:
>On 26/10/2021 14:59, Stefan Monnier wrote:
>> Thomas Koenig [2021-10-26 10:41:27] wrote:
>>> Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
>>>> Currently Gforth's configure.ac checks whether the C compiler
>>>> understands the following flags (and uses all those that the C
>>>> compiler understands):
>>>>
>>>> -fno-gcse
>>>> -fcaller-saves
>>>> -fno-defer-pop
>>>> -fno-inline
>>>> -fwrapv
>>>> -fchar-unsigned
>>>> -fno-strict-aliasing
>>>> -fno-cse-follow-jumps
>>>> -fno-reorder-blocks
>>>> -fno-reorder-blocks-and-partition
>>>> -fno-toplevel-reorder
>>>> -fno-trigraphs
>>>> -falign-labels=1
>>>> -falign-loops=1
>>>> -falign-jumps=1
>>>> -fno-delete-null-pointer-checks
....
>I am not clear here whether these are flags used when compiling the
>Gforth transpiler tool, or whether they are flags used when compiling
>the output of Gforth.

It seems that you have the wrong impression of the workings of Gforth.
Gforth does not compile Forth source to C source; if we ignore the
foreign function interface, Gforth does not perform call a C compiler
when the user runs Gforth and compiles and runs a Forth program.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Paper about ISO C

<slbbgl$a75$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21688&group=comp.arch#21688

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 13:00:37 +0200
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <slbbgl$a75$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com>
<jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org>
<5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me>
<5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at>
<sl8m0n$ipt$1@newsreader4.netcologne.de>
<jwvcznsrlmn.fsf-monnier+comp.arch@gnu.org> <sl937s$e89$2@dont-email.me>
<2021Oct27.125200@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 27 Oct 2021 11:00:37 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="dd2689dcfec063b94961eda71439e8a9";
logging-data="10469"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LG8MNFA9KaCAwd/cWWNaXFRHxwYSjYls="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:EFU3PRyEw+RJKr172cx7YL5Arzc=
In-Reply-To: <2021Oct27.125200@mips.complang.tuwien.ac.at>
Content-Language: en-GB
 by: David Brown - Wed, 27 Oct 2021 11:00 UTC

On 27/10/2021 12:52, Anton Ertl wrote:
> David Brown <david.brown@hesbynett.no> writes:
>> On 26/10/2021 14:59, Stefan Monnier wrote:
>>> Thomas Koenig [2021-10-26 10:41:27] wrote:
>>>> Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
>>>>> Currently Gforth's configure.ac checks whether the C compiler
>>>>> understands the following flags (and uses all those that the C
>>>>> compiler understands):
>>>>>
>>>>> -fno-gcse
>>>>> -fcaller-saves
>>>>> -fno-defer-pop
>>>>> -fno-inline
>>>>> -fwrapv
>>>>> -fchar-unsigned
>>>>> -fno-strict-aliasing
>>>>> -fno-cse-follow-jumps
>>>>> -fno-reorder-blocks
>>>>> -fno-reorder-blocks-and-partition
>>>>> -fno-toplevel-reorder
>>>>> -fno-trigraphs
>>>>> -falign-labels=1
>>>>> -falign-loops=1
>>>>> -falign-jumps=1
>>>>> -fno-delete-null-pointer-checks
> ...
>> I am not clear here whether these are flags used when compiling the
>> Gforth transpiler tool, or whether they are flags used when compiling
>> the output of Gforth.
>
> It seems that you have the wrong impression of the workings of Gforth.
> Gforth does not compile Forth source to C source; if we ignore the
> foreign function interface, Gforth does not perform call a C compiler
> when the user runs Gforth and compiles and runs a Forth program.
>

Thanks for the clarification.

That is how I originally thought it worked, but I got a little mixed
from some of the recent posts. Code with lots of gotos and labels is
common in generated C code but rare in human-written code, so the
example shown added to my confusion.

Re: educational computation, was addressing and protection, was Paper about ISO C

<slbhfp$14sk$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21689&group=comp.arch#21689

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!ppYixYMWAWh/woI8emJOIQ.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: educational computation, was addressing and protection, was Paper
about ISO C
Date: Wed, 27 Oct 2021 14:42:33 +0200
Organization: Aioe.org NNTP Server
Message-ID: <slbhfp$14sk$1@gioia.aioe.org>
References: <sjv4u6$37u$1@dont-email.me>
<o0n9ng9kh6696spmdpvqghpnuoh7q4o4st@4ax.com> <sl38mv$ncj$1@dont-email.me>
<sl40k0$tdq$1@dont-email.me> <sl4jud$1dju$1@gal.iecc.com>
<sl4mqq$oss$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="37780"; posting-host="ppYixYMWAWh/woI8emJOIQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101
Firefox/60.0 SeaMonkey/2.53.9.1
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Wed, 27 Oct 2021 12:42 UTC

Ivan Godard wrote:
> On 10/24/2021 2:41 PM, John Levine wrote:
>> When I was an undergraduate I was thrilled to be able to use a Wang
>> calculator
>> with Nixie tube display in the department library for some of my
>> chemistry
>> homework.  But I still have a slide rule in my backpack.  You never know.

I don't keep it in my backpack, but I did save my best slide rule when
we moved earlier this year.
>
> Ah, Wang Labs. We did a Fortran compiler for them. An Wang was the only
> person I know of who personally invented three billion dollar industries
> - calculators, core memory, and word processing - and back when a
> billion was a real number.

Sam Eyde basically started most of the industrialization of Norway, i.e.
both Hydro and Elkem, along with the hydroelectric power plants he
needed to run them. When he was finally forced out of Hydro in 1917 they
had to give him a _very_ golden parachute of 250K NOK/year, at a point
when that was worth well over a million dollars in today's money.

>
> The family was a tragic confirmation of the adage of "slum to palace to
> slum in four generations".

We tend to have less of those here, probably related to the fact that we
also have very few lottery jackpot winners who go overboard:

Typical reaction is "Get rid of all debts, buy a car for my parents, put
the rest in the bank/index funds. Go back to work on Monday"

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: Paper about ISO C

<86ilxifx0p.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21690&group=comp.arch#21690

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 05:54:46 -0700
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <86ilxifx0p.fsf@linuxsc.com>
References: <87fstdumxd.fsf@hotmail.com> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org> <2021Oct12.185057@mips.complang.tuwien.ac.at> <jwvzgre88y4.fsf-monnier+comp.arch@gnu.org> <5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com> <sku3dr$1hb$2@dont-email.me> <5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com> <sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at> <sl8m0n$ipt$1@newsreader4.netcologne.de> <2021Oct26.174949@mips.complang.tuwien.ac.at> <864k93gtz8.fsf@linuxsc.com> <2021Oct27.122342@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="8e95ceadfbb970fd55dad341f81b1190";
logging-data="29283"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iXSZuwM/snu2SAQBuoK2JnBmnEqpN7Z4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:+OiJGwVLhES9lEIhlTjoXbBGra8=
sha1:RzxS5tw9AaocYeSalOXfSQAV1Yg=
 by: Tim Rentsch - Wed, 27 Oct 2021 12:54 UTC

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>
>>> Thomas Koenig <tkoenig@netcologne.de> writes:
>>
>> [...]
>>
>>>> so your code is certainly very much non-conforming.
>>>
>>> In terms of the C standard, it's a [conforming] program.

[...]

>> Unfortunately the C standard does not define a term that matches
>> something close to what I think you mean, which is a program
>> that compiles and is accepted by the vast majority of C
>> implementations, including those without any language extensions.
>
> In the present case, I mean a "conforming program" in the standard
> C sense. Gforth uses several language extensions. There are
> dozens of C compilers that compile Gforth (many "versions" of gcc
> and clang) and it works on many architectures,

In that case I think it's better if you say something like that
rather than just saying it's a conforming program. People who are
not familiar with how the C standard defines this term will very
probably have a wrong impression of what you mean, and people who
/are/ familiar with how the term is defined might easily think you
mean something much weaker than what is the case. For example, you
might say "It's a conforming program, but more importantly it is
written in standard (if not absolutely portable) C, plus a few
language extensions supported by both gcc and clang [and some of
the others, if there are others]." That tells your readers a lot
more than just saying it's a conforming program.

> but of course this does not matter for the conformance levels
> of the C standard.

I think it's misleading to characterize the terms "conforming
program" and "strictly conforming program" as conformance
levels. The ISO C standard defines these terms for its own
purposes, not as metrics for general C programs to be measured
against. Most C programs fall more in the middle of these two
extremes (not counting the "C" programs that fall outside the
range by virtue of being compilable only by compilers invoked
in a non-conforming mode).

> Gforth uses several language extensions.

Do you mean language extensions, or compiler options? Out of
curiosity, do you mind if I ask what options or what extensions
those are?

Re: Paper about ISO C

<874d7c9d-aa0c-41f1-8237-c465a8174843n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21691&group=comp.arch#21691

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:4449:: with SMTP id w9mr24933375qkp.273.1635346097062;
Wed, 27 Oct 2021 07:48:17 -0700 (PDT)
X-Received: by 2002:a05:6830:2b06:: with SMTP id l6mr25753963otv.333.1635346096818;
Wed, 27 Oct 2021 07:48:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 27 Oct 2021 07:48:16 -0700 (PDT)
In-Reply-To: <86mtmvf7a9.fsf@linuxsc.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:2d0a:ea86:3c64:bd39;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:2d0a:ea86:3c64:bd39
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me> <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<hiN7J.53059$3p3.5024@fx16.iad> <9e23mg1uk377av16575v343v97f128bbe6@4ax.com>
<Gwh8J.222306$T_8.186929@fx48.iad> <j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
<9a019b14-481d-4ae9-a8ae-8f0c2d94bf57n@googlegroups.com> <vpc8mg9nie7kcpik5knob6po2rt4goftvd@4ax.com>
<864k9mp8d2.fsf@linuxsc.com> <sk4eht$b89$1@dont-email.me> <86ee8bibia.fsf@linuxsc.com>
<23a7aa84-1619-497c-b435-95d647cb0c62n@googlegroups.com> <868ryhgf3p.fsf@linuxsc.com>
<2faae7cb-1004-4074-abeb-47a8e1729ed9n@googlegroups.com> <86mtmvf7a9.fsf@linuxsc.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <874d7c9d-aa0c-41f1-8237-c465a8174843n@googlegroups.com>
Subject: Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 27 Oct 2021 14:48:17 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 23
 by: MitchAlsup - Wed, 27 Oct 2021 14:48 UTC

On Tuesday, October 26, 2021 at 10:58:24 PM UTC-5, Tim Rentsch wrote:
> MitchAlsup <Mitch...@aol.com> writes:
>
> > On Monday, October 25, 2021 at 12:59:40 PM UTC-5, Tim Rentsch wrote:
> >
> >> MitchAlsup <Mitch...@aol.com> writes:
> >>
> >>> On Saturday, October 23, 2021 at 6:09:53 PM UTC-5, Tim Rentsch wrote:
> >
> >>>> In truth GC works just fine for many or most application areas,
> >>>
> >>> The other truth is that most applications do not need any GC
> >>> whatsoever. {Where most means over 50%}
> >>
> >> That is a vacuous statement.
> >
> > OK, how much GC does 'cat' need ? 'more' ? 'less', 'ls', '|',
> > 'vi',.....'dev/null',...
>
> Here the word vacuous does not mean wrong or stupid but devoid
> of any useful content. Sorry for the ambiguity.
<
So the billion uses of 'cat' every day performs nothing of value to the users
invoking 'cat' ?

Re: Specifying timing constraints was Re: Paper about ISO C

<f8b8837b-eb71-4550-a705-be41614fb8b0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21692&group=comp.arch#21692

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:4152:: with SMTP id o79mr25200169qka.169.1635346479107;
Wed, 27 Oct 2021 07:54:39 -0700 (PDT)
X-Received: by 2002:aca:5b56:: with SMTP id p83mr4051026oib.119.1635346478904;
Wed, 27 Oct 2021 07:54:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 27 Oct 2021 07:54:38 -0700 (PDT)
In-Reply-To: <2021Oct27.104705@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:2d0a:ea86:3c64:bd39;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:2d0a:ea86:3c64:bd39
References: <87fstdumxd.fsf@hotmail.com> <skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com> <skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com> <86a6j6l8ci.fsf@linuxsc.com>
<LClbJ.602$xjIc.241@fx01.iad> <skl12c$i1n$1@dont-email.me>
<qgDbJ.3$in7.0@fx22.iad> <skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com> <itkgveFa1f5U1@mid.individual.net>
<86lf2hgjkd.fsf@linuxsc.com> <drVdJ.292$831.190@fx40.iad> <2021Oct27.104705@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f8b8837b-eb71-4550-a705-be41614fb8b0n@googlegroups.com>
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 27 Oct 2021 14:54:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 30
 by: MitchAlsup - Wed, 27 Oct 2021 14:54 UTC

On Wednesday, October 27, 2021 at 4:09:17 AM UTC-5, Anton Ertl wrote:
> EricP <ThatWould...@thevillage.com> writes:
> >For integer * and / signed and unsigned map to different instructions.
>
> For 2s-complement representation of signed numbers and wrapping on
> overflow non-widening multiplication is the same for signed and
> unsigned numbers, and therefore the same instruction. Note that,
> e.g., AMD64 only has two widening multiplication instructions MUL
> (unsigned) and IMUL (signed) with one explicit operand, but only one
> non-widening instruction: IMUL with two or three explicit operands.
>
> That's because
>
> ((a mod 2^n) * (b mod 2^n)) mod 2^n = (a*b) mod 2^n
>
> (like for addition and subtraction).
>
> Whether you interpret the mod 2^n numbers as signed or unsigned is
> immaterial.
>
> The "/" operation is a different kettle of fish, though.
<
While the 'bits' are correct, the exceptions are different::
signed × can overflow if there ends up significant bits > 2^n
>
> - anton
> --
> 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
> Mitch Alsup, <c17fcd89-f024-40e7...@googlegroups.com>

Re: Paper about ISO C

<slbutv$6dk$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21693&group=comp.arch#21693

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 09:31:57 -0700
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <slbutv$6dk$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org>
<5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me>
<5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at>
<sl79bl$jei$1@dont-email.me> <itpou1Fa8stU1@mid.individual.net>
<86zgqvfe7h.fsf@linuxsc.com> <slas5g$r1g$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 27 Oct 2021 16:32:00 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="03da84362d429c80e93a5a8f8393f974";
logging-data="6580"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MzhqM7J1CNhTmBhWv0gx1XUR5Rfk0eOA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.1
Cancel-Lock: sha1:VA4HjKyBHkH9QhpA90UwMO7uXJk=
In-Reply-To: <slas5g$r1g$1@dont-email.me>
Content-Language: en-US
 by: Stephen Fuld - Wed, 27 Oct 2021 16:31 UTC

On 10/26/2021 11:38 PM, David Brown wrote:
> On 27/10/2021 03:28, Tim Rentsch wrote:
>> Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
>>
>>>> [.. volatile ..]
>>>
>>> These discussions of volatile, and execution order wrt timing,
>>> gave me an idea: perhaps C (and other languages) should allow
>>> marking functions (subprograms) as "volatile", with the meaning
>>> that all of the effects of a call of that function (including use
>>> of processor time) should be ordered as volatile accesses are
>>> ordered, with respect to other volatile accesses.
>>>
>>> For example, if x and y are volatile variables, and foo is a
>>> volatile function, then in this code
>>>
>>> x = 1;
>>> foo ();
>>> y = 1;
>>>
>>> we would be sure that all effects and all dynamic resource usage
>>> of the foo() call would occur between the assignments to x and to
>>> y.
>>>
>>> A more flexible approach would be to mark selected function calls
>>> as volatile, in the same way that C allows in-line use of
>>> pointer-to-volatile to force a volatile access to an object that
>>> is not itself marked volatile. Something like:
>>>
>>> x = 1;
>>> (volatile) foo ();
>>> y = 1;
>>>
>>> Are volatile functions and/or volatile function calls a good idea?
>>
>> Let me propose a simpler mechanism that I believe does a better
>> job of what (I think) it is you want to do. By way of example:
>>
>> * (_Volatile int *) &x = 1;
>> foo();
>> * (_Volatile int *) &y = 1;
>>
>> The semantics of the new _Volatile qualifier, speaking
>> informally, is that it imposes a sequence point in the actual
>> machine, not just in the abstract machine. So all logically
>> previous evaluations must be finished before a volatile access,
>> and after a volatile access all logically subsequent evaluations
>> must not yet be started. To say that another way, no expression
>> evaluation (including side effects) may be "moved across" a
>> read or write to a _Volatile object.
>>
>> Note that foo() is a call to an ordinary function, and expressions
>> in foo() may be re-ordered in all the usual ways, except that they
>> must not be "moved across" the assignment to x or the assignment
>> to y.
>>
>
> That does sound like a simpler mechanism for the same effect. But
> perhaps we can go further and simpler:
>
> x = 1;
> _Execution_barrier();
> foo();
> _Execution_barrier();
> y = 1;
>
> _Execution_barrier() would be an implementation-dependent macro that
> imposes a sequence point in the actual machine, in the manner described
> by Tim above. I see no advantage to making it a qualifier or tying it
> to a particular lvalue access, since it acts on the entire machine.
>
> It would still be a big challenge (I believe) to get clear and precise
> definitions for how this would work, but I think it would be easier to
> define, understand and implement than "volatile functions" or a new
> "_Volatile" qualifier.

I think there are two separable questions here. One is what the
mechanism does. The second is whether the mechanism should be a
property of the function or of the invocation of that function. Or
equivalently, should the syntax (whatever it is) be required for each
call, or should it be invoked automatically (without additional syntax)
every time the function is invoked.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Paper about ISO C

<d60c3693-fb4b-40b1-a296-0d9fd636756dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21695&group=comp.arch#21695

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:4e66:: with SMTP id ec6mr9402350qvb.48.1635353312822;
Wed, 27 Oct 2021 09:48:32 -0700 (PDT)
X-Received: by 2002:a9d:7482:: with SMTP id t2mr2955909otk.350.1635353312591;
Wed, 27 Oct 2021 09:48:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 27 Oct 2021 09:48:32 -0700 (PDT)
In-Reply-To: <slbutv$6dk$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:2d0a:ea86:3c64:bd39;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:2d0a:ea86:3c64:bd39
References: <87fstdumxd.fsf@hotmail.com> <sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com> <sk437c$672$1@dont-email.me>
<jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org> <2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org> <5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me> <5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at>
<sl79bl$jei$1@dont-email.me> <itpou1Fa8stU1@mid.individual.net>
<86zgqvfe7h.fsf@linuxsc.com> <slas5g$r1g$1@dont-email.me> <slbutv$6dk$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d60c3693-fb4b-40b1-a296-0d9fd636756dn@googlegroups.com>
Subject: Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 27 Oct 2021 16:48:32 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 89
 by: MitchAlsup - Wed, 27 Oct 2021 16:48 UTC

On Wednesday, October 27, 2021 at 11:32:02 AM UTC-5, Stephen Fuld wrote:
> On 10/26/2021 11:38 PM, David Brown wrote:
> > On 27/10/2021 03:28, Tim Rentsch wrote:
> >> Niklas Holsti <niklas...@tidorum.invalid> writes:
> >>
> >>>> [.. volatile ..]
> >>>
> >>> These discussions of volatile, and execution order wrt timing,
> >>> gave me an idea: perhaps C (and other languages) should allow
> >>> marking functions (subprograms) as "volatile", with the meaning
> >>> that all of the effects of a call of that function (including use
> >>> of processor time) should be ordered as volatile accesses are
> >>> ordered, with respect to other volatile accesses.
> >>>
> >>> For example, if x and y are volatile variables, and foo is a
> >>> volatile function, then in this code
> >>>
> >>> x = 1;
> >>> foo ();
> >>> y = 1;
> >>>
> >>> we would be sure that all effects and all dynamic resource usage
> >>> of the foo() call would occur between the assignments to x and to
> >>> y.
> >>>
> >>> A more flexible approach would be to mark selected function calls
> >>> as volatile, in the same way that C allows in-line use of
> >>> pointer-to-volatile to force a volatile access to an object that
> >>> is not itself marked volatile. Something like:
> >>>
> >>> x = 1;
> >>> (volatile) foo ();
> >>> y = 1;
> >>>
> >>> Are volatile functions and/or volatile function calls a good idea?
> >>
> >> Let me propose a simpler mechanism that I believe does a better
> >> job of what (I think) it is you want to do. By way of example:
> >>
> >> * (_Volatile int *) &x = 1;
> >> foo();
> >> * (_Volatile int *) &y = 1;
> >>
> >> The semantics of the new _Volatile qualifier, speaking
> >> informally, is that it imposes a sequence point in the actual
> >> machine, not just in the abstract machine. So all logically
> >> previous evaluations must be finished before a volatile access,
> >> and after a volatile access all logically subsequent evaluations
> >> must not yet be started. To say that another way, no expression
> >> evaluation (including side effects) may be "moved across" a
> >> read or write to a _Volatile object.
> >>
> >> Note that foo() is a call to an ordinary function, and expressions
> >> in foo() may be re-ordered in all the usual ways, except that they
> >> must not be "moved across" the assignment to x or the assignment
> >> to y.
> >>
> >
> > That does sound like a simpler mechanism for the same effect. But
> > perhaps we can go further and simpler:
> >
> > x = 1;
> > _Execution_barrier();
> > foo();
> > _Execution_barrier();
> > y = 1;
> >
> > _Execution_barrier() would be an implementation-dependent macro that
> > imposes a sequence point in the actual machine, in the manner described
> > by Tim above. I see no advantage to making it a qualifier or tying it
> > to a particular lvalue access, since it acts on the entire machine.
> >
> > It would still be a big challenge (I believe) to get clear and precise
> > definitions for how this would work, but I think it would be easier to
> > define, understand and implement than "volatile functions" or a new
> > "_Volatile" qualifier.
<
> I think there are two separable questions here. One is what the
> mechanism does. The second is whether the mechanism should be a
> property of the function or of the invocation of that function. Or
> equivalently, should the syntax (whatever it is) be required for each
> call, or should it be invoked automatically (without additional syntax)
> every time the function is invoked.
<
None of this would be necessary if foo() was simply compiled separately
all the way down to code so the compiler could not have any knowledge
of what it does or does not do.
> --
> - Stephen Fuld
> (e-mail address disguised to prevent spam)

Re: Paper about ISO C

<ittf5fF1re4U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21696&group=comp.arch#21696

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 20:04:47 +0300
Organization: Tidorum Ltd
Lines: 45
Message-ID: <ittf5fF1re4U1@mid.individual.net>
References: <87fstdumxd.fsf@hotmail.com> <sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org>
<5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me>
<5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at>
<sl79bl$jei$1@dont-email.me> <itpou1Fa8stU1@mid.individual.net>
<86zgqvfe7h.fsf@linuxsc.com> <slas5g$r1g$1@dont-email.me>
<slbutv$6dk$1@dont-email.me>
<d60c3693-fb4b-40b1-a296-0d9fd636756dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net XVWw7Q+/Z3d/dmzx6KaZag/nPjLQSYN6keYR2OOlCshrfKf33R
Cancel-Lock: sha1:vxpTGyo8kFkrwanRppnKsPsi/o0=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <d60c3693-fb4b-40b1-a296-0d9fd636756dn@googlegroups.com>
Content-Language: en-US
 by: Niklas Holsti - Wed, 27 Oct 2021 17:04 UTC

On 2021-10-27 19:48, MitchAlsup wrote:
> On Wednesday, October 27, 2021 at 11:32:02 AM UTC-5, Stephen Fuld wrote:
>> On 10/26/2021 11:38 PM, David Brown wrote:
>>> On 27/10/2021 03:28, Tim Rentsch wrote:
>>>> Niklas Holsti <niklas...@tidorum.invalid> writes:
>>>>
>>>>>> [.. volatile ..]

[ snip ]

>>> That does sound like a simpler mechanism for the same effect. But
>>> perhaps we can go further and simpler:
>>>
>>> x = 1;
>>> _Execution_barrier();
>>> foo();
>>> _Execution_barrier();
>>> y = 1;
>>>
>>> _Execution_barrier() would be an implementation-dependent macro that
>>> imposes a sequence point in the actual machine, in the manner described
>>> by Tim above. I see no advantage to making it a qualifier or tying it
>>> to a particular lvalue access, since it acts on the entire machine.
>>>
>>> It would still be a big challenge (I believe) to get clear and precise
>>> definitions for how this would work, but I think it would be easier to
>>> define, understand and implement than "volatile functions" or a new
>>> "_Volatile" qualifier.
> <
>> I think there are two separable questions here. One is what the
>> mechanism does. The second is whether the mechanism should be a
>> property of the function or of the invocation of that function. Or
>> equivalently, should the syntax (whatever it is) be required for each
>> call, or should it be invoked automatically (without additional syntax)
>> every time the function is invoked.
> <
> None of this would be necessary if foo() was simply compiled separately
> all the way down to code so the compiler could not have any knowledge
> of what it does or does not do.

Except if link-time optimization is used. And the _Execution_barrier
mechanism could be used for any code, not just for function calls.

Re: Specifying timing constraints was Re: Paper about ISO C

<IIfeJ.1174$I%1.439@fx36.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21697&group=comp.arch#21697

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <skhjk3$9p4$1@dont-email.me> <f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com> <skjkqv$nd3$1@dont-email.me> <0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com> <86a6j6l8ci.fsf@linuxsc.com> <LClbJ.602$xjIc.241@fx01.iad> <skl12c$i1n$1@dont-email.me> <qgDbJ.3$in7.0@fx22.iad> <skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me> <86ilxnii8c.fsf@linuxsc.com> <itkgveFa1f5U1@mid.individual.net> <86lf2hgjkd.fsf@linuxsc.com> <drVdJ.292$831.190@fx40.iad> <2021Oct27.104705@mips.complang.tuwien.ac.at>
In-Reply-To: <2021Oct27.104705@mips.complang.tuwien.ac.at>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 53
Message-ID: <IIfeJ.1174$I%1.439@fx36.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Wed, 27 Oct 2021 17:08:56 UTC
Date: Wed, 27 Oct 2021 13:08:08 -0400
X-Received-Bytes: 3453
 by: EricP - Wed, 27 Oct 2021 17:08 UTC

Anton Ertl wrote:
> EricP <ThatWouldBeTelling@thevillage.com> writes:
>> For integer * and / signed and unsigned map to different instructions.
>
> For 2s-complement representation of signed numbers and wrapping on
> overflow non-widening multiplication is the same for signed and
> unsigned numbers, and therefore the same instruction. Note that,
> e.g., AMD64 only has two widening multiplication instructions MUL
> (unsigned) and IMUL (signed) with one explicit operand, but only one
> non-widening instruction: IMUL with two or three explicit operands.
>
> That's because
>
> ((a mod 2^n) * (b mod 2^n)) mod 2^n = (a*b) mod 2^n
>
> (like for addition and subtraction).
>
> Whether you interpret the mod 2^n numbers as signed or unsigned is
> immaterial.
>
> The "/" operation is a different kettle of fish, though.
>
> - anton

Yes, thanks.
In a new ISA, a MULL Multiply Low instruction would be used for
modulo types and the low part of trap and sat types.

A MULHS and MULHU Multiply High Signed/Unsigned instruction produces
the high result part which trap and sat types then check for overflow.

For unsigned trap and sat multiply Trap Conditional and Move Conditional
instructions handle the overflow checks for non-zero high part.
Each checked unsigned multiply would be MULL MULHU TRAPNZ instructions
so is worthwhile integrating into a single instruction MULTU.

For signed trap and sat multiply it needs to check that the high part is
the signed extension of the low part. A SHRA Shift Right Arithmetic fills
a register with the sign bit, a CMP, and either Trap or Move Conditional.

Since, in this alternate universe, most signed integers would use checked
arithmetic, that 5 instruction sequence MULL MULHS SHRA CMPEQ TRAPEZ
would occur for almost every multiply, it is worthwhile to integrate
into a single instruction MULTS Multiply Trap Signed Overflow.
Similar for saturate MULSS Multiply Saturate Signed.

So new ISA multiply instructions are

MULL Multiply Low
MULHU MULHS Multiply High Unsigned/Signed
MULTU MULTS Multiply Trap Unsigned/Signed Overflow
MULSU MULSS Multiply Saturate Unsigned/Signed

Re: Specifying timing constraints was Re: Paper about ISO C

<slc1dc$rob$2@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21698&group=comp.arch#21698

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
Date: Wed, 27 Oct 2021 17:14:20 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <slc1dc$rob$2@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com>
<3a350cfe-971c-4042-9171-9ec2516cdf2bn@googlegroups.com>
<sk6s4a$9cm$1@dont-email.me>
<1ed391dc-0d1d-4069-96d8-e83acbe01ba5n@googlegroups.com>
<sk9ej9$fj9$1@dont-email.me> <jwvtuhj4dlq.fsf-monnier+comp.arch@gnu.org>
<skc7a9$698$1@dont-email.me> <skc905$85c$1@dont-email.me>
<skh20o$ji2$1@dont-email.me>
<4fc4f707-2d42-492a-bd41-f791141dbfb2n@googlegroups.com>
<skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com>
<skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com>
<86a6j6l8ci.fsf@linuxsc.com> <LClbJ.602$xjIc.241@fx01.iad>
<skl12c$i1n$1@dont-email.me> <qgDbJ.3$in7.0@fx22.iad>
<skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com> <sl20bg$uha$1@dont-email.me>
<sl32ot$qn1$1@newsreader4.netcologne.de> <sl86pl$bgi$1@dont-email.me>
<sl8mc4$ipt$3@newsreader4.netcologne.de>
<2864cadb-1861-4054-a823-f057d40aa349n@googlegroups.com>
Injection-Date: Wed, 27 Oct 2021 17:14:20 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:465a:0:7285:c2ff:fe6c:992d";
logging-data="28427"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 27 Oct 2021 17:14 UTC

Quadibloc <jsavard@ecn.ab.ca> schrieb:
> On Tuesday, October 26, 2021 at 4:47:34 AM UTC-6, Thomas Koenig wrote:
>
>> Some people like to write fomulas like pressure = velocity ^1.2342,
>> of course it will be flagged. However, the problem is with the
>> people writing the formula, not the program.
>
> If the "correct" formula is pressure = unit-pressure * (velocity/unit-velocity) ^ 1.2342
> ...hopefully there is a way to prevent the compiler that is checking for
> dimensioning errors from wastefully generating instructions to multiply by
> one and divide by one. But of course there is, it's called optimization.

You can always do that (and it is what I have done on occasion,
while sending heartfelt curses in the dirction of whoever wrote
that formula).

Re: Paper about ISO C

<2021Oct27.184957@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21699&group=comp.arch#21699

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 16:49:57 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 58
Message-ID: <2021Oct27.184957@mips.complang.tuwien.ac.at>
References: <87fstdumxd.fsf@hotmail.com> <jwvzgre88y4.fsf-monnier+comp.arch@gnu.org> <5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com> <sku3dr$1hb$2@dont-email.me> <5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com> <sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at> <sl8m0n$ipt$1@newsreader4.netcologne.de> <2021Oct26.174949@mips.complang.tuwien.ac.at> <864k93gtz8.fsf@linuxsc.com> <2021Oct27.122342@mips.complang.tuwien.ac.at> <86ilxifx0p.fsf@linuxsc.com>
Injection-Info: reader02.eternal-september.org; posting-host="e40f03910385704f2499c92e2d83a519";
logging-data="29733"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19E/mFMeadK93tadmlbL6g1"
Cancel-Lock: sha1:Woiw/hAZgD564GZjNRxoKhLH3oY=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 27 Oct 2021 16:49 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>
>>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>
>>>> Thomas Koenig <tkoenig@netcologne.de> writes:
>>>
>>> [...]
>>>
>>>>> so your code is certainly very much non-conforming.
>>>>
>>>> In terms of the C standard, it's a [conforming] program.
....
>> In the present case, I mean a "conforming program" in the standard
>> C sense. Gforth uses several language extensions. There are
>> dozens of C compilers that compile Gforth (many "versions" of gcc
>> and clang) and it works on many architectures,
>
>In that case I think it's better if you say something like that
>rather than just saying it's a conforming program.

Normally I don't say anything about that. But since Thomas Koenig
claimed that using a C extension makes it "very much non-conforming",
I wanted to point out to him that it is a conforming program.

>> but of course this does not matter for the conformance levels
>> of the C standard.
>
>I think it's misleading to characterize the terms "conforming
>program" and "strictly conforming program" as conformance
>levels. The ISO C standard defines these terms for its own
>purposes, not as metrics for general C programs to be measured
>against.

What are these purposes? It seems to me that these two definitions
(and there are no others for programs) are a reflection on the
incompleteness of the C standard (nothing wrong with this
incompleteness, but one should be aware of it).

>> Gforth uses several language extensions.
>
>Do you mean language extensions, or compiler options? Out of
>curiosity, do you mind if I ask what options or what extensions
>those are?

Extensions: labels-as-values, extended asm (including portable use of
extended asm:-) and POSIX calls are the most obvious ones because
compilers can easily recognize them. Probably lots and lots of usages
that are undefined behaviour in the standard or somesuch.

Options: see <2021Oct25.195829@mips.complang.tuwien.ac.at>

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Specifying timing constraints was Re: Paper about ISO C

<slc21o$rob$3@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21700&group=comp.arch#21700

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
Date: Wed, 27 Oct 2021 17:25:12 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <slc21o$rob$3@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com>
<3a350cfe-971c-4042-9171-9ec2516cdf2bn@googlegroups.com>
<sk6s4a$9cm$1@dont-email.me>
<1ed391dc-0d1d-4069-96d8-e83acbe01ba5n@googlegroups.com>
<sk9ej9$fj9$1@dont-email.me> <jwvtuhj4dlq.fsf-monnier+comp.arch@gnu.org>
<skc7a9$698$1@dont-email.me> <skc905$85c$1@dont-email.me>
<skh20o$ji2$1@dont-email.me>
<4fc4f707-2d42-492a-bd41-f791141dbfb2n@googlegroups.com>
<skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com>
<skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com>
<86a6j6l8ci.fsf@linuxsc.com> <LClbJ.602$xjIc.241@fx01.iad>
<skl12c$i1n$1@dont-email.me> <qgDbJ.3$in7.0@fx22.iad>
<skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com> <sl20bg$uha$1@dont-email.me>
<sl32ot$qn1$1@newsreader4.netcologne.de> <sl86pl$bgi$1@dont-email.me>
<sl8mc4$ipt$3@newsreader4.netcologne.de> <sla6to$bpf$1@dont-email.me>
Injection-Date: Wed, 27 Oct 2021 17:25:12 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:465a:0:7285:c2ff:fe6c:992d";
logging-data="28427"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 27 Oct 2021 17:25 UTC

Bakul Shah <bakul@iitbombay.org> schrieb:
> Thomas Koenig wrote:
>> Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
>>> On 10/24/2021 12:42 AM, Thomas Koenig wrote:
>>>> Ivan Godard <ivan@millcomputing.com> schrieb:
>>>>
>>>>> The lit history is full of efforts to put units into the type systems.
>>>>> They sure look plausible but don't work. Think of a NR sqrt routine.
>>>>
>>>> MathCad has got this right. It is not a compiled language,
>>>> but it certainly works. I use it a lot in my day job for simple
>>>> engineering calculations: You see the formulas, you immediately
>>>> see the output, you do input in units (like kg/h), you can convert
>>>> the output to units you want.
>>>>
>>>> And, of course, it complains if you try to add or subtract
>>>> dimensions that do not match.
>>>
>>> What happens if you multiply two variables with dimension "length"
>>> together? Does it understand that the result is an "area"?
>>
>> It understands that the result is a length squared (and you can
>> put in an area measurement if you feel like it).
>>
>> The only thing it cannot determine is the difference between
>> torque and work - when I calculate a torque, a "J" automtically
>> appears as a unit. I can change it to "N m" by hand, though.
>>
>>> And that is
>>> a simple case. You can get far more complex combinations than that. It
>>> seems to me that this could be a nearly bottomless pit.
>>
>> It works pretty well, as long as your formulas are consistent.
>>
>> Some people like to write fomulas like pressure = velocity ^1.2342,
>> of course it will be flagged. However, the problem is with the
>> people writing the formula, not the program.
>>
>
> I haven't used mathcad but I believe in general you'd need an
> ability to allow a user to *define* their own units.

Which is no problem, as long as you stick to the dimensions
of SI units.

There are actually two versions of the program. In the older
one, which I still use, units are just variables, so you
can write

fortnight := 14 days

and it will just work (days is predefined). The newer version,
which I don't use because it is source code incompatible and has
a poorly- working conversion program, units are a bit special so
you are in no danger of redefining the liter if you use L for a
measurement, but you can still define your own units.

And if you have a time as a result, you can plug it into the
display, so the output will be either

time = 1000000 s

where the program supplies the unit, or

time = 0.826 fortnight

if you plug in the unit yourself.

> I think
> you'd also need the concept of exactness as in Scheme if you
> allow conversions between metric and imperial systems.

I don't know what that concept is. Could you elaborate?

For engineering calculations, double precision in something
that could actually be measured is plenty enough.

> Incidentally, some accounting packages already have to do this
> -- a conversion factor, such as exchange rate or share price
> may even be time dependent!

Or Excel tables.

You're given throughput in kg/hour and a density in kg/m^3, please
calculate the volumentric throughput in m^3/s.

(In a seminar I give, I actually let people calculate the above as
part of an excercise. It is astonishing how long people, most of
whome have university degrees in engineering or natural science
work on on their pocket calculators or mobile phones before they
have the result, if that is even correct).

Re: Specifying timing constraints was Re: Paper about ISO C

<slc23g$rob$4@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21701&group=comp.arch#21701

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
Date: Wed, 27 Oct 2021 17:26:08 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <slc23g$rob$4@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com>
<3a350cfe-971c-4042-9171-9ec2516cdf2bn@googlegroups.com>
<sk6s4a$9cm$1@dont-email.me>
<1ed391dc-0d1d-4069-96d8-e83acbe01ba5n@googlegroups.com>
<sk9ej9$fj9$1@dont-email.me> <jwvtuhj4dlq.fsf-monnier+comp.arch@gnu.org>
<skc7a9$698$1@dont-email.me> <skc905$85c$1@dont-email.me>
<skh20o$ji2$1@dont-email.me>
<4fc4f707-2d42-492a-bd41-f791141dbfb2n@googlegroups.com>
<skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com>
<skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com>
<86a6j6l8ci.fsf@linuxsc.com> <LClbJ.602$xjIc.241@fx01.iad>
<skl12c$i1n$1@dont-email.me> <qgDbJ.3$in7.0@fx22.iad>
<skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com> <sl20bg$uha$1@dont-email.me>
<sl32ot$qn1$1@newsreader4.netcologne.de> <sl86pl$bgi$1@dont-email.me>
<sl8mc4$ipt$3@newsreader4.netcologne.de> <slasei$sos$1@dont-email.me>
Injection-Date: Wed, 27 Oct 2021 17:26:08 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:465a:0:7285:c2ff:fe6c:992d";
logging-data="28427"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 27 Oct 2021 17:26 UTC

Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
> On 10/26/2021 3:47 AM, Thomas Koenig wrote:
>> Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
>>> On 10/24/2021 12:42 AM, Thomas Koenig wrote:
>>>> Ivan Godard <ivan@millcomputing.com> schrieb:
>>>>
>>>>> The lit history is full of efforts to put units into the type systems.
>>>>> They sure look plausible but don't work. Think of a NR sqrt routine.
>>>>
>>>> MathCad has got this right. It is not a compiled language,
>>>> but it certainly works. I use it a lot in my day job for simple
>>>> engineering calculations: You see the formulas, you immediately
>>>> see the output, you do input in units (like kg/h), you can convert
>>>> the output to units you want.
>>>>
>>>> And, of course, it complains if you try to add or subtract
>>>> dimensions that do not match.
>>>
>>> What happens if you multiply two variables with dimension "length"
>>> together? Does it understand that the result is an "area"?
>>
>> It understands that the result is a length squared (and you can
>> put in an area measurement if you feel like it).
>
> I guess the question is, given a variable L of dimension "Length", and a
> variable A of dimension "Area", does it complain at a statement like
>
> A = A + (L*L)

That is accepted, because both are Length^2.

Re: Use Rust instead? (Was Re: Paper about ISO C)

<slc266$rob$5@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21702&group=comp.arch#21702

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Use Rust instead? (Was Re: Paper about ISO C)
Date: Wed, 27 Oct 2021 17:27:34 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <slc266$rob$5@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com> <sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org>
<5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me>
<5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<2021Oct23.192433@mips.complang.tuwien.ac.at>
<sl3m7f$11am$1@gioia.aioe.org>
<2021Oct25.181949@mips.complang.tuwien.ac.at>
<sl8mhp$ipt$4@newsreader4.netcologne.de>
<jwv7de0rl9a.fsf-monnier+comp.arch@gnu.org>
Injection-Date: Wed, 27 Oct 2021 17:27:34 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:465a:0:7285:c2ff:fe6c:992d";
logging-data="28427"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 27 Oct 2021 17:27 UTC

Stefan Monnier <monnier@iro.umontreal.ca> schrieb:
>> In general, I am in favor of languages which lets me do things I
>> cannot do in other languages. I am less a fan of languages which
>> try to educate me what to use and not to use.
>
> Every time a language allows X, it inevitably prevents you from
> doing the things which depend on X never happening.

Well, yes, true... so a PGAS language will prevent me from doing
things which depend on my program being serial and not being
able to access other images :-)

Re: Paper about ISO C

<2021Oct27.192112@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21703&group=comp.arch#21703

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 17:21:12 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 68
Message-ID: <2021Oct27.192112@mips.complang.tuwien.ac.at>
References: <87fstdumxd.fsf@hotmail.com> <jwvzgre88y4.fsf-monnier+comp.arch@gnu.org> <5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com> <sku3dr$1hb$2@dont-email.me> <5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com> <sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at> <sl8m0n$ipt$1@newsreader4.netcologne.de> <jwvcznsrlmn.fsf-monnier+comp.arch@gnu.org> <sl937s$e89$2@dont-email.me> <2021Oct27.125200@mips.complang.tuwien.ac.at> <slbbgl$a75$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="e40f03910385704f2499c92e2d83a519";
logging-data="29733"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19MSGE/h2scP+N9+VF630iy"
Cancel-Lock: sha1:0XMLZf3jKQWkbsRvtuHRlZ56qEI=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 27 Oct 2021 17:21 UTC

David Brown <david.brown@hesbynett.no> writes:
>That is how I originally thought it worked, but I got a little mixed
>from some of the recent posts. Code with lots of gotos and labels is
>common in generated C code but rare in human-written code, so the
>example shown added to my confusion.

The code shown was written by a human.

The Gforth build process uses a generator (a variant of vmgen) with
input like the following:

+ ( n1 n2 -- n ) core plus
n = n1+n2;

The output looks as follows:

LABEL(plus) /* + ( n1 n2 -- n ) S1 -- S1 */
/* */
NAME("+")
{ DEF_CA
MAYBE_UNUSED Cell n1;
MAYBE_UNUSED Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(spTOS,n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
} #endif
sp += 1;
{ #line 697 "prim"
n = n1+n2;
#line 3208 "prim-fast.i"
}

#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
} #endif
NEXT_P1;
vm_n2Cell(n,spTOS);
LABEL2(plus)
NAME1("l2-plus")
NEXT_P1_5;
LABEL3(plus)
NAME1("l3-plus")
DO_GOTO;
}

The code generated by gcc for this is:

55C9C8F573A6: add r13,$08
55C9C8F573AA: add r15,$08
55C9C8F573AE: add r8,$00[r13]
55C9C8F573B2: mov rcx,-$08[r15]
55C9C8F573B6: jmp rcx

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Specifying timing constraints was Re: Paper about ISO C

<slc2tj$rob$6@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21704&group=comp.arch#21704

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
Date: Wed, 27 Oct 2021 17:40:03 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <slc2tj$rob$6@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com> <sk6s4a$9cm$1@dont-email.me>
<1ed391dc-0d1d-4069-96d8-e83acbe01ba5n@googlegroups.com>
<sk9ej9$fj9$1@dont-email.me> <jwvtuhj4dlq.fsf-monnier+comp.arch@gnu.org>
<skc7a9$698$1@dont-email.me> <skc905$85c$1@dont-email.me>
<skh20o$ji2$1@dont-email.me>
<4fc4f707-2d42-492a-bd41-f791141dbfb2n@googlegroups.com>
<skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com>
<skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com>
<86a6j6l8ci.fsf@linuxsc.com> <LClbJ.602$xjIc.241@fx01.iad>
<skl12c$i1n$1@dont-email.me> <qgDbJ.3$in7.0@fx22.iad>
<skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com> <sl20bg$uha$1@dont-email.me>
<sl32ot$qn1$1@newsreader4.netcologne.de> <sl86pl$bgi$1@dont-email.me>
<sl8mc4$ipt$3@newsreader4.netcologne.de>
<2864cadb-1861-4054-a823-f057d40aa349n@googlegroups.com>
<c83e5ae9-3f03-429c-9016-b098f34b59c4n@googlegroups.com>
Injection-Date: Wed, 27 Oct 2021 17:40:03 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:465a:0:7285:c2ff:fe6c:992d";
logging-data="28427"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 27 Oct 2021 17:40 UTC

MitchAlsup <MitchAlsup@aol.com> schrieb:
> On Tuesday, October 26, 2021 at 7:19:49 PM UTC-5, Quadibloc wrote:
>> On Tuesday, October 26, 2021 at 4:47:34 AM UTC-6, Thomas Koenig wrote:
>>
>> > Some people like to write fomulas like pressure = velocity ^1.2342,
>> > of course it will be flagged. However, the problem is with the
>> > people writing the formula, not the program.
>>
>> If the "correct" formula is pressure = unit-pressure * (velocity/unit-velocity) ^ 1.2342
>> ...hopefully there is a way to prevent the compiler that is checking for
>> dimensioning errors from wastefully generating instructions to multiply by
>> one and divide by one. But of course there is, it's called optimization.
><
> The pressure in a input duct is dependent on the velocity of the air flowing
> near the duct and the pressure inside the duct--in non-linear and intriguing
> ways.

Certainly - and, as we know since Buckingham proved his theorem,
all of these can be expressed using dimensionless numbers.

Re: Specifying timing constraints was Re: Paper about ISO C

<slc3hu$rob$7@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21705&group=comp.arch#21705

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
Date: Wed, 27 Oct 2021 17:50:54 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <slc3hu$rob$7@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com>
<3a350cfe-971c-4042-9171-9ec2516cdf2bn@googlegroups.com>
<sk6s4a$9cm$1@dont-email.me>
<1ed391dc-0d1d-4069-96d8-e83acbe01ba5n@googlegroups.com>
<sk9ej9$fj9$1@dont-email.me> <jwvtuhj4dlq.fsf-monnier+comp.arch@gnu.org>
<skc7a9$698$1@dont-email.me> <skc905$85c$1@dont-email.me>
<skh20o$ji2$1@dont-email.me>
<4fc4f707-2d42-492a-bd41-f791141dbfb2n@googlegroups.com>
<skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com>
<skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com>
<86a6j6l8ci.fsf@linuxsc.com> <LClbJ.602$xjIc.241@fx01.iad>
<skl12c$i1n$1@dont-email.me> <qgDbJ.3$in7.0@fx22.iad>
<skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com> <sl20bg$uha$1@dont-email.me>
<sl32ot$qn1$1@newsreader4.netcologne.de>
<d056984b-4bed-479c-b2ff-b67914f8b65cn@googlegroups.com>
<slaopv$1gk$1@newsreader4.netcologne.de> <itscmlFpjsnU1@mid.individual.net>
Injection-Date: Wed, 27 Oct 2021 17:50:54 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:465a:0:7285:c2ff:fe6c:992d";
logging-data="28427"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 27 Oct 2021 17:50 UTC

Niklas Holsti <niklas.holsti@tidorum.invalid> schrieb:
> On 2021-10-27 8:41, Thomas Koenig wrote:
>> Quadibloc <jsavard@ecn.ab.ca> schrieb:
>>> On Sunday, October 24, 2021 at 1:42:23 AM UTC-6, Thomas Koenig wrote:
>>>> Ivan Godard <iv...@millcomputing.com> schrieb:
>>>>> The lit history is full of efforts to put units into the type systems.
>>>>> They sure look plausible but don't work. Think of a NR sqrt routine.
>>>
>>>> MathCad has got this right. It is not a compiled language,
>>>> but it certainly works. I use it a lot in my day job for simple
>>>> engineering calculations: You see the formulas, you immediately
>>>> see the output, you do input in units (like kg/h), you can convert
>>>> the output to units you want.
>>>>
>>>> And, of course, it complains if you try to add or subtract
>>>> dimensions that do not match.
>>>>
>>>> (Notice I said "dimensions" in the last sentence - adding an inch
>>>> to a meter is fine, because both get converted automatically,
>>>> but adding a meter to a second is an error. Nomenclature:
>>>> Length is a dimension, meter or inch are units, of length
>>>> in this case).
>>>>
>>>> It even handles square roots of units and dimensions, which
>>>> are sometimes used, as characteristics of distillations colums,
>>>> for example.
>>>>
>>>> It handles units and dimensions as floating point numbers.
>>>> For dimensions, using rational numbers would probably be better.
>>>
>>> This is interesting; I am glad to hear that a language is available
>>> that can handle physical quantities with units correctly, thus
>>> reducing problems created by mistakes in dimensional analysis
>>> by the programmer.
>>
>> MathCad is more like a calculation paper sheet; you enter variable
>> assignments with formulas (and some programming, but that is quite
>> limited and rather painful for anything more complex) on a sheet-like
>> graph.
>>
>>
>>> And given that statement of the _benefit_ of doing this, I think
>>> that one _could_ in a compiled language flag floating-point
>>> quantities with units, so that the compiler would give an error or
>>> warning if incorrect arithmetic operations were specified with them.
>>
>> I would actually prefer rational numbers for dimensions, for
>> generality.
>
>
> The GNAT Ada compiler from AdaCore has an extension to provide a
> compile-time dimensional analysis system. It is not (yet) part of the
> Ada standard, though. It is described in
> https://www.adacore.com/gems/gem-136-how-tall-is-a-kilogram.
>
> The system lets one define one's own system of dimensions, supports
> rational dimension powers, and lets one define how units are indicated
> in output, for example "m" for meters.
>
> The system does not provide easy conversion between different units of
> measurement, such as metric and imperial units,

I find this quite admirable, but metric and Imperial (what is a
gallon again? :-) is only part of the problem.

Ever since I saw a volume conversion plant in the operator's room in
a chemical plant (and if your tank volumes are given in cubic feet,
with your flows given in gallons per minute, you need that table,
or you need MathCad, which I usually have open when talking to
US colleagues), and since I saw a formula for the Reynolds number
on the Web given as

Re = u * D * rho / (correction_factor * mu)

I have been utterly convinced that the Imperial system is sheer
madness, and that the US should reject this system that has been
imposed of them by their colonialist oppressors.

However, I digress.

There are also inconsitent units in everyday use - seconds and
hours, Liters and cubic meters, and so on.

> but it does detect and
> reject invalid mixtures, such as an attempt to add a length in meters to
> a length in feet. This check uses the ordinary strong typing rules,
> while the dimensionality check uses Ada subtypes extended with a
> dimension "aspect".

So anybody who puts in kg/h and kg/m^3 and wants m^3/s to calculate
that dimensionless number has to do the conversion by hand.

Hm, I'm not sure I would find that feature to be useful enough.

Re: Paper about ISO C

<2021Oct27.193426@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21706&group=comp.arch#21706

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 17:34:26 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 50
Message-ID: <2021Oct27.193426@mips.complang.tuwien.ac.at>
References: <87fstdumxd.fsf@hotmail.com> <2021Oct12.185057@mips.complang.tuwien.ac.at> <jwvzgre88y4.fsf-monnier+comp.arch@gnu.org> <5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com> <sku3dr$1hb$2@dont-email.me> <5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com> <sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at> <sl8m0n$ipt$1@newsreader4.netcologne.de> <2021Oct26.174949@mips.complang.tuwien.ac.at> <slarar$2qd$1@newsreader4.netcologne.de> <slatma$8au$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="e40f03910385704f2499c92e2d83a519";
logging-data="13390"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19AF0EpLCD+JJbq1px2RUTn"
Cancel-Lock: sha1:AqCOjOeXUXM7S0ZEqmsNo1Z93Lc=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 27 Oct 2021 17:34 UTC

David Brown <david.brown@hesbynett.no> writes:
>C compilers are almost always better at optimising code written in clear
>and standard ways - they compiler can get more information from such
>code, and the compiler developers put most effort into working with
>common code constructs. When people "manually optimise" their C code,
>such as with these labels-as-value arrays and hand-written jump tables,
>it's difficult for a compiler to see what is happening, and difficult to
>optimise - normal optimisation passes may regress performance.

Jon Bentley wrote "Writing Efficient Programs" in 1982, and he gave an
example in Pascal. I transliterated them to C IIRC in 1999 and you
can find the results at
<http://www.complang.tuwien.ac.at/anton/lvas/effizienz/tsp.html>.

Last I looked, the manual optimization steps that Jon Bentley
described in 1982 still produced a speedup factor of >2.7, while the
difference between disabling (with "-fno-aggressive-loop-optimizations
-fno-unsafe-loop-optimizations -fno-delete-null-pointer-checks
-fno-strict-aliasing -fno-strict-overflow
-fno-isolate-erroneous-paths-dereference-fwrapv" in gcc-5.2.0) and
leaving enabled the undefined-behaviour you cherish is a factor of 1
for the majority of programs, and a factor 0.95-1.04 for the rest.
Interestingly, the differences exist more for the more optimized
programs. Read all about it in Section 4.2 of
<https://www.complang.tuwien.ac.at/kps2015/proceedings/KPS_2015_submission_29.pdf>.

>Modern processors vary quite a bit in how they actually handle such code
>- the best strategy for a switch structure might be jump tables, tree of
>conditionals, combining branches into calculations or conditional moves,
>or various other possibilities.

I put up the challenge before <2017Aug18.152854@mips.complang.tuwien.ac.at>

|Write a proof-of-concept Forth interpreter in the language you
|advocate that runs at least one of bubble-sort, matrix-mult or sieve
|from bench/forth in
|<http://www.complang.tuwien.ac.at/forth/bench.zip>

We can then check whether the language you advocate can compete with a
low-level language by benchmarking your interpreter against Gforth.

>But to me, that's just a small step from
>programming in assembly,

That's the point.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Paper about ISO C

<659b83b1-ecb6-47fd-be4a-07d7db3b610en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21707&group=comp.arch#21707

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:9a90:: with SMTP id c138mr10557959qke.442.1635358512282;
Wed, 27 Oct 2021 11:15:12 -0700 (PDT)
X-Received: by 2002:a05:6808:e8d:: with SMTP id k13mr4777697oil.84.1635358511923;
Wed, 27 Oct 2021 11:15:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 27 Oct 2021 11:15:11 -0700 (PDT)
In-Reply-To: <ittf5fF1re4U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:2d0a:ea86:3c64:bd39;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:2d0a:ea86:3c64:bd39
References: <87fstdumxd.fsf@hotmail.com> <sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com> <sk437c$672$1@dont-email.me>
<jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org> <2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org> <5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me> <5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at>
<sl79bl$jei$1@dont-email.me> <itpou1Fa8stU1@mid.individual.net>
<86zgqvfe7h.fsf@linuxsc.com> <slas5g$r1g$1@dont-email.me> <slbutv$6dk$1@dont-email.me>
<d60c3693-fb4b-40b1-a296-0d9fd636756dn@googlegroups.com> <ittf5fF1re4U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <659b83b1-ecb6-47fd-be4a-07d7db3b610en@googlegroups.com>
Subject: Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 27 Oct 2021 18:15:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 44
 by: MitchAlsup - Wed, 27 Oct 2021 18:15 UTC

On Wednesday, October 27, 2021 at 12:04:50 PM UTC-5, Niklas Holsti wrote:
> On 2021-10-27 19:48, MitchAlsup wrote:
> > On Wednesday, October 27, 2021 at 11:32:02 AM UTC-5, Stephen Fuld wrote:
> >> On 10/26/2021 11:38 PM, David Brown wrote:
> >>> On 27/10/2021 03:28, Tim Rentsch wrote:
> >>>> Niklas Holsti <niklas...@tidorum.invalid> writes:
> >>>>
> >>>>>> [.. volatile ..]
> [ snip ]
> >>> That does sound like a simpler mechanism for the same effect. But
> >>> perhaps we can go further and simpler:
> >>>
> >>> x = 1;
> >>> _Execution_barrier();
> >>> foo();
> >>> _Execution_barrier();
> >>> y = 1;
> >>>
> >>> _Execution_barrier() would be an implementation-dependent macro that
> >>> imposes a sequence point in the actual machine, in the manner described
> >>> by Tim above. I see no advantage to making it a qualifier or tying it
> >>> to a particular lvalue access, since it acts on the entire machine.
> >>>
> >>> It would still be a big challenge (I believe) to get clear and precise
> >>> definitions for how this would work, but I think it would be easier to
> >>> define, understand and implement than "volatile functions" or a new
> >>> "_Volatile" qualifier.
> > <
> >> I think there are two separable questions here. One is what the
> >> mechanism does. The second is whether the mechanism should be a
> >> property of the function or of the invocation of that function. Or
> >> equivalently, should the syntax (whatever it is) be required for each
> >> call, or should it be invoked automatically (without additional syntax)
> >> every time the function is invoked.
> > <
> > None of this would be necessary if foo() was simply compiled separately
> > all the way down to code so the compiler could not have any knowledge
> > of what it does or does not do.
<
> Except if link-time optimization is used. And the _Execution_barrier
> mechanism could be used for any code, not just for function calls.
<
You can prevent link-time optimization by erasing the information
about the function excepting the entry point names. {In any event,
there does need to be some way of preventing link-time optimization.}

Re: Specifying timing constraints was Re: Paper about ISO C

<a37f80f8-9003-4a8c-908b-072497b11220n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21708&group=comp.arch#21708

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5f82:: with SMTP id j2mr33842684qta.75.1635358753046;
Wed, 27 Oct 2021 11:19:13 -0700 (PDT)
X-Received: by 2002:a05:6830:1e27:: with SMTP id t7mr14884591otr.96.1635358752774;
Wed, 27 Oct 2021 11:19:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 27 Oct 2021 11:19:12 -0700 (PDT)
In-Reply-To: <IIfeJ.1174$I%1.439@fx36.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:2d0a:ea86:3c64:bd39;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:2d0a:ea86:3c64:bd39
References: <87fstdumxd.fsf@hotmail.com> <skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com> <skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com> <86a6j6l8ci.fsf@linuxsc.com>
<LClbJ.602$xjIc.241@fx01.iad> <skl12c$i1n$1@dont-email.me>
<qgDbJ.3$in7.0@fx22.iad> <skn1iv$ap3$1@dont-email.me> <skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com> <itkgveFa1f5U1@mid.individual.net>
<86lf2hgjkd.fsf@linuxsc.com> <drVdJ.292$831.190@fx40.iad> <2021Oct27.104705@mips.complang.tuwien.ac.at>
<IIfeJ.1174$I%1.439@fx36.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a37f80f8-9003-4a8c-908b-072497b11220n@googlegroups.com>
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 27 Oct 2021 18:19:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 71
 by: MitchAlsup - Wed, 27 Oct 2021 18:19 UTC

On Wednesday, October 27, 2021 at 12:08:59 PM UTC-5, EricP wrote:
> Anton Ertl wrote:
> > EricP <ThatWould...@thevillage.com> writes:
> >> For integer * and / signed and unsigned map to different instructions.
> >
> > For 2s-complement representation of signed numbers and wrapping on
> > overflow non-widening multiplication is the same for signed and
> > unsigned numbers, and therefore the same instruction. Note that,
> > e.g., AMD64 only has two widening multiplication instructions MUL
> > (unsigned) and IMUL (signed) with one explicit operand, but only one
> > non-widening instruction: IMUL with two or three explicit operands.
> >
> > That's because
> >
> > ((a mod 2^n) * (b mod 2^n)) mod 2^n = (a*b) mod 2^n
> >
> > (like for addition and subtraction).
> >
> > Whether you interpret the mod 2^n numbers as signed or unsigned is
> > immaterial.
> >
> > The "/" operation is a different kettle of fish, though.
> >
> > - anton
> Yes, thanks.
> In a new ISA, a MULL Multiply Low instruction would be used for
> modulo types and the low part of trap and sat types.
>
> A MULHS and MULHU Multiply High Signed/Unsigned instruction produces
> the high result part which trap and sat types then check for overflow.
>
> For unsigned trap and sat multiply Trap Conditional and Move Conditional
> instructions handle the overflow checks for non-zero high part.
> Each checked unsigned multiply would be MULL MULHU TRAPNZ instructions
> so is worthwhile integrating into a single instruction MULTU.
>
> For signed trap and sat multiply it needs to check that the high part is
> the signed extension of the low part. A SHRA Shift Right Arithmetic fills
> a register with the sign bit, a CMP, and either Trap or Move Conditional.
>
> Since, in this alternate universe, most signed integers would use checked
> arithmetic, that 5 instruction sequence MULL MULHS SHRA CMPEQ TRAPEZ
> would occur for almost every multiply, it is worthwhile to integrate
> into a single instruction MULTS Multiply Trap Signed Overflow.
> Similar for saturate MULSS Multiply Saturate Signed.
>
> So new ISA multiply instructions are
>
> MULL Multiply Low
> MULHU MULHS Multiply High Unsigned/Signed
> MULTU MULTS Multiply Trap Unsigned/Signed Overflow
> MULSU MULSS Multiply Saturate Unsigned/Signed
<
When I faced this in a new ISA that, in general, sought to provide signed integer
overflow exceptions, I left a bit in the instruction OpCode so that if significance
showed up that could not be contained in the container of delivery, that OVEFLOW
exception would be raised.
<
Multiply 64×64->128 is
CARRY Rhigh,{(1)}
MUL Rlow,Rx,Ry
And {Rhigh,Rlow} contains the signed or unsigned 128-bit product.
No pairing, no even, odd, Rhigh is not related in any way to Rlow.

Re: Specifying timing constraints was Re: Paper about ISO C

<223cda62-a1de-41fe-bf25-9a7ccbd104ban@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21709&group=comp.arch#21709

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5f54:: with SMTP id y20mr33476854qta.324.1635358936124;
Wed, 27 Oct 2021 11:22:16 -0700 (PDT)
X-Received: by 2002:a9d:12b2:: with SMTP id g47mr25949462otg.227.1635358935895;
Wed, 27 Oct 2021 11:22:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 27 Oct 2021 11:22:15 -0700 (PDT)
In-Reply-To: <slc2tj$rob$6@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:2d0a:ea86:3c64:bd39;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:2d0a:ea86:3c64:bd39
References: <87fstdumxd.fsf@hotmail.com> <sk6s4a$9cm$1@dont-email.me>
<1ed391dc-0d1d-4069-96d8-e83acbe01ba5n@googlegroups.com> <sk9ej9$fj9$1@dont-email.me>
<jwvtuhj4dlq.fsf-monnier+comp.arch@gnu.org> <skc7a9$698$1@dont-email.me>
<skc905$85c$1@dont-email.me> <skh20o$ji2$1@dont-email.me> <4fc4f707-2d42-492a-bd41-f791141dbfb2n@googlegroups.com>
<skhjk3$9p4$1@dont-email.me> <f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com>
<skjkqv$nd3$1@dont-email.me> <0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com>
<86a6j6l8ci.fsf@linuxsc.com> <LClbJ.602$xjIc.241@fx01.iad>
<skl12c$i1n$1@dont-email.me> <qgDbJ.3$in7.0@fx22.iad> <skn1iv$ap3$1@dont-email.me>
<skn3ib$ouk$1@dont-email.me> <86ilxnii8c.fsf@linuxsc.com> <sl20bg$uha$1@dont-email.me>
<sl32ot$qn1$1@newsreader4.netcologne.de> <sl86pl$bgi$1@dont-email.me>
<sl8mc4$ipt$3@newsreader4.netcologne.de> <2864cadb-1861-4054-a823-f057d40aa349n@googlegroups.com>
<c83e5ae9-3f03-429c-9016-b098f34b59c4n@googlegroups.com> <slc2tj$rob$6@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <223cda62-a1de-41fe-bf25-9a7ccbd104ban@googlegroups.com>
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 27 Oct 2021 18:22:16 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 22
 by: MitchAlsup - Wed, 27 Oct 2021 18:22 UTC

On Wednesday, October 27, 2021 at 12:40:05 PM UTC-5, Thomas Koenig wrote:
> MitchAlsup <Mitch...@aol.com> schrieb:
> > On Tuesday, October 26, 2021 at 7:19:49 PM UTC-5, Quadibloc wrote:
> >> On Tuesday, October 26, 2021 at 4:47:34 AM UTC-6, Thomas Koenig wrote:
> >>
> >> > Some people like to write fomulas like pressure = velocity ^1.2342,
> >> > of course it will be flagged. However, the problem is with the
> >> > people writing the formula, not the program.
> >>
> >> If the "correct" formula is pressure = unit-pressure * (velocity/unit-velocity) ^ 1.2342
> >> ...hopefully there is a way to prevent the compiler that is checking for
> >> dimensioning errors from wastefully generating instructions to multiply by
> >> one and divide by one. But of course there is, it's called optimization.
> ><
> > The pressure in a input duct is dependent on the velocity of the air flowing
> > near the duct and the pressure inside the duct--in non-linear and intriguing
> > ways.
>
> Certainly - and, as we know since Buckingham proved his theorem,
> all of these can be expressed using dimensionless numbers.
<
Not complaining about the dimensionlessness, was complaining about
the original equation not considering what the air was flowing into.

Re: Paper about ISO C

<slc6kj$vv9$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21710&group=comp.arch#21710

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 27 Oct 2021 18:43:31 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <slc6kj$vv9$1@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com>
<2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org>
<5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me>
<5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<sl3c2g$n4b$1@dont-email.me> <2021Oct25.195829@mips.complang.tuwien.ac.at>
<sl8m0n$ipt$1@newsreader4.netcologne.de>
<2021Oct26.174949@mips.complang.tuwien.ac.at>
<slarar$2qd$1@newsreader4.netcologne.de> <slatma$8au$1@dont-email.me>
<2021Oct27.193426@mips.complang.tuwien.ac.at>
Injection-Date: Wed, 27 Oct 2021 18:43:31 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-465a-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:465a:0:7285:c2ff:fe6c:992d";
logging-data="32745"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 27 Oct 2021 18:43 UTC

Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
> David Brown <david.brown@hesbynett.no> writes:
>>C compilers are almost always better at optimising code written in clear
>>and standard ways - they compiler can get more information from such
>>code, and the compiler developers put most effort into working with
>>common code constructs. When people "manually optimise" their C code,
>>such as with these labels-as-value arrays and hand-written jump tables,
>>it's difficult for a compiler to see what is happening, and difficult to
>>optimise - normal optimisation passes may regress performance.
>
> Jon Bentley wrote "Writing Efficient Programs" in 1982, and he gave an
> example in Pascal. I transliterated them to C IIRC in 1999 and you
> can find the results at
><http://www.complang.tuwien.ac.at/anton/lvas/effizienz/tsp.html>.
>
> Last I looked, the manual optimization steps that Jon Bentley
> described in 1982 still produced a speedup factor of >2.7,

So, which of these are actually permitted according to the C
semantics?

Re: Specifying timing constraints was Re: Paper about ISO C

<slc810$dqa$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21711&group=comp.arch#21711

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bak...@iitbombay.org (Bakul Shah)
Newsgroups: comp.arch
Subject: Re: Specifying timing constraints was Re: Paper about ISO C
Date: Wed, 27 Oct 2021 19:07:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 108
Message-ID: <slc810$dqa$1@dont-email.me>
References: <sk6s4a$9cm$1@dont-email.me>
<1ed391dc-0d1d-4069-96d8-e83acbe01ba5n@googlegroups.com>
<sk9ej9$fj9$1@dont-email.me>
<jwvtuhj4dlq.fsf-monnier+comp.arch@gnu.org>
<skc7a9$698$1@dont-email.me>
<skc905$85c$1@dont-email.me>
<skh20o$ji2$1@dont-email.me>
<4fc4f707-2d42-492a-bd41-f791141dbfb2n@googlegroups.com>
<skhjk3$9p4$1@dont-email.me>
<f9db2e75-2ec2-4572-b211-a8b2d6b3e0e6n@googlegroups.com>
<skjkqv$nd3$1@dont-email.me>
<0ba079c3-d672-47b3-b86d-cfc74520ca5dn@googlegroups.com>
<86a6j6l8ci.fsf@linuxsc.com>
<LClbJ.602$xjIc.241@fx01.iad>
<skl12c$i1n$1@dont-email.me>
<qgDbJ.3$in7.0@fx22.iad>
<skn1iv$ap3$1@dont-email.me>
<skn3ib$ouk$1@dont-email.me>
<86ilxnii8c.fsf@linuxsc.com>
<sl20bg$uha$1@dont-email.me>
<sl32ot$qn1$1@newsreader4.netcologne.de>
<sl86pl$bgi$1@dont-email.me>
<sl8mc4$ipt$3@newsreader4.netcologne.de>
<sla6to$bpf$1@dont-email.me>
<slc21o$rob$3@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 27 Oct 2021 19:07:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a2d87c92950c09a23ec6ad8b330f5191";
logging-data="14154"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YisibwH17xtKdyvJcO1lA"
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:ZnwdtPZKWoJPMU3+XkiFZuH34wk=
sha1:ApLZpe4JhslI0BPJGz/fWEsAqlM=
 by: Bakul Shah - Wed, 27 Oct 2021 19:07 UTC

Thomas Koenig <tkoenig@netcologne.de> wrote:
> Bakul Shah <bakul@iitbombay.org> schrieb:
>> Thomas Koenig wrote:
>>> Stephen Fuld <sfuld@alumni.cmu.edu.invalid> schrieb:
>>>> On 10/24/2021 12:42 AM, Thomas Koenig wrote:
>>>>> Ivan Godard <ivan@millcomputing.com> schrieb:
>>>>>
>>>>>> The lit history is full of efforts to put units into the type systems.
>>>>>> They sure look plausible but don't work. Think of a NR sqrt routine.
>>>>>
>>>>> MathCad has got this right. It is not a compiled language,
>>>>> but it certainly works. I use it a lot in my day job for simple
>>>>> engineering calculations: You see the formulas, you immediately
>>>>> see the output, you do input in units (like kg/h), you can convert
>>>>> the output to units you want.
>>>>>
>>>>> And, of course, it complains if you try to add or subtract
>>>>> dimensions that do not match.
>>>>
>>>> What happens if you multiply two variables with dimension "length"
>>>> together? Does it understand that the result is an "area"?
>>>
>>> It understands that the result is a length squared (and you can
>>> put in an area measurement if you feel like it).
>>>
>>> The only thing it cannot determine is the difference between
>>> torque and work - when I calculate a torque, a "J" automtically
>>> appears as a unit. I can change it to "N m" by hand, though.
>>>
>>>> And that is
>>>> a simple case. You can get far more complex combinations than that. It
>>>> seems to me that this could be a nearly bottomless pit.
>>>
>>> It works pretty well, as long as your formulas are consistent.
>>>
>>> Some people like to write fomulas like pressure = velocity ^1.2342,
>>> of course it will be flagged. However, the problem is with the
>>> people writing the formula, not the program.
>>>
>>
>> I haven't used mathcad but I believe in general you'd need an
>> ability to allow a user to *define* their own units.
>
> Which is no problem, as long as you stick to the dimensions
> of SI units.
>
> There are actually two versions of the program. In the older
> one, which I still use, units are just variables, so you
> can write
>
> fortnight := 14 days
>
> and it will just work (days is predefined). The newer version,
> which I don't use because it is source code incompatible and has
> a poorly- working conversion program, units are a bit special so
> you are in no danger of redefining the liter if you use L for a
> measurement, but you can still define your own units.
>
> And if you have a time as a result, you can plug it into the
> display, so the output will be either
>
> time = 1000000 s
>
> where the program supplies the unit, or
>
> time = 0.826 fortnight
>
> if you plug in the unit yourself.
>
>> I think
>> you'd also need the concept of exactness as in Scheme if you
>> allow conversions between metric and imperial systems.
>
> I don't know what that concept is. Could you elaborate?

You can’t represent many values exactly in floating point. So for example
in Scheme:

(exact? 1.3) => #f
(exact? 13/10) => #t
(exact->inexact 1/7) => .14285714285714285

Repeated conversions with inexact numbers can lose precision.
Most apps may not care. I suspect financial apps care enough
to at least use decimal arithmetic!

> For engineering calculations, double precision in something
> that could actually be measured is plenty enough.
>
>> Incidentally, some accounting packages already have to do this
>> -- a conversion factor, such as exchange rate or share price
>> may even be time dependent!
>
> Or Excel tables.
>
> You're given throughput in kg/hour and a density in kg/m^3, please
> calculate the volumentric throughput in m^3/s.
>
> (In a seminar I give, I actually let people calculate the above as
> part of an excercise. It is astonishing how long people, most of
> whome have university degrees in engineering or natural science
> work on on their pocket calculators or mobile phones before they
> have the result, if that is even correct).

While growing up we had no calculators so I learned to do mental math.
I think even today Indian students are not allowed to use calculators,
at least until the end of high school. A useful skill because you can play
with numbers and get a feeling for how to solve such problems.

Re: Use Rust instead? (Was Re: Paper about ISO C)

<slc8j4$i3i$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21712&group=comp.arch#21712

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Use Rust instead? (Was Re: Paper about ISO C)
Date: Wed, 27 Oct 2021 12:16:52 -0700
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <slc8j4$i3i$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<2021Oct12.185057@mips.complang.tuwien.ac.at>
<jwvzgre88y4.fsf-monnier+comp.arch@gnu.org>
<5f97b29e-e958-49e2-bb1c-c0e9870f9c2bn@googlegroups.com>
<sku3dr$1hb$2@dont-email.me>
<5d25afd4-0e2c-4e98-a457-a04be5ae88dbn@googlegroups.com>
<2021Oct23.192433@mips.complang.tuwien.ac.at> <sl3m7f$11am$1@gioia.aioe.org>
<2021Oct25.181949@mips.complang.tuwien.ac.at>
<sl8mhp$ipt$4@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 27 Oct 2021 19:16:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="698618646d1b9b5abaca1cb191d524ae";
logging-data="18546"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qsucJ6p/+JARS1CMosiiG7qrEB6OiCRc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.1
Cancel-Lock: sha1:4tnxA+UH/PPGQCIlgikrazpQhrE=
In-Reply-To: <sl8mhp$ipt$4@newsreader4.netcologne.de>
Content-Language: en-US
 by: Stephen Fuld - Wed, 27 Oct 2021 19:16 UTC

On 10/26/2021 3:50 AM, Thomas Koenig wrote:
> Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
>> Terje Mathisen <terje.mathisen@tmsw.no> writes:
>>> Anton Ertl wrote:
>>>> Quadibloc <jsavard@ecn.ab.ca> writes:
>>>>> That isn't a solution. If the problem is to satisfy both sides,
>>>>> killing the branch of the language that satisfies one of them
>>>>> constitutes failure; one side is not satisfied.
>>>>>
>>>>> However, reality is more complex than that. The reality is
>>>>> that C99 and gcc are viewed by the dissatisfied side as
>>>>> just that "solution" as having happened already...
>>>>
>>>> Actually, it seems to me that C++ is the solution for the nasal demon
>>>> worshippers. And once C compilers started to be written by C++
>>>> programmers, they applied the C++ view of how to deal with undefined
>>>> behaviour also to C.
>>>
>>> So why aren't more people switching to Rust?
>>
>> More generally, why aren't people switching to other programming
>> languages? Because they have a legacy of C code.
>
> Or because they like the language, or do not feel like being
> constrained, or the language is not available on their
> favorite platform, or...
>
> In general, I am in favor of languages which lets me do things I
> cannot do in other languages.

So you prefer assembler over C, as the you can write instruction
sequences or even instructions that the compiler would never generate?

> I am less a fan of languages whi
> try to educate me what to use and not to use.

A language is a tool to get some job done. If the language puts
constraints on what I write in order to help me get the job done more
quickly or with fewer errors, then I like it, even if it disallows some
things. Better yet is a language that allows me to do potentially
"dangerous" things, but makes me explicitly write something that says
essentially "I know this would violate the typical rules, but I know
what I am doing so please allow it". This tells other programmers, or
even future me, that something "tricky" is going on and be extra careful
when you want to change it. But this should be pretty rare.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)


devel / comp.arch / Re: Paper about ISO C

Pages:123456789101112131415161718192021222324252627282930313233
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor