Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

She won' go Warp 7, Cap'n! The batteries are dead!


devel / comp.lang.c / Re: you think rust may outthrone c?

SubjectAuthor
* you think rust may outthrone c?fir
`* Re: you think rust may outthrone c?Blue-Maned_Hawk
 +- Re: you think rust may outthrone c?jak
 +* Re: you think rust may outthrone c?fir
 |`- Re: you think rust may outthrone c?fir
 +* Re: you think rust may outthrone c?rek2 hispagatos
 |`* Re: you think rust may outthrone c?Kaz Kylheku
 | `* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  +* Re: you think rust may outthrone c?Scott Lurndal
 |  |`* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | +- Re: you think rust may outthrone c?Kaz Kylheku
 |  | +* Re: you think rust may outthrone c?Bart
 |  | |`* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | +* Re: you think rust may outthrone c?Bart
 |  | | |+* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | ||`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | || `- Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |`* Re: you think rust may outthrone c?David Brown
 |  | | | `* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |  +* Re: you think rust may outthrone c?David Brown
 |  | | |  |`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |  | `- Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |  `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |   `* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |    `* Re: you think rust may outthrone c?David Brown
 |  | | |     +* Re: you think rust may outthrone c?Scott Lurndal
 |  | | |     |`- Re: you think rust may outthrone c?Keith Thompson
 |  | | |     `* Re: you think rust may outthrone c?Keith Thompson
 |  | | |      +- Re: you think rust may outthrone c?David Brown
 |  | | |      `* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |       `* Re: you think rust may outthrone c?David Brown
 |  | | |        `* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |         `* Re: you think rust may outthrone c?David Brown
 |  | | |          +- Re: you think rust may outthrone c?fir
 |  | | |          +* Re: you think rust may outthrone c?fir
 |  | | |          |`* Re: you think rust may outthrone c?fir
 |  | | |          | `- Re: you think rust may outthrone c?fir
 |  | | |          `* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |           `* Re: you think rust may outthrone c?Bart
 |  | | |            +* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            |`* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            | +* Re: you think rust may outthrone c?David Brown
 |  | | |            | |+* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            | ||+* Re: you think rust may outthrone c?David Brown
 |  | | |            | |||+* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            | ||||`* Re: you think rust may outthrone c?Tim Rentsch
 |  | | |            | |||| `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            | |||`* Re: you think rust may outthrone c?Bart
 |  | | |            | ||| +- Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            | ||| `- Re: you think rust may outthrone c?David Brown
 |  | | |            | ||`- Re: you think rust may outthrone c?Scott Lurndal
 |  | | |            | |`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |            | | +- Re: you think rust may outthrone c?David Brown
 |  | | |            | | `* Re: you think rust may outthrone c?jak
 |  | | |            | |  `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |            | |   +- Re: you think rust may outthrone c?jak
 |  | | |            | |   `- Re: you think rust may outthrone c?Tim Rentsch
 |  | | |            | `* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            |  `* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            |   +- Re: you think rust may outthrone c?David Brown
 |  | | |            |   `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            `* Re: you think rust may outthrone c?David Brown
 |  | | |             `* Re: you think rust may outthrone c?fir
 |  | | |              +* Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              |`* Re: you think rust may outthrone c?David Brown
 |  | | |              | +* Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | |+* Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | ||+- Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | ||+* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |              | |||`- Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | ||`- Re: you think rust may outthrone c?fir
 |  | | |              | |`- Re: you think rust may outthrone c?Bart
 |  | | |              | `- Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              `* Re: you think rust may outthrone c?fir
 |  | | |               `* Re: you think rust may outthrone c?Bart
 |  | | |                +* Re: you think rust may outthrone c?Keith Thompson
 |  | | |                |+* Re: you think rust may outthrone c?Bart
 |  | | |                ||+* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                |||`* Re: you think rust may outthrone c?Bart
 |  | | |                ||| +- Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                ||| +* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| |+* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||+- Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||`* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| || `* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||  `* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| ||   +* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||   |`* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| ||   | `* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||   |  `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| ||   `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                ||| ||    `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| |+* Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||+* Re: you think rust may outthrone c?Ike Naar
 |  | | |                ||| |||`- Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||+* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| |||`* Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||| `- Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||`* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| || +- Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                ||| || +* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |                ||| || `* Re: you think rust may outthrone c?Bart
 |  | | |                ||| |`* Re: you think rust may outthrone c?Scott Lurndal
 |  | | |                ||| `* Re: you think rust may outthrone c?Keith Thompson
 |  | | |                ||`- Re: you think rust may outthrone c?Keith Thompson
 |  | | |                |`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                `* Re: you think rust may outthrone c?fir
 |  | | +* Yeah, C is harder than many programming languages. Your point? (Was: you think Kenny McCormack
 |  | | +* Re: you think rust may outthrone c?Po Lu
 |  | | `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | +* Re: you think rust may outthrone c?David Brown
 |  | `- Re: you think rust may outthrone c?Po Lu
 |  `* Re: you think rust may outthrone c?Anton Shepelev
 `* Re: you think rust may outthrone c?Bonita Montero

Pages:123456789101112131415161718192021222324252627282930313233343536373839
Re: you think rust may outthrone c?

<u94don$1c1k4$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Mon, 17 Jul 2023 15:01:58 -0700
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <u94don$1c1k4$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u8p0kv$h9r$1@matrix.hispagatos.org> <20230713104558.553@kylheku.com>
<u8phd0$3niul$1@dont-email.me> <UpYrM.257503$W7d4.2562@fx18.iad>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 17 Jul 2023 22:01:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4968e6fd90b76b2c9a43bd670dd5aa43";
logging-data="1443460"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gJOIGOhoi38Ei1s7RHGPcFy++icD6h74="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:ttqIKDqxGQz+iAFl4B19uFWh0oo=
Content-Language: en-US
In-Reply-To: <5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
 by: Chris M. Thomasson - Mon, 17 Jul 2023 22:01 UTC

On 7/17/2023 3:01 PM, fir wrote:
> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
>> C is a high level language.
>
> i propose to say c is mid-level language.. i would say its closer to low-lewel than high-level

I tend to agree with that.

[...]

Re: you think rust may outthrone c?

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

  copy mid

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

  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: you think rust may outthrone c?
Date: Mon, 17 Jul 2023 23:02:14 +0100
Organization: A noiseless patient Spider
Lines: 187
Message-ID: <87ttu2urh5.fsf@bsb.me.uk>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me>
<87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <87mszvwbwl.fsf@bsb.me.uk>
<ea263e0e-b936-43d2-a4b2-9fe62ccccce9n@googlegroups.com>
<87h6q2wow1.fsf@bsb.me.uk>
<bdf7a934-5089-4ad2-9640-1fea717a2828n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a217b73d67e4bddf393a76a6fd405420";
logging-data="1440220"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UfAUYOJMn44QjwazZ043OpTInFf/wRuQ="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:WKiVt2V3GPe5Ryd9NjWMYr6/gpc=
sha1:IzkLxvGuoMqVux6oEgloZr6rh2Y=
X-BSB-Auth: 1.e1b1ab4db110f367a01f.20230717230214BST.87ttu2urh5.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 17 Jul 2023 22:02 UTC

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

> On Monday, 17 July 2023 at 16:15:27 UTC+1, Ben Bacarisse wrote:
>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>
>> > On Monday, 17 July 2023 at 02:43:50 UTC+1, Ben Bacarisse wrote:
>> >> Bart <b...@freeuk.com> writes:
>> >>
>> >> > On 16/07/2023 20:55, Ben Bacarisse wrote:
>> >> >> David Brown <david...@hesbynett.no> writes:
>> >> >
>> >> >>> Getting it /right/ is very simple. Two examples are :
>> >> >>>
>> >> >>> inline bool sign_bit(float f) {
>> >> >>> uint32_t u;
>> >> >>> memcpy(&u, &f, 4);
>> >> >>> return u & 0x80000000;
>> >> >>> }
>> >> >>>
>> >> >>> and
>> >> >>>
>> >> >>> inline bool sign_bit(float f) {
>> >> >>> union {
>> >> >>> uint32_t u;
>> >> >>> float f;
>> >> >>> } u;
>> >> >>> u.f = f;
>> >> >>> return u.u & 0x80000000;
>> >> >>> }
>> >> >>
>> >> >> Very a tangent, but I like the fact that compound literals and
>> >> >> designated initialisers let one write
>> >> >>
>> >> >> return (union { uint32_t u; float f; }){ .f = f }.u & 0x80000000;
>> >> >
>> >> > I'm struggling to see the appeal of being able to do this!
>> >> It's not clear to what your "this" refers: the contraction into one
>> >> expression, the use of a union or something else?
>> >> > Also, consider that the function result is a bool, which means probably
>> >> > having to turn 0 or 0x80000000 into 0 or 1.
>> >> You can use
>> >>
>> >> return (union { uint32_t u; float f; }){ .f = f }.u >> 31;
>> >>
>> >> if you prefer. I kept the & 0x80000000 to minimise the changes. By
>> >> putting the float first, I could also have eliminated the designated
>> >> initialiser:
>> >>
>> >> return (union { float _; uint32_t u; }){ f }.u >> 31;
>> >> > A lot of things going on just to access bit 31 of the parameter. Why the
>> >> > need to go around the houses so much?
>> >> Because C has not way to get at bit 31 of a float. Anyway, I don't
>> >> think there are really many houses being gone round here.
>> >> > Sticking to C, however, I would just do:
>> >> >
>> >> > (*(u32*)&f) & 0x80000000 # get 0x00000000 or 0x80000000
>> >>
>> >> Why? It seems odd to prefer an expression with no defined meaning.
>> >>
>> > It's got two main advantages. You don't need to create a union, which
>> > is a bit messy (if you've several similar functions, do you create the
>> > same union everywhere in local scope, as you did, or do you create one
>> > in global scope - neither answer is ideal).
>> This is not very clear. Do you object to the declaration of an object
>> with a union type (as in DB's code) or the use of an anonymous object of
>> union type in my code? Your reference to local and global scope
>> suggests that you might be objecting to the former. Do you object to
>> the anonymous object as well?
>>
> You created an anonymous union, which of course had local scope.

Scope is a property of names. Neither the union type nor the temporary
object had a name.

Anyway, you did in fact object to the use of a temporary object of union
type. OK. I can't see why, but I know now that it was not only the
named declared object in DB's code you objected to.

> One
> drawback to that is that if we have several functions all accessing the bits
> of a float, then we'll want the unions to be declared in the same way, so that
> they match.

You have a habit of suggesting universal agreement (or at least
widely-held agreement) on tendentious matters by using "we". I don't
know what sort of matching you are referring to but it does not sound
like something I would care about.

> But you can't enforce that. People might use different identifiers
> to "u" and "f" for the members, for example.

Since the purpose of the other functions would be to reinterpret the
bits of different types I'd hope they would. Would you want f for a
complex number and u for and array of char?

I suppose they could be called "in" and "out" or "from" and "to", but a
failure to enforce that is preferable to using an undefined construct.

>> Anyway, I can only answer your question for my suggestion -- if I had a
>> number of these functions I'd use anonymous objects of just the right
>> union type for each function, just as you would, presumably, prefer to
>> use undefined cast expressions of the just the right type for each
>> function.
>>
> The undefined cast expressions are less likely to fail to match, though of
> course it's possible because there are several type aliases.

What is the matching that you want so very much that you will favour
using an undefined construct in order to get it?

>> > And the C is likely a very
>> > close match for the assembler.
>>
>> That's an odd way of putting it. The C you prefer is undefined, so you
>> are making some big assumptions about what the assembler is likely to
>> be! But, even so, why is this matching an advantage? And why do you
>> think my version does not result in a similar "close match"?
>>
> In assember we will certainly have a way of saying "take the memory at
> location f and interpret it as a 32 bit integer". It's less clear how
> we should write access to another member of a union in assembler.

Why don't you have a look at the generated assembler? When I did, the
assembler matched my expectations exactly. Since not knowing what the
legal C code should compile to is holding you back from using it, why
not fix that knowledge gap? Then one of the reasons you have for using
the undefined construct will go away.

>> I can't see anything that would make me prefer an undefined construct.
>>
> Writing to one member of a union and reading another is also undefined
> behaviour,

Well, this is an impasse. The academic in my wants to say "citation
please". The teacher in me wants to say no, see the C standard.

(Some uses of unions to re-interpret bits can be undefined since the
result can be a "non-value" as they are now called in C23, but not this
one.)

> though that rule is more honoured in the breach than the observance.
>>
>> > If you've got to use bitwise operations
>> > instead of comparing to zero with a relational operator to get the
>> > sign, then it's quite likely you'll end up going to assembly at some
>> > point.
>>
>> What are you thinking about here? If you have a more realistic example,
>> that might be worth discussing.
>>
> Here's a real bit of code
> double addwave(double a, double b) {
> if (std::signbit(a) == std::signbit(b)) {
> if (std::signbit(a) == 0)
> return a + b - a * b;
> else
> return a + b + a * b;
> }
> else
> return a + b;
> }
>
> This is very likely to be a rate limiting step, because it's got to be
> called for every sample of a wave. So it's the sort of thing which
> might be a candidate for assembly. If we're going to do that, it can
> help to write out the C so that each line of C corresponds to one
> assembly instruction.

I thought you had an example in mind that would back up your preference
for an undefined construct, but now it seems you think the union method
is undefined too!

> > > This doesn't mean incidentally that casting a pointer is the way Malcolm
>> > would do it, as some people seem to think. Just that there might be reasons
>> > for choosing that option.
>> Has the article quoting been messed up or are you referring to yourself
>> in the third person?
>>
> I'm quoting DB.

Quotes should look like quotes. If it's quoted from a post up-thread it
should have the right number of ">" marks (and an attribution line). If
it's not, you should make it clear using quotation marks and a note
about who said it.


Click here to read the complete article
Re: you think rust may outthrone c?

<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:4541:b0:765:aaf7:b37b with SMTP id u1-20020a05620a454100b00765aaf7b37bmr78600qkp.2.1689631571426;
Mon, 17 Jul 2023 15:06:11 -0700 (PDT)
X-Received: by 2002:a05:6830:1bda:b0:6b9:546e:f220 with SMTP id
v26-20020a0568301bda00b006b9546ef220mr11199927ota.6.1689631571134; Mon, 17
Jul 2023 15:06:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 17 Jul 2023 15:06:10 -0700 (PDT)
In-Reply-To: <5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=31.0.91.20; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 31.0.91.20
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org> <u8p0kv$h9r$1@matrix.hispagatos.org>
<20230713104558.553@kylheku.com> <u8phd0$3niul$1@dont-email.me>
<UpYrM.257503$W7d4.2562@fx18.iad> <u8pmt9$3o80g$1@dont-email.me>
<u8q0q4$3p89v$1@dont-email.me> <u8qqpv$3v3pg$1@dont-email.me>
<u8r94r$dn9$1@dont-email.me> <u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com> <u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com> <u90u5r$pnad$1@dont-email.me>
<87sf9niqb6.fsf@bsb.me.uk> <u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
Subject: Re: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Mon, 17 Jul 2023 22:06:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2924
 by: fir - Mon, 17 Jul 2023 22:06 UTC

wtorek, 18 lipca 2023 o 00:01:31 UTC+2 fir napisał(a):
> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
> > C is a high level language.
>
> i propose to say c is mid-level language.. i would say its closer to low-lewel than high-level becouse c needs/expect consciousnes on low-level things, thats for sure..but is not so much good to name id low-lewel probably as some of c virtue (if i remember the meaning of this word as im not sure) is to span low level with high-level abstractions - but id dont reach too high to lost contact with low lewel reality - so the conclusion is c may be named mid-level (od low-to-mid-high-level)

besides it seem to me (yawn) that some people belives c is defined by the standard..its obvoisly false

(c is defined by some spirit/rules you may even name it ideology) and c standard is just around of it

Re: you think rust may outthrone c?

<u94eb1$1c2vr$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Mon, 17 Jul 2023 23:11:45 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <u94eb1$1c2vr$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u8p0kv$h9r$1@matrix.hispagatos.org> <20230713104558.553@kylheku.com>
<u8phd0$3niul$1@dont-email.me> <UpYrM.257503$W7d4.2562@fx18.iad>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 17 Jul 2023 22:11:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c87bb4c669806a0280a3b231e98491a3";
logging-data="1444859"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LtkTGkwJ6U/z1NEJg+vH4xNxxRr1o7X4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:LxY0R1+dCSv+sddcEWy0PsC4JB8=
In-Reply-To: <b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
 by: Bart - Mon, 17 Jul 2023 22:11 UTC

On 17/07/2023 23:06, fir wrote:
> wtorek, 18 lipca 2023 o 00:01:31 UTC+2 fir napisał(a):
>> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
>>> C is a high level language.
>>
>> i propose to say c is mid-level language.. i would say its closer to low-lewel than high-level becouse c needs/expect consciousnes on low-level things, thats for sure..but is not so much good to name id low-lewel probably as some of c virtue (if i remember the meaning of this word as im not sure) is to span low level with high-level abstractions - but id dont reach too high to lost contact with low lewel reality - so the conclusion is c may be named mid-level (od low-to-mid-high-level)
>
> besides it seem to me (yawn) that some people belives c is defined by the standard..its obvoisly false
>
> (c is defined by some spirit/rules you may even name it ideology) and c standard is just around of it

Half of it seems to be defined by the set of options you give to
compilers like gcc and Clang.

With one set of options, your program passes. But choose another set,
and it fails, or you have loads of warnings, or the behaviour is subtly
different.

So much for being portable.

Re: you think rust may outthrone c?

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

  copy mid

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

  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: you think rust may outthrone c?
Date: Mon, 17 Jul 2023 15:30:58 -0700
Organization: None to speak of
Lines: 26
Message-ID: <874jm2tbkt.fsf@nosuchdomain.example.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me>
<87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8632a0b02e32e421af6c4f3ef09a353e";
logging-data="1443864"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aSrL+g/apLsbUaaQjKbXI"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:d94pTdMeYJaHxJkgHKGd1qcGZJs=
sha1:7PM4BKgDkexY5xGN/ea57zK0dO0=
 by: Keith Thompson - Mon, 17 Jul 2023 22:30 UTC

Bart <bc@freeuk.com> writes:
[...]
> Half of it seems to be defined by the set of options you give to
> compilers like gcc and Clang.
>
> With one set of options, your program passes. But choose another set,
> and it fails, or you have loads of warnings, or the behaviour is
> subtly different.
>
> So much for being portable.

gcc and clang have options that cause them to (attempt to) be
conforming C compilers, something like "-std=cNN -pedantic", where
NN is the edition of the standard you want to conform to.

Without those options, gcc and clang are both non-conforming, and
of course any program that depends on compiler-specific extensions
is not portable.

You know all that. You just pretend not to so you can make some point
about how much you dislike C. *yawn*

--
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: you think rust may outthrone c?

<u94hip$1cdbp$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 00:07:05 +0100
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <u94hip$1cdbp$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <874jm2tbkt.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 17 Jul 2023 23:07:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c87bb4c669806a0280a3b231e98491a3";
logging-data="1455481"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AzJW+nIM9GRzhRKY4afbcV5yuXjjBn60="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:LXb8Rkz3tVTvahZq/6e2/2v/8Ic=
In-Reply-To: <874jm2tbkt.fsf@nosuchdomain.example.com>
 by: Bart - Mon, 17 Jul 2023 23:07 UTC

On 17/07/2023 23:30, Keith Thompson wrote:
> Bart <bc@freeuk.com> writes:
> [...]
>> Half of it seems to be defined by the set of options you give to
>> compilers like gcc and Clang.
>>
>> With one set of options, your program passes. But choose another set,
>> and it fails, or you have loads of warnings, or the behaviour is
>> subtly different.
>>
>> So much for being portable.
>
> gcc and clang have options that cause them to (attempt to) be
> conforming C compilers, something like "-std=cNN -pedantic", where
> NN is the edition of the standard you want to conform to.
>
> Without those options, gcc and clang are both non-conforming, and
> of course any program that depends on compiler-specific extensions
> is not portable.

I genuinely don't understand your points.

To usefully use C, you need to compile a program in it, and the compiler
needs to be told some things about how to that, how strict it should be etc.

This means the same source file could do different things depending how
it is compiled: pass or fail, do X or Y, use this or that -D macro. You
don't even need to make use of extensions.

Actually this is not /my/ point, but one made by Walter Bright in this
video:

https://www.youtube.com/watch?v=y7KWGv_t-MU

From 5:30.

This is a problem for me. In 2014 I posted a link to an 18Kloc program.
Compiled with gcc, it worked fine. But then some people here ramped up
the warning options, so that it spewed 1000s of warnings.

Was there anything wrong my program or not?

Apparently if /I/ stipulate the exact set of gcc options (ie. none),
then it's legal C; a perfectly valid program.

But other people prefer a stricter version of C, and to satisfy them,
many things would need changing.

This is why I said that a program, ostensibly in C, is really in a
language partly defined by the choice of compile options.

Re: you think rust may outthrone c?

<c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:240d:b0:765:ab00:9611 with SMTP id d13-20020a05620a240d00b00765ab009611mr111147qkn.3.1689635424525;
Mon, 17 Jul 2023 16:10:24 -0700 (PDT)
X-Received: by 2002:a05:6808:1a13:b0:3a1:f3e2:c977 with SMTP id
bk19-20020a0568081a1300b003a1f3e2c977mr18599508oib.11.1689635424261; Mon, 17
Jul 2023 16:10:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 17 Jul 2023 16:10:23 -0700 (PDT)
In-Reply-To: <u94eb1$1c2vr$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=31.0.91.20; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 31.0.91.20
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org> <u8p0kv$h9r$1@matrix.hispagatos.org>
<20230713104558.553@kylheku.com> <u8phd0$3niul$1@dont-email.me>
<UpYrM.257503$W7d4.2562@fx18.iad> <u8pmt9$3o80g$1@dont-email.me>
<u8q0q4$3p89v$1@dont-email.me> <u8qqpv$3v3pg$1@dont-email.me>
<u8r94r$dn9$1@dont-email.me> <u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com> <u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com> <u90u5r$pnad$1@dont-email.me>
<87sf9niqb6.fsf@bsb.me.uk> <u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com> <b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>
Subject: Re: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Mon, 17 Jul 2023 23:10:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4019
 by: fir - Mon, 17 Jul 2023 23:10 UTC

wtorek, 18 lipca 2023 o 00:11:59 UTC+2 Bart napisał(a):
> On 17/07/2023 23:06, fir wrote:
> > wtorek, 18 lipca 2023 o 00:01:31 UTC+2 fir napisał(a):
> >> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
> >>> C is a high level language.
> >>
> >> i propose to say c is mid-level language.. i would say its closer to low-lewel than high-level becouse c needs/expect consciousnes on low-level things, thats for sure..but is not so much good to name id low-lewel probably as some of c virtue (if i remember the meaning of this word as im not sure) is to span low level with high-level abstractions - but id dont reach too high to lost contact with low lewel reality - so the conclusion is c may be named mid-level (od low-to-mid-high-level)
> >
> > besides it seem to me (yawn) that some people belives c is defined by the standard..its obvoisly false
> >
> > (c is defined by some spirit/rules you may even name it ideology) and c standard is just around of it
> Half of it seems to be defined by the set of options you give to
> compilers like gcc and Clang.
>
> With one set of options, your program passes. But choose another set,
> and it fails, or you have loads of warnings, or the behaviour is subtly
> different.
>
> So much for being portable.

i probably woildnt agree with that but i never thinked on this... as to being 'inderdefined' i also
never thinked on that so i got no opinion.. i femember hovever for example (if im not wrong)
thut such thing is not defined

foo(a(),b(),c());

i mean which order of a b c calling is and it seems kinda problem -as probably c-spirit not defines this
(though maybe? from left to right? though its not clear but if there is some reason it shouldnt be it shouldnt be)
and is standard not defines it in fact it may be a hole in language

Re: you think rust may outthrone c?

<d6108c53-4937-4d8e-895f-dad67390563fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:460c:b0:768:2bf3:95cc with SMTP id br12-20020a05620a460c00b007682bf395ccmr1496qkb.3.1689635603563;
Mon, 17 Jul 2023 16:13:23 -0700 (PDT)
X-Received: by 2002:a05:6808:1988:b0:3a1:edf0:c79f with SMTP id
bj8-20020a056808198800b003a1edf0c79fmr1539850oib.3.1689635603339; Mon, 17 Jul
2023 16:13:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 17 Jul 2023 16:13:22 -0700 (PDT)
In-Reply-To: <c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=31.0.91.20; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 31.0.91.20
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org> <u8p0kv$h9r$1@matrix.hispagatos.org>
<20230713104558.553@kylheku.com> <u8phd0$3niul$1@dont-email.me>
<UpYrM.257503$W7d4.2562@fx18.iad> <u8pmt9$3o80g$1@dont-email.me>
<u8q0q4$3p89v$1@dont-email.me> <u8qqpv$3v3pg$1@dont-email.me>
<u8r94r$dn9$1@dont-email.me> <u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com> <u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com> <u90u5r$pnad$1@dont-email.me>
<87sf9niqb6.fsf@bsb.me.uk> <u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com> <b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d6108c53-4937-4d8e-895f-dad67390563fn@googlegroups.com>
Subject: Re: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Mon, 17 Jul 2023 23:13:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2246
 by: fir - Mon, 17 Jul 2023 23:13 UTC

wtorek, 18 lipca 2023 o 01:10:34 UTC+2 fir napisał(a):
> 'inderdefined'
underdefined

Re: you think rust may outthrone c?

<0d446430-948f-4ac5-badd-42a3d8d9f56cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1aa8:b0:403:b1f4:c5e6 with SMTP id s40-20020a05622a1aa800b00403b1f4c5e6mr89129qtc.3.1689635762994;
Mon, 17 Jul 2023 16:16:02 -0700 (PDT)
X-Received: by 2002:a9d:5e85:0:b0:6b7:1e75:18e with SMTP id
f5-20020a9d5e85000000b006b71e75018emr10663445otl.2.1689635762694; Mon, 17 Jul
2023 16:16:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 17 Jul 2023 16:16:02 -0700 (PDT)
In-Reply-To: <c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=31.0.91.20; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 31.0.91.20
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org> <u8p0kv$h9r$1@matrix.hispagatos.org>
<20230713104558.553@kylheku.com> <u8phd0$3niul$1@dont-email.me>
<UpYrM.257503$W7d4.2562@fx18.iad> <u8pmt9$3o80g$1@dont-email.me>
<u8q0q4$3p89v$1@dont-email.me> <u8qqpv$3v3pg$1@dont-email.me>
<u8r94r$dn9$1@dont-email.me> <u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com> <u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com> <u90u5r$pnad$1@dont-email.me>
<87sf9niqb6.fsf@bsb.me.uk> <u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com> <b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0d446430-948f-4ac5-badd-42a3d8d9f56cn@googlegroups.com>
Subject: Re: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Mon, 17 Jul 2023 23:16:02 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4348
 by: fir - Mon, 17 Jul 2023 23:16 UTC

wtorek, 18 lipca 2023 o 01:10:34 UTC+2 fir napisał(a):
> wtorek, 18 lipca 2023 o 00:11:59 UTC+2 Bart napisał(a):
> > On 17/07/2023 23:06, fir wrote:
> > > wtorek, 18 lipca 2023 o 00:01:31 UTC+2 fir napisał(a):
> > >> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
> > >>> C is a high level language.
> > >>
> > >> i propose to say c is mid-level language.. i would say its closer to low-lewel than high-level becouse c needs/expect consciousnes on low-level things, thats for sure..but is not so much good to name id low-lewel probably as some of c virtue (if i remember the meaning of this word as im not sure) is to span low level with high-level abstractions - but id dont reach too high to lost contact with low lewel reality - so the conclusion is c may be named mid-level (od low-to-mid-high-level)
> > >
> > > besides it seem to me (yawn) that some people belives c is defined by the standard..its obvoisly false
> > >
> > > (c is defined by some spirit/rules you may even name it ideology) and c standard is just around of it
> > Half of it seems to be defined by the set of options you give to
> > compilers like gcc and Clang.
> >
> > With one set of options, your program passes. But choose another set,
> > and it fails, or you have loads of warnings, or the behaviour is subtly
> > different.
> >
> > So much for being portable.
> i probably woildnt agree with that but i never thinked on this... as to being 'inderdefined' i also
> never thinked on that so i got no opinion.. i femember hovever for example (if im not wrong)
> thut such thing is not defined
>
> foo(a(),b(),c());
>
> i mean which order of a b c calling is and it seems kinda problem -as probably c-spirit not defines this
> (though maybe? from left to right? though its not clear but if there is some reason it shouldnt be it shouldnt be)
> and is standard not defines it in fact it may be a hole in language

if someone know such holes in c language may mention them and some my discuss how they should be closed

Re: you think rust may outthrone c?

<a319ae71-0a2f-418d-82a4-d83d7877a2c8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:58f2:0:b0:635:93ec:4d87 with SMTP id di18-20020ad458f2000000b0063593ec4d87mr2674qvb.2.1689636549403;
Mon, 17 Jul 2023 16:29:09 -0700 (PDT)
X-Received: by 2002:a05:6870:d8aa:b0:1b0:d64:dd7c with SMTP id
dv42-20020a056870d8aa00b001b00d64dd7cmr11645266oab.8.1689636549123; Mon, 17
Jul 2023 16:29:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 17 Jul 2023 16:29:08 -0700 (PDT)
In-Reply-To: <c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=31.0.91.20; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 31.0.91.20
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org> <u8p0kv$h9r$1@matrix.hispagatos.org>
<20230713104558.553@kylheku.com> <u8phd0$3niul$1@dont-email.me>
<UpYrM.257503$W7d4.2562@fx18.iad> <u8pmt9$3o80g$1@dont-email.me>
<u8q0q4$3p89v$1@dont-email.me> <u8qqpv$3v3pg$1@dont-email.me>
<u8r94r$dn9$1@dont-email.me> <u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com> <u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com> <u90u5r$pnad$1@dont-email.me>
<87sf9niqb6.fsf@bsb.me.uk> <u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com> <b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <c2049bb7-58b8-4822-80b8-3ff8fff81d7cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a319ae71-0a2f-418d-82a4-d83d7877a2c8n@googlegroups.com>
Subject: Re: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Mon, 17 Jul 2023 23:29:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4339
 by: fir - Mon, 17 Jul 2023 23:29 UTC

wtorek, 18 lipca 2023 o 01:10:34 UTC+2 fir napisał(a):
> wtorek, 18 lipca 2023 o 00:11:59 UTC+2 Bart napisał(a):
> > On 17/07/2023 23:06, fir wrote:
> > > wtorek, 18 lipca 2023 o 00:01:31 UTC+2 fir napisał(a):
> > >> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
> > >>> C is a high level language.
> > >>
> > >> i propose to say c is mid-level language.. i would say its closer to low-lewel than high-level becouse c needs/expect consciousnes on low-level things, thats for sure..but is not so much good to name id low-lewel probably as some of c virtue (if i remember the meaning of this word as im not sure) is to span low level with high-level abstractions - but id dont reach too high to lost contact with low lewel reality - so the conclusion is c may be named mid-level (od low-to-mid-high-level)
> > >
> > > besides it seem to me (yawn) that some people belives c is defined by the standard..its obvoisly false
> > >
> > > (c is defined by some spirit/rules you may even name it ideology) and c standard is just around of it
> > Half of it seems to be defined by the set of options you give to
> > compilers like gcc and Clang.
> >
> > With one set of options, your program passes. But choose another set,
> > and it fails, or you have loads of warnings, or the behaviour is subtly
> > different.
> >
> > So much for being portable.
> i probably woildnt agree with that but i never thinked on this... as to being 'uderdefined' i also

i mean if c has a numerous holes and compile options decide how to treat them (if one way or another)
i could agree what you say - its kinda point... but i wouldnt agre to seriously say that.. especially i personally not fall in that holes in pratice (or if i fell in some i didnt even noticed and thats okay for me) ..if i would port code and fall into few such holes i would just repair this as bugs and thats all, treating this as normal bugs - those are not mystical problems and in practice imo those are far far less important that normal bugs (probably)

Re: you think rust may outthrone c?

<20230717170507.507@kylheku.com>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 00:14:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <20230717170507.507@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <874jm2tbkt.fsf@nosuchdomain.example.com>
Injection-Date: Tue, 18 Jul 2023 00:14:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="636687d2210f78fe49f692a2db7742ef";
logging-data="1467720"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QpNpTyGCI2XhQkBggwtnU146KceJxANE="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:egryaxdC/cWSUkIhOHX1d61wbCc=
 by: Kaz Kylheku - Tue, 18 Jul 2023 00:14 UTC

On 2023-07-17, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> Bart <bc@freeuk.com> writes:
> [...]
>> Half of it seems to be defined by the set of options you give to
>> compilers like gcc and Clang.
>>
>> With one set of options, your program passes. But choose another set,
>> and it fails, or you have loads of warnings, or the behaviour is
>> subtly different.
>>
>> So much for being portable.
>
> gcc and clang have options that cause them to (attempt to) be
> conforming C compilers, something like "-std=cNN -pedantic", where
> NN is the edition of the standard you want to conform to.
>
> Without those options, gcc and clang are both non-conforming, and
> of course any program that depends on compiler-specific extensions
> is not portable.
>
> You know all that. You just pretend not to so you can make some point
> about how much you dislike C. *yawn*

Each compiler option that affects semantics splits the implementation's
language into two dialects (if the option is Boolean; more if it has
multiple values).

There is a language standard, but in actual practice, the C world cannot
agree on a single C language that everyone can like. One project wants
wrapping integer arithmetic. Another project deosn't care for that, but
want to defeat strict aliasing optimizations. Yet another wants char to
be unsigned.

The standard ignores the fact that there exist compiler options and
those options influence the language dialect, but which sit squarely
outside of the language syntax, and so don't appear in the translation
unit

Everything that changes language semantics should be in the language
syntax, and standardized.

The translation unit itself should be able to declare that it
wants wrapping arithmetic, and over which parts of the code.

A standard C in which you have standard-defined optimization controls
and code generation options in important areas would be a huge
improvement.

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

Re: you think rust may outthrone c?

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

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 01:28:09 +0100
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <87lefeukpy.fsf@bsb.me.uk>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me>
<87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me>
<874jm2tbkt.fsf@nosuchdomain.example.com>
<u94hip$1cdbp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a217b73d67e4bddf393a76a6fd405420";
logging-data="1472248"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TZOvgzTAw5VNKDENAYeXQOoGMK38V1G0="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:rvOCqbQ0KusbZgx2gka42B/Z9XE=
sha1:kTIwoSIh6Z9VhafXAV3kp/3g8/o=
X-BSB-Auth: 1.5c7d4f380ad8f55da1ce.20230718012809BST.87lefeukpy.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 18 Jul 2023 00:28 UTC

I don't know if anyone comes across comp.lang.c when trying to learn C
anymore, but if they do, a word of warning: Bart's purpose here is
always to obfuscate and confuse; he almost never explains or clarifies.
He want's everyone to find C as mysterious as me (pretends?) he does.

For example

Bart <bc@freeuk.com> writes:

> This is why I said that a program, ostensibly in C, is really in a language
> partly defined by the choice of compile options.

This is true of almost every programming language I have ever used.
Fortran is defined by ISO standards, but you can write programs that
look very much like ISO Fortran but which are really written in a
language only accepted by some compiler invoked with certain options.
It has always been this way, particularly for large, serious languages
with long histories.

The C programming language is defined by a series of ISO standards and,
before that, by the book written by Kernighan and Ritchie. Most old
C programs are not valid ISO C programs and the same is true (to a
lesser extent) with the various revisions of the standard.

Also, most C compilers accept programs written in languages that are not
entirely unlike C, but aren't quite. As I said, this is not peculiar to
C. What is possibly peculiar to C (I've not studied the matter) is that
C compilers often don't default to accepting the most recent standard
version of the language. Compilers often cater to a community used to
some non-standard variation, and it's that language that is accepted by
default.

So, in the spirit of being helpful, if you are learning C, you should
(a) get a good book; (b) use a good compiler (setting it's options to
the version of the language standard your book describes); and (c) crank
up the warning level so the compiler gives you as much help as possible.

For example, when someone posts here, I will compile it with something
like this

gcc -std=c11 -pedantic -D_ANSI_SOURCE -fno-common \
-fsanitize=undefined -Wbad-function-cast \
-Wstrict-prototypes -Wall -Wextra -Wformat-nonliteral -Wcast-align \
-Winline -Wundef -Wcast-qual -Wshadow -Wconversion -ffloat-store

so I can see problems as early as possible.

--
Ben.

Re: you think rust may outthrone c?

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

  copy mid

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

  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: you think rust may outthrone c?
Date: Mon, 17 Jul 2023 17:44:26 -0700
Organization: None to speak of
Lines: 31
Message-ID: <87zg3urqtx.fsf@nosuchdomain.example.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me>
<87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me>
<874jm2tbkt.fsf@nosuchdomain.example.com>
<u94hip$1cdbp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8632a0b02e32e421af6c4f3ef09a353e";
logging-data="1474827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QZQARUHoSp8seE4Z6YJqL"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:9AAbBqFXyYzjThqRNKX/ZQRNNH8=
sha1:VerszlVEXXdHT2zs3yR5+kdJqP4=
 by: Keith Thompson - Tue, 18 Jul 2023 00:44 UTC

Bart <bc@freeuk.com> writes:
> On 17/07/2023 23:30, Keith Thompson wrote:
>> Bart <bc@freeuk.com> writes:
>> [...]
>>> Half of it seems to be defined by the set of options you give to
>>> compilers like gcc and Clang.
>>>
>>> With one set of options, your program passes. But choose another set,
>>> and it fails, or you have loads of warnings, or the behaviour is
>>> subtly different.
>>>
>>> So much for being portable.
>>
>> gcc and clang have options that cause them to (attempt to) be
>> conforming C compilers, something like "-std=cNN -pedantic", where
>> NN is the edition of the standard you want to conform to.
>>
>> Without those options, gcc and clang are both non-conforming, and
>> of course any program that depends on compiler-specific extensions
>> is not portable.
>
> I genuinely don't understand your points.

I lack the patience to explain them to you again.

[...]

--
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: you think rust may outthrone c?

<u94pch$1dpd6$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 02:20:17 +0100
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <u94pch$1dpd6$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <874jm2tbkt.fsf@nosuchdomain.example.com>
<u94hip$1cdbp$1@dont-email.me> <87lefeukpy.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 18 Jul 2023 01:20:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c87bb4c669806a0280a3b231e98491a3";
logging-data="1500582"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HklkVNWDjqtAXk1ds32jgP9ZRcLip7Ds="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:RUYh5HwqoP8CuDfeilYfYzu9vz8=
In-Reply-To: <87lefeukpy.fsf@bsb.me.uk>
 by: Bart - Tue, 18 Jul 2023 01:20 UTC

On 18/07/2023 01:28, Ben Bacarisse wrote:
> I don't know if anyone comes across comp.lang.c when trying to learn C
> anymore, but if they do, a word of warning: Bart's purpose here is
> always to obfuscate and confuse; he almost never explains or clarifies.
> He want's everyone to find C as mysterious as me (pretends?) he does.
>
> For example
>
> Bart <bc@freeuk.com> writes:
>
>> This is why I said that a program, ostensibly in C, is really in a
language
>> partly defined by the choice of compile options.
>
> This is true of almost every programming language I have ever used.
> Fortran is defined by ISO standards, but you can write programs that
> look very much like ISO Fortran but which are really written in a
> language only accepted by some compiler invoked with certain options.
> It has always been this way, particularly for large, serious languages
> with long histories.

OK. But in that case why is C's so-called portability touted so much?

(In the case of Fortran, I remember using machine-specific types such as
INTEGER*4 (i32) in 1979; was there anything similar in C before C99?

Funny that the non-low-level language had machine types, and
close-to-the-metal C didn't!

Fortran anyway doesn't mind embracing change; the language has evolved
considerably since then.)

> For example, when someone posts here, I will compile it with something
> like this
>
> gcc -std=c11 -pedantic -D_ANSI_SOURCE -fno-common \
> -fsanitize=undefined -Wbad-function-cast \
> -Wstrict-prototypes -Wall -Wextra -Wformat-nonliteral -Wcast-align \
> -Winline -Wundef -Wcast-qual -Wshadow -Wconversion -ffloat-store
>
> so I can see problems as early as possible.

So you're using a version of the language defined by those options.

BTW I can't remember using any options when compiling Fortran. Maybe it
was too long ago, but would have remembered having to type in that lot!

Re: you think rust may outthrone c?

<20230717185506.775@kylheku.com>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 02:12:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <20230717185506.775@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <874jm2tbkt.fsf@nosuchdomain.example.com>
<u94hip$1cdbp$1@dont-email.me> <87lefeukpy.fsf@bsb.me.uk>
<u94pch$1dpd6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jul 2023 02:12:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="636687d2210f78fe49f692a2db7742ef";
logging-data="1613217"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+l9yrXt8nXXxu5dUcjQ8abaO0YdkjGixI="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:58cWD3/Uum8LG7ZHYQLAwgv7+vI=
 by: Kaz Kylheku - Tue, 18 Jul 2023 02:12 UTC

On 2023-07-18, Bart <bc@freeuk.com> wrote:
> OK. But in that case why is C's so-called portability touted so much?

Because a lot of people have success in writing something on one system
and using it on two others.

It used to be those three were actually different architectures,
and the compilers were from different vendors.

Today it's "wow, portable" if two of them are 64 bit x86 and one is ARM,
with just operating systems being different (e.g Windows, MacOS, Linux)
and the compilers being GCC and/or Clang.

This low portability bar is allowing other camps to proclaim that their shit
portable (e.g. Rust, which has no abstract integer types: only int16,
int32, int64 ...: all the world's a VAX^H^H^SPARC^H^H^HX86^H^H^HARM!)

We could make a graph something like this:

No of programmers

│ ┌────┐
│ │ │
│ │ │
│ │ │
│ │ │
/ / /
: : :
/ / /
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ ┌────┐
│ │ │ │ │ ┌────┐
│ │ │ │ │ │ │ ┌────┐
│ └────┘ └────┘ └────┘ └────┘ ───── ───── ───── ─────
└───────────────────────────────────────────────────────────────────────►
0 1 2 3 4 5 6 7 8 or more
Max no of platforms ported any software to.

(There should be a 0 bar for those who never got their stuff properly
ported to the one and only platform they targeted.)

The 2, 3 and 4 crowd proclaim that they are portable programmers, and they
vastly outnumber 5+.

Re: you think rust may outthrone c?

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

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 03:25:45 +0100
Organization: A noiseless patient Spider
Lines: 94
Message-ID: <87edl6uf9y.fsf@bsb.me.uk>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me>
<87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me>
<874jm2tbkt.fsf@nosuchdomain.example.com>
<u94hip$1cdbp$1@dont-email.me> <87lefeukpy.fsf@bsb.me.uk>
<u94pch$1dpd6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a217b73d67e4bddf393a76a6fd405420";
logging-data="1615703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+v/NedZtJxbKEuWPDrptRFTDgNakwc8S4="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:c2RhG1H65PXesdwr44o/igVxCGk=
sha1:/thuR7GxEi9O+mkDzyTccQueY+U=
X-BSB-Auth: 1.670b947a28e815f4bf9a.20230718032545BST.87edl6uf9y.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 18 Jul 2023 02:25 UTC

Bart <bc@freeuk.com> writes:

> On 18/07/2023 01:28, Ben Bacarisse wrote:
>> I don't know if anyone comes across comp.lang.c when trying to learn C
>> anymore, but if they do, a word of warning: Bart's purpose here is
>> always to obfuscate and confuse; he almost never explains or clarifies.
>> He want's everyone to find C as mysterious as me (pretends?) he does.
>>
>> For example
>>
>> Bart <bc@freeuk.com> writes:
>>
>>> This is why I said that a program, ostensibly in C, is really in a
> language
>>> partly defined by the choice of compile options.
>>
>> This is true of almost every programming language I have ever used.
>> Fortran is defined by ISO standards, but you can write programs that
>> look very much like ISO Fortran but which are really written in a
>> language only accepted by some compiler invoked with certain options.
>> It has always been this way, particularly for large, serious languages
>> with long histories.
>
> OK. But in that case why is C's so-called portability touted so much?

Who touts it? Picking an old version of C, and sticking to the standard
can result in reasonably portable programs, but the whole notion is
fraught with misunderstandings and is not easy to define. C is often
thought of as being very portable because almost every platform has a C
compiler, but writing highly portable is very hard and few people know
how to do it well. Does that mean that C is portable or does it mean it
isn't? The question is not an easy one to answer.

> (In the case of Fortran, I remember using machine-specific types such as
> INTEGER*4 (i32) in 1979; was there anything similar in C before C99?

For a while in the 1970s and into the 80s I would have said that FORTRAN
66 was probably the most "portable" language around. It was widely
implemented and had a strict language standard.

> Funny that the non-low-level language had machine types, and
> close-to-the-metal C didn't!

INTEGER*4 is not a machine type on the 6502 but C's int can be
efficiently implemented on small systems. You have invented a fiction
about what C "should be" in order to criticise it, while using a similar
fiction about Fortran to big up that language.

> Fortran anyway doesn't mind embracing change; the language has evolved
> considerably since then.)

C has changed quite a bit too but I'm not sure what part of your myth
that C is defined by compiler options is backed up by Fortran having
changed a lot (and C less).

>> For example, when someone posts here, I will compile it with something
>> like this
>>
>> gcc -std=c11 -pedantic -D_ANSI_SOURCE -fno-common \
>> -fsanitize=undefined -Wbad-function-cast \
>> -Wstrict-prototypes -Wall -Wextra -Wformat-nonliteral -Wcast-align \
>> -Winline -Wundef -Wcast-qual -Wshadow -Wconversion -ffloat-store
>>
>> so I can see problems as early as possible.
>
> So you're using a version of the language defined by those options.

That's what every compiler ever written does: process a language defined
by the author(s), the options used and the bugs in the implementation.
I really don't know what you hope to gain by saying obvious things like
this other than to (incorrectly) imply that C -- the language -- is not
defined by it's defining documents -- the ISO standards -- but by
compiler options.

Fortunately, gcc is a quality compiler and these options make the
language it accepts as close to ISO standard C (the 2011 version) as I
can get it, but there will always be bugs and misunderstandings.

> BTW I can't remember using any options when compiling Fortran.

Really? Odd. I remember needing multiple JCL cards to invoke the IBM
360 FORTRAN compiler, but you didn't get much choice about the language.
It implemented IBM's interpretation of FORTRAN IV and you were stuck
with it, though you could choose to write in a more portable subset.

> Maybe it was
> too long ago, but would have remembered having to type in that lot!

Fortunately every OS I've used provides mechanisms to avoid having to
type commands like this. I suspect every OS you'd used does as well,
but you can't help reaching for a sound bite.

--
Ben.

Re: you think rust may outthrone c?

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

  copy mid

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

  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: you think rust may outthrone c?
Date: Mon, 17 Jul 2023 21:27:25 -0700
Organization: None to speak of
Lines: 22
Message-ID: <87v8ehsv2q.fsf@nosuchdomain.example.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me>
<87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me>
<874jm2tbkt.fsf@nosuchdomain.example.com>
<u94hip$1cdbp$1@dont-email.me> <87lefeukpy.fsf@bsb.me.uk>
<u94pch$1dpd6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8632a0b02e32e421af6c4f3ef09a353e";
logging-data="1635443"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186COsIfYQPjD57qQN/6Q3Z"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:g6+nlZWW/c5tzpAOJLKaKLw1mT8=
sha1:dBUQR8BLOqjLKQNIRIORSaGwrqQ=
 by: Keith Thompson - Tue, 18 Jul 2023 04:27 UTC

Bart <bc@freeuk.com> writes:
[...]
> (In the case of Fortran, I remember using machine-specific types such
> as INTEGER*4 (i32) in 1979; was there anything similar in C before
> C99?
>
> Funny that the non-low-level language had machine types, and
> close-to-the-metal C didn't!

So your complaint is that C has fixed-width types *now*, but didn't
acquire them until 24 years ago? It's difficult to imagine any
explanation that would satisfy you.

And you're referring to the intN_t types as "machine types"?
Why do you call them that?

[...]

--
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: you think rust may outthrone c?

<u95eqh$1ipij$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 09:26:09 +0200
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <u95eqh$1ipij$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u8p0kv$h9r$1@matrix.hispagatos.org> <20230713104558.553@kylheku.com>
<u8phd0$3niul$1@dont-email.me> <UpYrM.257503$W7d4.2562@fx18.iad>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<u94don$1c1k4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jul 2023 07:26:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="450515ec0877b5b354acbe2c68c4ec4d";
logging-data="1664595"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Eal304Exd21fRhqTZY9pc+vQWNQSv7+c="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:Bl4aHhLU/fjBmlWEW/NoK/wElDg=
Content-Language: en-GB
In-Reply-To: <u94don$1c1k4$1@dont-email.me>
 by: David Brown - Tue, 18 Jul 2023 07:26 UTC

On 18/07/2023 00:01, Chris M. Thomasson wrote:
> On 7/17/2023 3:01 PM, fir wrote:
>> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
>>>   C is a  high level language.
>>
>> i propose to say c is mid-level language.. i would say its closer to
>> low-lewel than high-level
>
> I tend to agree with that.
>

I don't know if there is any kind of "official" definition of a
high-level language. But I think a reasonable choice would be to say
that a low-level language is one that is defined in terms of the
hardware. Operations in the language do what the hardware says they
will do. A high-level language is one that is defined independently of
any particular hardware.

By that definition, C is a high-level language - it is defined in terms
of an abstract machine. It has some implementation-dependent factors
(as do all languages - though C has perhaps more than most, and is more
explicit about it than most). But those affect particular
implementations of the language rather than the language itself.

Another way to distinguish low and high level languages is to consider
the usage, and suitability of usage, in "low level" or "systems" coding,
close to the hardware, as distinct from more abstract coding. Python is
then "high level", with native support for infinite precision integers,
hash maps, standard libraries for application-level features, etc. C is
"low level" for supporting efficient and direct hardware access and
systems coding. But C++ would then be both a low-level /and/ a
high-level language.

I personally think it is more accurate to say that C is a low-level
high-level language, or a high-level language targeting low-level
programming. A binary low/high classification is not particularly
useful - it is perhaps better to think of a scale, in which a language
like Python would be significantly higher than C. But as C would score
well above 0 here, it is very definitely a high level language.

Re: you think rust may outthrone c?

<u95f7s$1ioti$2@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 00:33:15 -0700
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <u95f7s$1ioti$2@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u8p0kv$h9r$1@matrix.hispagatos.org> <20230713104558.553@kylheku.com>
<u8phd0$3niul$1@dont-email.me> <UpYrM.257503$W7d4.2562@fx18.iad>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<u94don$1c1k4$1@dont-email.me> <u95eqh$1ipij$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jul 2023 07:33:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4968e6fd90b76b2c9a43bd670dd5aa43";
logging-data="1663922"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ideXbHZZgqKScvK6i5wbb3lFNKDKa/pU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:SUJO7hpYOX+DQ5L7lW+siQ9edy8=
In-Reply-To: <u95eqh$1ipij$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 18 Jul 2023 07:33 UTC

On 7/18/2023 12:26 AM, David Brown wrote:
> On 18/07/2023 00:01, Chris M. Thomasson wrote:
>> On 7/17/2023 3:01 PM, fir wrote:
>>> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
>>>>   C is a  high level language.
>>>
>>> i propose to say c is mid-level language.. i would say its closer to
>>> low-lewel than high-level
>>
>> I tend to agree with that.
>>
>
> I don't know if there is any kind of "official" definition of a
> high-level language.  But I think a reasonable choice would be to say
> that a low-level language is one that is defined in terms of the
> hardware.  Operations in the language do what the hardware says they
> will do.  A high-level language is one that is defined independently of
> any particular hardware.
>
> By that definition, C is a high-level language - it is defined in terms
> of an abstract machine.  It has some implementation-dependent factors
> (as do all languages - though C has perhaps more than most, and is more
> explicit about it than most).  But those affect particular
> implementations of the language rather than the language itself.
>
> Another way to distinguish low and high level languages is to consider
> the usage, and suitability of usage, in "low level" or "systems" coding,
> close to the hardware, as distinct from more abstract coding.  Python is
> then "high level", with native support for infinite precision integers,
> hash maps, standard libraries for application-level features, etc.  C is
> "low level" for supporting efficient and direct hardware access and
> systems coding.  But C++ would then be both a low-level /and/ a
> high-level language.
>
> I personally think it is more accurate to say that C is a low-level
> high-level language, or a high-level language targeting low-level
> programming.  A binary low/high classification is not particularly
> useful - it is perhaps better to think of a scale, in which a language
> like Python would be significantly higher than C.  But as C would score
> well above 0 here, it is very definitely a high level language.

Well, I can use C to steal bits from a pointer. Pretty nice and useful,
from time to time, so to speak... :^)

Re: you think rust may outthrone c?

<u95fct$1ioti$3@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 00:35:56 -0700
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <u95fct$1ioti$3@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u8p0kv$h9r$1@matrix.hispagatos.org> <20230713104558.553@kylheku.com>
<u8phd0$3niul$1@dont-email.me> <UpYrM.257503$W7d4.2562@fx18.iad>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<u94don$1c1k4$1@dont-email.me> <u95eqh$1ipij$1@dont-email.me>
<u95f7s$1ioti$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jul 2023 07:35:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4968e6fd90b76b2c9a43bd670dd5aa43";
logging-data="1663922"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vbyQymr1IlT78qfIoSF2HHvCdXX662nE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:eMO+HauRE4Q4NwOlzNdtbASayzg=
Content-Language: en-US
In-Reply-To: <u95f7s$1ioti$2@dont-email.me>
 by: Chris M. Thomasson - Tue, 18 Jul 2023 07:35 UTC

On 7/18/2023 12:33 AM, Chris M. Thomasson wrote:
> On 7/18/2023 12:26 AM, David Brown wrote:
>> On 18/07/2023 00:01, Chris M. Thomasson wrote:
>>> On 7/17/2023 3:01 PM, fir wrote:
>>>> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
>>>>>   C is a  high level language.
>>>>
>>>> i propose to say c is mid-level language.. i would say its closer to
>>>> low-lewel than high-level
>>>
>>> I tend to agree with that.
>>>
>>
>> I don't know if there is any kind of "official" definition of a
>> high-level language.  But I think a reasonable choice would be to say
>> that a low-level language is one that is defined in terms of the
>> hardware.  Operations in the language do what the hardware says they
>> will do.  A high-level language is one that is defined independently
>> of any particular hardware.
>>
>> By that definition, C is a high-level language - it is defined in
>> terms of an abstract machine.  It has some implementation-dependent
>> factors (as do all languages - though C has perhaps more than most,
>> and is more explicit about it than most).  But those affect particular
>> implementations of the language rather than the language itself.
>>
>> Another way to distinguish low and high level languages is to consider
>> the usage, and suitability of usage, in "low level" or "systems"
>> coding, close to the hardware, as distinct from more abstract coding.
>> Python is then "high level", with native support for infinite
>> precision integers, hash maps, standard libraries for
>> application-level features, etc.  C is "low level" for supporting
>> efficient and direct hardware access and systems coding.  But C++
>> would then be both a low-level /and/ a high-level language.
>>
>> I personally think it is more accurate to say that C is a low-level
>> high-level language, or a high-level language targeting low-level
>> programming.  A binary low/high classification is not particularly
>> useful - it is perhaps better to think of a scale, in which a language
>> like Python would be significantly higher than C.  But as C would
>> score well above 0 here, it is very definitely a high level language.
>
> Well, I can use C to steal bits from a pointer. Pretty nice and useful,
> from time to time, so to speak... :^)
>

Fun times! Storing meta data in a pointer, then masking it off before we
actually use the pointer. Undefined behavior for sure, but can it work
and be used in highly beneficial ways, yup.

Re: you think rust may outthrone c?

<u95fge$1ioti$4@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 00:37:50 -0700
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <u95fge$1ioti$4@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8p0kv$h9r$1@matrix.hispagatos.org> <20230713104558.553@kylheku.com>
<u8phd0$3niul$1@dont-email.me> <UpYrM.257503$W7d4.2562@fx18.iad>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<u94don$1c1k4$1@dont-email.me> <u95eqh$1ipij$1@dont-email.me>
<u95f7s$1ioti$2@dont-email.me> <u95fct$1ioti$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jul 2023 07:37:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4968e6fd90b76b2c9a43bd670dd5aa43";
logging-data="1663922"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hUqE+WRQj0GprFqn7xjg/HvodW/Ju5L0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:+6sxMmd9Fjsi8OiEN5c3A/o/mQE=
Content-Language: en-US
In-Reply-To: <u95fct$1ioti$3@dont-email.me>
 by: Chris M. Thomasson - Tue, 18 Jul 2023 07:37 UTC

On 7/18/2023 12:35 AM, Chris M. Thomasson wrote:
> On 7/18/2023 12:33 AM, Chris M. Thomasson wrote:
>> On 7/18/2023 12:26 AM, David Brown wrote:
>>> On 18/07/2023 00:01, Chris M. Thomasson wrote:
>>>> On 7/17/2023 3:01 PM, fir wrote:
>>>>> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
>>>>>>   C is a  high level language.
>>>>>
>>>>> i propose to say c is mid-level language.. i would say its closer
>>>>> to low-lewel than high-level
>>>>
>>>> I tend to agree with that.
>>>>
>>>
>>> I don't know if there is any kind of "official" definition of a
>>> high-level language.  But I think a reasonable choice would be to say
>>> that a low-level language is one that is defined in terms of the
>>> hardware.  Operations in the language do what the hardware says they
>>> will do.  A high-level language is one that is defined independently
>>> of any particular hardware.
>>>
>>> By that definition, C is a high-level language - it is defined in
>>> terms of an abstract machine.  It has some implementation-dependent
>>> factors (as do all languages - though C has perhaps more than most,
>>> and is more explicit about it than most).  But those affect
>>> particular implementations of the language rather than the language
>>> itself.
>>>
>>> Another way to distinguish low and high level languages is to
>>> consider the usage, and suitability of usage, in "low level" or
>>> "systems" coding, close to the hardware, as distinct from more
>>> abstract coding. Python is then "high level", with native support for
>>> infinite precision integers, hash maps, standard libraries for
>>> application-level features, etc.  C is "low level" for supporting
>>> efficient and direct hardware access and systems coding.  But C++
>>> would then be both a low-level /and/ a high-level language.
>>>
>>> I personally think it is more accurate to say that C is a low-level
>>> high-level language, or a high-level language targeting low-level
>>> programming.  A binary low/high classification is not particularly
>>> useful - it is perhaps better to think of a scale, in which a
>>> language like Python would be significantly higher than C.  But as C
>>> would score well above 0 here, it is very definitely a high level
>>> language.
>>
>> Well, I can use C to steal bits from a pointer. Pretty nice and
>> useful, from time to time, so to speak... :^)
>>
>
> Fun times! Storing meta data in a pointer, then masking it off before we
> actually use the pointer. Undefined behavior for sure, but can it work
> and be used in highly beneficial ways, yup.

Actually, they can be used in VERY good ways, pointer tricks. Big time.
One time, I thought of the following song when I first started using the
non-portable trick.

https://youtu.be/s09LuDYX12g

:^)

Re: you think rust may outthrone c?

<u95ggt$1iuls$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 09:55:09 +0200
Organization: A noiseless patient Spider
Lines: 113
Message-ID: <u95ggt$1iuls$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <874jm2tbkt.fsf@nosuchdomain.example.com>
<u94hip$1cdbp$1@dont-email.me> <87lefeukpy.fsf@bsb.me.uk>
<u94pch$1dpd6$1@dont-email.me> <87edl6uf9y.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 18 Jul 2023 07:55:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="450515ec0877b5b354acbe2c68c4ec4d";
logging-data="1669820"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ro22PlDOv1lOiVp6QpTJB0S4dzKGp5ZA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:t9miaVr8IehNFz3mM+EboWkK3zo=
Content-Language: en-GB
In-Reply-To: <87edl6uf9y.fsf@bsb.me.uk>
 by: David Brown - Tue, 18 Jul 2023 07:55 UTC

On 18/07/2023 04:25, Ben Bacarisse wrote:
> Bart <bc@freeuk.com> writes:
>
>> On 18/07/2023 01:28, Ben Bacarisse wrote:
>>> I don't know if anyone comes across comp.lang.c when trying to learn C
>>> anymore, but if they do, a word of warning: Bart's purpose here is
>>> always to obfuscate and confuse; he almost never explains or clarifies.
>>> He want's everyone to find C as mysterious as me (pretends?) he does.
>>>
>>> For example
>>>
>>> Bart <bc@freeuk.com> writes:
>>>
>>>> This is why I said that a program, ostensibly in C, is really in a
>> language
>>>> partly defined by the choice of compile options.
>>>
>>> This is true of almost every programming language I have ever used.
>>> Fortran is defined by ISO standards, but you can write programs that
>>> look very much like ISO Fortran but which are really written in a
>>> language only accepted by some compiler invoked with certain options.
>>> It has always been this way, particularly for large, serious languages
>>> with long histories.
>>
>> OK. But in that case why is C's so-called portability touted so much?
>
> Who touts it? Picking an old version of C, and sticking to the standard
> can result in reasonably portable programs, but the whole notion is
> fraught with misunderstandings and is not easy to define. C is often
> thought of as being very portable because almost every platform has a C
> compiler, but writing highly portable is very hard and few people know
> how to do it well. Does that mean that C is portable or does it mean it
> isn't? The question is not an easy one to answer.
>

It is more accurate, I think, to say that C /supports/ portable
programming, rather than saying that C is a portable language.

The language was designed for two main uses. One was /portable/
application-level programming. The other was /non-portable/
systems-level programming - alleviating developers from having to use
assembly.

It's use has spread far beyond its original designers' imaginations, and
even with those two categories, there is no hard boundary between them.

Typically, programs will consist of a lot of portable code (even if it
was not actually written with portability in mind), and some
non-portable parts. Some projects actively divide code like that with a
view to ease of reuse on different targets, others mix freely. Some
bits of code are written intentionally as very portable, others make
assumptions that limit portability. I think it is fair to say that you
can write a great deal of C /code/ in a portable (or fairly portable)
manner without extra effort or run-time overhead - but you can write few
complete C /programs/ in a highly portable fashion without extra work.

>
>>> For example, when someone posts here, I will compile it with something
>>> like this
>>>
>>> gcc -std=c11 -pedantic -D_ANSI_SOURCE -fno-common \
>>> -fsanitize=undefined -Wbad-function-cast \
>>> -Wstrict-prototypes -Wall -Wextra -Wformat-nonliteral -Wcast-align \
>>> -Winline -Wundef -Wcast-qual -Wshadow -Wconversion -ffloat-store
>>>
>>> so I can see problems as early as possible.
>>
>> So you're using a version of the language defined by those options.

Note (this is primarily for Bart - it's nothing new to Ben) that none of
these flags define the language - they merely ask for warnings on
suspicious code. "-std=c11" /chooses/ which language standard to use,
but does not define it.

gcc does offer options that change the language - you can choose to
support gcc extensions, and you can add additional semantics to C with
options such as "-fwrapv" and "-fno-strict-aliasing". But those are not
in Ben's list.

>
> That's what every compiler ever written does: process a language defined
> by the author(s), the options used and the bugs in the implementation.
> I really don't know what you hope to gain by saying obvious things like
> this other than to (incorrectly) imply that C -- the language -- is not
> defined by it's defining documents -- the ISO standards -- but by
> compiler options.
>

One thing to remember is Bart's comparison here. He is forever
comparing C to his own language - a language that is, in a sense,
constant because there is only one implementation of it. There are no
flags that affect the language, because what might be an optional
feature in another compiler, is for him a fixed change to the language
implemented by changing the compiler source. With only one user, and
only one compiler, there are no options or variations. It is fully
portable - all programs in his language can be compiled by all
implementations. There are no conflicts between language definition
documents and implementations, because there are no documents defining
the language - the language is whatever the implementation does. There
is no scope for alternative interpretation of the definition - with one
user, there is always consensus. There are no flaws in the language -
it works exactly as its users want it to.

Because Bart has primarily used his own language (or languages) for many
decades, he struggles to understand how things work for a language that
has developed over decades, has formal standards, has countless
implementations, countless users, and an enormous quantity of code
written to wildly varying qualities.

Re: you think rust may outthrone c?

<u95h64$1iujj$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 01:06:27 -0700
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <u95h64$1iujj$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u93q47$19p2n$1@dont-email.me> <u93s2l$19vtc$1@dont-email.me>
<u94228$1akkc$2@dont-email.me> <u9445o$1aui5$1@dont-email.me>
<u9449c$1arkn$1@dont-email.me> <u94862$1bc1e$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 18 Jul 2023 08:06:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4968e6fd90b76b2c9a43bd670dd5aa43";
logging-data="1669747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uGUcnWbCybqNcEn6iIgWZGT7WAhXdtXQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:0kgKSEAdxN5gS8yB2l5a74gKiP4=
Content-Language: en-US
In-Reply-To: <u94862$1bc1e$1@dont-email.me>
 by: Chris M. Thomasson - Tue, 18 Jul 2023 08:06 UTC

On 7/17/2023 1:26 PM, Kalevi Kolttonen wrote:
> Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
>> Do you have PIL installed?
>
> [root@hostname ~]# rpm -qa|grep -i python|grep -i pil
> python3-pillow-9.4.0-2.fc38.x86_64
>
> The result of googling:
>
> "What is PIL/Pillow? PIL (Python Imaging Library) adds
> many image processing features to Python. Pillow is a
> fork of PIL that adds some user-friendly features."
>
> It seems to me that Fedora 38 ships with Pillow but
> not PIL.
>
> Anyway, your code worked after inserting a shebang line:
>
> #!/usr/bin/python3

Yup. Python 3 for sure. Shebang lol. Doing it right makes it work:

https://youtu.be/LL-gyhZVvx0

;^D

Re: you think rust may outthrone c?

<u95hid$1j2d9$1@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 10:13:00 +0200
Organization: A noiseless patient Spider
Lines: 105
Message-ID: <u95hid$1j2d9$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<b54f60b1-6db7-4ecc-a1f6-b03c78c291een@googlegroups.com>
<u94eb1$1c2vr$1@dont-email.me> <874jm2tbkt.fsf@nosuchdomain.example.com>
<20230717170507.507@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 18 Jul 2023 08:13:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="450515ec0877b5b354acbe2c68c4ec4d";
logging-data="1673641"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185mf2H3u+hQ2nG8ApOK1JyfllqWR36OBQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:km9DQsW/OB1U5uSIgpMy/5ZrJ+w=
In-Reply-To: <20230717170507.507@kylheku.com>
Content-Language: en-GB
 by: David Brown - Tue, 18 Jul 2023 08:13 UTC

On 18/07/2023 02:14, Kaz Kylheku wrote:
> On 2023-07-17, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>> Bart <bc@freeuk.com> writes:
>> [...]
>>> Half of it seems to be defined by the set of options you give to
>>> compilers like gcc and Clang.
>>>
>>> With one set of options, your program passes. But choose another set,
>>> and it fails, or you have loads of warnings, or the behaviour is
>>> subtly different.
>>>
>>> So much for being portable.
>>
>> gcc and clang have options that cause them to (attempt to) be
>> conforming C compilers, something like "-std=cNN -pedantic", where
>> NN is the edition of the standard you want to conform to.
>>
>> Without those options, gcc and clang are both non-conforming, and
>> of course any program that depends on compiler-specific extensions
>> is not portable.
>>
>> You know all that. You just pretend not to so you can make some point
>> about how much you dislike C. *yawn*
>
> Each compiler option that affects semantics splits the implementation's
> language into two dialects (if the option is Boolean; more if it has
> multiple values).
>
> There is a language standard, but in actual practice, the C world cannot
> agree on a single C language that everyone can like.

The world cannot agree on a type of car that everyone can like. Yet we
manage to drive on the same roads.

Different people need different things for their programming - a certain
degree of variety and option is necessary. But there is also a common
subset - standard C - that can be used by anyone and (baring bugs) on
any compiler.

> One project wants
> wrapping integer arithmetic. Another project deosn't care for that, but
> want to defeat strict aliasing optimizations. Yet another wants char to
> be unsigned.
>

If you want these features, and your implementation (compiler plus flags
plus any other details) guarantees them, fine. Most implementations
can't guarantee these features, so you should not use them. (And if
your code relies on the signedness of "char" in any way, it is broken -
use "signed char" or "unsigned char" if that's what you mean.)

Requirements for the implementation should be part of the documentation
and build information for the code. It is even better if it is in the
code itself - the few pieces of code I have written that benefited from
wrapping signed integer arithmetic had pre-processor checks for GCC, and
a pragma to set the "-fwrapv" flag. And it would be really nice if C
had standardised pragmas to set these commonly requested features (or at
least standardised pre-defined macros to let you check them at compile
time).

> The standard ignores the fact that there exist compiler options and
> those options influence the language dialect, but which sit squarely
> outside of the language syntax, and so don't appear in the translation
> unit

The standard defines a common subset - it is not an implementation.

>
> Everything that changes language semantics should be in the language
> syntax, and standardized.

Disallowing extensions would inhibit innovation and improvement. C is
quite a stable language, but it /has/ changed over the years. And most
significant additions to the C standards since C90 have been based on
extensions found in real-world implementations - that's how the C
standards committee knows the additions are useful and work well in
practice.

>
> The translation unit itself should be able to declare that it
> wants wrapping arithmetic, and over which parts of the code.
>

Agreed - that would be a nice feature. (Implementations would be able
to refuse to compile the code if they don't support wrapping.)

> A standard C in which you have standard-defined optimization controls
> and code generation options in important areas would be a huge
> improvement.
>

There are some cases (such as wrapping signed integer overflow) that are
common enough to benefit from standardisation.

But there are many, many more that are not. Microsoft's C compiler for
x86-64 should not have to support flags or pragmas for gcc's code
generation on AVR microcontrollers. And changes to gcc's AVR port
should not have to wait for a new C standard to be published before
adding a feature to support a new microcontroller.

Re: you think rust may outthrone c?

<u95i7g$1iujj$2@dont-email.me>

  copy mid

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

  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: you think rust may outthrone c?
Date: Tue, 18 Jul 2023 01:24:15 -0700
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <u95i7g$1iujj$2@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u8p0kv$h9r$1@matrix.hispagatos.org> <20230713104558.553@kylheku.com>
<u8phd0$3niul$1@dont-email.me> <UpYrM.257503$W7d4.2562@fx18.iad>
<u8pmt9$3o80g$1@dont-email.me> <u8q0q4$3p89v$1@dont-email.me>
<u8qqpv$3v3pg$1@dont-email.me> <u8r94r$dn9$1@dont-email.me>
<u8rcu9$qd2$1@dont-email.me> <u8rdrf$uca$1@dont-email.me>
<20230714140153.112@kylheku.com> <u8sf33$4nc3$1@dont-email.me>
<u8u3ge$cscl$1@dont-email.me> <87sf9oye05.fsf@nosuchdomain.example.com>
<a189a8ff-5e91-43b7-9601-1f29b6a667bfn@googlegroups.com>
<u90c0s$nr2u$1@dont-email.me>
<0ff5dfe1-de32-4dae-872e-5401a3c04c97n@googlegroups.com>
<u90u5r$pnad$1@dont-email.me> <87sf9niqb6.fsf@bsb.me.uk>
<u923gr$tf08$1@dont-email.me> <u92mms$12tmp$1@dont-email.me>
<5fbef78e-14f8-43c4-afaf-17fa5bad12bdn@googlegroups.com>
<u94don$1c1k4$1@dont-email.me> <u95eqh$1ipij$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jul 2023 08:24:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4968e6fd90b76b2c9a43bd670dd5aa43";
logging-data="1669747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kColVqs7NR30dgDJp++DQf8pmOi4ky6A="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:dH9gmjRO6SLPQEAFx8gkhBy4PcA=
In-Reply-To: <u95eqh$1ipij$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 18 Jul 2023 08:24 UTC

On 7/18/2023 12:26 AM, David Brown wrote:
> On 18/07/2023 00:01, Chris M. Thomasson wrote:
>> On 7/17/2023 3:01 PM, fir wrote:
>>> poniedziałek, 17 lipca 2023 o 08:22:38 UTC+2 David Brown napisał(a):
>>>>   C is a  high level language.
>>>
>>> i propose to say c is mid-level language.. i would say its closer to
>>> low-lewel than high-level
>>
>> I tend to agree with that.
>>
>
> I don't know if there is any kind of "official" definition of a
> high-level language.  But I think a reasonable choice would be to say
> that a low-level language is one that is defined in terms of the
> hardware.  Operations in the language do what the hardware says they
> will do.  A high-level language is one that is defined independently of
> any particular hardware.
>
> By that definition, C is a high-level language - it is defined in terms
> of an abstract machine.  It has some implementation-dependent factors
> (as do all languages - though C has perhaps more than most, and is more
> explicit about it than most).  But those affect particular
> implementations of the language rather than the language itself.
>
> Another way to distinguish low and high level languages is to consider
> the usage, and suitability of usage, in "low level" or "systems" coding,
> close to the hardware, as distinct from more abstract coding.  Python is
> then "high level", with native support for infinite precision integers,
> hash maps, standard libraries for application-level features, etc.  C is
> "low level" for supporting efficient and direct hardware access and
> systems coding.  But C++ would then be both a low-level /and/ a
> high-level language.
>
> I personally think it is more accurate to say that C is a low-level
> high-level language, or a high-level language targeting low-level
> programming.  A binary low/high classification is not particularly
> useful - it is perhaps better to think of a scale, in which a language
> like Python would be significantly higher than C.  But as C would score
> well above 0 here, it is very definitely a high level language.
>

Artificially align memory on a large boundary, then use the extra bits
in the pointers to it.

>
>
>


devel / comp.lang.c / Re: you think rust may outthrone c?

Pages:123456789101112131415161718192021222324252627282930313233343536373839
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor