Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Dennis Ritchie is twice as bright as Steve Jobs, and only half wrong. -- Jim Gettys


devel / comp.lang.c / 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
you think rust may outthrone c?

<ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1aa1:b0:403:ae76:1697 with SMTP id s33-20020a05622a1aa100b00403ae761697mr62739qtc.1.1689171483809;
Wed, 12 Jul 2023 07:18:03 -0700 (PDT)
X-Received: by 2002:a05:6870:76a9:b0:1b0:9596:8931 with SMTP id
dx41-20020a05687076a900b001b095968931mr5858328oab.11.1689171483425; Wed, 12
Jul 2023 07:18:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 12 Jul 2023 07:18:02 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.233; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.233
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
Subject: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Wed, 12 Jul 2023 14:18:03 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fir - Wed, 12 Jul 2023 14:18 UTC

soem people say it possibly it (by some people i mean polish coder ans security enginer gynvael coldwind, but he laso says it rather outthrone c++ coz c++ has so many unresolvable problems thet rust may be cure for them)

as to c i wouldnt like it..but i must say i tried for soem moment learn this rust but looked at this source fragments in wikipedia page on it and resigned...doeas not seem just to sparkle any interest in me..

so i personally doubt... (most of this 'new; languagess adds not so much 'new' walue and if do something they mix it with a soup of worse than c syntax and things..so it adds some piece of new but a t the cost that not justify it imo)

Re: you think rust may outthrone c?

<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@gmail.com (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Thu, 13 Jul 2023 01:37:50 -0400
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Thu, 13 Jul 2023 05:37:51 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="35211440ca4a65ac2351abf6debcfbed";
logging-data="3765217"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vY/X+3YMqmVNKlbw15aqBh5enMU2diUo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:u17FO89Zmx83mZT/uqxZhGai0s8=
Content-Language: en-US
In-Reply-To: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
 by: Blue-Maned_Hawk - Thu, 13 Jul 2023 05:37 UTC


​Ain't nothing gonna dethrone C until a total revolution of the modern
computing ecosystem; in other words, replacing C would require replacing
everything else all at once.
--
⚗︎ | /blu.mɛin.dʰak/ | shortens to "Hawk" | he/him/his/himself/Mr.
bluemanedhawk.github.io
Bitches stole my whole ass ␔🭖᷿᪳𝼗᷍⏧𒒫𐻾ࣛ↉�⃣ quoted-printable, can't
have shit in Thunderbird 😩

Re: you think rust may outthrone c?

<u8obs5$3jpog$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@please.ty (jak)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Thu, 13 Jul 2023 10:16:06 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <u8obs5$3jpog$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 13 Jul 2023 08:16:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1594ba61eafa195c57fa9960eb600e73";
logging-data="3794704"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182vNle6mBxDruQSjwjz8m5"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.16
Cancel-Lock: sha1:muhOItIGEZzhYyj6r7UKDqi35qE=
In-Reply-To: <u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
 by: jak - Thu, 13 Jul 2023 08:16 UTC

Blue-Maned_Hawk ha scritto:
>
> ​Ain't nothing gonna dethrone C until a total revolution of the modern
> computing ecosystem; in other words, replacing C would require replacing
> everything else all at once.

+++

Re: you think rust may outthrone c?

<82a666b0-56ca-4e0f-9a76-522ed6196e21n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:4625:b0:767:f1e8:d2d4 with SMTP id br37-20020a05620a462500b00767f1e8d2d4mr3158qkb.1.1689247641202;
Thu, 13 Jul 2023 04:27:21 -0700 (PDT)
X-Received: by 2002:a05:6808:1206:b0:3a4:2813:db38 with SMTP id
a6-20020a056808120600b003a42813db38mr1619642oil.3.1689247641032; Thu, 13 Jul
2023 04:27:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.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: Thu, 13 Jul 2023 04:27:20 -0700 (PDT)
In-Reply-To: <u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.90; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.90
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com> <u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <82a666b0-56ca-4e0f-9a76-522ed6196e21n@googlegroups.com>
Subject: Re: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 13 Jul 2023 11:27:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2422
 by: fir - Thu, 13 Jul 2023 11:27 UTC

czwartek, 13 lipca 2023 o 07:39:23 UTC+2 Blue-Maned_Hawk napisał(a):
> ​Ain't nothing gonna dethrone C until a total revolution of the modern
> computing ecosystem; in other words, replacing C would require replacing
> everything else all at once.
>
why? i dont get it

systems are in fact based on abi it is a module-conventions (dll on windows) but they are language agnostic, so in fact c dont pass in there

this abi btw probably still need standarisation...for me most sane abi for modules maybe is like that:

contain symbol and enumeration of abi-convention used (which may be many).... the two i find sane
are like that function uuses input static record say

int x,y foo(int x,y,z)
uses 12 bytes static input record and 8 bytes static output record, thiose static records may
lie inside thsi function as its ram or both outside the function and belong to its parent caller..
really what you should pass is 2 pointers (on input or output record) or nothing if im not wrong
- thsi nothing may be better so probably the convention where thiose static records are inside
the foo are better - this is pass nothing convention

Re: you think rust may outthrone c?

<09967841-5b39-4338-9900-1c422b192d4cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:b13:b0:635:de09:2058 with SMTP id u19-20020a0562140b1300b00635de092058mr3743qvj.3.1689249666745;
Thu, 13 Jul 2023 05:01:06 -0700 (PDT)
X-Received: by 2002:a05:6808:1308:b0:3a2:4d1d:2831 with SMTP id
y8-20020a056808130800b003a24d1d2831mr1695848oiv.3.1689249666452; Thu, 13 Jul
2023 05:01:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 13 Jul 2023 05:01:05 -0700 (PDT)
In-Reply-To: <82a666b0-56ca-4e0f-9a76-522ed6196e21n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.90; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.90
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org> <82a666b0-56ca-4e0f-9a76-522ed6196e21n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <09967841-5b39-4338-9900-1c422b192d4cn@googlegroups.com>
Subject: Re: you think rust may outthrone c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 13 Jul 2023 12:01:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fir - Thu, 13 Jul 2023 12:01 UTC

czwartek, 13 lipca 2023 o 13:27:28 UTC+2 fir napisał(a):
> czwartek, 13 lipca 2023 o 07:39:23 UTC+2 Blue-Maned_Hawk napisał(a):
> > ​Ain't nothing gonna dethrone C until a total revolution of the modern
> > computing ecosystem; in other words, replacing C would require replacing
> > everything else all at once.
> >
> why? i dont get it
>
> systems are in fact based on abi it is a module-conventions (dll on windows) but they are language agnostic, so in fact c dont pass in there
>
> this abi btw probably still need standarisation...for me most sane abi for modules maybe is like that:
>
> contain symbol and enumeration of abi-convention used (which may be many).... the two i find sane
> are like that function uuses input static record say
>
> int x,y foo(int x,y,z)
> uses 12 bytes static input record and 8 bytes static output record, thiose static records may
> lie inside thsi function as its ram or both outside the function and belong to its parent caller..
> really what you should pass is 2 pointers (on input or output record) or nothing if im not wrong
> - thsi nothing may be better so probably the convention where thiose static records are inside
> the foo are better - this is pass nothing convention

overally imo this symbol names list should look like this i guess

"symbolname", ENUM_CALL_CONVENTION (int or short ot byte, depending on module format on gven system), {agruments_list} (this argument list in a form of enums like
{ENUM_INT, ENUM_INT, ENUM_FLOAT, ENUM_CHAR_POINTER etc} some special enums probably
would be to make soem notations like ENUM_OUTPUT_ARGS (probably better than using bite flags and OR them with other enums)

structures could be also defined as such list of enums and be puttd in symbol list

Re: you think rust may outthrone c?

<u8p0kv$h9r$1@matrix.hispagatos.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!.POSTED.static-135-116-26-46.ipcom.comunitel.net!not-for-mail
From: rek...@hispagatos.org.invalid (rek2 hispagatos)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Thu, 13 Jul 2023 14:10:39 -0000 (UTC)
Organization: Hispagatos
Message-ID: <u8p0kv$h9r$1@matrix.hispagatos.org>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
Reply-To: ReK2 <rek2@hispagatos.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 13 Jul 2023 14:10:39 -0000 (UTC)
Injection-Info: matrix.hispagatos.org; posting-host="static-135-116-26-46.ipcom.comunitel.net:46.26.116.135";
logging-data="17723"; mail-complaints-to="usenet@matrix.hispagatos.org"
User-Agent: slrn/pre1.0.4-9 (Linux)
 by: rek2 hispagatos - Thu, 13 Jul 2023 14:10 UTC

On 2023-07-13, Blue-Maned_Hawk <bluemanedhawk@gmail.com> wrote:
>
> ​Ain't nothing gonna dethrone C until a total revolution of the modern
> computing ecosystem; in other words, replacing C would require replacing
> everything else all at once.
>

I agree with this, I am a old C programmer that started in the late
80's for the last 10 years I been playing with GO and lately with RUST
but they have a long way to even been able to replace C, why ? C is
everywhere and is still faster. You find C in all network routers,
infrasctructure, kernels, libs, devices, heck Unix and C are brothers
and Unix son Linux and BSD's are still promident all over. Nothing
speaks Unix better than C since they were created for each other,
network protocols and such all tied down to unix and C.
And one can keep on going...

Happy Hacking

--
{gemini,https}://{,rek2.}hispagatos.org
https://hispagatos.space/@rek2

Re: you think rust may outthrone c?

<20230713104558.553@kylheku.com>

  copy mid

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

  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: Thu, 13 Jul 2023 17:51:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <20230713104558.553@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<u8o2jf$3isv1$1@bluemanedhawk.eternal-september.org>
<u8p0kv$h9r$1@matrix.hispagatos.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 13 Jul 2023 17:51:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c3835504eb373dfe47c109465f0860c9";
logging-data="3906396"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+p0wfvOw5P4J5T5l4ojNxjTEnamCgr/fg="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:4oW0Iy+KQbstIShulXUA9/PydpQ=
 by: Kaz Kylheku - Thu, 13 Jul 2023 17:51 UTC

On 2023-07-13, rek2 hispagatos <rek2@hispagatos.org.invalid> wrote:
> On 2023-07-13, Blue-Maned_Hawk <bluemanedhawk@gmail.com> wrote:
>>
>> ​Ain't nothing gonna dethrone C until a total revolution of the modern
>> computing ecosystem; in other words, replacing C would require replacing
>> everything else all at once.
>>
>
> I agree with this, I am a old C programmer that started in the late
> 80's for the last 10 years I been playing with GO and lately with RUST
> but they have a long way to even been able to replace C, why ? C is
> everywhere and is still faster. You find C in all network routers,
> infrasctructure, kernels, libs, devices, heck Unix and C are brothers
> and Unix son Linux and BSD's are still promident all over. Nothing
> speaks Unix better than C since they were created for each other,
> network protocols and such all tied down to unix and C.
> And one can keep on going...

The rabid fanatics of newer programming languages overemphasize C
reliability issues. There is an ocean of C code running out there, yet
the sky isn't falling.

C is easy to work in. You form a picture in your mind of how you want
the memory to be shaped and manipulated, and then just describe that in
the most obvious C.

You don't have to deal with someone's incomphrehensible opinions about
why you shouldn't do what you want, but instead do something else
(that something else being a puzzle for you to figure out, one
compiler diagnostic at a time).

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

<u8phd0$3niul$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Thu, 13 Jul 2023 18:56:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Sender: <untosten@0.0.0.0>
Message-ID: <u8phd0$3niul$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>
Injection-Date: Thu, 13 Jul 2023 18:56:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="588101a2678d6794da10a9c0c26650f9";
logging-data="3918805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/A6jExr8FyNPCuhJscjxWK6yIdp8KrKvA="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.3.11-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:n1oLI68XPS/Yk8YEbVjsBmL2APM=
 by: Kalevi Kolttonen - Thu, 13 Jul 2023 18:56 UTC

Kaz Kylheku <864-117-4973@kylheku.com> wrote:
> C is easy to work in. You form a picture in your mind of how you want
> the memory to be shaped and manipulated, and then just describe that in
> the most obvious C.

I cannot agree with that claim. C is a very
dangerous language and some people have likened
it to using a chainsaw: It is highly efficient
provided that you know how to use it properly, but
you can cut your leg off if you are ignorant or
careless.

Luckily modern C compilers can help a lot when
all warnings are enabled.

C allows you to write code that may work as
intended, but relies on undefined behaviour.
It can be a nightmare.

Many years ago, K&R book said that C is a small
language and it is best served by a small book.

Since those times, many things have changed. In
order to use C in the real world, you have to be
familiar with C standards like ISO and POSIX/SUS.

br,
KK

Re: you think rust may outthrone c?

<UpYrM.257503$W7d4.2562@fx18.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: you think rust may outthrone c?
Newsgroups: comp.lang.c
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>
Lines: 26
Message-ID: <UpYrM.257503$W7d4.2562@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 13 Jul 2023 19:39:32 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 13 Jul 2023 19:39:32 GMT
X-Received-Bytes: 1682
 by: Scott Lurndal - Thu, 13 Jul 2023 19:39 UTC

kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
>Kaz Kylheku <864-117-4973@kylheku.com> wrote:
>> C is easy to work in. You form a picture in your mind of how you want
>> the memory to be shaped and manipulated, and then just describe that in
>> the most obvious C.
>
>I cannot agree with that claim. C is a very
>dangerous language

Hyperbole, to be sure.

> and some people have likened
>it to using a chainsaw: It is highly efficient
>provided that you know how to use it properly, but
>you can cut your leg off if you are ignorant or
>careless.

Which anecdote doesn't actually mean anything. Just
like most professional chainsaw users are very productive
and modern saws have a plethora of safety features,
so most C programmers are very productive and produce
productive code. There are exceptions of course, but
both tools continue to be useful regardless of the fact
that they can be improperly used.

Re: you think rust may outthrone c?

<u8pmt9$3o80g$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Thu, 13 Jul 2023 20:30:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 50
Sender: <untosten@0.0.0.0>
Message-ID: <u8pmt9$3o80g$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>
Injection-Date: Thu, 13 Jul 2023 20:30:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="588101a2678d6794da10a9c0c26650f9";
logging-data="3940368"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KbyLTG1F3FTpQIAVIeXtPndXgNrjxun4="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.3.11-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:qCfGAWONbtG9WXZMI4T2MaXCyqk=
 by: Kalevi Kolttonen - Thu, 13 Jul 2023 20:30 UTC

Scott Lurndal <scott@slp53.sl.home> wrote:
> Which anecdote doesn't actually mean anything.

It does have a ring of truth in it.

> Just like most professional chainsaw users are very productive
> and modern saws have a plethora of safety features,
> so most C programmers are very productive and produce
> productive code. There are exceptions of course, but
> both tools continue to be useful regardless of the fact
> that they can be improperly used.

To be clear, I am not against the use of C. It is one
of the first programming languages I have learned and
I am confident enough to do *something* with C. But
it is quite a demanding language for most people.

On comp.lang.c, day after day, I still come across
very difficult C questions concerning unusual
corner cases or something like that. To use C
in a safe way, you have to memorize lots of
rules that the C standards dictate. If you don't,
you might invoke undefined behaviour and be
screwed.

Writing portable C code can also be challenging
as it also requires lots of knowledge about
C standards. I am not saying it cannot be done,
just that it is not easy.

With languages like Python or Java, you don't have
to manually take care of memory management, or worry
about corrupting memory with incorrect pointer
usage. Portability is not difficult to achieve,
either. They are much safer and easier to use
than C.

The only language that I consider more dangerous
than C is assembly. And raw machine code in case
someone still likes to use just numbers to express
their ideas. My former colleague did that with
8-bit ORIC-1 back in the 1980s.

Hmmm. I probably have to say that C++ is more
dangerous than C as well. That language is so
bloated and full of features that who can
know what is all right and what causes UB?

br,
KK

Re: you think rust may outthrone c?

<20230713151553.573@kylheku.com>

  copy mid

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

  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: Thu, 13 Jul 2023 22:29:41 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 111
Message-ID: <20230713151553.573@kylheku.com>
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>
Injection-Date: Thu, 13 Jul 2023 22:29:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="11930d4b9116140760b34e67a40ec333";
logging-data="3967213"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6HNdjGw7BE4Fn9tTRdztTUngq7mkN71A="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:ENbn7e2u9V1IG/WV599JBSOhF9k=
 by: Kaz Kylheku - Thu, 13 Jul 2023 22:29 UTC

On 2023-07-13, Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
> Scott Lurndal <scott@slp53.sl.home> wrote:
>> Which anecdote doesn't actually mean anything.
>
> It does have a ring of truth in it.
>
>> Just like most professional chainsaw users are very productive
>> and modern saws have a plethora of safety features,
>> so most C programmers are very productive and produce
>> productive code. There are exceptions of course, but
>> both tools continue to be useful regardless of the fact
>> that they can be improperly used.
>
> To be clear, I am not against the use of C. It is one
> of the first programming languages I have learned and
> I am confident enough to do *something* with C. But
> it is quite a demanding language for most people.
>
> On comp.lang.c, day after day, I still come across
> very difficult C questions concerning unusual
> corner cases or something like that. To use C
> in a safe way, you have to memorize lots of
> rules that the C standards dictate. If you don't,
> you might invoke undefined behaviour and be
> screwed.
>
> Writing portable C code can also be challenging
> as it also requires lots of knowledge about
> C standards. I am not saying it cannot be done,
> just that it is not easy.

Most people don't need to write absolutely portable C code. Just
portable enough.

Most programmers who believe who are writing portable C, with
demonstrated success, probably don't know that pointers don't all have
to be the same size.

A rigrous unit test and integration test suite will go a long
way toward flushing out actual portability problems; just not
ISO C academic ones.

> With languages like Python or Java, you don't have
> to manually take care of memory management, or worry
> about corrupting memory with incorrect pointer
> usage. Portability is not difficult to achieve,
> either. They are much safer and easier to use
> than C.

If we crack open the internals of Python, we can easily find grotty C
code that is not absolutely portable.

I doub that CPython would run on a machine where sizeof (char *) and
sizeof (struct foo *) are different.

> The only language that I consider more dangerous
> than C is assembly. And raw machine code in case
> someone still likes to use just numbers to express
> their ideas. My former colleague did that with
> 8-bit ORIC-1 back in the 1980s.

But assembly is also less dangerous because instruction sets for
machines tend to have way less undefined behavior (if any).

In many assembly languages, you can add two signed numbers and check for
overflow very easily, either by checking a flag, or handling some
processor exception.

Evaluation orders are carefully specified, so that programs for the
oldest members of an architectural family work unmodified on newer
members, whose cores do a lot more stuff in parallel.

Processors optimize code dynamically, in a way that preserves the
instruction-by instruction interpretation of their effects.

(There may be exceptions for that, but as a generalization it
is broadly true.)

All the situations in which undefined behavior turns into a predictable
crash like SIGFPE, SIGBUS or SIGSEGV are courtesy of the hardware being
better defined and safer than C.

It's the instruction set that protects kernels from user spaces, and
user spaces from each other, so that C programs can go rampant.

> Hmmm. I probably have to say that C++ is more
> dangerous than C as well. That language is so
> bloated and full of features that who can
> know what is all right and what causes UB?

The thing about C++ is that if you are an expert solo developer (or
small team) doing a completely greenfield project, you can choose C++
features that make programming utterly safe.

Instead of "int", you can write some integer class that throws
exceptions on overflow, and is almost as convenient to use as the native
int.

You can use safely bounded arrays, reference counted strings (such
things being in the standard library).

Smart pointers to prevent leaks and use-after-free errors;
RAII to ensure locks are unlocked ...

If you have to inherit legacy C++ code written and maintained by
generations of random goofballs, all bets are off.

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

<u8q0q4$3p89v$1@dont-email.me>

  copy mid

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

  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: Fri, 14 Jul 2023 00:19:33 +0100
Organization: A noiseless patient Spider
Lines: 93
Message-ID: <u8q0q4$3p89v$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 13 Jul 2023 23:19:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="facad4e9cf48680b34c1c577365fcdbc";
logging-data="3973439"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4eNwiPnCXKftDaHnEfolAdETA8W8mLBw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:rQ5XLK5Ip9be7jR7ix8VRtG0/nM=
In-Reply-To: <u8pmt9$3o80g$1@dont-email.me>
 by: Bart - Thu, 13 Jul 2023 23:19 UTC

On 13/07/2023 21:30, Kalevi Kolttonen wrote:
> Scott Lurndal <scott@slp53.sl.home> wrote:
>> Which anecdote doesn't actually mean anything.
>
> It does have a ring of truth in it.
>
>> Just like most professional chainsaw users are very productive
>> and modern saws have a plethora of safety features,
>> so most C programmers are very productive and produce
>> productive code. There are exceptions of course, but
>> both tools continue to be useful regardless of the fact
>> that they can be improperly used.
>
> To be clear, I am not against the use of C. It is one
> of the first programming languages I have learned and
> I am confident enough to do *something* with C. But
> it is quite a demanding language for most people.
>
> On comp.lang.c, day after day, I still come across
> very difficult C questions concerning unusual
> corner cases or something like that. To use C
> in a safe way, you have to memorize lots of
> rules that the C standards dictate. If you don't,
> you might invoke undefined behaviour and be
> screwed.

So the answer is to do constant battle with the Rust Borrow Checker?

Which I understand doesn't guarantee it will solve all memory problems,
while to do useful things you need to switch to Unsafe mode, the mode
that C operates in.

Or maybe there's Zig. That's got its own problem: until 2019, it refused
to accept source files with CRLF line endings (deliberately spiting MS),
and it still doesn't support hard tabs, only spaces for identation.

So you're already doing battle with it just to write source code!

Then apparently it doesn't have a for-loop to do a simple iteration. And
printing something out involves code like this:

const std = @import("std");

try std.io.getStdOut().writer().print("Hello, {s}!\n", .{"world"});

The C equivalent is:

#include <stdio.h>

printf("Hello, %s\n", "world");

And I thought `printf` was fiddly enough!

There is a huge amount that can be improved in C without radically
changing the kind of language it is, its complexity, level, or size
(this is what I've spent a lot of time doing, privately).

But these new languages try too hard, and are too ambitious.

> Writing portable C code can also be challenging
> as it also requires lots of knowledge about
> C standards. I am not saying it cannot be done,
> just that it is not easy.

Portable C is a myth. Even C you wrote 5 minutes ago might not work,
even on the exact same machine and OS, if someone uses a different set
of compiler options.

However C will work on unusual architectures, even if the program you
write is not so portable, while Rust likely won't work at all since it's
designed for desktop-class processors, like most other alternatives.

> With languages like Python or Java, you don't have
> to manually take care of memory management, or worry
> about corrupting memory with incorrect pointer
> usage. Portability is not difficult to achieve,
> either. They are much safer and easier to use
> than C.

Python is a different class of language for different applications.
CPython is also implemented in C; you'd have trouble implementing it in
itself. (Do people think CPython is unsafe because it's written in C?)

(I don't know Java. Does it really take care of memory management?)

> The only language that I consider more dangerous
> than C is assembly.

If the only choice I had to write a program was Rust, C or assembly, I
would choose C first. If that wasn't available, I would choose assembly
over Rust (and use that to write a simple HLL first then use that to
write the program).

Re: you think rust may outthrone c?

<u8qqpv$3v3pg$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Fri, 14 Jul 2023 06:43:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 84
Sender: <untosten@0.0.0.0>
Message-ID: <u8qqpv$3v3pg$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>
Injection-Date: Fri, 14 Jul 2023 06:43:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c222fe64990f4521cd1777af39dfbc31";
logging-data="4165424"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sxWc82lyNr0tqnzZK/peJEiuHyhaZfg8="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.3.12-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:I744CnZZquvavzd4ekqAlKJky2M=
 by: Kalevi Kolttonen - Fri, 14 Jul 2023 06:43 UTC

Bart <bc@freeuk.com> wrote:
> On 13/07/2023 21:30, Kalevi Kolttonen wrote:
> So the answer is to do constant battle with the Rust Borrow Checker?

I make no recommendations. I just observed the fact that
in order to write safe C code, you need considerable amount
of knowledge about the C standards in order to avoid the
pitfalls.

I am sure Kaz and Scott are very talented programmers and
they probably have many years of experience with C, so the
language is indeed easy for them.

When Rust came out, I read about its features and selling points,
but I never bothered to write any Rust code. I don't remember
that much anymore, but I guess Rust compilers are able to do
some additional checking compared to C compilers, and this is
due to the fact that Rust language is different than C.

Some people have suggested that Linux kernel modules should
be allowed to be written in Rust, too. I do not know whether
that suggestion was ever accepted by the Linux kernel developers.

> Portable C is a myth. Even C you wrote 5 minutes ago might not work,
> even on the exact same machine and OS, if someone uses a different set
> of compiler options.

No. Lots of C programs are quite portable. That includes e.g. Linux
kernel, BSD kernels, PostgreSQL, Apache, Postfix, and many,
many other Unix daemons. PostgreSQL runs not only on Unix
but even on Windows. Possibly OpenLDAP does, too.

The kernels of course require a certain amount of assembly tweaking
for new CPU architectures, but the huge majority of the codebase
is C. Well, I have to admit the Linux kernel's C code uses some
GNU extensions and may require GCC to compile.

>> With languages like Python or Java, you don't have
>> to manually take care of memory management, or worry
>> about corrupting memory with incorrect pointer
>> usage. Portability is not difficult to achieve,
>> either. They are much safer and easier to use
>> than C.
>
> Python is a different class of language for different applications.

Yes, agreed, but I only compared safety and difficulty to use.

However, I have heard that Python can be very fast. They do some
serious number crunching with it.

> CPython is also implemented in C; you'd have trouble implementing it in
> itself. (Do people think CPython is unsafe because it's written in C?)

I know nothing about that.

> (I don't know Java. Does it really take care of memory management?)

Yes, it has automatic garbage collection. Those who have started
programming using Java can have considerable difficulties with
manual memory management in C. They are not used to it at all.

>> The only language that I consider more dangerous
>> than C is assembly.
>
> If the only choice I had to write a program was Rust, C or assembly, I
> would choose C first. If that wasn't available, I would choose assembly
> over Rust (and use that to write a simple HLL first then use that to
> write the program).

Well, I understand what you are saying, but your point misses
the mark.

Saying that you would use assembly to create a HLL first
and then use that HLL is equivalent to saying: I would use C first
to implement Python and then I would write in Python. Yes, you
could do that, but in that case you wouldn't be writing your
program in C any longer, but you would write it in Python.

It is well-known that you can use assembly or C to implement
*any* programming language, but that was not discussed here now.

br,
KK

Re: you think rust may outthrone c?

<u8qtnb$3vbmm$1@dont-email.me>

  copy mid

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

  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: Fri, 14 Jul 2023 09:32:58 +0200
Organization: A noiseless patient Spider
Lines: 118
Message-ID: <u8qtnb$3vbmm$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 14 Jul 2023 07:32:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b6c45f79885c516f8f214e1c69339975";
logging-data="4173526"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1970yJ1hUbaR2evl+b/6sfsxq0iQmhMUMs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:IMi8dXtwNLjxeeXM32cBcVMnvpI=
Content-Language: en-GB
In-Reply-To: <u8pmt9$3o80g$1@dont-email.me>
 by: David Brown - Fri, 14 Jul 2023 07:32 UTC

On 13/07/2023 22:30, Kalevi Kolttonen wrote:
> Scott Lurndal <scott@slp53.sl.home> wrote:
>> Which anecdote doesn't actually mean anything.
>
> It does have a ring of truth in it.
>
>> Just like most professional chainsaw users are very productive
>> and modern saws have a plethora of safety features,
>> so most C programmers are very productive and produce
>> productive code. There are exceptions of course, but
>> both tools continue to be useful regardless of the fact
>> that they can be improperly used.

Any tool that can be used, can be abused. And the more powerful the
tool, the more scope for damage if you don't use it properly. This is
especially true if you want an efficient language.

>
> To be clear, I am not against the use of C. It is one
> of the first programming languages I have learned and
> I am confident enough to do *something* with C. But
> it is quite a demanding language for most people.
>
> On comp.lang.c, day after day, I still come across
> very difficult C questions concerning unusual
> corner cases or something like that. To use C
> in a safe way, you have to memorize lots of
> rules that the C standards dictate. If you don't,
> you might invoke undefined behaviour and be
> screwed.

No, you don't actually have to memorize lots of rules - you need to know
a few, then write code sensibly. You can get on fine with C without
ever knowing the precedence of && and <<, or how signed integer overflow
works (or doesn't work), or which formats for function declarations are
compatible with each other. You write clear, sensible code that is
easily read by humans. You avoid unnecessarily complicated expressions,
and use brackets to make things clearer. You do one thing at a time,
step by step. You think about your calculations and use types that are
big enough.

/Some/ people need to know all the rules. That includes:

1. Pedants on comp.lang.c and other forums ("pendant" is not an insult -
it's a badge of honour for those that help others with their awkward
questions).

2. People working on C tools.

3. Smart-arses who think it is cool to make code as compact as humanly
possible.

4. People who have to understand code written by smart-arses.

5. People who really need to squeeze that absolute maximum out of their
code, or are writing very specialised low-level code.

Of course you have to know the basics, and you may have to know more
details in some aspects of the language and standard library if your
programming tasks require it. But the idea that every C programmer must
memorize the C standards or face nasal demons is simply not credible.

>
> Writing portable C code can also be challenging
> as it also requires lots of knowledge about
> C standards. I am not saying it cannot be done,
> just that it is not easy.

Few people need to write C code that is significantly portable. Writing
code that works across similar targets is easy, but almost no one (as a
fraction of C programmers) has to write code that works on targets with
16-bit chars, or with ones' complement signed integers, or any of the
other oddities that challenge extreme portability.

>
> With languages like Python or Java, you don't have
> to manually take care of memory management, or worry
> about corrupting memory with incorrect pointer
> usage. Portability is not difficult to achieve,
> either. They are much safer and easier to use
> than C.
>

Different languages are good for different purposes. It makes no sense
to compare Python and C and say which is "easier" - it's like comparing
a lorry and a motorcycle. They do different things.

Of course, if you are working on a program that is a good fit for
Python, it will be much harder to write it in C - and vice versa.

It is fair to say, however, that some languages make it easier to make
mistakes than others, and some have better tools than others to help
developers. Python has a bit more help built in (though you can make
all kinds of mistakes with it - they are just different mistakes than
you make with C). For C, you do need to know more about how to use your
tools - and some C programmers don't.

> The only language that I consider more dangerous
> than C is assembly. And raw machine code in case
> someone still likes to use just numbers to express
> their ideas. My former colleague did that with
> 8-bit ORIC-1 back in the 1980s.
>
> Hmmm. I probably have to say that C++ is more
> dangerous than C as well. That language is so
> bloated and full of features that who can
> know what is all right and what causes UB?
>

Many people happily use C++ to write very good code. But as Spiderman
says, with great power comes great responsibility. You can write
marvellous things in C++, but there's plenty of scope for writing train
wrecks.

Re: you think rust may outthrone c?

<u8qv7a$3vfb2$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Fri, 14 Jul 2023 07:58:34 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Sender: <untosten@0.0.0.0>
Message-ID: <u8qv7a$3vfb2$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> <u8qtnb$3vbmm$1@dont-email.me>
Injection-Date: Fri, 14 Jul 2023 07:58:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c222fe64990f4521cd1777af39dfbc31";
logging-data="4177250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/s5fBv5HR9aLKxwL+tlHk1jJq1QNVNzqE="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.3.12-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:sAP8628fOR6Bo+jVBdWGxd46Plo=
 by: Kalevi Kolttonen - Fri, 14 Jul 2023 07:58 UTC

David Brown <david.brown@hesbynett.no> wrote:
> Many people happily use C++ to write very good code. But as Spiderman
> says, with great power comes great responsibility. You can write
> marvellous things in C++, but there's plenty of scope for writing train
> wrecks.

I have heard that C++ projects must usually limit their
use of C++ features to some subset because the whole
language is simply too big to comprehend. If you allowed
all features to be used, then it would be likely that
not all programmers in the team could understand the
code.

I wonder are there *any* languages you would call
dangerous, or do you consider all of them as equals,
provided that the programmers know what they are
doing?

br,
KK

OT Re: you think rust may outthrone c?

<u8r0gv$3vj4i$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@please.ty (jak)
Newsgroups: comp.lang.c
Subject: OT Re: you think rust may outthrone c?
Date: Fri, 14 Jul 2023 10:20:46 +0200
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <u8r0gv$3vj4i$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> <u8qtnb$3vbmm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 14 Jul 2023 08:20:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4784561919f6664fd3d8b38ed0fb1f74";
logging-data="4181138"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/jemb4287YpWrCvoDPmIV"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.16
Cancel-Lock: sha1:mT4T86JiRtHsySmH7DlvIM7NOAM=
In-Reply-To: <u8qtnb$3vbmm$1@dont-email.me>
 by: jak - Fri, 14 Jul 2023 08:20 UTC

>
> Many people happily use C++ to write very good code.  But as Spiderman
> says, with great power comes great responsibility.  You can write
> marvellous things in C++, but there's plenty of scope for writing train
> wrecks.
>
>

Apart from that it was extracted from the concept of the sword of
Damocle, it was the uncle Ben who said this to Peter Parker (Spiderman).

Re: you think rust may outthrone c?

<u8r94r$dn9$1@dont-email.me>

  copy mid

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

  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: Fri, 14 Jul 2023 11:47:56 +0100
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <u8r94r$dn9$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 14 Jul 2023 10:47:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="facad4e9cf48680b34c1c577365fcdbc";
logging-data="14057"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ABOYQejS570bYXUbg3TwtLkXQyzG8scA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:TDNihcIe+ugjlVqZqFGJVMcNqhk=
In-Reply-To: <u8qqpv$3v3pg$1@dont-email.me>
 by: Bart - Fri, 14 Jul 2023 10:47 UTC

On 14/07/2023 07:43, Kalevi Kolttonen wrote:
> Bart <bc@freeuk.com> wrote:
>> On 13/07/2023 21:30, Kalevi Kolttonen wrote:

> When Rust came out, I read about its features and selling points,
> but I never bothered to write any Rust code. I don't remember
> that much anymore, but I guess Rust compilers are able to do
> some additional checking compared to C compilers, and this is
> due to the fact that Rust language is different than C.

So what do you you use to code in? I'm guessing Python and/or Java.

> Some people have suggested that Linux kernel modules should
> be allowed to be written in Rust, too. I do not know whether
> that suggestion was ever accepted by the Linux kernel developers.
>
>> Portable C is a myth. Even C you wrote 5 minutes ago might not work,
>> even on the exact same machine and OS, if someone uses a different set
>> of compiler options.
>
> No. Lots of C programs are quite portable. That includes e.g. Linux
> kernel,

The Linux kernel is at least 26 million lines of code. It's not all
found in the same machine! There are lots of different files for
different hardware.

So a driver for one device will be different from that for another: you
write dedicated C code for each, so portability is not needed.

>> Python is a different class of language for different applications.
>
> Yes, agreed, but I only compared safety and difficulty to use.
>
> However, I have heard that Python can be very fast. They do some
> serious number crunching with it.

With Numpy? I believe that is a library written in unsafe C, that's why
it's fast.

>> CPython is also implemented in C; you'd have trouble implementing it in
>> itself. (Do people think CPython is unsafe because it's written in C?)
>
> I know nothing about that.
> It is well-known that you can use assembly or C to implement
> *any* programming language, but that was not discussed here now.

You're agreeing that you can use unsafe C to create a safe language. So
why not a safe application?

Re: you think rust may outthrone c?

<u8r9la$fik$1@dont-email.me>

  copy mid

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

  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: Fri, 14 Jul 2023 12:56:42 +0200
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <u8r9la$fik$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> <u8qtnb$3vbmm$1@dont-email.me>
<u8qv7a$3vfb2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 14 Jul 2023 10:56:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b6c45f79885c516f8f214e1c69339975";
logging-data="15956"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uY5TLvwMNIFqnIIYoqLQ8dvk/hEMNDk0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:nR83WCQh39ZDmY141c/ebbAZQtE=
Content-Language: en-GB
In-Reply-To: <u8qv7a$3vfb2$1@dont-email.me>
 by: David Brown - Fri, 14 Jul 2023 10:56 UTC

On 14/07/2023 09:58, Kalevi Kolttonen wrote:
> David Brown <david.brown@hesbynett.no> wrote:
>> Many people happily use C++ to write very good code. But as Spiderman
>> says, with great power comes great responsibility. You can write
>> marvellous things in C++, but there's plenty of scope for writing train
>> wrecks.
>
> I have heard that C++ projects must usually limit their
> use of C++ features to some subset because the whole
> language is simply too big to comprehend. If you allowed
> all features to be used, then it would be likely that
> not all programmers in the team could understand the
> code.
>

I have never heard of a (real) general-purpose language in which anybody
uses the whole language. And certainly you always use a subset of the
language - that is what is called a "coding standard". You might not be
using a formal written standard, but you will be using one - a project
style, a company standard, personal habits. Maybe your standard for C
says "never use the comma operator", or "do not use goto", or "put all
your #include's at the head of the file". There are countless ways in
which you limit the way you write code in any language used for real work.

So the question is really a matter of extent - do people restrict
themselves /more/ for C++ than for other languages?

I think for many languages, people and projects restrict themselves a
great deal, but perhaps don't think about it. How many Python
programmers understand metaclasses? How many use slots in their
classes? If you add the standard library for languages, how many Python
or Java programmers are familiar and confident with more than a few
percent of their standard libraries?

But it is not unfair to say that you have to be more restrictive with
C++ than with C. For one thing, it is a /much/ bigger language than C,
and it is highly unlikely that everyone in a team will be familiar with
the whole language, never mind the standard library. You also have
significant differences between versions, and any given project has to
pick a standard (say, C++17). And there's no doubt that some aspects of
C++ programming give a lot of scope for confusion, more than in the
smaller and simpler C.

> I wonder are there *any* languages you would call
> dangerous, or do you consider all of them as equals,
> provided that the programmers know what they are
> doing?
>

Of course there are. I agree that assembly is pretty dangerous!

I think any general-purpose language that can be used for serious work
can be "dangerous" when used incorrectly, or without sufficient
knowledge. But I think it is primarily the way people use languages
that makes them dangerous, not the languages themselves. I don't
believe, for example, that C is inherently dangerous and Rust inherently
safer - not even for memory safety. But I think that the people who
write new versions of old C code in Rust at the moment do so with safety
and correctness more in focus than the people that wrote old code in
the first place, and they use better tools for it. I believe that these
same people could write equally safe versions in C if they wanted.

More advanced or higher level languages can free you from possible
mistakes, but they always give you new ways to make other sorts of errors.

Re: you think rust may outthrone c?

<u8ra47$hl8$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Fri, 14 Jul 2023 11:04:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 73
Sender: <untosten@0.0.0.0>
Message-ID: <u8ra47$hl8$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>
Injection-Date: Fri, 14 Jul 2023 11:04:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c222fe64990f4521cd1777af39dfbc31";
logging-data="18088"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bWhbdSsK0C6m9qIcU2KCkTtkK8wmbLKw="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.3.12-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:sybfr/iWFURni0wdmCzte37iNI0=
 by: Kalevi Kolttonen - Fri, 14 Jul 2023 11:04 UTC

Bart <bc@freeuk.com> wrote:
> So what do you you use to code in? I'm guessing Python
> and/or Java.

Bash, AWK, Python, C. My University courses had to be
completed using Java, but that was over 20 years ago.

>> Some people have suggested that Linux kernel modules should
>> be allowed to be written in Rust, too. I do not know whether
>> that suggestion was ever accepted by the Linux kernel developers.
>>
>>> Portable C is a myth. Even C you wrote 5 minutes ago might not work,
>>> even on the exact same machine and OS, if someone uses a different set
>>> of compiler options.
>>
>> No. Lots of C programs are quite portable. That includes e.g. Linux
>> kernel,
>
> The Linux kernel is at least 26 million lines of code. It's not all
> found in the same machine! There are lots of different files for
> different hardware.

As far as I know, the "different files" are mostly CPU architecture
speficic assembly code. I could be wrong, though. Maybe you can offer
some proof?

> So a driver for one device will be different from that for another: you
> write dedicated C code for each, so portability is not needed.

Ummm...What? I just don't get it. Of course you write dedicated
code for different devices. What does that have to do with portability?

>>> Python is a different class of language for different applications.
>>
>> Yes, agreed, but I only compared safety and difficulty to use.
>>
>> However, I have heard that Python can be very fast. They do some
>> serious number crunching with it.
>
> With Numpy? I believe that is a library written in unsafe C, that's why
> it's fast.

Probably. All I know is that even phycists can use Python for their
demanding simulation tasks.

It seems to me that some folks are almost offended if C is criticized
in any way. I have no problem admitting that C is not a safe language.

>>> CPython is also implemented in C; you'd have trouble implementing it in
>>> itself. (Do people think CPython is unsafe because it's written in C?)
>>
>> I know nothing about that.
>> It is well-known that you can use assembly or C to implement
>> *any* programming language, but that was not discussed here now.
>
> You're agreeing that you can use unsafe C to create a safe language. So
> why not a safe application?

I never said C cannot be used for creating safe applications.

You are missing the entire point.

Look, if you say: I prefer to write in assembly, then do so. Write
in assembly by all means.

But do not *twist the argument* by saying that you prefer assembly, and
then immediately ditch your assembly preference by saying you would use
it to create a HLL. If you use assembly to create an entirely different
language, then you automatically admit that your preference is the newly
*HLL*, not assembly. This should be pretty obvious.

br,
KK

Yeah, C is harder than many programming languages. Your point? (Was: you think rust may outthrone c?)

<u8rb8h$28204$1@news.xmission.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Yeah, C is harder than many programming languages. Your point? (Was: you think rust may outthrone c?)
Date: Fri, 14 Jul 2023 11:24:01 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u8rb8h$28204$1@news.xmission.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>
Injection-Date: Fri, 14 Jul 2023 11:24:01 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2361348"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Fri, 14 Jul 2023 11:24 UTC

In article <u8qqpv$3v3pg$1@dont-email.me>,
Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
....
>> (I don't know Java. Does it really take care of memory management?)
>
>Yes, it has automatic garbage collection. Those who have started
>programming using Java can have considerable difficulties with
>manual memory management in C. They are not used to it at all.

Much the same could be said about people who start out programming Excel
macros. When they start programming in C, they find it very strange that
you have to do memory management at all.

--
This is the GOP's problem. When you're at the beginning of the year
and you've got nine Democrats running for the nomination, maybe one or
two of them are Dennis Kucinich. When you have nine Republicans, seven
or eight of them are Michelle Bachmann.

Re: Yeah, C is harder than many programming languages. Your point?

<u8rbk9$lv9$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: Yeah, C is harder than many programming languages. Your point?
Date: Fri, 14 Jul 2023 11:30:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Sender: <untosten@0.0.0.0>
Message-ID: <u8rbk9$lv9$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> <u8rb8h$28204$1@news.xmission.com>
Injection-Date: Fri, 14 Jul 2023 11:30:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c222fe64990f4521cd1777af39dfbc31";
logging-data="22505"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/njanEt3bwfs/7h1EmpkUQcdE2uoTPub4="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.3.12-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:9WzQEizEGWeHejbY2RoW5kYh9Vg=
 by: Kalevi Kolttonen - Fri, 14 Jul 2023 11:30 UTC

Kenny McCormack <gazelle@shell.xmission.com> wrote:
> In article <u8qqpv$3v3pg$1@dont-email.me>,
> Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
> ...
>>> (I don't know Java. Does it really take care of memory management?)
>>
>>Yes, it has automatic garbage collection. Those who have started
>>programming using Java can have considerable difficulties with
>>manual memory management in C. They are not used to it at all.
>
> Much the same could be said about people who start out programming Excel
> macros. When they start programming in C, they find it very strange that
> you have to do memory management at all.

You are quite right. The point is that manual memory management
is an additional burden to the programmer.

Creating serious memory leaks is one of the dangerous possibilities
when coding in C. That danger can be avoided altogether when writing
in e.g. Java.

br,
KK

Re: you think rust may outthrone c?

<u8rcu9$qd2$1@dont-email.me>

  copy mid

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

  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: Fri, 14 Jul 2023 13:52:41 +0200
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <u8rcu9$qd2$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 14 Jul 2023 11:52:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b6c45f79885c516f8f214e1c69339975";
logging-data="27042"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Oax0V7LGpqYCXX1Ix56BQL+CfexZH5ek="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:AAVvqLveTiqrb5jlmERFZzcDa5g=
Content-Language: en-GB
In-Reply-To: <u8r94r$dn9$1@dont-email.me>
 by: David Brown - Fri, 14 Jul 2023 11:52 UTC

On 14/07/2023 12:47, Bart wrote:
> On 14/07/2023 07:43, Kalevi Kolttonen wrote:
> > Bart <bc@freeuk.com> wrote:
> >> On 13/07/2023 21:30, Kalevi Kolttonen wrote:
>
>
> > When Rust came out, I read about its features and selling points,
> > but I never bothered to write any Rust code. I don't remember
> > that much anymore, but I guess Rust compilers are able to do
> > some additional checking compared to C compilers, and this is
> > due to the fact that Rust language is different than C.
>
> So what do you you use to code in? I'm guessing Python and/or Java.
>
> > Some people have suggested that Linux kernel modules should
> > be allowed to be written in Rust, too. I do not know whether
> > that suggestion was ever accepted by the Linux kernel developers.
> >
> >> Portable C is a myth. Even C you wrote 5 minutes ago might not work,
> >> even on the exact same machine and OS, if someone uses a different set
> >> of compiler options.
> >
> > No. Lots of C programs are quite portable. That includes e.g. Linux
> > kernel,
>
> The Linux kernel is at least 26 million lines of code. It's not all
> found in the same machine! There are lots of different files for
> different hardware.
>
> So a driver for one device will be different from that for another: you
> write dedicated C code for each, so portability is not needed.

Most Linux drivers are portable code - only a relatively small
proportion are platform specific. And the real target-specific stuff at
the low level is kept as small as practically possible.

However, none of the code needs to be /widely/ portable. All targets
have 32-bit int, 8-bit char, either 32-bit or 64-bit pointers, use ASCII
basic character sets, and have many other aspects in common.

>
>
> >> Python is a different class of language for different applications.
> >
> > Yes, agreed, but I only compared safety and difficulty to use.
> >
> > However, I have heard that Python can be very fast. They do some
> > serious number crunching with it.
>
> With Numpy? I believe that is a library written in unsafe C, that's why
> it's fast.
>

Yes, that's the way it is done.

> >> CPython is also implemented in C; you'd have trouble implementing it in
> >> itself. (Do people think CPython is unsafe because it's written in C?)
> >
> > I know nothing about that.
> > It is well-known that you can use assembly or C to implement
> > *any* programming language, but that was not discussed here now.
>
> You're agreeing that you can use unsafe C to create a safe language. So
> why not a safe application?
>

I fully agree.

Re: you think rust may outthrone c?

<u8rdrf$uca$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: you think rust may outthrone c?
Date: Fri, 14 Jul 2023 12:08:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Sender: <untosten@0.0.0.0>
Message-ID: <u8rdrf$uca$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>
Injection-Date: Fri, 14 Jul 2023 12:08:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c222fe64990f4521cd1777af39dfbc31";
logging-data="31114"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+M1icTcijlecf7aNbCXMlOSaoCGHYZzmE="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.3.12-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:PQH3ycBcUyzgeVN5+X5Q4dfZ644=
 by: Kalevi Kolttonen - Fri, 14 Jul 2023 12:08 UTC

David Brown <david.brown@hesbynett.no> wrote:
> However, none of the code needs to be /widely/ portable. All targets
> have 32-bit int, 8-bit char, either 32-bit or 64-bit pointers, use ASCII
> basic character sets, and have many other aspects in common.

I suppose one can argue pretty endlessly about the true
meaning of "portable code". How many platforms must it run
on in order to quality as portable? I think there is no
single correct answer to that question.

I don't know about other people's definitions, but I never
thought that portable code would mean that it would run
forever on absolutely every imaginable platform possible.

It seems like a far-fetched, extremist position to take.

NetBSD has been known for great portability and it runs
on quite many platforms. Those who claim that the portability
of C code is "a myth" would do well to check out this page:

http://www.netbsd.org/ports/

To me, NetBSD kernel and userland software is a clear
proof that carefully written C is indeed very portable.

Pretty much the same can be said about Linux.

br,
KK

Re: Yeah, C is harder than many programming languages. Your point?

<137ee20e-2873-452e-b667-449a81fa109en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:560d:b0:634:beaa:5a99 with SMTP id mg13-20020a056214560d00b00634beaa5a99mr12815qvb.3.1689337251104;
Fri, 14 Jul 2023 05:20:51 -0700 (PDT)
X-Received: by 2002:a05:6808:1788:b0:3a3:9990:f396 with SMTP id
bg8-20020a056808178800b003a39990f396mr6040195oib.11.1689337250752; Fri, 14
Jul 2023 05:20:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.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: Fri, 14 Jul 2023 05:20:50 -0700 (PDT)
In-Reply-To: <u8rbk9$lv9$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.108; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.108
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> <u8rb8h$28204$1@news.xmission.com> <u8rbk9$lv9$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <137ee20e-2873-452e-b667-449a81fa109en@googlegroups.com>
Subject: Re: Yeah, C is harder than many programming languages. Your point?
From: profesor...@gmail.com (fir)
Injection-Date: Fri, 14 Jul 2023 12:20:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2828
 by: fir - Fri, 14 Jul 2023 12:20 UTC

piątek, 14 lipca 2023 o 13:30:33 UTC+2 Kalevi Kolttonen napisał(a):
> Kenny McCormack <gaz...@shell.xmission.com> wrote:
> > In article <u8qqpv$3v3pg$1...@dont-email.me>,
> > Kalevi Kolttonen <kal...@kolttonen.fi> wrote:
> > ...
> >>> (I don't know Java. Does it really take care of memory management?)
> >>
> >>Yes, it has automatic garbage collection. Those who have started
> >>programming using Java can have considerable difficulties with
> >>manual memory management in C. They are not used to it at all.
> >
> > Much the same could be said about people who start out programming Excel
> > macros. When they start programming in C, they find it very strange that
> > you have to do memory management at all.
> You are quite right. The point is that manual memory management
> is an additional burden to the programmer.
>
> Creating serious memory leaks is one of the dangerous possibilities
> when coding in C. That danger can be avoided altogether when writing
> in e.g. Java.
>
imo you write a lot of nonsenses in this thread (many belifs not much real)
to teh extent i somewhat feel sorry i stated the question - i forgot that quite
usulally people when some wtate soem question not give answer but produce
a stream of nonsenses.. i thought maybe i will learn something on this
rust maybe (this one i cant learn) instead nonsenses on c..but well you may
continue ofc

Re: Yeah, C is harder than many programming languages. Your point?

<u8rf2p$28357$1@news.xmission.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Yeah, C is harder than many programming languages. Your point?
Date: Fri, 14 Jul 2023 12:29:13 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u8rf2p$28357$1@news.xmission.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com> <u8qqpv$3v3pg$1@dont-email.me> <u8rb8h$28204$1@news.xmission.com> <u8rbk9$lv9$1@dont-email.me>
Injection-Date: Fri, 14 Jul 2023 12:29:13 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2362535"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Fri, 14 Jul 2023 12:29 UTC

In article <u8rbk9$lv9$1@dont-email.me>,
Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
>Kenny McCormack <gazelle@shell.xmission.com> wrote:
>> In article <u8qqpv$3v3pg$1@dont-email.me>,
>> Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
>> ...
>>>> (I don't know Java. Does it really take care of memory management?)
>>>
>>>Yes, it has automatic garbage collection. Those who have started
>>>programming using Java can have considerable difficulties with
>>>manual memory management in C. They are not used to it at all.
>>
>> Much the same could be said about people who start out programming Excel
>> macros. When they start programming in C, they find it very strange that
>> you have to do memory management at all.
>
>You are quite right. The point is that manual memory management
>is an additional burden to the programmer.
>
>Creating serious memory leaks is one of the dangerous possibilities
>when coding in C. That danger can be avoided altogether when writing
>in e.g. Java.

Or, e.g., Excel.

FWIW, I think the modern trend is just to accept memory leaks as a part of
life. Every web browser I've ever used leaks memory like a sieve; they
always need to be periodically re-started.

--
You know politics has really been turned upside down when you have someone in the
government with a last name of Cheney (Liz, Senator from Wyoming) who is the voice of
reason.

Pages:123456789101112131415161718192021222324252627282930313233343536373839
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor