Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Alexander Graham Bell is alive and well in New York, and still waiting for a dial tone.


devel / comp.lang.c / Re: C vs Haskell for XML parsing

SubjectAuthor
* C vs Haskell for XML parsingMalcolm McLean
+* C vs Haskell for XML parsingBart
|+* C vs Haskell for XML parsingBen Bacarisse
||`* C vs Haskell for XML parsingMalcolm McLean
|| `* C vs Haskell for XML parsingBen Bacarisse
||  `* C vs Haskell for XML parsingMalcolm McLean
||   `* C vs Haskell for XML parsingBen Bacarisse
||    +* C vs Haskell for XML parsingMalcolm McLean
||    |`- C vs Haskell for XML parsingBen Bacarisse
||    `* C vs Haskell for XML parsingMalcolm McLean
||     +- C vs Haskell for XML parsingLew Pitcher
||     +* C vs Haskell for XML parsingScott Lurndal
||     |+* C vs Haskell for XML parsingLew Pitcher
||     ||+- C vs Haskell for XML parsingLew Pitcher
||     ||`- C vs Haskell for XML parsingScott Lurndal
||     |`* C vs Haskell for XML parsingBen Bacarisse
||     | `- C vs Haskell for XML parsingScott Lurndal
||     `* C vs Haskell for XML parsingBen Bacarisse
||      `* C vs Haskell for XML parsingMalcolm McLean
||       +- C vs Haskell for XML parsingRichard Damon
||       `* C vs Haskell for XML parsingBen Bacarisse
||        `* C vs Haskell for XML parsingMalcolm McLean
||         +- C vs Haskell for XML parsingKeith Thompson
||         `* C vs Haskell for XML parsingBen Bacarisse
||          +* C vs Haskell for XML parsingMalcolm McLean
||          |`- C vs Haskell for XML parsingBen Bacarisse
||          `* C vs Haskell for XML parsingDavid Brown
||           +* C vs Haskell for XML parsingMalcolm McLean
||           |`* C vs Haskell for XML parsingDavid Brown
||           | `* C vs Haskell for XML parsingMalcolm McLean
||           |  `* C vs Haskell for XML parsingDavid Brown
||           |   +* C vs Haskell for XML parsingMalcolm McLean
||           |   |+* C vs Haskell for XML parsingDavid Brown
||           |   ||`* C vs Haskell for XML parsingMalcolm McLean
||           |   || `* C vs Haskell for XML parsingDavid Brown
||           |   ||  `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||   `* C vs Haskell for XML parsingDavid Brown
||           |   ||    `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     +* C vs Haskell for XML parsingBart
||           |   ||     |`* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     | `- C vs Haskell for XML parsingDavid Brown
||           |   ||     +* C vs Haskell for XML parsingDavid Brown
||           |   ||     |`* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     | +- C vs Haskell for XML parsingScott Lurndal
||           |   ||     | `* C vs Haskell for XML parsingDavid Brown
||           |   ||     |  `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |   `* C vs Haskell for XML parsingDavid Brown
||           |   ||     |    `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |     +* C vs Haskell for XML parsingBart
||           |   ||     |     |+* C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |     ||`- C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |     |`- C vs Haskell for XML parsingDavid Brown
||           |   ||     |     `* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      +* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      |+* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      ||+* C vs Haskell for XML parsingScott Lurndal
||           |   ||     |      |||`* C vs Haskell for XML parsingLew Pitcher
||           |   ||     |      ||| `* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      |||  `- C vs Haskell for XML parsingLew Pitcher
||           |   ||     |      ||+* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      |||`* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      ||| `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      |||  `- C vs Haskell for XML parsingDavid Brown
||           |   ||     |      ||`* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || +* C vs Haskell for XML parsingScott Lurndal
||           |   ||     |      || |`* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || | +- C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || | `* C vs Haskell for XML parsingJames Kuyper
||           |   ||     |      || |  +* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  |+* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||`* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  || `* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||  `* C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |      || |  ||   +- C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  ||   `* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||    `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  ||     `* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||      `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  ||       `- C vs Haskell for XML parsingTim Rentsch
||           |   ||     |      || |  |+* C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |      || |  ||`- C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  |+- C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      || |  |`- C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      || |  `- C vs Haskell for XML parsingScott Lurndal
||           |   ||     |      || `* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      ||  `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      ||   +- C vs Haskell for XML parsingChris M. Thomasson
||           |   ||     |      ||   `- C vs Haskell for XML parsingDavid Brown
||           |   ||     |      |`* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      | +* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |+* C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||+* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |||+- C vs Haskell for XML parsingBen Bacarisse
||           |   ||     |      | |||+* C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||`* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |||| `* C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||  `* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | ||||   `* C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||    `* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | ||||     `* C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||      `* C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |||`- C vs Haskell for XML parsingDavid Brown
||           |   ||     |      | ||`* C vs Haskell for XML parsingBart
||           |   ||     |      | |`* C vs Haskell for XML parsingDavid Brown
||           |   ||     |      | `* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      +- C vs Haskell for XML parsingSpiros Bousbouras
||           |   ||     |      +* C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      +* Underscores in type names (was : C vs Haskell for XML parsing)Spiros Bousbouras
||           |   ||     |      `* C vs Haskell for XML parsingBart
||           |   ||     `- C vs Haskell for XML parsingKeith Thompson
||           |   |`- C vs Haskell for XML parsingScott Lurndal
||           |   `- C vs Haskell for XML parsingBart
||           `- C vs Haskell for XML parsingBen Bacarisse
|+* C vs Haskell for XML parsingfir
|`* C vs Haskell for XML parsingKaz Kylheku
+- C vs Haskell for XML parsingBen Bacarisse
+- C vs Haskell for XML parsingfir
`* C vs Haskell for XML parsingfir

Pages:123456789101112
Re: Named function arguments (Was : C vs Haskell for XML parsing)

<FH2PvBd=Z3nt=LKcX@bongo-ra.co>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=44887&group=comp.lang.c#44887

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.c
Subject: Re: Named function arguments (Was : C vs Haskell for XML parsing)
Date: Thu, 31 Aug 2023 18:41:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <FH2PvBd=Z3nt=LKcX@bongo-ra.co>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <uc7l4o$3fp72$1@dont-email.me> <639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me> <d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com> <uca3sh$p9c$1@dont-email.me>
<878r9zeynn.fsf@nosuchdomain.example.com> <AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me> <H2oGM.827787$TPw2.680260@fx17.iad>
<ucd5kt$kl1p$1@dont-email.me> <20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
<20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me> <20230827151627.814@kylheku.com>
<87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com> <87ledubyeh.fsf@nosuchdomain.example.com>
<861qfmwwvy.fsf@linuxsc.com> <9OdIB8bvkgNvRPt7n@bongo-ra.co> <20230830124510.831@kylheku.com>
<=cpNTIYn=xLPR00Wq@bongo-ra.co> <ucof1i$2tbqe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 31 Aug 2023 18:41:48 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="953f931c38f7411195d543c971be568c";
logging-data="3583667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3AFDZsviPMyJxKKrkRxzG"
Cancel-Lock: sha1:Auu4s8VaZC6RMUgHkYAZf98Ka8w=
In-Reply-To: <ucof1i$2tbqe$1@dont-email.me>
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Thu, 31 Aug 2023 18:41 UTC

On Wed, 30 Aug 2023 23:15:13 +0100
Richard Harnden <richard.nospam@gmail.com> wrote:
> On 30/08/2023 21:07, Spiros Bousbouras wrote:
>
> >
> > I said
> > the wrapper function take as a single argument a pointer to struct
> >
>
> Can a struct have the same qualifiers as a function?
>
> I mean, say you have:
> void foo(const char * restrict bar);
>
> Can you have ...?
>
> struct foo
> {
> const char * restrict bar;
> };
>
> void foos(struct foo foo);
>
> ... ?
>
> Does the const/restrict'ness survive?

The syntax allows it but to what extent the semantics are different , I'm not
sure. For restrict I'm not clear about the details even if it's not a member
of a structure.

Re: C vs Haskell for XML parsing

<86o7ilspa9.fsf@linuxsc.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=44962&group=comp.lang.c#44962

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Fri, 01 Sep 2023 11:48:30 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <86o7ilspa9.fsf@linuxsc.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me> <20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me> <20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me> <20230827151627.814@kylheku.com> <87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com> <87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com> <ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com> <uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me> <875y4xboly.fsf@nosuchdomain.example.com> <ucn6hi$2n2kb$1@dont-email.me> <87o7io9xsv.fsf@nosuchdomain.example.com> <86a5u7u39b.fsf@linuxsc.com> <20230831011341.24@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="e13a49a448cc252f76540c1a5198a3b9";
logging-data="4175704"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pohznnJBH89/AY9XnsxC99tHBDzNeuJc="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:ZYtEzEm0LayVG791fSiJAKz/0f8=
sha1:r2gWwyLBVmBX/6jw44Myy3/jtsM=
 by: Tim Rentsch - Fri, 1 Sep 2023 18:48 UTC

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

> On 2023-08-31, Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
>> in identifiers. As an example, consider an implementation that
>> supports the common extension of allowing dollar signs in
>> identifiers. It would make sense, in case a keyboard is being
>> used that doesn't have a dollar sign key, to allow the universal
>> character name for dollar sign (\u0024, IIANM). Other universal
>
> Maybe let that coder expense $15 on the company credit card to get a
> better keyboard instad of inflicting \u0024 on future maintainers of the
> code.

A pointless observation. It's the implementor who is making
the decision, and it's easier just to put in the exception
than to try to convince even one potential user to get a new
keyboard.

Re: C vs Haskell for XML parsing

<86jzt9sp61.fsf@linuxsc.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=44964&group=comp.lang.c#44964

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Fri, 01 Sep 2023 11:51:02 -0700
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <86jzt9sp61.fsf@linuxsc.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com> <uc9m7v$3u797$1@dont-email.me> <d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com> <j=2ifExxFfXU05g0F@bongo-ra.co> <ae3d2d4e-71bd-4c6c-99aa-cf8b6b652175n@googlegroups.com> <87pm3bot1n.fsf@bsb.me.uk> <7a9b3883-ee9f-4d46-944c-c11d4f0354d5n@googlegroups.com> <ucdcaf$mj8h$1@dont-email.me> <627cbd87-75d6-49e9-b2e0-733ca17b7cean@googlegroups.com> <ucftjs$186cs$1@dont-email.me> <gN1HM.144949$ftCb.130257@fx34.iad> <86il8ywyu5.fsf@linuxsc.com> <uck607$2563l$1@dont-email.me> <20230829121430.516@kylheku.com> <ucnkde$2op2r$1@dont-email.me> <86msy7uayk.fsf@linuxsc.com> <20230831004230.649@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="e13a49a448cc252f76540c1a5198a3b9";
logging-data="4175704"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fjhSWoW8McgTlqK597lp1QXa6jHyO1pY="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:wqX8Ff0IllzHzPRB6AylIasf4Ls=
sha1:eRS9viw7OsS1XVexR8NOiu+UWWc=
 by: Tim Rentsch - Fri, 1 Sep 2023 18:51 UTC

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

> On 2023-08-31, Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
>> Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
>>
>>> On Tue, 29 Aug 2023 19:22:09 +0000, Kaz Kylheku wrote:
>>>
>>>> On 2023-08-29, David Brown <david.brown@hesbynett.no> wrote:
>>>>
>>>>> On 29/08/2023 01:07, Tim Rentsch wrote:
>>>>>
>>>>>> scott@slp53.sl.home (Scott Lurndal) writes:
>>>>>>
>>>>>>> I will use [underscore] in preference to CamelCase, which I
>>>>>>> dislike primarily because of the impact on my typing speed.
>>>>>>
>>>>>> In most cases I find CamelCase harder to read than using
>>>>>> underscores, especially when using mono-spaced fonts.
>>>>>
>>>>> I used to use camelCase for most of my identifiers - now I find I
>>>>> am using underscores much more, precisely because I find it easier
>>>>> to read. I strongly suspect it is age-related - camelCase was
>>>>> more appealing when my eyes were younger.
>>>>
>>>> CamelCase is at odds with the C language.
>>>
>>> I would disagree. CamelCase (as in identifiers consisting of a mix of
>>> upper and lower case characters) is inherent in the definition of an
>>> identifier, and has been since K&R C. [...]
>>
>> CamelCase is consistent with C syntax; it feels out of place
>> though in terms of common usage.

>> ISTM that CamelCase was never
>> used in C until C++ started using it, which I think started
>> happening because Smalltalk uses camelCase (and CamelCase), and
>> C++ has Smalltalk envy.

[various bits of esoterica about C++ and CamelCase]

The key point is that CamelCase tends to be relatively common
in C++, and not nearly as common in C. All the C++ esoterica
is just noise.

Re: C vs Haskell for XML parsing

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

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45051&group=comp.lang.c#45051

  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.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 03 Sep 2023 03:55:48 -0700
Organization: None to speak of
Lines: 26
Message-ID: <8734zv7cgb.fsf@nosuchdomain.example.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
<20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me>
<20230827151627.814@kylheku.com>
<87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com>
<87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com>
<ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com>
<uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me>
<875y4xboly.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="bce9f47447e4fb1356ae9778f84e0995";
logging-data="939321"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tIlG+F4PrmTjzFebTC/8w"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:XwO4R5q2gOcs5nINd5NjNvg0xFY=
sha1:UOQDk2FWYDVTSUiNmYKz/VJQeHM=
 by: Keith Thompson - Sun, 3 Sep 2023 10:55 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> David Brown <david.brown@hesbynett.no> writes:
> [...]
>> Being able to accept $ in identifiers is a convenient extension.
>
> Quibble: $ in identifiers is not an extension as specified in section 4
> of the standard. Starting in C99, the set of characters accepted in
> identifiers is implementation-defined. (I'm not sure what difference
> that makes.)

On further thought, there is a significant difference.

An implementation that supports $ in identifiers via an via the
"other implementation-defined characters" wording in the syntax
of an identifier can accept foo$bar as an identifier without
issuing a diagnostic. If it's an extension as defined in section 4
(Conformance) of the standard, it can accept foo$bar but it must
still issue a diagnostic (presumably a non-fatal warning).

(That's in conforming mode, of course. The standard has nothing to say
about non-conforming modes.)

--
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: C vs Haskell for XML parsing

<86il8rqeps.fsf@linuxsc.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45074&group=comp.lang.c#45074

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 03 Sep 2023 11:44:15 -0700
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <86il8rqeps.fsf@linuxsc.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <ucbjph$96fa$1@dont-email.me> <ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me> <H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me> <20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me> <20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me> <20230827151627.814@kylheku.com> <87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com> <87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com> <ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com> <uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me> <875y4xboly.fsf@nosuchdomain.example.com> <8734zv7cgb.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="6ef63087f855104b64afdd13e03f4862";
logging-data="1098838"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/w/E8p6NkOq55HiaQiSFgrnzqbOYLio/I="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:C3ST+twvCxRYJXj5+ZYSrykS0wQ=
sha1:PTz6XniOqNDttHpv895f6M0qGeA=
 by: Tim Rentsch - Sun, 3 Sep 2023 18:44 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>
>> David Brown <david.brown@hesbynett.no> writes:
>> [...]
>>
>>> Being able to accept $ in identifiers is a convenient extension.
>>
>> Quibble: $ in identifiers is not an extension as specified in section 4
>> of the standard. Starting in C99, the set of characters accepted in
>> identifiers is implementation-defined. (I'm not sure what difference
>> that makes.)
>
> On further thought, there is a significant difference.
>
> An implementation that supports $ in identifiers via an via the
> "other implementation-defined characters" wording in the syntax
> of an identifier can accept foo$bar as an identifier without
> issuing a diagnostic. If it's an extension as defined in section 4
> (Conformance) of the standard, it can accept foo$bar but it must
> still issue a diagnostic (presumably a non-fatal warning).

I'm not sure that's right. Section 5.1.1.3 paragraph 1 says

A conforming implementation shall produce at least one
diagnostic message (identified in an implementation-defined
manner) if a preprocessing translation unit or translation
unit contains a violation of any syntax rule or constraint,
even if the behavior is also explicitly specified as
undefined or implementation-defined.

Note the last clause: "even if the behavior is also explicitly
specified as undefined or implementation-defined." This clause
suggests that accepting $ as one of the implementation-defined
characters still warrants a diagnostic.

(And as was pointed out, only if the compiler is invoked in what
is purported to be a conforming mode.)

Re: C vs Haskell for XML parsing

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

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45087&group=comp.lang.c#45087

  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.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 03 Sep 2023 16:20:50 -0700
Organization: None to speak of
Lines: 62
Message-ID: <87y1hm6dyl.fsf@nosuchdomain.example.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
<20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me>
<20230827151627.814@kylheku.com>
<87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com>
<87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com>
<ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com>
<uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me>
<875y4xboly.fsf@nosuchdomain.example.com>
<8734zv7cgb.fsf@nosuchdomain.example.com> <86il8rqeps.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="2d5fff03b065922503ffa3043f03177b";
logging-data="1176487"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WAkOkP6jlGWmOx/MOFR7z"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:66qIkQomGs00rDbJEyaHGc77lyo=
sha1:k5xKqRpQxdvOwGUntLTXRIhLQDs=
 by: Keith Thompson - Sun, 3 Sep 2023 23:20 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>> David Brown <david.brown@hesbynett.no> writes:
>>> [...]
>>>> Being able to accept $ in identifiers is a convenient extension.
>>>
>>> Quibble: $ in identifiers is not an extension as specified in section 4
>>> of the standard. Starting in C99, the set of characters accepted in
>>> identifiers is implementation-defined. (I'm not sure what difference
>>> that makes.)
>>
>> On further thought, there is a significant difference.
>>
>> An implementation that supports $ in identifiers via an via the
>> "other implementation-defined characters" wording in the syntax
>> of an identifier can accept foo$bar as an identifier without
>> issuing a diagnostic. If it's an extension as defined in section 4
>> (Conformance) of the standard, it can accept foo$bar but it must
>> still issue a diagnostic (presumably a non-fatal warning).
>
> I'm not sure that's right. Section 5.1.1.3 paragraph 1 says
>
> A conforming implementation shall produce at least one
> diagnostic message (identified in an implementation-defined
> manner) if a preprocessing translation unit or translation
> unit contains a violation of any syntax rule or constraint,
> even if the behavior is also explicitly specified as
> undefined or implementation-defined.
>
> Note the last clause: "even if the behavior is also explicitly
> specified as undefined or implementation-defined." This clause
> suggests that accepting $ as one of the implementation-defined
> characters still warrants a diagnostic.

Ah, but the "implementation-defined characters" are part of the syntax.

As of C11, the grammar for an identifier is:

identifier:
identifier-nondigit
identifier identifier-nondigit
identifier digit
identifier-nondigit:
nondigit
universal-character-name
other implementation-defined characters
nondigit: one of
[_, a..z, A..Z]
digit: one of
[0..9]

If $ is one of the "other implementation-defined characters" for a given
implementation, then `foo$bar` does not violate a syntax rule.

> (And as was pointed out, only if the compiler is invoked in what
> is purported to be a conforming mode.)

--
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: C vs Haskell for XML parsing

<86wmx6q0o5.fsf@linuxsc.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45090&group=comp.lang.c#45090

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 03 Sep 2023 16:47:38 -0700
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <86wmx6q0o5.fsf@linuxsc.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <uccitk$hhuj$1@dont-email.me> <H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me> <20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me> <20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me> <20230827151627.814@kylheku.com> <87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com> <87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com> <ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com> <uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me> <875y4xboly.fsf@nosuchdomain.example.com> <8734zv7cgb.fsf@nosuchdomain.example.com> <86il8rqeps.fsf@linuxsc.com> <87y1hm6dyl.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="e731bbb82483d3b3451e3d39a3921e01";
logging-data="1186361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CDU/LOM9oTcqXEG9KCta7sImNWVcllIw="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:M8tMS4MUZoaNl0rJrLyrS4ZhAy8=
sha1:eD0Hg+S6atLU3L/JPrykPoh48WI=
 by: Tim Rentsch - Sun, 3 Sep 2023 23:47 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>
>>>> David Brown <david.brown@hesbynett.no> writes:
>>>> [...]
>>>>
>>>>> Being able to accept $ in identifiers is a convenient extension.
>>>>
>>>> Quibble: $ in identifiers is not an extension as specified in section 4
>>>> of the standard. Starting in C99, the set of characters accepted in
>>>> identifiers is implementation-defined. (I'm not sure what difference
>>>> that makes.)
>>>
>>> On further thought, there is a significant difference.
>>>
>>> An implementation that supports $ in identifiers via an via the
>>> "other implementation-defined characters" wording in the syntax
>>> of an identifier can accept foo$bar as an identifier without
>>> issuing a diagnostic. If it's an extension as defined in section 4
>>> (Conformance) of the standard, it can accept foo$bar but it must
>>> still issue a diagnostic (presumably a non-fatal warning).
>>
>> I'm not sure that's right. Section 5.1.1.3 paragraph 1 says
>>
>> A conforming implementation shall produce at least one
>> diagnostic message (identified in an implementation-defined
>> manner) if a preprocessing translation unit or translation
>> unit contains a violation of any syntax rule or constraint,
>> even if the behavior is also explicitly specified as
>> undefined or implementation-defined.
>>
>> Note the last clause: "even if the behavior is also explicitly
>> specified as undefined or implementation-defined." This clause
>> suggests that accepting $ as one of the implementation-defined
>> characters still warrants a diagnostic.
>
> Ah, but the "implementation-defined characters" are part of the
> syntax. [...]

I know that. Since the sentence in 5.1.1.3 p1 specifically calls
out cases that are explicitly implementation-defined, it should
take precedence. There is a violation of a syntax rule; any
argument that there isn't has to rely on implementation-defined
behavior, and thus a diagnostic is required.

Re: C vs Haskell for XML parsing

<Is9JM.815111$SuUf.795653@fx14.iad>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45092&group=comp.lang.c#45092

  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!fx14.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: C vs Haskell for XML parsing
Content-Language: en-US
Newsgroups: comp.lang.c
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uccitk$hhuj$1@dont-email.me> <H2oGM.827787$TPw2.680260@fx17.iad>
<ucd5kt$kl1p$1@dont-email.me> <20230826123929.770@kylheku.com>
<ucdp4i$ot46$1@dont-email.me> <20230826210521.20@kylheku.com>
<ucf86t$14b70$1@dont-email.me> <20230827151627.814@kylheku.com>
<87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com>
<87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com>
<ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com>
<uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me>
<875y4xboly.fsf@nosuchdomain.example.com>
<8734zv7cgb.fsf@nosuchdomain.example.com> <86il8rqeps.fsf@linuxsc.com>
<87y1hm6dyl.fsf@nosuchdomain.example.com> <86wmx6q0o5.fsf@linuxsc.com>
From: Richard@Damon-Family.org (Richard Damon)
In-Reply-To: <86wmx6q0o5.fsf@linuxsc.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 60
Message-ID: <Is9JM.815111$SuUf.795653@fx14.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sun, 3 Sep 2023 17:24:07 -0700
X-Received-Bytes: 4094
 by: Richard Damon - Mon, 4 Sep 2023 00:24 UTC

On 9/3/23 4:47 PM, Tim Rentsch wrote:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>
>>>>> David Brown <david.brown@hesbynett.no> writes:
>>>>> [...]
>>>>>
>>>>>> Being able to accept $ in identifiers is a convenient extension.
>>>>>
>>>>> Quibble: $ in identifiers is not an extension as specified in section 4
>>>>> of the standard. Starting in C99, the set of characters accepted in
>>>>> identifiers is implementation-defined. (I'm not sure what difference
>>>>> that makes.)
>>>>
>>>> On further thought, there is a significant difference.
>>>>
>>>> An implementation that supports $ in identifiers via an via the
>>>> "other implementation-defined characters" wording in the syntax
>>>> of an identifier can accept foo$bar as an identifier without
>>>> issuing a diagnostic. If it's an extension as defined in section 4
>>>> (Conformance) of the standard, it can accept foo$bar but it must
>>>> still issue a diagnostic (presumably a non-fatal warning).
>>>
>>> I'm not sure that's right. Section 5.1.1.3 paragraph 1 says
>>>
>>> A conforming implementation shall produce at least one
>>> diagnostic message (identified in an implementation-defined
>>> manner) if a preprocessing translation unit or translation
>>> unit contains a violation of any syntax rule or constraint,
>>> even if the behavior is also explicitly specified as
>>> undefined or implementation-defined.
>>>
>>> Note the last clause: "even if the behavior is also explicitly
>>> specified as undefined or implementation-defined." This clause
>>> suggests that accepting $ as one of the implementation-defined
>>> characters still warrants a diagnostic.
>>
>> Ah, but the "implementation-defined characters" are part of the
>> syntax. [...]
>
> I know that. Since the sentence in 5.1.1.3 p1 specifically calls
> out cases that are explicitly implementation-defined, it should
> take precedence. There is a violation of a syntax rule; any
> argument that there isn't has to rely on implementation-defined
> behavior, and thus a diagnostic is required.

No, it says that *IF* there is a violation of a syntax rule, there must
be a diagnostic, even if the results of that violation is indicated to
be undefined or implementation defined.

If $ is an implmenetation defined identifier character, then no
violation of a syntax rules exist.

Re: C vs Haskell for XML parsing

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

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45093&group=comp.lang.c#45093

  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.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 03 Sep 2023 17:26:33 -0700
Organization: None to speak of
Lines: 71
Message-ID: <87ttsa6ax2.fsf@nosuchdomain.example.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
<20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me>
<20230827151627.814@kylheku.com>
<87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com>
<87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com>
<ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com>
<uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me>
<875y4xboly.fsf@nosuchdomain.example.com>
<8734zv7cgb.fsf@nosuchdomain.example.com> <86il8rqeps.fsf@linuxsc.com>
<87y1hm6dyl.fsf@nosuchdomain.example.com> <86wmx6q0o5.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="2d5fff03b065922503ffa3043f03177b";
logging-data="1195771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/SIe1PYA2xlfdKVoy3LU2E"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:ckNSilkW68JxmrmW1s+68xxqCCk=
sha1:2aK6QQQHB/DfHzqf/oLmQowwP/8=
 by: Keith Thompson - Mon, 4 Sep 2023 00:26 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>> David Brown <david.brown@hesbynett.no> writes:
>>>>> [...]
>>>>>> Being able to accept $ in identifiers is a convenient extension.
>>>>>
>>>>> Quibble: $ in identifiers is not an extension as specified in section 4
>>>>> of the standard. Starting in C99, the set of characters accepted in
>>>>> identifiers is implementation-defined. (I'm not sure what difference
>>>>> that makes.)
>>>>
>>>> On further thought, there is a significant difference.
>>>>
>>>> An implementation that supports $ in identifiers via an via the
>>>> "other implementation-defined characters" wording in the syntax
>>>> of an identifier can accept foo$bar as an identifier without
>>>> issuing a diagnostic. If it's an extension as defined in section 4
>>>> (Conformance) of the standard, it can accept foo$bar but it must
>>>> still issue a diagnostic (presumably a non-fatal warning).
>>>
>>> I'm not sure that's right. Section 5.1.1.3 paragraph 1 says
>>>
>>> A conforming implementation shall produce at least one
>>> diagnostic message (identified in an implementation-defined
>>> manner) if a preprocessing translation unit or translation
>>> unit contains a violation of any syntax rule or constraint,
>>> even if the behavior is also explicitly specified as
>>> undefined or implementation-defined.
>>>
>>> Note the last clause: "even if the behavior is also explicitly
>>> specified as undefined or implementation-defined." This clause
>>> suggests that accepting $ as one of the implementation-defined
>>> characters still warrants a diagnostic.
>>
>> Ah, but the "implementation-defined characters" are part of the
>> syntax. [...]
>
> I know that. Since the sentence in 5.1.1.3 p1 specifically calls
> out cases that are explicitly implementation-defined, it should
> take precedence. There is a violation of a syntax rule; any
> argument that there isn't has to rely on implementation-defined
> behavior, and thus a diagnostic is required.

I disagree. A diagnostic is required if:
- A syntax rule or constraint is violated; or
- A syntax rule or constraint is violated and the behavior is explicitly
undefined; or
- A syntax rule or constraint is violated and the behavior is
explicitly implementation-defined.

(The last two cases are arguably covered by the first.)

In this case, no syntax rule is violated, so none of the cases apply,
so no diagnostic is required.

The syntax rule is not violated because the implementation-defined
character is part of the syntax rule. (See the parent article where I
quoted the syntax rule, or see the standard.) It's not the *behavior*
that's implementation defined, it's the *syntax rule*.

I do find it a bit odd, and potentially inconvenient, that one
implementation can quietly accept foo$bar as an identifier and another
can reject it as a syntax error, but that's what the standard says.

--
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: C vs Haskell for XML parsing

<udgv2d$3ufb5$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45343&group=comp.lang.c#45343

  copy link   Newsgroups: comp.lang.c
Path: rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuyper@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sat, 9 Sep 2023 01:15:57 -0400
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <udgv2d$3ufb5$2@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
<20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me>
<20230827151627.814@kylheku.com> <87edjocbqj.fsf@nosuchdomain.example.com>
<86edjnxo81.fsf@linuxsc.com> <87ledubyeh.fsf@nosuchdomain.example.com>
<861qfmwwvy.fsf@linuxsc.com> <ucjei2$1tv7s$1@dont-email.me>
<20230828182115.305@kylheku.com> <uckeel$26q6m$1@dont-email.me>
<uckumo$29oe0$1@dont-email.me> <875y4xboly.fsf@nosuchdomain.example.com>
<ucn6hi$2n2kb$1@dont-email.me> <ucnqv5$2q4fv$1@dont-email.me>
<87jztc9xp0.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 9 Sep 2023 05:15:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f4b9f45e68a9e1d5bcc9614d9d2ea43b";
logging-data="4144485"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ujbprqSFUDUhoD5wDsacWK0xavAjRj1A="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:nrFUFz/y35a34II3bOoFvq9TBNE=
In-Reply-To: <87jztc9xp0.fsf@nosuchdomain.example.com>
Content-Language: en-US
 by: James Kuyper - Sat, 9 Sep 2023 05:15 UTC

On 8/30/23 14:44, Keith Thompson wrote:
> James Kuyper <jameskuyper@alumni.caltech.edu> writes:
....
>> The defining characteristic of a C extension is "A conforming
>> implementation may have extensions (including additional library
>> functions), provided they do not alter the behavior of any strictly
>> conforming program." Since it is implementation-defined whether those
>> characters can be used, a strictly conforming program cannot use them,
>>
>> I would have preferred that they call these "conforming" extensions -
>> that is, extensions that do not render the implementation
>> non-conforming. I think it would be appropriate to talk about extensions
>> that render an implementation non-conforming, calling them
>> "non-conforming extensions".
>
> That might be useful, but I suggest that anything that renders an
> implementation non-conforming is simply outside the scope of the
> standard.

Sorry for the late reply. I've been in quarantine due to Covid-19, and
my computer was not in quarantine with me.

A very large fraction of all of the things I would be inclined to call
"extensions" to C do in fact render the implementation that supports
them non-conforming. That doesn't have to be the case - if it gives a
meaning to keywords that aren't standard C keywords, all it would have
to do is give those keywords names that are reserved to the
implementation. Any use of those keywords could trigger a single
diagnostic message "Congratulations for using our [description]
extension". But not all implementors bother doing that.

I therefore find it annoying that C's definition of extensions cannot be
used to refer to such things.

Re: C vs Haskell for XML parsing

<861qecdn98.fsf@linuxsc.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45883&group=comp.lang.c#45883

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Tue, 03 Oct 2023 03:16:35 -0700
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <861qecdn98.fsf@linuxsc.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <ucd5kt$kl1p$1@dont-email.me> <20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me> <20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me> <20230827151627.814@kylheku.com> <87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com> <87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com> <ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com> <uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me> <875y4xboly.fsf@nosuchdomain.example.com> <8734zv7cgb.fsf@nosuchdomain.example.com> <86il8rqeps.fsf@linuxsc.com> <87y1hm6dyl.fsf@nosuchdomain.example.com> <86wmx6q0o5.fsf@linuxsc.com> <Is9JM.815111$SuUf.795653@fx14.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="a7f15c7033ff7991d1a910385a293cab";
logging-data="3690250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cLaKiK+rLaQa0h78MNO2Iyv3KScRsruc="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:3wY2rJVJTiWbLhdBBzxRYRunEbA=
sha1:BrorGPg8nWaapcQ9urpM9cFRI1c=
 by: Tim Rentsch - Tue, 3 Oct 2023 10:16 UTC

Richard Damon <Richard@Damon-Family.org> writes:

> On 9/3/23 4:47 PM, Tim Rentsch wrote:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>
>>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>>
>>>>>> David Brown <david.brown@hesbynett.no> writes:
>>>>>> [...]
>>>>>>
>>>>>>> Being able to accept $ in identifiers is a convenient extension.
>>>>>>
>>>>>> Quibble: $ in identifiers is not an extension as specified in section 4
>>>>>> of the standard. Starting in C99, the set of characters accepted in
>>>>>> identifiers is implementation-defined. (I'm not sure what difference
>>>>>> that makes.)
>>>>>
>>>>> On further thought, there is a significant difference.
>>>>>
>>>>> An implementation that supports $ in identifiers via an via the
>>>>> "other implementation-defined characters" wording in the syntax
>>>>> of an identifier can accept foo$bar as an identifier without
>>>>> issuing a diagnostic. If it's an extension as defined in section 4
>>>>> (Conformance) of the standard, it can accept foo$bar but it must
>>>>> still issue a diagnostic (presumably a non-fatal warning).
>>>>
>>>> I'm not sure that's right. Section 5.1.1.3 paragraph 1 says
>>>>
>>>> A conforming implementation shall produce at least one
>>>> diagnostic message (identified in an implementation-defined
>>>> manner) if a preprocessing translation unit or translation
>>>> unit contains a violation of any syntax rule or constraint,
>>>> even if the behavior is also explicitly specified as
>>>> undefined or implementation-defined.
>>>>
>>>> Note the last clause: "even if the behavior is also explicitly
>>>> specified as undefined or implementation-defined." This clause
>>>> suggests that accepting $ as one of the implementation-defined
>>>> characters still warrants a diagnostic.
>>>
>>> Ah, but the "implementation-defined characters" are part of the
>>> syntax. [...]
>>
>> I know that. Since the sentence in 5.1.1.3 p1 specifically calls
>> out cases that are explicitly implementation-defined, it should
>> take precedence. There is a violation of a syntax rule; any
>> argument that there isn't has to rely on implementation-defined
>> behavior, and thus a diagnostic is required.
>
> No, it says that *IF* there is a violation of a syntax rule, there
> must be a diagnostic, even if the results of that violation is
> indicated to be undefined or implementation defined.
>
> If $ is an implmenetation defined identifier character, then no
> violation of a syntax rules exist.

I think there is more to be said in this discussion but I
have decided not to pursue it for now.

Re: C vs Haskell for XML parsing

<86wmw4c8k3.fsf@linuxsc.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=45884&group=comp.lang.c#45884

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17687@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Tue, 03 Oct 2023 03:19:24 -0700
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <86wmw4c8k3.fsf@linuxsc.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <ucd5kt$kl1p$1@dont-email.me> <20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me> <20230826210521.20@kylheku.com> <ucf86t$14b70$1@dont-email.me> <20230827151627.814@kylheku.com> <87edjocbqj.fsf@nosuchdomain.example.com> <86edjnxo81.fsf@linuxsc.com> <87ledubyeh.fsf@nosuchdomain.example.com> <861qfmwwvy.fsf@linuxsc.com> <ucjei2$1tv7s$1@dont-email.me> <20230828182115.305@kylheku.com> <uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me> <875y4xboly.fsf@nosuchdomain.example.com> <8734zv7cgb.fsf@nosuchdomain.example.com> <86il8rqeps.fsf@linuxsc.com> <87y1hm6dyl.fsf@nosuchdomain.example.com> <86wmx6q0o5.fsf@linuxsc.com> <87ttsa6ax2.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="a7f15c7033ff7991d1a910385a293cab";
logging-data="3690250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QltZAO5gys9kz6qKXUmqM5DZ1jowBTnE="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:+1w4tek9G/mWsTnW5ZiH05K+xDw=
sha1:LRvVHa7n/AHKr0y5LVsj5iB9ibs=
 by: Tim Rentsch - Tue, 3 Oct 2023 10:19 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>
>>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>>
>>>>>> David Brown <david.brown@hesbynett.no> writes:
>>>>>> [...]
>>>>>>
>>>>>>> Being able to accept $ in identifiers is a convenient extension.
>>>>>>
>>>>>> Quibble: $ in identifiers is not an extension as specified in section 4
>>>>>> of the standard. Starting in C99, the set of characters accepted in
>>>>>> identifiers is implementation-defined. (I'm not sure what difference
>>>>>> that makes.)
>>>>>
>>>>> On further thought, there is a significant difference.
>>>>>
>>>>> An implementation that supports $ in identifiers via an via the
>>>>> "other implementation-defined characters" wording in the syntax
>>>>> of an identifier can accept foo$bar as an identifier without
>>>>> issuing a diagnostic. If it's an extension as defined in section 4
>>>>> (Conformance) of the standard, it can accept foo$bar but it must
>>>>> still issue a diagnostic (presumably a non-fatal warning).
>>>>
>>>> I'm not sure that's right. Section 5.1.1.3 paragraph 1 says
>>>>
>>>> A conforming implementation shall produce at least one
>>>> diagnostic message (identified in an implementation-defined
>>>> manner) if a preprocessing translation unit or translation
>>>> unit contains a violation of any syntax rule or constraint,
>>>> even if the behavior is also explicitly specified as
>>>> undefined or implementation-defined.
>>>>
>>>> Note the last clause: "even if the behavior is also explicitly
>>>> specified as undefined or implementation-defined." This clause
>>>> suggests that accepting $ as one of the implementation-defined
>>>> characters still warrants a diagnostic.
>>>
>>> Ah, but the "implementation-defined characters" are part of the
>>> syntax. [...]
>>
>> I know that. Since the sentence in 5.1.1.3 p1 specifically calls
>> out cases that are explicitly implementation-defined, it should
>> take precedence. There is a violation of a syntax rule; any
>> argument that there isn't has to rely on implementation-defined
>> behavior, and thus a diagnostic is required.
>
> I disagree. A diagnostic is required if:
> - A syntax rule or constraint is violated; or
> - A syntax rule or constraint is violated and the behavior is explicitly
> undefined; or
> - A syntax rule or constraint is violated and the behavior is
> explicitly implementation-defined.
>
> (The last two cases are arguably covered by the first.)
>
> In this case, no syntax rule is violated, so none of the cases apply,
> so no diagnostic is required.
>
> The syntax rule is not violated because the implementation-defined
> character is part of the syntax rule. (See the parent article where I
> quoted the syntax rule, or see the standard.) It's not the *behavior*
> that's implementation defined, it's the *syntax rule*.
>
> I do find it a bit odd, and potentially inconvenient, that one
> implementation can quietly accept foo$bar as an identifier and another
> can reject it as a syntax error, but that's what the standard says.

I appreciate your comments and the thoughtfulness of the message.

I think there is more to be said in this discussion but I have
decided not to pursue it for now.

Pages:123456789101112
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor