Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

It has just been discovered that research causes cancer in rats.


devel / comp.lang.c++ / Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

SubjectAuthor
* "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lynn McGuire
+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|`- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"John McCue
|`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
| `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Blue-Maned_Hawk
|  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|   +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Blue-Maned_Hawk
|    `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|     `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Blue-Maned_Hawk
+- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Blue-Maned_Hawk
+- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|+- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Janis Papanagnou
|+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Kaz Kylheku
||`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| | +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Malcolm McLean
|| | |`- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| | `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |  +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |    `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |     `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |      `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |       `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |        `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |         `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Janis Papanagnou
||  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
||   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Janis Papanagnou
||    `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
||+- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Andreas Kempe
||`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |+- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |+- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"bart
|| |`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Malcolm McLean
|| | `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
|| |   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |    +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |    |`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |    | `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |    `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
|| |     `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |      `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
|| |       +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"bart
|| |       |+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
|| |       ||`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |       || +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
|| |       || |`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |       || | +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Kaz Kylheku
|| |       || | `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Paavo Helde
|| |       || |  +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |       || |  |+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"bart
|| |       || |  ||`- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |       || |  |`- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Ross Finlayson
|| |       || |  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |       || |   +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |       || |   |`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Kaz Kylheku
|| |       || |   | `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |       || |   |  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Kaz Kylheku
|| |       || |   |   `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |       || |   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"paavo512
|| |       || |    +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |       || |    `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Scott Lurndal
|| |       || `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Kaz Kylheku
|| |       ||  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |       ||   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
|| |       ||    `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David Brown
|| |       ||     +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Michael S
|| |       ||     `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |       ||      `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"aph
|| |       |`- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |       +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"aph
|| |       |`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| |       | `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |       |  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Kaz Kylheku
|| |       |   `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|| |       `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
|| `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Kenny McCormack
||  `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|`- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Scott Lurndal
|`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lynn McGuire
| +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
| `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Scott Lurndal
+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Blue-Maned_Hawk
|+- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
|`- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lynn McGuire
+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"David LaRue
|`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
| +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
| |+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Chris M. Thomasson
| ||+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lawrence D'Oliveiro
| ||`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Janis Papanagnou
| |`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Lynn McGuire
| `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Malcolm McLean
+* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Derek
`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"Mr. Man-wai Chang

Pages:1234567
Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<20240307083608.237@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites
Cybersecurity Risks"
Date: Thu, 7 Mar 2024 17:18:14 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <20240307083608.237@kylheku.com>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307134401.00007aa2@yahoo.com>
<uscmub$149j3$1@dont-email.me>
Injection-Date: Thu, 7 Mar 2024 17:18:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d4c5da8a4cdb9a5a7101a267b3941499";
logging-data="1233359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yQnV4B6JHGkrszu2OJuks/NGm9zj1ODQ="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:pPZc8UrP/wYVDljJWv/7uxmxyAE=
 by: Kaz Kylheku - Thu, 7 Mar 2024 17:18 UTC

On 2024-03-07, David Brown <david.brown@hesbynett.no> wrote:
> On 07/03/2024 12:44, Michael S wrote:
>> GC does not stop fragmentation, but it allow heap compaction to be
>> built-in part of environment.
>
> No, GC alone does not do that. But heap compaction is generally done as
> part of a GC cycle.
>
> Heap compaction requires indirect pointers.

I believe, it doesn't, or doesn't have to. The garbage collector fixes
all the pointers contained in the reachable graph to point to the new
locations of objects.

If some foreign code held pointers to GC objects, that would be a
problem. That can usually be avoided. Or else, the proxy handles
can be used just for those outside references.

A simple copying garbage collector moves each object on the first
traversal and rewrites the parent pointer which it just chased
to point to the new location. Subsequent visits to the same object
then recognize that it has already been moved and just adjust the
pointer that had been traversed to reach that object. The forwarding
pointer to the new location can be stored in the old object;
most of its fields are no longer needed for anything.

The space required for the scheme can be regarded as equivalent
to fragmentation, but it's controlled.

The worst case exhibited by fragmentation (where the wasted space is
proportional to the size ratio of the largest to smallest object) is
avoided.

Now, copying collection is almost certainly inapplicable to C programs;
it's not something you "slide under" C, like Boehm. We have to think
outside of the C box. Outside of the C box, interesting things are
possible, like precisely knowing all the places that point at an
object.

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

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usd4gb$170b1$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Thu, 7 Mar 2024 14:28:11 -0500
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <usd4gb$170b1$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me>
<us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me>
<20240305132240.241@kylheku.com> <us83nu$3vinv$1@dont-email.me>
<87le6wpbvc.fsf@nosuchdomain.example.com> <us86kr$7j8$1@dont-email.me>
<us9r86$eiqh$1@dont-email.me> <us9sao$erpl$1@dont-email.me>
<20240306161842.00001400@yahoo.com> <usafb2$irvm$1@dont-email.me>
<20240306114939.761@kylheku.com> <usb1lc$mbth$1@dont-email.me>
<usbb01$rnkd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 7 Mar 2024 19:28:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="cf3cb0d8cf82c152b9ce7e37dec5b8e2";
logging-data="1278305"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+A8L/HMVuKE4H76xGQd4l/UX5cIQJcBho="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3hdDl4ZGqrfJfOLzqVHkN/j4k5g=
In-Reply-To: <usbb01$rnkd$1@dont-email.me>
Content-Language: en-US
 by: James Kuyper - Thu, 7 Mar 2024 19:28 UTC

On 3/6/24 22:06, Lawrence D'Oliveiro wrote:
> On Wed, 6 Mar 2024 19:27:24 -0500, James Kuyper wrote:
>
>> It's a constructed language, which probably has no native speakers.
>
> Not to be confused with Basic English, which was created, and copyrighted
> by, C K Ogden.

Simple English is the term used by Wikipedia for one of it's
language-specific subsets. One of it's requirements is that the articles
be written in Basic English as much as possible. See
<https://simple.wikipedia.org/wiki/Wikipedia:How_to_write_Simple_English_pages#Basic_English_and_VOA_Special_English>
for details.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usdjch$1a50p$5@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Thu, 7 Mar 2024 23:42:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <usdjch$1a50p$5@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us5dl8$3b8mq$6@dont-email.me> <us5ear$3besu$6@dont-email.me>
<us5eee$3b8mq$9@dont-email.me> <us6129$3imua$1@dont-email.me>
<us67t9$3jpc3$1@dont-email.me> <us6a95$3k45j$1@dont-email.me>
<us6gc4$3l59s$3@dont-email.me> <us83v8$3vinv$2@dont-email.me>
<us8d6d$1a24$2@dont-email.me> <us90qt$86c5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 7 Mar 2024 23:42:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d5f167ea8e6b66fd37103ff38661b22f";
logging-data="1381401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xg92FVTX5tOtuJRGUXp8K"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:TpImjQqixeLVd2a78RyZylviAN0=
 by: Lawrence D'Oliv - Thu, 7 Mar 2024 23:42 UTC

On Tue, 5 Mar 2024 22:01:01 -0800, Chris M. Thomasson wrote:

> On 3/5/2024 4:25 PM, Lawrence D'Oliveiro wrote:
>
> So, what is the right language to use?

Learn to use more than one.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usdjec$1a50p$6@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Thu, 7 Mar 2024 23:43:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <usdjec$1a50p$6@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me>
<us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me>
<20240305132240.241@kylheku.com> <87plw8pci5.fsf@nosuchdomain.example.com>
<us84q3$3vqtf$1@dont-email.me> <us9rdq$eiqh$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 7 Mar 2024 23:43:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d5f167ea8e6b66fd37103ff38661b22f";
logging-data="1381401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fYATkPRu+AMOmP5251kan"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:WVkqIbz8/bH0/MuVEJs6AjsxT8Y=
 by: Lawrence D'Oliv - Thu, 7 Mar 2024 23:43 UTC

On Wed, 6 Mar 2024 14:34:50 +0100, David Brown wrote:

> It used to be a running joke that if you managed to get your Ada code to
> compile, it was ready to ship.

That joke actually originated with Pascal. Though I suppose Ada took it to
the next level ...

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usdjgk$1a50p$7@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Thu, 7 Mar 2024 23:44:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <usdjgk$1a50p$7@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me>
<us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me>
<20240305132240.241@kylheku.com> <us83nu$3vinv$1@dont-email.me>
<87le6wpbvc.fsf@nosuchdomain.example.com> <us86kr$7j8$1@dont-email.me>
<us9r86$eiqh$1@dont-email.me> <us9sao$erpl$1@dont-email.me>
<20240306161842.00001400@yahoo.com> <usafb2$irvm$1@dont-email.me>
<20240306114939.761@kylheku.com> <usb1lc$mbth$1@dont-email.me>
<usbb01$rnkd$1@dont-email.me> <usd4gb$170b1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 7 Mar 2024 23:44:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d5f167ea8e6b66fd37103ff38661b22f";
logging-data="1381401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6gTKeomXo/goclowEio0U"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:a9Fxze6+rgUJEkTG0gUr1RCu2nU=
 by: Lawrence D'Oliv - Thu, 7 Mar 2024 23:44 UTC

On Thu, 7 Mar 2024 14:28:11 -0500, James Kuyper wrote:

> One of it's requirements is that the articles be written in Basic
> English as much as possible.

Interesting, because it was Ogden’s protectiveness of his copyright that
killed off any initial chance of Basic English taking off, back in the
day.

I guess that’s expired now.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usdllh$1ambo$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Thu, 7 Mar 2024 16:21:05 -0800
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <usdllh$1ambo$2@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us5dl8$3b8mq$6@dont-email.me> <us5ear$3besu$6@dont-email.me>
<us5eee$3b8mq$9@dont-email.me> <us6129$3imua$1@dont-email.me>
<us67t9$3jpc3$1@dont-email.me> <us6a95$3k45j$1@dont-email.me>
<us6gc4$3l59s$3@dont-email.me> <us83v8$3vinv$2@dont-email.me>
<us8d6d$1a24$2@dont-email.me> <us90qt$86c5$1@dont-email.me>
<usdjch$1a50p$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 8 Mar 2024 00:21:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c15478cdd59e0ca934cfd72d78b3f41f";
logging-data="1399160"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dwo8xvhH9hxl7+b1GzmhvMTA6GZD39a0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3dl8Qwj0aGN8UZJVghaCZSCcOcE=
Content-Language: en-US
In-Reply-To: <usdjch$1a50p$5@dont-email.me>
 by: Chris M. Thomasson - Fri, 8 Mar 2024 00:21 UTC

On 3/7/2024 3:42 PM, Lawrence D'Oliveiro wrote:
> On Tue, 5 Mar 2024 22:01:01 -0800, Chris M. Thomasson wrote:
>
>> On 3/5/2024 4:25 PM, Lawrence D'Oliveiro wrote:
>>
>> So, what is the right language to use?
>
> Learn to use more than one.

Indeed, I do. Btw, are you an AI? Still not exactly sure why I think that.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<useegp$1ihfv$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 08:25:13 +0100
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <useegp$1ihfv$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307083119.850@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Mar 2024 07:25:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="88ea06878998d980e83918480f8d68d3";
logging-data="1656319"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19THJddqw9jxOfHzrfj7UJhyFzJssdxxek="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ve7aWGBRQrAeZvFdl8mBuipjeY8=
Content-Language: en-GB
In-Reply-To: <20240307083119.850@kylheku.com>
 by: David Brown - Fri, 8 Mar 2024 07:25 UTC

On 07/03/2024 17:35, Kaz Kylheku wrote:
> On 2024-03-07, David Brown <david.brown@hesbynett.no> wrote:
>> On 06/03/2024 23:00, Michael S wrote:
>>> On Wed, 6 Mar 2024 12:28:59 +0000
>>> bart <bc@freeuk.com> wrote:
>>>
>>>>
>>>> "Rust uses a relatively unique memory management approach that
>>>> incorporates the idea of memory “ownership”. Basically, Rust keeps
>>>> track of who can read and write to memory. It knows when the program
>>>> is using memory and immediately frees the memory once it is no longer
>>>> needed. It enforces memory rules at compile time, making it virtually
>>>> impossible to have runtime memory bugs.⁴ You do not need to manually
>>>> keep track of memory. The compiler takes care of it."
>>>>
>>>> This suggests the language automatically takes care of this.
>>>
>>> Takes care of what?
>>> AFAIK, heap fragmentation is as bad problem in Rust as it is in
>>> C/Pascal/Ada etc... In this aspect Rust is clearly inferior to GC-based
>>> languages like Java, C# or Go.
>>>
>> Garbage collection does not stop heap fragmentation. GC does, I
>> suppose, mean that you need much more memory and bigger heaps in
>> proportion to the amount of memory you actually need in the program at
>> any given time, and having larger heaps reduces fragmentation (or at
>> least reduces the consequences of it).
>
> Copying garbage collectors literally stop fragmentation.

Yes, but garbage collectors that could be useable for C, C++, or other
efficient compiled languages are not "copying" garbage collectors.

> Reachable
> objects are identified and moved to a memory partition where they
> are now adjacent. The vacated memory partition is then efficiently used
> to bump-allocate new objects.
>

I think if you have a system with enough memory that copying garbage
collection (or other kinds of heap compaction during GC) is a reasonable
option, then it's unlikely that heap fragmentation is a big problem in
the first place. And you won't be running on a small embedded system.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usegkh$1ivtt$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 09:01:21 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <usegkh$1ivtt$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me>
<us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me>
<20240305132240.241@kylheku.com> <87plw8pci5.fsf@nosuchdomain.example.com>
<us84q3$3vqtf$1@dont-email.me> <us9rdq$eiqh$2@dont-email.me>
<usdjec$1a50p$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 8 Mar 2024 08:01:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5b4fd483861029d4eca5978ecaa265e3";
logging-data="1671101"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GIbpXsQ6fz/5YLBE0pA7cdPR5NtKrJDU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:MXzic0O/XDPkhCvg+dEgvR85u6k=
Content-Language: en-GB
In-Reply-To: <usdjec$1a50p$6@dont-email.me>
 by: David Brown - Fri, 8 Mar 2024 08:01 UTC

On 08/03/2024 00:43, Lawrence D'Oliveiro wrote:
> On Wed, 6 Mar 2024 14:34:50 +0100, David Brown wrote:
>
>> It used to be a running joke that if you managed to get your Ada code to
>> compile, it was ready to ship.
>
> That joke actually originated with Pascal.

I didn't know that.

> Though I suppose Ada took it to
> the next level ...

It seems much more appropriate for Ada (though Pascal also had stricter
checking and stronger types than most other popular languages had when
Pascal was developed).

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<20240308125746.000074c1@yahoo.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5...@yahoo.com (Michael S)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites
Cybersecurity Risks"
Date: Fri, 8 Mar 2024 12:57:46 +0200
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <20240308125746.000074c1@yahoo.com>
References: <us0brl$246bf$1@dont-email.me>
<us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me>
<us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me>
<us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me>
<20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me>
<20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me>
<20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me>
<20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me>
<20240307083119.850@kylheku.com>
<useegp$1ihfv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="ba4dddafc7a27447368298c876b745c8";
logging-data="1735418"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eGK7bHLlu8ckq96eCCA3r/3DWvvpP59Y="
Cancel-Lock: sha1:oUkuVWXEQEVoxA+cdb9PrMyd+Q4=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
 by: Michael S - Fri, 8 Mar 2024 10:57 UTC

On Fri, 8 Mar 2024 08:25:13 +0100
David Brown <david.brown@hesbynett.no> wrote:

> On 07/03/2024 17:35, Kaz Kylheku wrote:
> > On 2024-03-07, David Brown <david.brown@hesbynett.no> wrote:
> >> On 06/03/2024 23:00, Michael S wrote:
> >>> On Wed, 6 Mar 2024 12:28:59 +0000
> >>> bart <bc@freeuk.com> wrote:
> >>>
> >>>>
> >>>> "Rust uses a relatively unique memory management approach that
> >>>> incorporates the idea of memory “ownership”. Basically, Rust
> >>>> keeps track of who can read and write to memory. It knows when
> >>>> the program is using memory and immediately frees the memory
> >>>> once it is no longer needed. It enforces memory rules at compile
> >>>> time, making it virtually impossible to have runtime memory
> >>>> bugs.⁴ You do not need to manually keep track of memory. The
> >>>> compiler takes care of it."
> >>>>
> >>>> This suggests the language automatically takes care of this.
> >>>
> >>> Takes care of what?
> >>> AFAIK, heap fragmentation is as bad problem in Rust as it is in
> >>> C/Pascal/Ada etc... In this aspect Rust is clearly inferior to
> >>> GC-based languages like Java, C# or Go.
> >>>
> >> Garbage collection does not stop heap fragmentation. GC does, I
> >> suppose, mean that you need much more memory and bigger heaps in
> >> proportion to the amount of memory you actually need in the
> >> program at any given time, and having larger heaps reduces
> >> fragmentation (or at least reduces the consequences of it).
> >
> > Copying garbage collectors literally stop fragmentation.
>
> Yes, but garbage collectors that could be useable for C, C++, or
> other efficient compiled languages are not "copying" garbage
> collectors.
>

Go, C# and Java are all efficient compiled languages. For Go it was
actually a major goal.

> > Reachable
> > objects are identified and moved to a memory partition where they
> > are now adjacent. The vacated memory partition is then efficiently
> > used to bump-allocate new objects.
> >
>
> I think if you have a system with enough memory that copying garbage
> collection (or other kinds of heap compaction during GC) is a
> reasonable option, then it's unlikely that heap fragmentation is a
> big problem in the first place. And you won't be running on a small
> embedded system.
>

You sound like arguing for sake of arguing.
Of course, heap fragmentation is relatively rare problem. But when you
process 100s of 1000s of requests of significantly varying sizes for
weeks without interruption then rare things happen with high
probability :(
In case of this particular Discord service, they appear to
have a benefit of size of requests not varying significantly, so
absence of heap compaction is not a major defect.
BTW, I'd like to know if 3 years later they still have their Rust
solution running.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usf11f$1mk5l$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: eesn...@osa.pri.ee (Paavo Helde)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 14:41:16 +0200
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <usf11f$1mk5l$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307134401.00007aa2@yahoo.com>
<uscmub$149j3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 8 Mar 2024 12:41:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4f1ef4d6f86fc9f6bae183de53f6d847";
logging-data="1790133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++puQyEIm9b4q686aYPjSl4DpBoKjvakE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EHft7jqADT9v9PBrKDUNjBe41e4=
In-Reply-To: <uscmub$149j3$1@dont-email.me>
Content-Language: en-US
 by: Paavo Helde - Fri, 8 Mar 2024 12:41 UTC

07.03.2024 17:36 David Brown kirjutas:
>
> CPython does use garbage collection, as far as I know.
>

AFAIK CPython uses reference counting, i.e. basically the same as C++
std::shared_ptr (except that it does not need to be thread-safe).

With reference counting one only knows how many pointers there are to a
given heap block, but not where they are, so heap compaction would not
be straightforward.

Python also has zillions of extensions written in C or C++ (all of AI
related work for example), so having e.g. heap compaction of Python
objects only might not be worth of it.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usf63j$1nnsb$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 15:07:47 +0100
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <usf63j$1nnsb$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307134401.00007aa2@yahoo.com>
<uscmub$149j3$1@dont-email.me> <usf11f$1mk5l$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 8 Mar 2024 14:07:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5b4fd483861029d4eca5978ecaa265e3";
logging-data="1826699"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kgk1brzYowkaMC9ppFsUZbjZYHgTGTgQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:MxBP/X8h/Qnc3K8KRf7Z8flo2Cs=
In-Reply-To: <usf11f$1mk5l$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Fri, 8 Mar 2024 14:07 UTC

On 08/03/2024 13:41, Paavo Helde wrote:
> 07.03.2024 17:36 David Brown kirjutas:
>>
>> CPython does use garbage collection, as far as I know.
>>
>
> AFAIK CPython uses reference counting, i.e. basically the same as C++
> std::shared_ptr (except that it does not need to be thread-safe).

Yes, that is my understanding too. (I could be wrong here, so don't
rely on anything I write!) But the way it is used is still a type of
garbage collection. When an object no longer has any "live" references,
it is put in a list, and on the next GC it will get cleared up (and call
the asynchronous destructor, __del__, for the object).

A similar method is sometimes used in C++ for objects that are
time-consuming to destruct. You have a "tidy up later" container that
holds shared pointers. Each time you make a new object that will have
asynchronous destruction, you use a shared_ptr for the access and put a
copy of that pointer in the tidy-up container. A low priority
background thread checks this list on occasion - any pointers with only
one reference can be cleared up in the context of this separate thread.

>
> With reference counting one only knows how many pointers there are to a
> given heap block, but not where they are, so heap compaction would not
> be straightforward.
>
> Python also has zillions of extensions written in C or C++ (all of AI
> related work for example), so having e.g. heap compaction of Python
> objects only might not be worth of it.
>

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usf7hn$1o7fd$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 15:32:22 +0100
Organization: A noiseless patient Spider
Lines: 103
Message-ID: <usf7hn$1o7fd$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307083119.850@kylheku.com>
<useegp$1ihfv$1@dont-email.me> <20240308125746.000074c1@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Mar 2024 14:32:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5b4fd483861029d4eca5978ecaa265e3";
logging-data="1842669"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MEImCX21lSO3vdAwUZY17YYg1QbxPHwk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:XYaOS2UqhrIYTD5v4bG1+4PdM4w=
In-Reply-To: <20240308125746.000074c1@yahoo.com>
Content-Language: en-GB
 by: David Brown - Fri, 8 Mar 2024 14:32 UTC

On 08/03/2024 11:57, Michael S wrote:
> On Fri, 8 Mar 2024 08:25:13 +0100
> David Brown <david.brown@hesbynett.no> wrote:
>
>> On 07/03/2024 17:35, Kaz Kylheku wrote:
>>> On 2024-03-07, David Brown <david.brown@hesbynett.no> wrote:
>>>> On 06/03/2024 23:00, Michael S wrote:
>>>>> On Wed, 6 Mar 2024 12:28:59 +0000
>>>>> bart <bc@freeuk.com> wrote:
>>>>>
>>>>>>
>>>>>> "Rust uses a relatively unique memory management approach that
>>>>>> incorporates the idea of memory “ownership”. Basically, Rust
>>>>>> keeps track of who can read and write to memory. It knows when
>>>>>> the program is using memory and immediately frees the memory
>>>>>> once it is no longer needed. It enforces memory rules at compile
>>>>>> time, making it virtually impossible to have runtime memory
>>>>>> bugs.⁴ You do not need to manually keep track of memory. The
>>>>>> compiler takes care of it."
>>>>>>
>>>>>> This suggests the language automatically takes care of this.
>>>>>
>>>>> Takes care of what?
>>>>> AFAIK, heap fragmentation is as bad problem in Rust as it is in
>>>>> C/Pascal/Ada etc... In this aspect Rust is clearly inferior to
>>>>> GC-based languages like Java, C# or Go.
>>>>>
>>>> Garbage collection does not stop heap fragmentation. GC does, I
>>>> suppose, mean that you need much more memory and bigger heaps in
>>>> proportion to the amount of memory you actually need in the
>>>> program at any given time, and having larger heaps reduces
>>>> fragmentation (or at least reduces the consequences of it).
>>>
>>> Copying garbage collectors literally stop fragmentation.
>>
>> Yes, but garbage collectors that could be useable for C, C++, or
>> other efficient compiled languages are not "copying" garbage
>> collectors.
>>
>
> Go, C# and Java are all efficient compiled languages. For Go it was
> actually a major goal.

C# and Java are, AFAIUI, managed languages - they are byte-compiled and
run on a VM. (JIT compilation to machine code can be used for
acceleration, but that does not change the principles.) I don't know
about Go.

>
>>> Reachable
>>> objects are identified and moved to a memory partition where they
>>> are now adjacent. The vacated memory partition is then efficiently
>>> used to bump-allocate new objects.
>>>
>>
>> I think if you have a system with enough memory that copying garbage
>> collection (or other kinds of heap compaction during GC) is a
>> reasonable option, then it's unlikely that heap fragmentation is a
>> big problem in the first place. And you won't be running on a small
>> embedded system.
>>
>
> You sound like arguing for sake of arguing.

I am just trying to be clear about things. Different types of system,
and different types of task, have different challenges and different
solutions. (This seems obvious, but people often think they have "the"
solution to a particular issue.) In particular, in small embedded
systems with limited ram and no MMU, if you use dynamic memory of any
kind, then heap fragmentation is a serious risk. And a heap-compacting
garbage collection will not mitigate that risk.

There are a lot of GC algorithms, each with their pros and cons, and the
kind of languages and tasks for which they are suitable. If you have a
GC algorithm that works by copying all live data (then scraping
everything left over), then heap compaction is a natural byproduct.

But I think it is rare that heap compaction is an appropriate goal in
itself - it is a costly operation. It invalidates all pointers, which
means a lot of overhead and extra care in languages where pointers are
likely to be cached in registers or local variables on the stack. And
it will be tough on the cache as everything has to be copied and moved.
That pretty much rules it out for efficient compiled languages, at least
for the majority of their objects, and leaves it in the domain of
languages that can accept the performance hit.

> Of course, heap fragmentation is relatively rare problem. But when you
> process 100s of 1000s of requests of significantly varying sizes for
> weeks without interruption then rare things happen with high
> probability :(

There are all sorts of techniques usable to optimise such systems.
Allocation pools for different sized blocks would be a typical strategy.

> In case of this particular Discord service, they appear to
> have a benefit of size of requests not varying significantly, so
> absence of heap compaction is not a major defect.
> BTW, I'd like to know if 3 years later they still have their Rust
> solution running.
>

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<20240308165709.00004aca@yahoo.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5...@yahoo.com (Michael S)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites
Cybersecurity Risks"
Date: Fri, 8 Mar 2024 16:57:09 +0200
Organization: A noiseless patient Spider
Lines: 78
Message-ID: <20240308165709.00004aca@yahoo.com>
References: <us0brl$246bf$1@dont-email.me>
<us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me>
<us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me>
<us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me>
<20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me>
<20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me>
<20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me>
<20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me>
<20240307083119.850@kylheku.com>
<useegp$1ihfv$1@dont-email.me>
<20240308125746.000074c1@yahoo.com>
<usf7hn$1o7fd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="ba4dddafc7a27447368298c876b745c8";
logging-data="1773540"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z9HlVJyisDEl8SYpGcQxHiiQQyQ0htko="
Cancel-Lock: sha1:MqxPs4GNd4JmthjKPUbtJ8IM10Q=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
 by: Michael S - Fri, 8 Mar 2024 14:57 UTC

On Fri, 8 Mar 2024 15:32:22 +0100
David Brown <david.brown@hesbynett.no> wrote:

> On 08/03/2024 11:57, Michael S wrote:
> > On Fri, 8 Mar 2024 08:25:13 +0100
> > David Brown <david.brown@hesbynett.no> wrote:
> >
> >> On 07/03/2024 17:35, Kaz Kylheku wrote:
> >>> On 2024-03-07, David Brown <david.brown@hesbynett.no> wrote:
> >>>> On 06/03/2024 23:00, Michael S wrote:
> >>>>> On Wed, 6 Mar 2024 12:28:59 +0000
> >>>>> bart <bc@freeuk.com> wrote:
> >>>>>
> >>>>>>
> >>>>>> "Rust uses a relatively unique memory management approach that
> >>>>>> incorporates the idea of memory “ownership”. Basically, Rust
> >>>>>> keeps track of who can read and write to memory. It knows when
> >>>>>> the program is using memory and immediately frees the memory
> >>>>>> once it is no longer needed. It enforces memory rules at
> >>>>>> compile time, making it virtually impossible to have runtime
> >>>>>> memory bugs.⁴ You do not need to manually keep track of
> >>>>>> memory. The compiler takes care of it."
> >>>>>>
> >>>>>> This suggests the language automatically takes care of this.
> >>>>>
> >>>>> Takes care of what?
> >>>>> AFAIK, heap fragmentation is as bad problem in Rust as it is in
> >>>>> C/Pascal/Ada etc... In this aspect Rust is clearly inferior to
> >>>>> GC-based languages like Java, C# or Go.
> >>>>>
> >>>> Garbage collection does not stop heap fragmentation. GC does, I
> >>>> suppose, mean that you need much more memory and bigger heaps in
> >>>> proportion to the amount of memory you actually need in the
> >>>> program at any given time, and having larger heaps reduces
> >>>> fragmentation (or at least reduces the consequences of it).
> >>>
> >>> Copying garbage collectors literally stop fragmentation.
> >>
> >> Yes, but garbage collectors that could be useable for C, C++, or
> >> other efficient compiled languages are not "copying" garbage
> >> collectors.
> >>
> >
> > Go, C# and Java are all efficient compiled languages. For Go it was
> > actually a major goal.
>
> C# and Java are, AFAIUI, managed languages - they are byte-compiled
> and run on a VM. (JIT compilation to machine code can be used for
> acceleration, but that does not change the principles.) I don't know
> about Go.
>

C# was Jitted originally and was even interpretted on on very small
implementation that don't seem to be supported any longer. Today it is
mostly AoTed, which in simpler language means "compiled". There are
options in dev tools whhether to compile to native code on to
platform-independent. I would think that most people compile to native.

Java-on-Android which, I would guess, is majority on Java written in
the world, is like 95% AoTed + 5% JITtted. Is used to be 100% AoTed in
few versions of Android, but by now JIT is reintroduced as an option,
not for portability, but for profile-guided optimization
opportinities it allows. If I am not mistaken, direct interpretaions of
Davlik non-byte-code was never supported on Android.

Java-outside-Android? I don't know what is current stated. Would think
that Oracle's JVMs intetended for desktop/la[top/server are also
either JITted or AoTed, not interpreted.

Go is compiled to native, most often via LLVM, but there exists gcc
option as well.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usfa2o$1orr3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 15:15:36 +0000
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <usfa2o$1orr3$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307134401.00007aa2@yahoo.com>
<uscmub$149j3$1@dont-email.me> <usf11f$1mk5l$1@dont-email.me>
<usf63j$1nnsb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Mar 2024 15:15:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6e0a11c2f9940244b487580c0cc6ead4";
logging-data="1863523"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3O3uS7+mQ49lCNibJHHl1"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:14EHivHvGpSNRcqPmc4d42tY9eY=
In-Reply-To: <usf63j$1nnsb$1@dont-email.me>
Content-Language: en-GB
 by: bart - Fri, 8 Mar 2024 15:15 UTC

On 08/03/2024 14:07, David Brown wrote:
> On 08/03/2024 13:41, Paavo Helde wrote:
>> 07.03.2024 17:36 David Brown kirjutas:
>>>
>>> CPython does use garbage collection, as far as I know.
>>>
>>
>> AFAIK CPython uses reference counting, i.e. basically the same as C++
>> std::shared_ptr (except that it does not need to be thread-safe).
>
> Yes, that is my understanding too.  (I could be wrong here, so don't
> rely on anything I write!)  But the way it is used is still a type of
> garbage collection.  When an object no longer has any "live" references,
> it is put in a list, and on the next GC it will get cleared up (and call
> the asynchronous destructor, __del__, for the object).

Is that how CPython works? I can't quite see the point of saving up all
the deallocations so that they are all done as a batch. It's extra
overhead, and will cause those latency spikes that was the problem here.

In my own reference count scheme, when the count reaches zero, the
memory is freed immediately.

I also tend to have most allocations being of either 16 or 32 bytes, so
reuse is easy. It is only individual data items (a long string or long
array) that might have an arbitrary length that needs to be in
contiguous memory.

Most strings however have an average length of well below 16 characters
in my programs, so use a 16-byte allocation.

I don't know the allocation pattern in that Discard app, but Michael S
suggested they might not be lots of arbitrary-size objects.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usffuk$1q99e$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 17:55:48 +0100
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <usffuk$1q99e$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307134401.00007aa2@yahoo.com>
<uscmub$149j3$1@dont-email.me> <usf11f$1mk5l$1@dont-email.me>
<usf63j$1nnsb$1@dont-email.me> <usfa2o$1orr3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Mar 2024 16:55:48 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5b4fd483861029d4eca5978ecaa265e3";
logging-data="1910062"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5xEKDmLw27DVhWH6hUbatF3Mv1JEwcwM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:Db8WrX/RpvKx1yCTEcoRJUx1wZo=
In-Reply-To: <usfa2o$1orr3$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Fri, 8 Mar 2024 16:55 UTC

On 08/03/2024 16:15, bart wrote:
> On 08/03/2024 14:07, David Brown wrote:
>> On 08/03/2024 13:41, Paavo Helde wrote:
>>> 07.03.2024 17:36 David Brown kirjutas:
>>>>
>>>> CPython does use garbage collection, as far as I know.
>>>>
>>>
>>> AFAIK CPython uses reference counting, i.e. basically the same as C++
>>> std::shared_ptr (except that it does not need to be thread-safe).
>>
>> Yes, that is my understanding too.  (I could be wrong here, so don't
>> rely on anything I write!)  But the way it is used is still a type of
>> garbage collection.  When an object no longer has any "live"
>> references, it is put in a list, and on the next GC it will get
>> cleared up (and call the asynchronous destructor, __del__, for the
>> object).
>
> Is that how CPython works? I can't quite see the point of saving up all
> the deallocations so that they are all done as a batch. It's extra
> overhead, and will cause those latency spikes that was the problem here.

I believe the GC runs are done very regularly (if there is something in
the clean-up list), so there is not much build-up and not much extra
latency.

>
> In my own reference count scheme, when the count reaches zero, the
> memory is freed immediately.

That's synchronous deallocation. It's a perfectly good strategy, of
course. There are pros and cons of both methods.

>
> I also tend to have most allocations being of either 16 or 32 bytes, so
> reuse is easy. It is only individual data items (a long string or long
> array) that might have an arbitrary length that needs to be in
> contiguous memory.
>
> Most strings however have an average length of well below 16 characters
> in my programs, so use a 16-byte allocation.
>
> I don't know the allocation pattern in that Discard app, but Michael S
> suggested they might not be lots of arbitrary-size objects.
>

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<lVydnTRTXJu3yXb4nZ2dnZfqnPednZ2d@giganews.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c comp.lang.java.programmer
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 08 Mar 2024 18:08:42 +0000
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.java.programmer
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me>
<us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me>
<us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com>
<us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com>
<us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com>
<us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com>
<usc58s$10cls$1@dont-email.me> <20240307134401.00007aa2@yahoo.com>
<uscmub$149j3$1@dont-email.me> <usf11f$1mk5l$1@dont-email.me>
<usf63j$1nnsb$1@dont-email.me>
From: ross.a.f...@gmail.com (Ross Finlayson)
Date: Fri, 8 Mar 2024 10:08:44 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <usf63j$1nnsb$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <lVydnTRTXJu3yXb4nZ2dnZfqnPednZ2d@giganews.com>
Lines: 124
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-0bYhLbQZ1EkFQfHHlBV1wNKPfbGAuNj1s9ApCGepMeXncODOkSoIClEIPy5n3bHqXByRPywotrUzutB!xhVsvhQZg/GVJIbSa7OEyAf3GUwxoTd1Jsd50eihB6peGyV3TF1UbC/FVBmJeK1T0OoEKxmXJ3Q=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Received-Bytes: 6505
 by: Ross Finlayson - Fri, 8 Mar 2024 18:08 UTC

On 03/08/2024 06:07 AM, David Brown wrote:
> On 08/03/2024 13:41, Paavo Helde wrote:
>> 07.03.2024 17:36 David Brown kirjutas:
>>>
>>> CPython does use garbage collection, as far as I know.
>>>
>>
>> AFAIK CPython uses reference counting, i.e. basically the same as C++
>> std::shared_ptr (except that it does not need to be thread-safe).
>
> Yes, that is my understanding too. (I could be wrong here, so don't
> rely on anything I write!) But the way it is used is still a type of
> garbage collection. When an object no longer has any "live" references,
> it is put in a list, and on the next GC it will get cleared up (and call
> the asynchronous destructor, __del__, for the object).
>
> A similar method is sometimes used in C++ for objects that are
> time-consuming to destruct. You have a "tidy up later" container that
> holds shared pointers. Each time you make a new object that will have
> asynchronous destruction, you use a shared_ptr for the access and put a
> copy of that pointer in the tidy-up container. A low priority
> background thread checks this list on occasion - any pointers with only
> one reference can be cleared up in the context of this separate thread.
>
>>
>> With reference counting one only knows how many pointers there are to
>> a given heap block, but not where they are, so heap compaction would
>> not be straightforward.
>>
>> Python also has zillions of extensions written in C or C++ (all of AI
>> related work for example), so having e.g. heap compaction of Python
>> objects only might not be worth of it.
>>
>

Wondering about mark-and-sweep or abstractly
whatever means that detects references, vis-a-vis,
reference counting and reference registration and
this kind of thing, sort of is for making the automatic
cleanup along the lines of stack-unwinding.

Like how C++ works on stack objects, ....

Then, that makes de-allocation part of the routine,
and adds reference-counts to objects, but it would
be pretty safe, ..., and the GC would never interrupt
the entire runtime.

One might figure that any time an lvalue is assigned
an rvalue, the rvalue's refcount increments and any
previous assigned revalue's refcount decrements,
then anything that goes out of scope it's rvalue
is assigned null, its un-assigned rvalue refcount decrements,
that any refcount decremented to zero results deletion.

Isn't that smart-pointers?

https://en.wikipedia.org/wiki/Smart_pointer

Maybe the big code cop should say "you should use smart pointers".

I think smart pointers should usually be the way of things,
any kind of pointer, then with, you know, detach() or what,
manual management.

I suppose it's nice that syntactic sugar just does that,
or, that the runtime makes a best effort sort of
inference, while, it would be nice if when an object's
purpose is fulfilled, that it can be canned and it results
freeing itself.

Static analysis and "safe programming"
is an option in any deterministic language, ...,
given "defined behavior" of the runtime, of course.

How about "ban USB and PXE" and
"proxy-defeating DNS", "read-only
runtime", "computer literacy suprise quiz".

The idea of memory pools and freelists and
arenas and slabs and dedicated allocations
for objects of types and the declaration at
definition-time of the expected lifetime and
ownership of objects, gets into a lot of ways
to have both efficiency and dedication by design.

Shadow stack, NX bit, shared register protection,
Orange Book, journaling, link-layer?

A usual behavior of Java crashing is leaving
the entire heap in a heap-dump file, ....

These days a usual sort of approach is, like,
the old "trust but verify", static analysis and
all, figuring that type-safety first is the greatest
possible boon to correctness, then that
memory-management would better be a
sort of "if you could just explicitly close your
resources when you're done then maybe
have a mark-and-sweep on the side, and
mark lifetime resources as so, then anything
left would be waste".

I'm a big fan of C/C++ coders and it's nice
to know about Java which I think is great
and I mostly think in it, vis-a-vis,
Go and JavaScript and similar event loops,
like Windows, or the Pythonic or something like
that, there's something to be said for that
Haskell is probably cooler than me, these
days I'm looking at the language specs and
the opcode instructions as from assembler
languages with regards to "modular modules
with well-defined modules and modularity".

Figuring "modular modules" and "scope the globals".

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usfvld$1tfqm$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Fri, 8 Mar 2024 13:23:57 -0800
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <usfvld$1tfqm$2@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<20240303092938.43@kylheku.com> <us2m8u$2m9mm$1@dont-email.me>
<us2s0i$2n6h3$5@dont-email.me> <us41kk$327oo$1@dont-email.me>
<us5bd9$3b404$1@dont-email.me> <us6n21$3mbe2$1@dont-email.me>
<us80kd$3v39d$1@dont-email.me> <us9hc9$b720$1@dont-email.me>
<usaq3v$l26r$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 8 Mar 2024 21:23:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c15478cdd59e0ca934cfd72d78b3f41f";
logging-data="2015062"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lZ2XuJqaiW5gMRmFhDX87Vsbmqrctn+k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ojgl+WvUIhNWW4M7F6SsC5CTzrk=
Content-Language: en-US
In-Reply-To: <usaq3v$l26r$3@dont-email.me>
 by: Chris M. Thomasson - Fri, 8 Mar 2024 21:23 UTC

On 3/6/2024 2:18 PM, Chris M. Thomasson wrote:
> On 3/6/2024 2:43 AM, David Brown wrote:
[...]

This is a fun one:

// pseudo code...
_______________________
node*
node_pop()
{ // try per-thread lifo

// try shared distributed lifo

// try global region

// if all of those failed, return nullptr
}

void
node_push(
node* n
) {
// if n came from our per-thread, try to push it into it...

// if n came from another thread, try to push it into its thread...

// if all of those failed, push into shared distributed lifo
} _______________________

The fun part is this scheme can be realized as long as a node is at
least the size of a pointer. That is the required overhead wrt the size
of a node.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<ha2dnVzbM9-naHb4nZ2dnZfqnPWdnZ2d@giganews.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c comp.lang.c++ comp.lang.java.programmer
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 09 Mar 2024 05:35:54 +0000
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.java.programmer
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me>
<us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me>
<20240305132240.241@kylheku.com> <us83nu$3vinv$1@dont-email.me>
<87le6wpbvc.fsf@nosuchdomain.example.com> <us86kr$7j8$1@dont-email.me>
<us9r86$eiqh$1@dont-email.me> <us9sao$erpl$1@dont-email.me>
<20240306161842.00001400@yahoo.com> <usafb2$irvm$1@dont-email.me>
<20240306114939.761@kylheku.com> <usaipk$jjq3$1@dont-email.me>
From: ross.a.f...@gmail.com (Ross Finlayson)
Date: Fri, 8 Mar 2024 21:36:14 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <usaipk$jjq3$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <ha2dnVzbM9-naHb4nZ2dnZfqnPWdnZ2d@giganews.com>
Lines: 175
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-dtlH2l3LngVsA7ed/2T3dxoWaDFbUPfJSxcPYFp0Z2E23cuydoIxYQgtOj8nV0OGmg7eFkprCmbmvoY!HbWx0ajZyISA6q3mP2lKTHxO/o4M1xaXulZIao4Tsk56mhVbIfv66FUBuDeunB2oRqNrzeEwaRQ=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Received-Bytes: 8555
 by: Ross Finlayson - Sat, 9 Mar 2024 05:36 UTC

On 03/06/2024 12:13 PM, David Brown wrote:
> On 06/03/2024 20:50, Kaz Kylheku wrote:
>> On 2024-03-06, James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>> On 3/6/24 09:18, Michael S wrote:
>>>> On Wed, 6 Mar 2024 13:50:16 +0000
>>>> bart <bc@freeuk.com> wrote:
>>> ...
>>>>> Whoever wrote this short Wikipedia article on it got confused too as
>>>>> it uses both Ada and ADA:
>>>>>
>>>>> https://simple.wikipedia.org/wiki/Ada_(programming_language)
>>>>>
>>>>> (The example program also includes 'Ada' as some package name. Since
>>>>> it is case-insensitive, 'ADA' would also work.)
>>>>>
>>>>
>>>> Your link is to "simple Wikipedia". I don't know what it is
>>>> exactly, but it does not appear as authoritative as real Wikipedia
>>>
>>> Notice that in your following link, "en" appears at the beginning to
>>> indicate the use of English. "simple" at the beginning of the above link
>>> serves the same purpose. "Simple English" is it's own language, closely
>>> related to standard English.
>>
>> Where is Simple English spoken? Is there some geographic area where
>> native speakers concentrate?
>>
>
> It is meant to be simpler text, written in simpler language. The target
> audience will include younger people, people with dyslexia or other
> reading difficulties, learners of English, people with lower levels of
> education, people with limited intelligence or learning impediments, or
> simply people whose eyes glaze over when faced with long texts on the
> main Wikipedia pages.
>
>

Yet, why?

There's "Simplified Technical English", which is a same
sort of idea, with the idea that manuals and instructions
be clear and unambiguous.

https://en.wikipedia.org/wiki/Simplified_Technical_English

Heh, it's like in the old days, when people would get
manuals, and be amused as it were by the expression.

What I'd like to know about is who keeps dialing
the "harmonization" efforts, which really must
give grouse to the "harmonisation" spellers,
when good old-fashioned words "spelt" their own way,
which of course is archaic "spelled".

It reminds me of "Math Blaster" and "Typing Games",
vis-a-vis, "the spelling bee", and for that matter,
of course, weekly spelling quizzes all through
elementary school.

I'm so old the only games we had were how to
compute and how to spell.

And Tooth Invaders. Just kidding I had 50+ floppies
for my Commodore64. Like GI Joe and Beachhead II.

But we didn't get promoted in school if we
didn't pass our spelling tests.

(We couldn't even have dangling prepositions
or sentence fragments like the above.)

We had a class in school we couldn't even pass
until we could type thirty words a minute.

The Simplified Technical English though is a good idea,
it's used in technical manuals and instructions, widely.

Really, whever harmonization dials away a word,
I'm like, hey, I'm using that word.

There's something to be said for a, "source parser",
the idea being a, multi-pass parser of sorts, with
any number of, forms, so that it results, parsing
languages sort of opportunistically, and results,
sort of lifting, sections, of source, into regions
of syntax, so that as syntaxes get all commingled,
that all the syntax and grammar definitions get piled
together, where it sort of results then for comments
and quoting, and, usual ideas of brackets, and comma,
for joiners and separators and groupers and splitters,
observing mostly usually the parenthetical and indentation,
for all sorts of languages, into, a pretty common sort of
form.

So, what is there, "Simplified Compilation Source",
basically reflecting, "if it's source somehow it
parses, if being ambiguous among languages then
in editions of each or according to the source
locale", these kinds of things....

For a long time I've been thinking about "modular
and composable parsers", with mostly the usual
goal of relating productions in grammar to source
locations, that one figures it would be a most usual
sort of study, to result, all the proliferation of
little languages, get all parsed, then for the great
facility of "term re-write rules" and "term-graph
re-write rules", or "re-write systems", or for
extracting signatures, identifiers, and logic,
for any kind of language.

I think everybody reading this has a most usual
sort of exposure to the theory of parsing as after
Backus-Naur format, vis-a-vis syntax diagrams or
railroad diagrams, and Chomsky hierarchy, and lexers
and parsers and the interpreted and all these kinds
of things, but I don't know a sort of wide-open
framework that parses any kinds of sources and
happens to also re-write itself to any sort of target,
parsing any source language in any source language.

Did I miss the memo?

What I got into was defining languages in terms
of comments and quoting, and, brackets and commas,
and, space and line, in terms of, sequence and alternation,
for basically that all the source is loaded or mapped into
memory, then instead of an abstract syntax tree or sorts,
results an abstract syntax sequence of sorts, those "lifted"
over the source text for its location, then that any sort
of lexicalizing and syntax and grammar, all get put together
as modules and any one just enumerates or makes equivalent
whatever kind of source it is, then according to the
language, results usual sorts constructs and productions,
for functional and procedural languages, and data,
and, you know, language.

Tesniere, Tesniere is the great complement to Chomsky,
where after Chomsky is like, "this finite state machine
builds models of productions in minimal resources", to,
something like, "Simplified Compilation Source", parser,
"this algorithm works in fixed or linear resources in
up to factorial time and parses anything, and unparsed
sections are their source text, and iterating the data
structure or any segment iterates the source under it
that it's lifted over".

See, look at that, "lifted over", I would get a bad
mark for that. Of course that's since been relaxed,
figuring it's natural to dangle and OK to continue.
And so on.

So anyways as long as we're talking about all the usual
languages, uh, is that all "Common Source Language"?

CS language?

So, for something like, "Common Compilation Components",
figuring all sorts usual functional and procedural
productions sort of have a usual form and thusly
can be a great fabric of re-write rules, or targetting,
basically is for making common-enough productions and
the algorithm be multi-pass as necessary, to result
a usual sort of workbench for languages of the source.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<ushkfm$2ai73$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Sat, 9 Mar 2024 13:25:26 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <ushkfm$2ai73$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<20240303092938.43@kylheku.com> <us2m8u$2m9mm$1@dont-email.me>
<us2s0i$2n6h3$5@dont-email.me> <us41kk$327oo$1@dont-email.me>
<us5bd9$3b404$1@dont-email.me> <us6n21$3mbe2$1@dont-email.me>
<us80kd$3v39d$1@dont-email.me> <us9hc9$b720$1@dont-email.me>
<usaq3v$l26r$3@dont-email.me> <usfvld$1tfqm$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 12:25:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ac7f1056488cfd1f74bf1d72d12d7af";
logging-data="2443491"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xAIkmGs1k3dEKhIPON9pv1lu0tG0uE8w="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gGJWcbiAP5MuTy4YApq8NydJ9Bg=
Content-Language: en-GB
In-Reply-To: <usfvld$1tfqm$2@dont-email.me>
 by: David Brown - Sat, 9 Mar 2024 12:25 UTC

On 08/03/2024 22:23, Chris M. Thomasson wrote:
> On 3/6/2024 2:18 PM, Chris M. Thomasson wrote:
>> On 3/6/2024 2:43 AM, David Brown wrote:
> [...]
>
> This is a fun one:
>
> // pseudo code...
> _______________________
> node*
> node_pop()
> {
>     // try per-thread lifo
>
>     // try shared distributed lifo
>
>     // try global region
>
>     // if all of those failed, return nullptr
> }
>

Just to be clear here - if this is in a safety-critical system, and your
allocation system returns nullptr, people die. That is why you don't
use this kind of thing for important tasks.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usin3i$2htsq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Sat, 9 Mar 2024 14:16:18 -0800
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <usin3i$2htsq$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<20240303092938.43@kylheku.com> <us2m8u$2m9mm$1@dont-email.me>
<us2s0i$2n6h3$5@dont-email.me> <us41kk$327oo$1@dont-email.me>
<us5bd9$3b404$1@dont-email.me> <us6n21$3mbe2$1@dont-email.me>
<us80kd$3v39d$1@dont-email.me> <us9hc9$b720$1@dont-email.me>
<usaq3v$l26r$3@dont-email.me> <usfvld$1tfqm$2@dont-email.me>
<ushkfm$2ai73$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 22:16:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0c5e4c226908d988f63fdd2be319dab1";
logging-data="2684826"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oKbcQrIVbMXA2SuTeLaNJQDgdty6Ke4c="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Q2PzjZeJG4JqYXGlDi/ToD8+qJs=
In-Reply-To: <ushkfm$2ai73$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 9 Mar 2024 22:16 UTC

On 3/9/2024 4:25 AM, David Brown wrote:
> On 08/03/2024 22:23, Chris M. Thomasson wrote:
>> On 3/6/2024 2:18 PM, Chris M. Thomasson wrote:
>>> On 3/6/2024 2:43 AM, David Brown wrote:
>> [...]
>>
>> This is a fun one:
>>
>> // pseudo code...
>> _______________________
>> node*
>> node_pop()
>> {
>>      // try per-thread lifo
>>
>>      // try shared distributed lifo
>>
>>      // try global region
>>
>>      // if all of those failed, return nullptr
>> }
>>
>
> Just to be clear here - if this is in a safety-critical system, and your
> allocation system returns nullptr, people die.  That is why you don't
> use this kind of thing for important tasks.
>
>

In this scenario, nullptr returned means the main region allocator is
out of memory. So, pool things up where this never occurs.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<usin76$2htsq$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Sat, 9 Mar 2024 14:18:14 -0800
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <usin76$2htsq$2@dont-email.me>
References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me>
<20240303092938.43@kylheku.com> <us2m8u$2m9mm$1@dont-email.me>
<us2s0i$2n6h3$5@dont-email.me> <us41kk$327oo$1@dont-email.me>
<us5bd9$3b404$1@dont-email.me> <us6n21$3mbe2$1@dont-email.me>
<us80kd$3v39d$1@dont-email.me> <us9hc9$b720$1@dont-email.me>
<usaq3v$l26r$3@dont-email.me> <usfvld$1tfqm$2@dont-email.me>
<ushkfm$2ai73$1@dont-email.me> <usin3i$2htsq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 22:18:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0c5e4c226908d988f63fdd2be319dab1";
logging-data="2684826"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1A7dAYKtdw5wR686jBjAtfW8NhS49+B0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:D3NXUJh6RthKdLfDY503uX0JaHw=
Content-Language: en-US
In-Reply-To: <usin3i$2htsq$1@dont-email.me>
 by: Chris M. Thomasson - Sat, 9 Mar 2024 22:18 UTC

On 3/9/2024 2:16 PM, Chris M. Thomasson wrote:
> On 3/9/2024 4:25 AM, David Brown wrote:
>> On 08/03/2024 22:23, Chris M. Thomasson wrote:
>>> On 3/6/2024 2:18 PM, Chris M. Thomasson wrote:
>>>> On 3/6/2024 2:43 AM, David Brown wrote:
>>> [...]
>>>
>>> This is a fun one:
>>>
>>> // pseudo code...
>>> _______________________
>>> node*
>>> node_pop()
>>> {
>>>      // try per-thread lifo
>>>
>>>      // try shared distributed lifo
>>>
>>>      // try global region
>>>
>>>      // if all of those failed, return nullptr
>>> }
>>>
>>
>> Just to be clear here - if this is in a safety-critical system, and
>> your allocation system returns nullptr, people die.  That is why you
>> don't use this kind of thing for important tasks.
>>
>>
>
> In this scenario, nullptr returned means the main region allocator is
> out of memory. So, pool things up where this never occurs.
>

You know how to do it! I know you do.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<uso64i$3t3jn$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Tue, 12 Mar 2024 00:03:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <uso64i$3t3jn$1@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me>
<us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me>
<20240305132240.241@kylheku.com> <87plw8pci5.fsf@nosuchdomain.example.com>
<us84q3$3vqtf$1@dont-email.me> <us9rdq$eiqh$2@dont-email.me>
<usdjec$1a50p$6@dont-email.me> <usegkh$1ivtt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 12 Mar 2024 00:03:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="11b38f0fdef8c619d895dc1d0c253c52";
logging-data="4099703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zpjOMYg5nDVoboRFDUh+z"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:VYyVocpEtKmv+1pGcCMvMGa939g=
 by: Lawrence D'Oliv - Tue, 12 Mar 2024 00:03 UTC

On Fri, 8 Mar 2024 09:01:21 +0100, David Brown wrote:

> It seems much more appropriate for Ada (though Pascal also had stricter
> checking and stronger types than most other popular languages had when
> Pascal was developed).

That’s why Ada was built on Pascal: if you want something intended for
high-reliability, safety-critical applications, why not build it on a
foundation that was already the most, shall we say, anal-retentive, among
well-known languages of the time?

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<uso6br$3t3jn$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c comp.lang.c++ comp.lang.java.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.java.programmer
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Tue, 12 Mar 2024 00:07:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <uso6br$3t3jn$2@dont-email.me>
References: <us0brl$246bf$1@dont-email.me>
<XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170>
<us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me>
<us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me>
<us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me>
<20240305132240.241@kylheku.com> <us83nu$3vinv$1@dont-email.me>
<87le6wpbvc.fsf@nosuchdomain.example.com> <us86kr$7j8$1@dont-email.me>
<us9r86$eiqh$1@dont-email.me> <us9sao$erpl$1@dont-email.me>
<20240306161842.00001400@yahoo.com> <usafb2$irvm$1@dont-email.me>
<20240306114939.761@kylheku.com> <usaipk$jjq3$1@dont-email.me>
<ha2dnVzbM9-naHb4nZ2dnZfqnPWdnZ2d@giganews.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 12 Mar 2024 00:07:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="11b38f0fdef8c619d895dc1d0c253c52";
logging-data="4099703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NhE5D4/rQklBC+3gKBFbT"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:0ljCkFcD0ORvlxRxw3woam6SUx8=
 by: Lawrence D'Oliv - Tue, 12 Mar 2024 00:07 UTC

On Fri, 8 Mar 2024 21:36:14 -0800, Ross Finlayson wrote:

> What I'd like to know about is who keeps dialing the "harmonization"
> efforts, which really must give grouse to the "harmonisation"
> spellers ...

Some words came from French and had “-ize”, others did not and had “-ise”.
Some folks in Britain decided to change the former to the latter.

“Televise”, “merchandise”, “advertise” -- never any “-ize” form.

“Synchronize”, “harmonize”, “apologize” -- “-ize” originally.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<SD6dnWlgV-b2W3L4nZ2dnZfqnPhi4p2d@giganews.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c comp.lang.c++ comp.lang.java.programmer
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.26.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 12 Mar 2024 03:05:15 +0000
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"
Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.java.programmer
References: <us0brl$246bf$1@dont-email.me> <XnsB12AC133C49E3hueydlltampabayrrcom@135.181.20.170> <us33a0$2ot8t$1@dont-email.me> <us3n2c$306pr$1@dont-email.me> <us6ckb$3khma$2@dont-email.me> <us6ge5$3l59s$4@dont-email.me> <us6s1l$3nb7r$2@dont-email.me> <us8180$3v3cu$1@dont-email.me> <20240305132240.241@kylheku.com> <us83nu$3vinv$1@dont-email.me> <87le6wpbvc.fsf@nosuchdomain.example.com> <us86kr$7j8$1@dont-email.me> <us9r86$eiqh$1@dont-email.me> <us9sao$erpl$1@dont-email.me> <20240306161842.00001400@yahoo.com> <usafb2$irvm$1@dont-email.me> <20240306114939.761@kylheku.com> <usaipk$jjq3$1@dont-email.me> <ha2dnVzbM9-naHb4nZ2dnZfqnPWdnZ2d@giganews.com> <uso6br$3t3jn$2@dont-email.me>
From: ross.a.f...@gmail.com (Ross Finlayson)
Date: Mon, 11 Mar 2024 20:05:19 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <uso6br$3t3jn$2@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <SD6dnWlgV-b2W3L4nZ2dnZfqnPhi4p2d@giganews.com>
Lines: 115
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-9PdtUN+kylfnYtj86R9lsWfuZPtQCk942+kMX6IENKO8d5WZ3qhEq0ED/fAM4+Q//r7NUXdqkHBfCMF!KIp4wqTVeDkgxJ7AJFiswaNACeQNqhH5CJtWeGXXCC1T85SIWx4w1tNMF+ivGRFVg5h38rE8a4yJ
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Ross Finlayson - Tue, 12 Mar 2024 03:05 UTC

On 03/11/2024 05:07 PM, Lawrence D'Oliveiro wrote:
> On Fri, 8 Mar 2024 21:36:14 -0800, Ross Finlayson wrote:
>
>> What I'd like to know about is who keeps dialing the "harmonization"
>> efforts, which really must give grouse to the "harmonisation"
>> spellers ...
>
> Some words came from French and had “-ize”, others did not and had “-ise”.
> Some folks in Britain decided to change the former to the latter.
>
> “Televise”, “merchandise”, “advertise” -- never any “-ize” form.
>
> “Synchronize”, “harmonize”, “apologize” -- “-ize” originally.
>

Hey thanks that's something I hadn't thought,
that the harmonization was coming from this
side of the pond besides vice-versa, with regards
to that "harmonization" is an effort in controlled
languages in terms of natural languages which
are organic though of course subject their extended
memory the written corpi, which I write corpi, not corpora.

It's like when the dictionary adds new words,
the old words are still words, in, the "Wortbuch",
an abstract dictionary of all the words, that I read
about in Curme. (I'm a fan of Tesniere and Curme.)

About parsing and re-writing systems, I'm really wondering
a lot about, compilation units, lines, spacing and indentation,
blocks, comments, quoting, punctuation, identifiers,
brackets, commas, and stops, how to write grammars
for all sorts usual source language in those, and result,
a novel sort of linear data structure above those,
in whatever languages so recognized in those,
and any sections it doesn't as the source text.

I looked around a bit and after re-writing on the Wiki
and "multi-pass parser" there are some sorts ideas,
usually in terms of fungible intermediate languages
for targeting those to whatever languages, here
though mostly to deal with a gamut of existing code,
there are lots of syntax recognizers and highlighters
and this kind of thing, "auto-detect" in the static
analysis toolkit, the languages, then as with regards to
that a given compilation unit is only gonna be one or
a few languages in it, with regards for example to
"code in text" or "text in code", about comments,
sections, blocks, or "language integrated code"
or "convenience code", "sugar modes", you know,
about what the _grammar_ specifications would be,
and the lexical and syntax the specifications, to
arrive at a multi-pass parser, that compiles a whole
bunch of language specs, finds which ones apply
where to the compilation unit, then starts building
them up "lifting" them above the character sequence,
building an "abstract syntax sequence" (yeah I know)
above that, then building a model of the productions
directly above that, that happens to be exactly derived
from the grammar productions, with the same sort
of structure as the grammar productions.

(Order, loop, optional, a superset of eBNF, to support
syntaxes with bracket blocks like C-style and syntaxes
with indent blocks though I'm not into that, the various
inversions of comments and code, the various interpolations
of quoting, brackets and grouping and precedence,
commas and joining and separating, and because SQL
doesn't really comport itself to BNF, these kinds of things.)

Of course it's obligatory that this would be about C/C++
and as with regards to Java which of course is in the
same style, or that its derivative, is for example that
M4/C/C++ code is already to a multi-pass parser, and,
Java at some point added language features which
fundamentally require a multi-pass parser, so it's not
like the entire resources of the mainframe has to fit
a finite-state-machine on the read-head, in fact at
compile-time specifically there's "it's fair to consider
a concatenation of the compilation units as a linear
input in space", then figuring the "liftings" are linear
in that, in space, then that the productions whence
derived are as concise as the productions a minimal
model, thus discardable the intermediate bit, is for
introducing a sort of common model of language
representation, source language, for reference
implementations of the grammars, then to make
the act of ingestion of sources in languages as a
first-class kind of thing, I'm looking for one of those,
and that's about as much I've figured out it is.

It's such a usual idea I must imagine that it's
commonplace, as it's just the very most simple
act of the model of iterating these things and
reading them out.

I probably might not care about it but getting
to where it takes a parser that can parse SQL
for example, or, you know, when there are lots
of source formats but it's just data and definitions,
yeah if you know that there's like a very active
open project in that I'd be real interested in a
sort of "source/object/relational mapping", ...,
as it were, "source/grammatical-production mapping",
what results you identify grammars and pick sources
and it prints out the things.

I'm familiar with the traditional approaches,
and intend to employ them. I figure this
must be a very traditional approach if
nobody's heard of it.

Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

<d05dfd7d-a2fd-49da-a2de-1ce0ad0026b3@gmail.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: thiago.a...@gmail.com (Thiago Adams)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity
Risks"
Date: Tue, 12 Mar 2024 15:54:21 -0300
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <d05dfd7d-a2fd-49da-a2de-1ce0ad0026b3@gmail.com>
References: <us0brl$246bf$1@dont-email.me>
<us780t$3pku4$1@toylet.eternal-september.org>
<us96rh$962c$1@toylet.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="713f1c401e6d48d953031393ec49325f";
logging-data="483642"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2+vXfvG6N1YT7FKwUO2tSQ34TI3U86TY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:R4M5wxKaiLuHJOAD/BShIu3m0zk=
In-Reply-To: <us96rh$962c$1@toylet.eternal-september.org>
Content-Language: en-US
 by: Thiago Adams - Tue, 12 Mar 2024 18:54 UTC

On 06/03/2024 04:43, Mr. Man-wai Chang wrote:
> On 5/3/2024 9:51 pm, Mr. Man-wai Chang wrote:
>> On 3/3/2024 7:13 am, Lynn McGuire wrote:
>>>
>>> "The Biden administration backs a switch to more memory-safe programming
>>> languages. The tech industry sees their point, but it won't be easy."
>>>
>>> No.  The feddies want to regulate software development very much.  They
>>> have been talking about it for at least 20 years now.  This is a very
>>> bad thing.
>>
>> A responsible, good progreammer or a better C/C++ pre-processor can
>> avoid a lot of problems!!
>
> Or maybe A.I.-assisted code analyzer?? But there are still blind spots...

I think AI could be used and give goods result but it is not ideal.
The advantage of AI it could understand patterns. Like the names init
and destroy could work as tips or patterns.

However, I think programming needs a formal language for contracts and
the static analysis needs to check them.
Also ideally is better contracts for the interface rather having to see
the body of the functions.


devel / comp.lang.c++ / Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

Pages:1234567
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor