Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Support bacteria -- it's the only culture some people have!


devel / comp.lang.c / Re: bart again (UCX64)

SubjectAuthor
* bart again (UCX64)Paul Edwards
+* Re: bart again (UCX64)Bart
|+* Re: bart again (UCX64)Paul Edwards
||`* Re: bart again (UCX64)Bart
|| +- Re: bart again (UCX64)Paul Edwards
|| `- Re: bart again (UCX64)Dan Cross
|+* Re: bart again (UCX64)Bart
||`* Re: bart again (UCX64)Paul Edwards
|| `* Re: bart again (UCX64)Bart
||  `- Re: bart again (UCX64)Paul Edwards
|`- Re: bart again (UCX64)Chris M. Thomasson
+- Re: bart again (UCX64)Paul Edwards
+* Re: bart again (UCX64)Anton Shepelev
|`* Re: bart again (UCX64)Paul Edwards
| `* Re: bart again (UCX64)Bart
|  `* Re: bart again (UCX64)Paul Edwards
|   +* Re: bart again (UCX64)Paul Edwards
|   |`- Re: bart again (UCX64)Paul Edwards
|   `* Re: bart again (UCX64)Bart
|    +* Re: bart again (UCX64)Paul Edwards
|    |`* Re: bart again (UCX64)Bart
|    | `* Re: bart again (UCX64)Paul Edwards
|    |  `* Re: bart again (UCX64)Bart
|    |   `* Re: bart again (UCX64)Paul Edwards
|    |    +* Re: bart again (UCX64)Bart
|    |    |`- Re: bart again (UCX64)Paul Edwards
|    |    `* Re: bart again (UCX64)Bart
|    |     +* Re: bart again (UCX64)Paul Edwards
|    |     |+* Re: bart again (UCX64)Bart
|    |     ||`* Re: bart again (UCX64)Paul Edwards
|    |     || +* Re: bart again (UCX64)Bart
|    |     || |+- Re: bart again (UCX64)Paul Edwards
|    |     || |`* Re: bart again (UCX64)Keith Thompson
|    |     || | `* Re: bart again (UCX64)Scott Lurndal
|    |     || |  `- Re: bart again (UCX64)David Brown
|    |     || `- Re: bart again (UCX64)Paul Edwards
|    |     |`* Re: bart again (UCX64)Scott Lurndal
|    |     | `- Re: bart again (UCX64)Ben Bacarisse
|    |     `* Re: bart again (UCX64)David Brown
|    |      `* Re: bart again (UCX64)Bart
|    |       +- Re: bart again (UCX64)Bart
|    |       +* Re: bart again (UCX64)David Brown
|    |       |`* Re: bart again (UCX64)Bart
|    |       | +* Re: bart again (UCX64)Keith Thompson
|    |       | |+* Verbosity in command output (Was: bart again (UCX64))Kenny McCormack
|    |       | ||`* Re: Verbosity in command output (Was: bart again (UCX64))Kaz Kylheku
|    |       | || `* Re: Verbosity in command output (Was: bart again (UCX64))Malcolm McLean
|    |       | ||  `- Re: Verbosity in command output (Was: bart again (UCX64))Kaz Kylheku
|    |       | |`* Re: bart again (UCX64)Bart
|    |       | | `- Re: bart again (UCX64)Keith Thompson
|    |       | +- Re: bart again (UCX64)Scott Lurndal
|    |       | +* Re: bart again (UCX64)Scott Lurndal
|    |       | |`* Re: bart again (UCX64)Bart
|    |       | | +- Re: bart again (UCX64)Scott Lurndal
|    |       | | +* Re: bart again (UCX64)Keith Thompson
|    |       | | |`* Re: bart again (UCX64)Bart
|    |       | | | +* Re: bart again (UCX64)Paul Edwards
|    |       | | | |+* Re: bart again (UCX64)Chris M. Thomasson
|    |       | | | ||`* Re: bart again (UCX64)Paul Edwards
|    |       | | | || `- Re: bart again (UCX64)Kaz Kylheku
|    |       | | | |`- Re: bart again (UCX64)Bart
|    |       | | | +- Re: bart again (UCX64)Kaz Kylheku
|    |       | | | `- Re: bart again (UCX64)Keith Thompson
|    |       | | `* Re: bart again (UCX64)David Brown
|    |       | |  `* Re: bart again (UCX64)Bart
|    |       | |   +- Re: bart again (UCX64)David Brown
|    |       | |   +* Re: bart again (UCX64)Richard Harnden
|    |       | |   |`* Re: bart again (UCX64)Bart
|    |       | |   | +- Re: bart again (UCX64)David Brown
|    |       | |   | +* Re: bart again (UCX64)Richard Harnden
|    |       | |   | |+- Re: bart again (UCX64)David Brown
|    |       | |   | |`* Re: bart again (UCX64)Bart
|    |       | |   | | `- Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | |`* Re: bart again (UCX64)Bart
|    |       | |   | | +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | |`* Re: bart again (UCX64)Bart
|    |       | |   | | | +* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |`* Re: bart again (UCX64)Bart
|    |       | |   | | | | `* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |  `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   +* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |`* Re: bart again (UCX64)Bart
|    |       | |   | | | |   | `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |  `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |   `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |    `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |     +* Re: bart again (UCX64)Malcolm McLean
|    |       | |   | | | |   |     |+* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |     ||`* Re: bart again (UCX64)Malcolm McLean
|    |       | |   | | | |   |     || `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |     ||  `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |     ||   `- Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |     |`- Re: bart again (UCX64)David Brown
|    |       | |   | | | |   |     +- Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |     `* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |      +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |      |`* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |      | +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |      | |`* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |      | | +- Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |      | | `- Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |      | `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |      `- Re: bart again (UCX64)Keith Thompson
|    |       | |   | | | |   `- Re: bart again (UCX64)David Brown
|    |       | |   | | | `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | `* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | `- Re: bart again (UCX64)Kaz Kylheku
|    |       | |   `* Re: bart again (UCX64)Kaz Kylheku
|    |       | `* Re: bart again (UCX64)David Brown
|    |       `* Re: bart again (UCX64)Kaz Kylheku
|    `* Re: bart again (UCX64)Paul Edwards
`* Re: bart again (UCX64)Michael S

Pages:12345678910111213141516
Re: bart again (UCX64)

<a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1a0e:b0:400:9629:cfad with SMTP id f14-20020a05622a1a0e00b004009629cfadmr224401qtb.13.1693822070033;
Mon, 04 Sep 2023 03:07:50 -0700 (PDT)
X-Received: by 2002:a17:90b:30d1:b0:268:377d:9a95 with SMTP id
hi17-20020a17090b30d100b00268377d9a95mr2397771pjb.2.1693822069677; Mon, 04
Sep 2023 03:07:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 4 Sep 2023 03:07:48 -0700 (PDT)
In-Reply-To: <ud48b0$1co8f$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:88d:c567:12a6:beb3;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:88d:c567:12a6:beb3
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucqj27$3con1$1@dont-email.me> <ucqpgp$3dnop$1@dont-email.me>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
Subject: Re: bart again (UCX64)
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 04 Sep 2023 10:07:50 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 72
 by: Malcolm McLean - Mon, 4 Sep 2023 10:07 UTC

On Monday, 4 September 2023 at 10:34:39 UTC+1, Bart wrote:
>
> So what exactly is a C compiler? What does it do? Don't bother answering.
>
A compiler takes a program written in one language and translates it into
another language. As the author of many languages yourself, you should know
that basic defintion.
>
> Next I fully expect you will say that C isn't really a language. From
> what I've gleaned here, it isn't. It's a collection of suggestions and
> recommendations as to how an input file might be processed.
>
The problem is that if we extend C in a small way, for example to speed things
up a bit by making 32 bit pointers "near" pointers and 64-bit pointers "far"
pointers, the we've got what is technically a different language. Pointer
declarations which would be syntax errors in original C are now legal, whilst
a handful of legal C programs which use "far" or "near" as identifiers will
break.
But it isn't really a different language. It's just a slightly incompatible extension.

Because gcc is written by volunteers, it's far more fun to implement new features
than to write a compiler for a language where someone else has taken all the
decisions. So gcc has a lot of extensions.
>
> There's so much gaslighting going on here that I'm almost starting to
> question my own ideas.
>
> /My/ idea of a compiler is a simple box, with a single Go button. You
> feed in a tape at one side representing source code and it writes a tape
> on the other with a runnable program. When it's finished a green light
> flashes. The output tape I can subsequently feed into a computer to execute.
>
> If there's a problem with the input, a red light flashes, and no output
> tape is produced.
>
> It's almost like a consumer product that anyone can use.
>
> Now, what would gcc look like when expressed like that? How many
> thousands of buttons and lights would it have? What actual language
> would be accepted? How many colours of errors lights would there be? I
> know there is no green light.
>
> How big would it be? Would it be one huge box, or would be contain other
> boxes? How many different languages could it deal with?
>
> One more thing about this box: if you don't set the dials for the title
> of the output take, it will overwrite the same tape it producted a
> minute ago! And of course the buttons, switches and dials all reset
> themselves each time.
>
A C compiler translates C into another language, almost always directly
executable machine code. So the specification for a C compiler is
"take a C source file and produce the executable that has the same behaviour".
But of course we want more than that. We want "produce the best executable
with the same behaviour".
That's the rub. It's not so much that there are minor and usually unimportant
trade-offs to be had between code size, memory usage, and execution speed.
It's that a compiler can't actually produce the "best" executable, because
optimisation isn't a computable problem (there's no Turing machine which reads
a C source as input and outputs the fastest equivalent machine code as output
it's mathematically impossible).
So you have to ask the user. The most basic option a compiler usually has is
release vs debug. But it's only necessary because of techncial limitations.
Then you've got other options like "signed chars" which are necessary because
of poor design decisions taken early in C's history. Then you've got options like
"warning level" or "treat warnings as errors" which are cop-outs by the compiler
designers and in a good compiler wouldn't be provided at all. (The concept
of a warning which is only sometimes worth issuing is a strange one).

The options do represent failures. But some of those failures are inherent
problems in what you are asking the compiler to do. gcc of course has a
ridiculous number of options and many of them could and should be culled,
but you'd still be left with a substantial number which carry their weight.

Re: bart again (UCX64)

<ud4ccn$1dub0$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 11:43:37 +0100
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <ud4ccn$1dub0$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucqj27$3con1$1@dont-email.me> <ucqpgp$3dnop$1@dont-email.me>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Sep 2023 10:43:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2da2ce2dba17cc6e2f2172308700bc74";
logging-data="1505632"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18D1W/i9cAINxXgjtqCo5qs2rSAVI5Igws="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:/Tbtj7jOVkObJb/f8M3/7mBwHrg=
In-Reply-To: <a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
 by: Bart - Mon, 4 Sep 2023 10:43 UTC

On 04/09/2023 11:07, Malcolm McLean wrote:
> On Monday, 4 September 2023 at 10:34:39 UTC+1, Bart wrote:
>>
>> So what exactly is a C compiler? What does it do? Don't bother answering.
>>
> A compiler takes a program written in one language and translates it into
> another language. As the author of many languages yourself, you should know
> that basic defintion.

Yes, but what is a /C/ compiler? Because apparently:

BB:
> For example, nether the gcc nor clang command (run just like that) is
a C compiler.

Those (run just like that) will take an input and translate it into an
about. But that is not compiling C according to BB.

Here's a novel idea, how about taking those products (run just like
that) and making them C compilers. Trustworthy ones.

Re: bart again (UCX64)

<20a53e7c-6952-432e-8147-9004ab5ea79cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1889:b0:403:a91d:bfec with SMTP id v9-20020a05622a188900b00403a91dbfecmr221193qtc.0.1693826518762;
Mon, 04 Sep 2023 04:21:58 -0700 (PDT)
X-Received: by 2002:a05:622a:1899:b0:412:2d71:70dd with SMTP id
v25-20020a05622a189900b004122d7170ddmr227190qtc.5.1693826518570; Mon, 04 Sep
2023 04:21:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 4 Sep 2023 04:21:58 -0700 (PDT)
In-Reply-To: <ud4ccn$1dub0$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:88d:c567:12a6:beb3;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:88d:c567:12a6:beb3
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucqj27$3con1$1@dont-email.me> <ucqpgp$3dnop$1@dont-email.me>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me> <a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
<ud4ccn$1dub0$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <20a53e7c-6952-432e-8147-9004ab5ea79cn@googlegroups.com>
Subject: Re: bart again (UCX64)
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 04 Sep 2023 11:21:58 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2807
 by: Malcolm McLean - Mon, 4 Sep 2023 11:21 UTC

On Monday, 4 September 2023 at 11:43:49 UTC+1, Bart wrote:
> On 04/09/2023 11:07, Malcolm McLean wrote:
> > On Monday, 4 September 2023 at 10:34:39 UTC+1, Bart wrote:
> >>
> >> So what exactly is a C compiler? What does it do? Don't bother answering.
> >>
> > A compiler takes a program written in one language and translates it into
> > another language. As the author of many languages yourself, you should know
> > that basic defintion.
> Yes, but what is a /C/ compiler? Because apparently:
>
> BB:
> > For example, nether the gcc nor clang command (run just like that) is
> a C compiler.
> Those (run just like that) will take an input and translate it into an
> about. But that is not compiling C according to BB.
>
Yes, because in BB's world, a grammar either defines C, or a subset of C,
or a superset of C, or a different language to C.

Re: bart again (UCX64)

<ud4m0v$1g6en$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 15:27:58 +0200
Organization: A noiseless patient Spider
Lines: 104
Message-ID: <ud4m0v$1g6en$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucqj27$3con1$1@dont-email.me> <ucqpgp$3dnop$1@dont-email.me>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Sep 2023 13:27:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="945a2f8fc8be8a028ab8a1c34d222ac4";
logging-data="1579479"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19E/FV8XJzRtpi7Cfw9fKguMPRVbXKZXbI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:DGSfULCoprSqFs7YT/l3M1D/rq8=
In-Reply-To: <a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Mon, 4 Sep 2023 13:27 UTC

On 04/09/2023 12:07, Malcolm McLean wrote:
> On Monday, 4 September 2023 at 10:34:39 UTC+1, Bart wrote:
>>
>> So what exactly is a C compiler? What does it do? Don't bother answering.
>>
> A compiler takes a program written in one language and translates it into
> another language. As the author of many languages yourself, you should know
> that basic defintion.

That's not what he is asking.

You can't say what a "C compiler" is until you understand what "C" is.
It is the language defined by the C standards. Technically, only the
current standard (C17) defines C, as it replaces previous standards -
but in practice it is reasonable to talk about a "C99 compiler", a "C17
compiler", etc., with a "C compiler" commonly regarded as meaning at
least a C99 compiler, since the changes to the language after C99 were
relatively small. (The upcoming C23 has big changes again.)

So a "C compiler" is a compiler which will accept the language as
defined by the standards, and issue diagnostics as required for syntax
or constraint errors. It can issue other diagnostics, but should not
fail to compile source that is valid according to the C standards.
Other things useful for compiling C code, including a standard library,
headers, OS/System headers, an assembler, a linker, utilities such as
"make", editors, IDEs, debuggers, profilers, linters - these are not
part of a C compiler, but may be packaged alongside for user convenience.

It is usually fine to have a much looser meaning of "C compiler", as a
tool for compiling a language roughly like C - perhaps with extra
restrictions, perhaps with extra extensions, perhaps stricter or perhaps
more lenient. But in this discussion, since Bart wants to know exactly
what is allowed or not allowed in C and how a C compiler should behave,
we have to use a strict definition of the language.

There is nothing to suggest that a "C compiler" must be a single
program, nor that it should be run using a simple command-line
interface. I have used several dozen C compilers through the years - I
don't know of any that were even reasonably strict and compliant C
compilers without an appropriate selection of flags or options.

>>
>> Next I fully expect you will say that C isn't really a language. From
>> what I've gleaned here, it isn't. It's a collection of suggestions and
>> recommendations as to how an input file might be processed.
>>
> The problem is that if we extend C in a small way, for example to speed things
> up a bit by making 32 bit pointers "near" pointers and 64-bit pointers "far"
> pointers, the we've got what is technically a different language. Pointer
> declarations which would be syntax errors in original C are now legal, whilst
> a handful of legal C programs which use "far" or "near" as identifiers will
> break.
> But it isn't really a different language. It's just a slightly incompatible extension.

If a compiler silently accepts "int * far p;", or "far int * p;", or
whatever syntax you are suggesting, then it is not a C compiler in the
context of this discussion, because a C compiler will at least issue a
diagnostic here. Your hypothetical extended C compiler might be a more
useful tool, and it would often be referred to as a "C compiler", but in
this discussion branch, it is not.

>
> Because gcc is written by volunteers, it's far more fun to implement new features
> than to write a compiler for a language where someone else has taken all the
> decisions. So gcc has a lot of extensions.

For the past two decades, the great majority of work on gcc has been
done by professionals who have been paid for that work, by companies
such as Intel, ARM, Red Hat, IBM, Google, and others. What you describe
was more accurate in the 1980's and 1990's - and many of gcc's
extensions have since been standardised. Since those days, the solid
majority of gcc extensions have been within the reserved namespaces,
such as __builtin* functions and __attribute__'s. There is, however, a
tendency to allow new features of later C standards to be accepted by
default even if those newer C standards are not picked.

Since its early days, gcc has by default accepted a language that only
approximately conforms to any of the C standards. If you want it to act
as a C compiler, you need to give it the appropriate flags (specify the
standard you want with "-std=c11", "-std=c17", etc., and either
"-Wpedantic" or "-pedantic-errors").

>>
>> There's so much gaslighting going on here that I'm almost starting to
>> question my own ideas.

When everyone else is saying something different than you, you /should/
be questioning your own ideas.

>>
>> /My/ idea of a compiler is a simple box, with a single Go button. You
>> feed in a tape at one side representing source code and it writes a tape
>> on the other with a runnable program. When it's finished a green light
>> flashes. The output tape I can subsequently feed into a computer to execute.

That's not how real-world compilers work - at least, not when the
language must cover such a huge variety of usages as C. It's okay for a
small or limited language with simple tools and a very restricted set of
usages. And it might be acceptable for a byte-compiler that targets a
single virtual machine.

So yes, question your ideas.

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 14:54:15 +0100
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <87edjeujqw.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<20230901104426.371@kylheku.com> <uct9hv$3v1lb$2@dont-email.me>
<20230901114625.198@kylheku.com> <ucthrb$gvk$2@dont-email.me>
<20230901135123.702@kylheku.com> <uctlpv$17t5$1@dont-email.me>
<878r9p7b13.fsf@nosuchdomain.example.com>
<ucu0tf$2mht$1@dont-email.me> <20230901175635.91@kylheku.com>
<ucv4e6$d0c9$1@dont-email.me> <ucvna1$fb08$7@dont-email.me>
<ud00bc$grer$1@dont-email.me> <ud23ls$um2u$1@dont-email.me>
<ud2eod$10jv5$1@dont-email.me> <ud4604$1cbam$1@dont-email.me>
<ud4a6a$1d4cd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="e2cb716c5442438ebe9264e332ee95d9";
logging-data="1587386"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kE20mfADOTaAGgub3dLp7vfPwYhzvyUY="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:pW4r3FrFVpGB2t27HDWMOd5ynDA=
sha1:c31kWDYHGNf4wqCjKLs69q1j/Nc=
X-BSB-Auth: 1.2b26f028b40b3e131f54.20230904145415BST.87edjeujqw.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 4 Sep 2023 13:54 UTC

Bart <bc@freeuk.com> writes:

> On 04/09/2023 09:54, David Brown wrote:
>> On 03/09/2023 19:11, Bart wrote:
>
>>> What's wrong with that?
>> If you can live inside a bubble, and be happy with that, then I suppose
>> that's fine.  However, you don't have the experience or understanding to
>> criticise those outside the bubble.  You can live in your blissful
>> ignorance if that's what suits you - but please understand that others do
>> not want to be in your bubble.  It does not appeal at all to me. Your
>> bubble tools and languages are of little use or interest to all but a
>> very few other people.
>
> That may be so. But you can still learn things from them.

I think I've asked before, but is there a language reference manual?

> And yet, I can't get this program to compile when expressed in my langage:
>
> char* fred(void) {
> (long long int)rand()*3.14159;
> }
>
> int main(void) {
> printf("%s\n", fred());
> }

C (as currently defined) has nothing to say about the behaviour of this
program. That makes it trivial to implement an "equivalent" in almost
any language. If your view of equivalent is the inclusive one, then any
program at all will match the behaviour permitted for this one. And if
your view of equivalent is quite narrow, then any text that has no
defined meaning in the other language will do instead.

I post this only to explain how I interpret the notion of "expressing" a
program in another language. I am sure your view of the term is quite
different.

--
Ben.

Re: bart again (UCX64)

<yDlJM.780911$mPI2.239837@fx15.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: bart again (UCX64)
Newsgroups: comp.lang.c
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com> <ucthrb$gvk$2@dont-email.me> <20230901135123.702@kylheku.com> <uctlpv$17t5$1@dont-email.me> <878r9p7b13.fsf@nosuchdomain.example.com> <ucu0tf$2mht$1@dont-email.me> <20230901175635.91@kylheku.com> <ucv4e6$d0c9$1@dont-email.me> <ucvna1$fb08$7@dont-email.me> <ud00bc$grer$1@dont-email.me> <ud23ls$um2u$1@dont-email.me> <ud2eod$10jv5$1@dont-email.me> <ud4604$1cbam$1@dont-email.me> <ud4a6a$1d4cd$1@dont-email.me>
Lines: 18
Message-ID: <yDlJM.780911$mPI2.239837@fx15.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 04 Sep 2023 14:14:54 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 04 Sep 2023 14:14:54 GMT
X-Received-Bytes: 1760
 by: Scott Lurndal - Mon, 4 Sep 2023 14:14 UTC

Bart <bc@freeuk.com> writes:
>On 04/09/2023 09:54, David Brown wrote:
>> On 03/09/2023 19:11, Bart wrote:
>
>>> What's wrong with that?
>>
>> If you can live inside a bubble, and be happy with that, then I suppose
>> that's fine.  However, you don't have the experience or understanding to
>> criticise those outside the bubble.  You can live in your blissful
>> ignorance if that's what suits you - but please understand that others
>> do not want to be in your bubble.  It does not appeal at all to me. Your
>> bubble tools and languages are of little use or interest to all but a
>> very few other people.
>
>That may be so. But you can still learn things from them. A good idea is
>a good idea.

Not really. Define 'good' in this context.

Re: bart again (UCX64)

<ud4rbl$1h1t4$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 16:59:00 +0200
Organization: A noiseless patient Spider
Lines: 258
Message-ID: <ud4rbl$1h1t4$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucoe3l$2t4o2$1@dont-email.me>
<557bf807-40c7-404b-9242-c26975faa42fn@googlegroups.com>
<ucprpd$38s6i$1@dont-email.me> <ucq1gd$39q14$1@dont-email.me>
<ucq86h$3auvq$1@dont-email.me> <ucqj27$3con1$1@dont-email.me>
<ucqpgp$3dnop$1@dont-email.me> <aa8IM.249421$f7Ub.27491@fx47.iad>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <20230901104426.371@kylheku.com>
<uct9hv$3v1lb$2@dont-email.me> <20230901114625.198@kylheku.com>
<ucthrb$gvk$2@dont-email.me> <20230901135123.702@kylheku.com>
<uctlpv$17t5$1@dont-email.me> <878r9p7b13.fsf@nosuchdomain.example.com>
<ucu0tf$2mht$1@dont-email.me> <20230901175635.91@kylheku.com>
<ucv4e6$d0c9$1@dont-email.me> <ucvna1$fb08$7@dont-email.me>
<ud00bc$grer$1@dont-email.me> <ud23ls$um2u$1@dont-email.me>
<ud2eod$10jv5$1@dont-email.me> <ud4604$1cbam$1@dont-email.me>
<ud4a6a$1d4cd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 4 Sep 2023 14:59:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="945a2f8fc8be8a028ab8a1c34d222ac4";
logging-data="1607588"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0sEnNyWuUWfVsdB2BRYasDlCLPmcxdoo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:MNUZpgYIbRN/gO2Xk3SRE7Lnukk=
Content-Language: en-GB
In-Reply-To: <ud4a6a$1d4cd$1@dont-email.me>
 by: David Brown - Mon, 4 Sep 2023 14:59 UTC

On 04/09/2023 12:06, Bart wrote:
> On 04/09/2023 09:54, David Brown wrote:
>> On 03/09/2023 19:11, Bart wrote:
>
>>> What's wrong with that?
>>
>> If you can live inside a bubble, and be happy with that, then I
>> suppose that's fine.  However, you don't have the experience or
>> understanding to criticise those outside the bubble.  You can live in
>> your blissful ignorance if that's what suits you - but please
>> understand that others do not want to be in your bubble.  It does not
>> appeal at all to me. Your bubble tools and languages are of little use
>> or interest to all but a very few other people.
>
> That may be so. But you can still learn things from them. A good idea is
> a good idea.

I agree entirely that you can learn from them, and some good ideas are
widely applicable.

But a good idea for one language is not necessarily a good idea for a
different language.

>
>>
>>
>
>> We focus on C here, because it is a C discussion group.
>
> The thread has been largely about how compilers work. That surely can be
> compared with how compilers for like languages work. Or even how my
> compiler for C works.

Your own languages are basically irrelevant here. Languages related to
C are sometimes interesting for comparison, but should at least be
languages familiar to people here. (Thus C++ can sometimes come up.)
How your C compilers act on C code /is/ relevant.

>
>> Do not imagine for a moment that you are special because you have
>> another language to compare to C.
>
> Why not? How many here:
>
> * Have used a viable alternative to C for most of their careers?
>   (I don't mean C++!)

Why don't you mean C++? It is a viable alternative to C for a great
many uses. Other languages that can be used in places where C might
also be a reasonable choice include Rust, Go, D, Fortran, Ada, Pascal,
Java, Objective-C, Ocaml, Zig, Forth, and probably several others.

Your language is not viable as a choice for programming. I would not
consider a personal one-man language as acceptable for professional
work. (Your opinion, naturally, will differ here - I can only speak for
myself.) I've seen what happens when rare or obscure languages are
picked for development projects, and it is not pretty. Even when the
tool involved is a perfect for the task, and even when it is an
established tool (at least big enough to have its own Wikipedia page),
you have a maintenance disaster. The customer is left with software
that has cost them a great deal of time and money, and as soon as it
hits a limit or a new feature is required, it is worthless because they
can't get someone to build on it.

No, at least for the customers I have had over the decades, your tools
would not be considered viable at all.

(And of course they are completely useless on the main targets for most
of my code.)

And regardless, your point is irrelevant to being able to compare C with
other languages.

>
> * How many have /designed and implemented/ that alternative?

That is completely irrelevant to understanding other languages.

>
> * How many here have written compilers? That includes a 'full stack'
>   implementation

Again, irrelevant.

>
> * How many here have tried implementing a C compiler?
>

Again, irrelevant.

> You don't think that can give someone a rather special perspective?

Not for this point, no.

Don't get me wrong - you've done some impressive stuff over the years,
and creating your own languages and tools is no minor achievement.
Implementing a C compiler does (or should) give you some useful
insights. (Though you are not alone in this group in having implemented
a compiler.)

But does any of that mean you have unique insights or are able to offer
comparisons or views on C that others cannot? No, it does not. For
every time you bring up your own language in comparison to C, I could
compare it to half a dozen other languages (and there are other regulars
here would could do far more) - all equally irrelevant. I don't need to
have had a career programming in Ada or D to be able to compare them to
C - I just need to know enough about the languages. And these have the
overwhelming benefit that everyone here can look up the details if they
want to know more, try them online at godbolt.org (or other similar
sites), and test them out on their own machines.

So yes, you certainly have done something few others have over the
decades. Call yourself "special" if you want - it would not be
unreasonable. But don't mistake that for thinking you have special
knowledge of C or unique abilities to compare it to other languages.

>
> You can tell any other upstart, This is what a C compiler is and how it
> is supposed to work. But not when that upstart says, No, a C compiler
> can also look and behave like /this/, because I've done it.

Well, no, you haven't.

You've made a compiler for a sort-of C language, of unknown standard,
with unknown details, that rejects code that is by definition valid C,
works in limited use-cases, and is missing features that other people
want when developing in C.

That doesn't mean it is a bad tool - being small, fast and easy to use
is a good thing. (And it certainly does not mean it is not an
impressive achievement.) And when your tool is good enough, it is good
enough.

I would be much happier to see you take credit and stand for what you
have achieved, than making absurd comparisons that lead to ridicule.
Say you have made a sort-of C compiler that handles a useful subset of
the language and has defaults and error handling that you personally
find more useful than other tools and the standard C language - that's
honest opinion, and perfectly valid. Telling people that the defaults
they find useful in massively popular software are objectively wrong, or
that C compilers should work contrary to the requirements of the
language, is entirely different - it makes you look arrogant and
ignorant. (This is especially the case since you have proved that your
knowledge of C is barely enough to write code in the language, and
certainly not accurate enough to write a conforming C compiler.)

>
>>> I acknowledge that it is easy for me to try new things, but that
>>> itself allows me to say whether they are better than how C does it,
>>> or worse. (Usually the former! The others don't last long.)
>>
>> No, it does not allow you to say anything of the sort - except within
>> the very limited and niche confines of your little bubble.  You have
>> no concept of how your ideas might work or fail to work in the real
>> world - you've demonstrated that repeatedly here.
>
> The real world consisting of half a century's accumulation of cruft in
> the C language, compilers, options, libraries, makefiles and assorted
> other tools?
>
> I fully agree.

You can't "agree" with something completely unrelated to what I wrote.

>
> Of course, you can /change/ that in the real world if somebody put their
> mind to it. But nobody will. Most people's contribution in that area is
> to add to the cruft: 51 year's accummulatation instead of 50!
>

And what, exactly, do you think /you/ are doing? Whining, moaning and
complaining to people who have no influence whatsoever on the language
or tools in question? You've written a sort-of-C compiler that is, if I
understand correctly, not even that useful for your own work - and the
only other person interested in it makes flat-earthers look rational.

What do you think we should all be doing - even if anyone here agreed
with you on more than a few small points?

>>   You have no inkling about what other people want or need, or how
>> they could apply to other people's projects.  This is because you
>> directly avoid anything outside your bubble, refuse to listen to
>> anything people tell you, and you will not make any attempt to learn
>> or understand.  Nothing gets through your walls of smugness,
>> self-satisfaction, and irrational hatred.
>>
>> That does not mean you don't have good ideas, or that your programming
>> languages don't have their good points - far from it, there are some
>> nice things there.  They are not as unique or innovative as you
>> believe, and certainly not as universally good, but can be good things
>> for at least some people and some uses.
>
> And yet, I can't get this program to compile when expressed in my langage:

Why should anyone care about your language?

>
>   char* fred(void) {
>       (long long int)rand()*3.14159;
>   }
>
>   int main(void) {
>       printf("%s\n", fred());
>   }
>
> I can very easily do so in C, /and/ I can run it.


Click here to read the complete article
Re: bart again (UCX64)

<8734ztvrqi.fsf@bsb.me.uk>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 17:16:21 +0100
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <8734ztvrqi.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me>
<a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
<ud4ccn$1dub0$1@dont-email.me>
<20a53e7c-6952-432e-8147-9004ab5ea79cn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="e2cb716c5442438ebe9264e332ee95d9";
logging-data="1632292"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sd2E8z3ghVBapt67i55KuFyqN9N9JYfQ="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:WKiJcrtAcg9ZcB+eIz3u9PJjZno=
sha1:q7BUBhinZLAdfL4vF9tRtsPtqCQ=
X-BSB-Auth: 1.7c4e6069382007e78ec0.20230904171621BST.8734ztvrqi.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 4 Sep 2023 16:16 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> On Monday, 4 September 2023 at 11:43:49 UTC+1, Bart wrote:
>> On 04/09/2023 11:07, Malcolm McLean wrote:
>> > On Monday, 4 September 2023 at 10:34:39 UTC+1, Bart wrote:
>> >>
>> >> So what exactly is a C compiler? What does it do? Don't bother answering.
>> >>
>> > A compiler takes a program written in one language and translates it into
>> > another language. As the author of many languages yourself, you should know
>> > that basic defintion.
>> Yes, but what is a /C/ compiler? Because apparently:
>>
>> BB:

Bart, you asked me not to reply to that question so I didn't. Given
that you don't want me to reply, I would appreciate it if you left me
out of the discussion.

>> > For example, nether the gcc nor clang command (run just like that) is
>> a C compiler.
>> Those (run just like that) will take an input and translate it into an
>> about. But that is not compiling C according to BB.
>>
> Yes, because in BB's world, a grammar either defines C, or a subset of C,
> or a superset of C, or a different language to C.

It's more than just the grammar, the defined semantics matter as well,
but that's the gist of it. I'd hope that you also define a programming
language as a grammar plus semantics. That's why names like C99 and GNU
C are used -- they name different languages.

Do you know that gcc (with no other flags or options) will report no
syntax errors for this source code:

PROGRAM HELLO
WRITE (*,*) 'Hello world'
END

? Is it only in "my world" that the plain gcc command is not a C
compiler?

--
Ben.

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 17:18:45 +0100
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <87wmx5ud22.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="e2cb716c5442438ebe9264e332ee95d9";
logging-data="1632292"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yl9HgXkx65ocRAsiUhRkc0IWujZ36qi0="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:ihIxoyqCENRg32IP/yugb+IHo3o=
sha1:5ySpCmmD4kPkTwzUQEe4aVu7TV0=
X-BSB-Auth: 1.f1bc862146e4c3983f7c.20230904171845BST.87wmx5ud22.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 4 Sep 2023 16:18 UTC

Bart <bc@freeuk.com> writes:

> On 04/09/2023 03:17, Ben Bacarisse wrote:
>> Bart <bc@freeuk.com> writes:
>>
>>> On 03/09/2023 15:31, Ben Bacarisse wrote:
>>>> Bart <bc@freeuk.com> writes:
>>>>
>>>>> Take this program:
>>>>>
>>>>> void fred(void){}; void bill(void)
>>>> This program has two syntax errors.
>>>
>>> Sorry, I found that when I tested the above but forgot to update the post.
>>>
>>>> The one you are talking about and
>>>> the missing ; or missing compound statement as the end of the line.
>>>>
>>>>> There's an extraneous ";" that the grammar says shouldn't be there, so it's
>>>>> a syntax error.
>>>>>
>>>>> Should a compiler fail it or not?
>>>> The standard says that it should be reported.
>>>
>>> And yet the first four compilers I tried don't do that.
>> Most programs that claim to be C compilers are not C compilers. For
>> example, nether the gcc nor clang command (run just like that) is a C
>> compiler.
>
> Ha ha ha!
>
> And here /you/ go around the same loop!
>
> Oh, you know the product that we've been hailing as the flagship C compiler
> for that few thousand posts, well it isn't really a C compiler anyway!
>
> So what exactly is a C compiler? What does it do? Don't bother
> answering.

OK.

--
Ben.

Re: bart again (UCX64)

<20230904092343.829@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 16:26:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <20230904092343.829@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucqj27$3con1$1@dont-email.me> <ucqpgp$3dnop$1@dont-email.me>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
Injection-Date: Mon, 4 Sep 2023 16:26:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b0451dec79ee4655b8a53117d1292826";
logging-data="1632595"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3quHQPmhSUFo1LaFaPXBCHcDYLijIBhU="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:0NhULwXMvniELeK3o511OIrh+hI=
 by: Kaz Kylheku - Mon, 4 Sep 2023 16:26 UTC

On 2023-09-04, Bart <bc@freeuk.com> wrote:
> On 04/09/2023 03:17, Ben Bacarisse wrote:
>> Most programs that claim to be C compilers are not C compilers. For
>> example, nether the gcc nor clang command (run just like that) is a C
>> compiler.
>
> Ha ha ha!
>
> And here /you/ go around the same loop!

gcc, when invoked on a .c file with no arguments, is a C compiler,
for some version of GNU C. It is not an ISO C compiler.

"C" does not mean "ISO C", unless the debate has been explicitly
restricted that way.

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

Re: bart again (UCX64)

<ud54co$1ij02$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 18:33:13 +0100
Organization: A noiseless patient Spider
Lines: 96
Message-ID: <ud54co$1ij02$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me>
<a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
<ud4ccn$1dub0$1@dont-email.me>
<20a53e7c-6952-432e-8147-9004ab5ea79cn@googlegroups.com>
<8734ztvrqi.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Sep 2023 17:33:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2da2ce2dba17cc6e2f2172308700bc74";
logging-data="1657858"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vLxeepE9D3UzIo6EAEiTf+bFaSw+fNgo="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:z2PXDkwWBiV+dq0jZoIyNqPG2XM=
In-Reply-To: <8734ztvrqi.fsf@bsb.me.uk>
 by: Bart - Mon, 4 Sep 2023 17:33 UTC

On 04/09/2023 17:16, Ben Bacarisse wrote:

> Do you know that gcc (with no other flags or options) will report no
> syntax errors for this source code:
>
> PROGRAM HELLO
> WRITE (*,*) 'Hello world'
> END
>
> ? Is it only in "my world" that the plain gcc command is not a C
> compiler?

Your comments are misleading:

--------------------------------------
c:\c>type c.c
PROGRAM HELLO
WRITE (*,*) 'Hello world'
END

c:\c>gcc c.c
c.c:1:7: error: unknown type name 'PROGRAM'
1 | PROGRAM HELLO
| ^~~~~~~
c.c:2:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'WRITE'
2 | WRITE (*,*) 'Hello world'
| ^~~~~
c.c:2:19: warning: character constant too long for its type
2 | WRITE (*,*) 'Hello world'
| ^~~~~~~~~~~~~

c:\c>ren c.c c.ext

c:\c>gcc c.ext
C:\tdm\bin\ld.exe:c.ext: file format not recognized; treating as linker
script
C:\tdm\bin\ld.exe:c.ext:1: syntax error
collect2.exe: error: ld returned 1 exit status

c:\c>ren c.ext c.ftn

c:\c>gcc c.ftn
gcc: error: c.ftn: Fortran compiler not installed on this system

--------------------------------------

I didn't use the -x option as you said it would work without options.
But apparently it needs some input to tell it the language. That appears
to be the file extension.

That's clever, but so what? I can do that too:

c:\c>bcc c.ftn
Error: Fortran compiler not available
Stopping

I don't however want a Swiss army knife type of compiler that marshalls
each type of file into the appropriate tool. Isn't that more the OS's job?

Since people are always talking about wrappers around gcc to more
precisely pinpoint the task, why can't they write their own wrappers to
to this kind of dispatch too?

Of course, when /you/ have to, it's not so much fun is it?

I quite like the idea that I can do this:

mm prog compile .m
aa prog assemble .asm
bcc prog compile .c
mc prog transpile .m to C
ms prog Run .m

rather than:

gcc prog.m
gcc prog.asm
gcc prog.c
gcc prog.m -transpile
gcc prog.m -run

Because why not go further:

gcc prog.mp3
gcc prog.html
gcc makefile.mk
etc

You see my point? 'gcc' is too general.

My stuff is controlled by the names of the executables. You want to have
a minimal number of executables controlled by file extension (the famous
file extensions that in Linux are supposed to be optional!)

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 19:33:32 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <87r0ndu6tf.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="e2cb716c5442438ebe9264e332ee95d9";
logging-data="1667641"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zm9G+qInHI7akOs2YO4ilbePsKTv0BUY="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:TiNmqjHtRGZb0RZg5vJID7z/rXo=
sha1:gksbBcqylo4Y+86nH57rFPIBGEE=
X-BSB-Auth: 1.9787797ee68299d9e5e3.20230904193332BST.87r0ndu6tf.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 4 Sep 2023 18:33 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> On 2023-09-04, Bart <bc@freeuk.com> wrote:
>> On 04/09/2023 03:17, Ben Bacarisse wrote:
>>> Most programs that claim to be C compilers are not C compilers. For
>>> example, nether the gcc nor clang command (run just like that) is a C
>>> compiler.
>>
>> Ha ha ha!
>>
>> And here /you/ go around the same loop!
>
> gcc, when invoked on a .c file with no arguments, is a C compiler,
> for some version of GNU C. It is not an ISO C compiler.
>
> "C" does not mean "ISO C", unless the debate has been explicitly
> restricted that way.

Note, though, that this is exactly what has happened in this thread.
Bart's complaints about gcc's defaults are largely based on what "C"
permits, says or requires and gcc's failure to allow, honour or insist
on.

For a long while I went along with the idea that "C" can mean many
things, but that's not how Bart uses the term. In fact, that's one of
his big whinging topics -- C is what you care to make it. So I changed
my usage and posted the remark above. He found it worthy of mockery,
but did not want me to respond. Go figure.

--
Ben.

Re: bart again (UCX64)

<20230904121509.86@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 19:17:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <20230904121509.86@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk>
Injection-Date: Mon, 4 Sep 2023 19:17:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b0451dec79ee4655b8a53117d1292826";
logging-data="1688997"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GS57SASHdD/3IftzZPBCConaRZhjfteY="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:2M9eEZoXZlafMLR6Jr4wDLTzHHc=
 by: Kaz Kylheku - Mon, 4 Sep 2023 19:17 UTC

On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
> For a long while I went along with the idea that "C" can mean many
> things, but that's not how Bart uses the term. In fact, that's one of
> his big whinging topics -- C is what you care to make it. So I changed
> my usage and posted the remark above. He found it worthy of mockery,
> but did not want me to respond. Go figure.

C is a language family, like Lisp. Some people mean "Clojure"
when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".

Bart will just have to be patiently educated in the differences among:

- language family
- language dialect
- language standard
- language implementation
- language reference manual

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

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 20:48:19 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <87fs3tu3cs.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="e2cb716c5442438ebe9264e332ee95d9";
logging-data="1700702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PDSOu/1IqG9VJEkZr/yOV1UmdQMKZDnI="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:E/YTVjs1PBXOaztgDj/brOdIBQE=
sha1:8AvVBK8RtHN0k0XRXcx5ntGAksQ=
X-BSB-Auth: 1.1f4bf0a2636ab5cc88e4.20230904204819BST.87fs3tu3cs.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 4 Sep 2023 19:48 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>> For a long while I went along with the idea that "C" can mean many
>> things, but that's not how Bart uses the term. In fact, that's one of
>> his big whinging topics -- C is what you care to make it. So I changed
>> my usage and posted the remark above. He found it worthy of mockery,
>> but did not want me to respond. Go figure.
>
> C is a language family, like Lisp. Some people mean "Clojure"
> when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".

Yes.

> Bart will just have to be patiently educated in the differences among:
>
> - language family
> - language dialect
> - language standard
> - language implementation
> - language reference manual

How's that going?

--
Ben.

Re: bart again (UCX64)

<ud5db8$1k2dj$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 21:06:01 +0100
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <ud5db8$1k2dj$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Sep 2023 20:06:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2da2ce2dba17cc6e2f2172308700bc74";
logging-data="1706419"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EsxTaMVBEjj0zc3+LrUgyhBRcsM7dD+w="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:1wejgr9yxZMha7HcwwvBF/L5q94=
In-Reply-To: <20230904121509.86@kylheku.com>
 by: Bart - Mon, 4 Sep 2023 20:06 UTC

On 04/09/2023 20:17, Kaz Kylheku wrote:
> On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>> For a long while I went along with the idea that "C" can mean many
>> things, but that's not how Bart uses the term. In fact, that's one of
>> his big whinging topics -- C is what you care to make it. So I changed
>> my usage and posted the remark above. He found it worthy of mockery,
>> but did not want me to respond. Go figure.
>
> C is a language family, like Lisp. Some people mean "Clojure"
> when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".

But there is still one current C standard, and one current set of
standard headers?

>
> Bart will just have to be patiently educated in the differences among:
>
> - language family
> - language dialect
> - language standard
> - language implementation
> - language reference manual

Sure, how much more complicated do you want to make it?

But while you're here, perhaps you can tell me which of those myriad Cs
is being compiled in each case here:

gcc prog.c
clang prog.c
tcc lang.c
msvc lang.c
zig cc lang.c
lcc lang.c
pellesc lang.c (I forget the actual compiler name)

None of those likes to be verbose so it's rather a mystery what exactly
they are doing.

All I know is that the family/dialect/standard in each case doesn't care
amount making a missing 'return <value>' a hard error. So else are they
being being lax over?

Do I have to to specify -Werror=xxx 173 times for all the possible
things that ought to sensibly be hard errors?

BTW apparently 'gcc' is not a C compiler. That's both an interesting and
useless bit of information. What is means is that 'gcc.exe' invokes
programs like 'cc.exe', 'as.exe' and 'ld.exe', when presented with a -xc
option or a .c file extension, but people, in a C context, colloquially
refer to 'gcc' as a C compiler.

I think you guys just want to keep things a mystery!

Despite all the smoke and mirrors you want to apply, I seem to remember
a few weeks ago taking a project called libjpeg, and successfully
compiling the C modules it comprised with both 'gcc' and 'bcc' programs,
without any specific dialect options (I might have needed to dumb down
bcc with -old).

So, what language is libjpeg written in? If I look at the Wikipedia
entry for it, it says:

Written in: C

Same with Gzip. Same with CPython.

But, but, there IS no single language called C, right? In the case of
libjpeg, it used also a generic jconfig.h file.

So what's going on? Just trying to bamboozle people? Cut them down to
size? Carry on doing that, and I'll carry on trying to cut all the bullshit.

Re: bart again (UCX64)

<ud5dif$1k2eb$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 13:09:51 -0700
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <ud5dif$1k2eb$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
<ud5db8$1k2dj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 4 Sep 2023 20:09:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dbfec9bf80a1760bb972bf83cd8a0103";
logging-data="1706443"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xkqphDyQKQ8Ms6SaoldmzrLZBfu6fhOw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:xT6urzp03AqAEH0IhK3Npmxq4yM=
In-Reply-To: <ud5db8$1k2dj$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 4 Sep 2023 20:09 UTC

On 9/4/2023 1:06 PM, Bart wrote:
> On 04/09/2023 20:17, Kaz Kylheku wrote:
>> On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>>> For a long while I went along with the idea that "C" can mean many
>>> things, but that's not how Bart uses the term.  In fact, that's one of
>>> his big whinging topics -- C is what you care to make it.  So I changed
>>> my usage and posted the remark above.  He found it worthy of mockery,
>>> but did not want me to respond.  Go figure.
>>
>> C is a language family, like Lisp. Some people mean "Clojure"
>> when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".
>
> But there is still one current C standard, and one current set of
> standard headers?
>
>>
>> Bart will just have to be patiently educated in the differences among:
>>
>> - language family
>> - language dialect
>> - language standard
>> - language implementation
>> - language reference manual
>
>
> Sure, how much more complicated do you want to make it?
>
> But while you're here, perhaps you can tell me which of those myriad Cs
> is being compiled in each case here:
>
>   gcc prog.c
>   clang prog.c
>   tcc lang.c
>   msvc lang.c
>   zig cc lang.c
>   lcc lang.c
>   pellesc lang.c       (I forget the actual compiler name)

Fwiw, its nice to be able to have one code base that compiles in all of
those compilers. I cannot remember trying zig. But I do remember you
helping me port one of my programs to most of those compilers. :^) Fwiw,
here is a crude version of it online:

http://fractallife247.com/test/hmac_cipher/ver_0_0_0_1?ct_hmac_cipher=a3e49ce5df3d492b288b19cc079741fb777535e907b116efa4d06849a4d5d27889712b21995097e47304946224a5d66dbd3cd337e28e3ce1927aedb177eca3aaa468d80e3e9e2883dfe0e60d1a13f2957514ab2c5c

Using the "default secret key" so everybody can read it. :^)

[...]

Re: bart again (UCX64)

<ud5efg$1k757$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 21:25:22 +0100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <ud5efg$1k757$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
<87fs3tu3cs.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Sep 2023 20:25:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2da2ce2dba17cc6e2f2172308700bc74";
logging-data="1711271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182SxednmtSx1xrwjb+l4JK5MlrDNvnG3U="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:SaFrDtSTO37OT13jrbIAepnT5kE=
In-Reply-To: <87fs3tu3cs.fsf@bsb.me.uk>
 by: Bart - Mon, 4 Sep 2023 20:25 UTC

On 04/09/2023 20:48, Ben Bacarisse wrote:
> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>
>> On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>>> For a long while I went along with the idea that "C" can mean many
>>> things, but that's not how Bart uses the term. In fact, that's one of
>>> his big whinging topics -- C is what you care to make it. So I changed
>>> my usage and posted the remark above. He found it worthy of mockery,
>>> but did not want me to respond. Go figure.
>>
>> C is a language family, like Lisp. Some people mean "Clojure"
>> when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".
>
> Yes.

Examples of versions of the C family which have their own identities?

I think it's clear we're not talking about distinct languages like
Objective-C or C++.

If you're going to include those, then you're clutching at straws.

Re: bart again (UCX64)

<ud5gkt$1kj5t$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 22:02:22 +0100
Organization: A noiseless patient Spider
Lines: 102
Message-ID: <ud5gkt$1kj5t$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<20230901104426.371@kylheku.com> <uct9hv$3v1lb$2@dont-email.me>
<20230901114625.198@kylheku.com> <ucthrb$gvk$2@dont-email.me>
<20230901135123.702@kylheku.com> <uctlpv$17t5$1@dont-email.me>
<878r9p7b13.fsf@nosuchdomain.example.com> <ucu0tf$2mht$1@dont-email.me>
<20230901175635.91@kylheku.com> <ucv4e6$d0c9$1@dont-email.me>
<ucvna1$fb08$7@dont-email.me> <ud00bc$grer$1@dont-email.me>
<ud23ls$um2u$1@dont-email.me> <ud2eod$10jv5$1@dont-email.me>
<ud4604$1cbam$1@dont-email.me> <ud4a6a$1d4cd$1@dont-email.me>
<87edjeujqw.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 4 Sep 2023 21:02:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2da2ce2dba17cc6e2f2172308700bc74";
logging-data="1723581"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DgzH3T2PY8zgIqlVUO0UGnbIbxEMn+YM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:D1VjLOqXQASwq3+/Rsd6wc3iKDc=
In-Reply-To: <87edjeujqw.fsf@bsb.me.uk>
 by: Bart - Mon, 4 Sep 2023 21:02 UTC

On 04/09/2023 14:54, Ben Bacarisse wrote:
> Bart <bc@freeuk.com> writes:
>
>> On 04/09/2023 09:54, David Brown wrote:
>>> On 03/09/2023 19:11, Bart wrote:
>>
>>>> What's wrong with that?
>>> If you can live inside a bubble, and be happy with that, then I suppose
>>> that's fine.  However, you don't have the experience or understanding to
>>> criticise those outside the bubble.  You can live in your blissful
>>> ignorance if that's what suits you - but please understand that others do
>>> not want to be in your bubble.  It does not appeal at all to me. Your
>>> bubble tools and languages are of little use or interest to all but a
>>> very few other people.
>>
>> That may be so. But you can still learn things from them.
>
> I think I've asked before, but is there a language reference manual?

No.

In my case it's not worth doing. There was something a few years ago,
but it's out of date, is too long and needs a rewrite. Since the
expected audience is zero, it is not a priority.

The language is also volatile; it adapts to new hardware, and contains
many experimental features. If it was going to be used by others, it
would need to be more stable first.

However, the language has been self-hosted through various versions and
implementations in a continuous chain going back to the mid-eighties.
The first compiler of the chain would have been written in assembly.

So again, no; I'm keeping my languages private as support, even just
docs, is not viable. But people are welcome to benefit from any features
that come up in forums like these.

>> And yet, I can't get this program to compile when expressed in my langage:
>>
>> char* fred(void) {
>> (long long int)rand()*3.14159;
>> }
>>
>> int main(void) {
>> printf("%s\n", fred());
>> }
>
> C (as currently defined) has nothing to say about the behaviour of this
> program. That makes it trivial to implement an "equivalent" in almost
> any language. If your view of equivalent is the inclusive one, then any
> program at all will match the behaviour permitted for this one. And if
> your view of equivalent is quite narrow, then any text that has no
> defined meaning in the other language will do instead.

The equivalent program in my language is this:

func fred:ref char =
int(rand()*pi)
end

proc main=
println fred()
end

The language uses the value of the last statement or expression as the
return value in a function.

The error here is not a missing return (it is implicit), it is that the
value has the wrong type: int rather than 'ref char'.

This version:

func fred:ref char =
do end # (endless loop)
end

Shows the error "Void expression or return value missing". (A loop
statement has a 'void' type.)

To emulate the behaviour of the C, this used to do the trick, but the
current code generator has an issue with it that I need to fix:

func fred:ref char =
int(rand()*pi)
asm nop
end

(Inline assembly blocks are assumed to have set up a suitable value of
the right type.) However I'd only use assembly as a last resort,
preferably in an isolated module.

> I post this only to explain how I interpret the notion of "expressing" a
> program in another language. I am sure your view of the term is quite
> different.

Do you have your own examples in other languages which do the same:
return whatever garbage is in a register, since the language allows you
to omit an explicit value?

Re: bart again (UCX64)

<20230904145249.15@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 21:56:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <20230904145249.15@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
<87fs3tu3cs.fsf@bsb.me.uk> <ud5efg$1k757$1@dont-email.me>
Injection-Date: Mon, 4 Sep 2023 21:56:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b0451dec79ee4655b8a53117d1292826";
logging-data="1738066"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IiwYwuM0vpfY229GN0YlYAfzF8Ot+k5M="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:6KsvmUuKF+jCRK8xEEB+qjpcPrQ=
 by: Kaz Kylheku - Mon, 4 Sep 2023 21:56 UTC

On 2023-09-04, Bart <bc@freeuk.com> wrote:
> On 04/09/2023 20:48, Ben Bacarisse wrote:
>> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>>
>>> On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>>>> For a long while I went along with the idea that "C" can mean many
>>>> things, but that's not how Bart uses the term. In fact, that's one of
>>>> his big whinging topics -- C is what you care to make it. So I changed
>>>> my usage and posted the remark above. He found it worthy of mockery,
>>>> but did not want me to respond. Go figure.
>>>
>>> C is a language family, like Lisp. Some people mean "Clojure"
>>> when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".
>>
>> Yes.
>
> Examples of versions of the C family which have their own identities?
>
> I think it's clear we're not talking about distinct languages like
> Objective-C or C++.

Mostly dialects.

> If you're going to include those, then you're clutching at straws.

There is no reason to exclude those. You can meaningfully write C
that also compiles as C++ or Objective C.

My TXR project is ostensibly written in C, but you can ./configure
cc=g++ and it works. I mostly don't work that way, but at least I check
it for regressions before releases. From time to time it catches
something.

Objective C is highly compatible with C due to introducing extensions
with @. GNU Awk does that (it has @include); it's still considered Awk.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you're posting from Google Groups, I don't see you!

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 15:41:56 -0700
Organization: None to speak of
Lines: 34
Message-ID: <87h6o95znv.fsf@nosuchdomain.example.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <20230901104426.371@kylheku.com>
<uct9hv$3v1lb$2@dont-email.me> <20230901114625.198@kylheku.com>
<ucthrb$gvk$2@dont-email.me> <20230901135123.702@kylheku.com>
<uctlpv$17t5$1@dont-email.me>
<878r9p7b13.fsf@nosuchdomain.example.com>
<ucu0tf$2mht$1@dont-email.me> <20230901175635.91@kylheku.com>
<ucv4e6$d0c9$1@dont-email.me> <ucvna1$fb08$7@dont-email.me>
<ud00bc$grer$1@dont-email.me> <ud23ls$um2u$1@dont-email.me>
<ud2eod$10jv5$1@dont-email.me> <ud4604$1cbam$1@dont-email.me>
<ud4a6a$1d4cd$1@dont-email.me> <ud4rbl$1h1t4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="d633fa9147221aa5a66d8a19b6f926fe";
logging-data="1750719"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cAamC6GEqlz8/nolbOLkE"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:zysb04UzPdTm6/YrZL05Aq2rNow=
sha1:uLgLexuUHxI2VHPhze1DZ1u0AP0=
 by: Keith Thompson - Mon, 4 Sep 2023 22:41 UTC

David Brown <david.brown@hesbynett.no> writes:
> On 04/09/2023 12:06, Bart wrote:
[...]
>>   char* fred(void) {
>>       (long long int)rand()*3.14159;
>>   }
>>   int main(void) {
>>       printf("%s\n", fred());
>>   }
[...]
> As you know, it is not valid C code. As you know, proper C compilers
> will - at least - warn you about it when asked to treat the input
> according to the C standards. As you know, there isn't a compiler in
> the world for any language which will stop programmers from writing
> incorrect code.

Given the context of the discussion, pedantry seems appropriate.

It's invalid C code because it doesn't declare rand() and printf(),
correctable by adding `#include <stdlib.h>` and `#include <stdio.h>`.
(It also contains NO-BREAK SPACE characters, but that's that's just a
Usenet formatting issue.)

Other than that, a conforming C compiler is not required to diagnose
the above code. It does have undefined behavior, and a C compiler is
likely to warn about it with appropriate warnings, but it does not
violate any syntax rule or constraint.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 15:46:27 -0700
Organization: None to speak of
Lines: 20
Message-ID: <87cyyx5zgc.fsf@nosuchdomain.example.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d633fa9147221aa5a66d8a19b6f926fe";
logging-data="1750719"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fe0IvcREmqG/i8qnhJoAl"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:zfUFGYTkAsoT+vfemaSktTh+D8U=
sha1:4pnesaHEoCqYeyb9sCFl1cYbSuc=
 by: Keith Thompson - Mon, 4 Sep 2023 22:46 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:
[...]
> "C" does not mean "ISO C", unless the debate has been explicitly
> restricted that way.

I understand and respect your point of view, but I do not share it.

For me, "C" means "ISO C" unless otherwise specified, especially in the
context of this newsgroup.

"C" can also *informally* have a wider meaning. (English am confusing
sometimes.)

It doesn't hurt to say "ISO C" rather than "C" when the distinction is
important.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 16:04:39 -0700
Organization: None to speak of
Lines: 29
Message-ID: <878r9l5ym0.fsf@nosuchdomain.example.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d633fa9147221aa5a66d8a19b6f926fe";
logging-data="1756169"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YMluV2Epo7BQ6KdZsHGiC"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:eLpJryLq5LnBqxemCQWF89VZMb0=
sha1:0lhZOsN8e/XDLadgGRMpE5mZAVY=
 by: Keith Thompson - Mon, 4 Sep 2023 23:04 UTC

Bart <bc@freeuk.com> writes:
[...]
> All I know is that the family/dialect/standard in each case doesn't
> care amount making a missing 'return <value>' a hard error. So else
> are they being being lax over?

I have what I think is a very simple question for you. Will you
acknowledge that the ISO C standard does not require a diagnostic
for a missing return statement in a non-void function?

I'm asking you for nothing more than a "yes" or "no" answer. You can
of course follow that with anything you like, but a "yes" or "no"
would be helpful -- or a brief explanation of why you think neither
"yes" nor "no" is a meaningful answer.

[...]

> I think you guys just want to keep things a mystery!

If I had wanted to keep things a mystery, I wouldn't have spent
a great deal of time explaning things, even after it became clear
that my explanations were falling on deaf ears.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: bart again (UCX64)

<ud5qka$1lrm2$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 00:52:44 +0100
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <ud5qka$1lrm2$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Sep 2023 23:52:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12c26e2becd6d1e0d07f8c2ea7e50a28";
logging-data="1765058"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s0Taoo6GFelkQsvEb6Q+wCqKFllUsx7g="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:mIUAeYlEQO50+QNe8U6u+4cplgo=
In-Reply-To: <878r9l5ym0.fsf@nosuchdomain.example.com>
 by: Bart - Mon, 4 Sep 2023 23:52 UTC

On 05/09/2023 00:04, Keith Thompson wrote:
> Bart <bc@freeuk.com> writes:
> [...]
>> All I know is that the family/dialect/standard in each case doesn't
>> care amount making a missing 'return <value>' a hard error. So else
>> are they being being lax over?
>
> I have what I think is a very simple question for you. Will you
> acknowledge that the ISO C standard does not require a diagnostic
> for a missing return statement in a non-void function?
>
> I'm asking you for nothing more than a "yes" or "no" answer. You can
> of course follow that with anything you like, but a "yes" or "no"
> would be helpful -- or a brief explanation of why you think neither
> "yes" nor "no" is a meaningful answer.
>
> [...]
>
>> I think you guys just want to keep things a mystery!
>
> If I had wanted to keep things a mystery, I wouldn't have spent
> a great deal of time explaning things, even after it became clear
> that my explanations were falling on deaf ears.

You may be right.

I think I've become over-saturated with talk of C versions and C
compilers (and non-compilers) and people's obsession with trying to
muddy things in order to trip me up.

You can imagine that recent discussions and newly discovered attitudes
have not done much for my appreciation of ... whatever the hell 'C'
actually is (right now I have no idea), and its whole ecosystem of
maybe-compilers and other tools.

I have had enough (I guess you all have too).

However there two tools I need to maintain for the time being:

* The revised backend of my C-subset compiler, which I'm doing largely
for my own satisfaction since I have my own standards to meet

* The transpiler necessary to turn that C-subset compiler, written in a
large subset of my language, into the same C-subset. If nothing else,
it will be able to at least self-host, sort of.

Then I can be free of all this nonsense! Back to sanity.

Re: bart again (UCX64)

<874jk95vaz.fsf@nosuchdomain.example.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 17:16:04 -0700
Organization: None to speak of
Lines: 59
Message-ID: <874jk95vaz.fsf@nosuchdomain.example.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com>
<ud5qka$1lrm2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d633fa9147221aa5a66d8a19b6f926fe";
logging-data="1772587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/54ow5U4pRBK7rLOW1mxnT"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:xrX9SS6tXeYBeMVgWamy7s/CJ+c=
sha1:V9WmGsuTqD6E8/DoaIHNZfPTU5c=
 by: Keith Thompson - Tue, 5 Sep 2023 00:16 UTC

Bart <bc@freeuk.com> writes:
> On 05/09/2023 00:04, Keith Thompson wrote:
>> Bart <bc@freeuk.com> writes:
>> [...]
>>> All I know is that the family/dialect/standard in each case doesn't
>>> care amount making a missing 'return <value>' a hard error. So else
>>> are they being being lax over?
>> I have what I think is a very simple question for you. Will you
>> acknowledge that the ISO C standard does not require a diagnostic
>> for a missing return statement in a non-void function?
>> I'm asking you for nothing more than a "yes" or "no" answer. You
>> can
>> of course follow that with anything you like, but a "yes" or "no"
>> would be helpful -- or a brief explanation of why you think neither
>> "yes" nor "no" is a meaningful answer.
>> [...]

I note your refusal to answer this simple question. I asked it
because I believe that any discussion of the merits or demerits of
either C or the ISO C standard should begin with an understanding
of what the standard says.

If you change your mind and decide to post a "yes" or "no" answer
(or an explanation of why neither answer would be meaningful),
I might be willing to continue the discussion.

If not, I am done with you, and barring unforeseen circumstances
this will be my last reply to anything you write here, except that
I *might* reply to misstatements of fact that I think are likely to
mislead others. (In the unlikely event that you wish to contact me,
the email address on this post is valid and will reach me.)

Others will do as they see fit. I'm sure many people here will be
relieved if I stop engaging with you.

[...]

> I think I've become over-saturated with talk of C versions and C
> compilers (and non-compilers) and people's obsession with trying to
> muddy things in order to trip me up.

Nobody has done that.

> You can imagine that recent discussions and newly discovered attitudes
> have not done much for my appreciation of ... whatever the hell 'C'
> actually is (right now I have no idea), and its whole ecosystem of
> maybe-compilers and other tools.

One person has expressed the opinion that "C" doesn't mean "ISO C".
You've probably seen my reply, so I won't repeat it here. If one
person expressing an opinion causes you such confusion, I can't
help you.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: bart again (UCX64)

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 05 Sep 2023 01:31:35 +0100
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <87tts9sbo8.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<20230901104426.371@kylheku.com> <uct9hv$3v1lb$2@dont-email.me>
<20230901114625.198@kylheku.com> <ucthrb$gvk$2@dont-email.me>
<20230901135123.702@kylheku.com> <uctlpv$17t5$1@dont-email.me>
<878r9p7b13.fsf@nosuchdomain.example.com>
<ucu0tf$2mht$1@dont-email.me> <20230901175635.91@kylheku.com>
<ucv4e6$d0c9$1@dont-email.me> <ucvna1$fb08$7@dont-email.me>
<ud00bc$grer$1@dont-email.me> <ud23ls$um2u$1@dont-email.me>
<ud2eod$10jv5$1@dont-email.me> <ud4604$1cbam$1@dont-email.me>
<ud4a6a$1d4cd$1@dont-email.me> <87edjeujqw.fsf@bsb.me.uk>
<ud5gkt$1kj5t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="2907f66c348ba0da34ad87ef57ce8447";
logging-data="1774356"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KkYs0Ct3k2D+ykuEJbdI6koatHZDOd5E="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:3sD7jQidhAV9T6EnseGlEWXQIsE=
sha1:lmavPMCA3tSqRfL85QPrQ1w5TEw=
X-BSB-Auth: 1.9e1ea865f62bb737b7a2.20230905013135BST.87tts9sbo8.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 5 Sep 2023 00:31 UTC

Bart <bc@freeuk.com> writes:

> On 04/09/2023 14:54, Ben Bacarisse wrote:
>> Bart <bc@freeuk.com> writes:
>>
>>> On 04/09/2023 09:54, David Brown wrote:
>>>> On 03/09/2023 19:11, Bart wrote:
>>>
>>>>> What's wrong with that?
>>>> If you can live inside a bubble, and be happy with that, then I suppose
>>>> that's fine.  However, you don't have the experience or understanding to
>>>> criticise those outside the bubble.  You can live in your blissful
>>>> ignorance if that's what suits you - but please understand that others do
>>>> not want to be in your bubble.  It does not appeal at all to me. Your
>>>> bubble tools and languages are of little use or interest to all but a
>>>> very few other people.
>>>
>>> That may be so. But you can still learn things from them.
>> I think I've asked before, but is there a language reference manual?
>
> No.

Then no significant learning can happen.

>>> And yet, I can't get this program to compile when expressed in my langage:
>>>
>>> char* fred(void) {
>>> (long long int)rand()*3.14159;
>>> }
>>>
>>> int main(void) {
>>> printf("%s\n", fred());
>>> }
>> C (as currently defined) has nothing to say about the behaviour of this
>> program. That makes it trivial to implement an "equivalent" in almost
>> any language. If your view of equivalent is the inclusive one, then any
>> program at all will match the behaviour permitted for this one. And if
>> your view of equivalent is quite narrow, then any text that has no
>> defined meaning in the other language will do instead.
>
> The equivalent program in my language is this:

As I said. It's trivial since the C program has no defined meaning.

>> I post this only to explain how I interpret the notion of "expressing" a
>> program in another language. I am sure your view of the term is quite
>> different.
>
> Do you have your own examples in other languages which do the same: return
> whatever garbage is in a register, since the language allows you to omit an
> explicit value?

If "the language" is C, then it does not allow any such thing. And the
program you posted does not "do" anything. It is as meaningless and any
and all other undefined C programs.

--
Ben.


devel / comp.lang.c / Re: bart again (UCX64)

Pages:12345678910111213141516
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor