Lynn McGuire <lynnmcguire5@gmail.com> wrote:
Huh, so somebody has actually built a decent decompiler. Why do I doubt
this even though ESR says otherwise?
Because decompiling some languages isn't that hard. Humans can do it pretty well, although it's harder for machines. It helps a lot if you have a symbol table (which it sounds like they did in the example ESR cites).
Now... that said... I wouldn't trust anything ESR ever says and I would not hold him up as an authority.
And he has a translator from Borland Pascal to Rust?
That seems like a step down, doesn't it?
--scott
On 10/15/2026 9:56 AM, Richard wrote:
Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code
<11amvre$15far$1@dont-email.me> thusly:
Huh, so somebody has actually built a decent decompiler.
It's been around for decades. It's called Ida Pro. The NSA published
an open source one called Ghidra. It's actually not hard to recognize
the output of a particular compiler and reverse engineer stack frames,
arguments, etc.
What the LLM brings to the picture is speculating meaningful
datatypes, names, patterns, etc., on top of the mechanical
decompilation.
Why do I doubt
this even though ESR says otherwise?
Maybe because you don't have experience with existing reverse
compilers (try Ghidra, since it's free) and LLMs?
And he has a translator from Borland Pascal to Rust?
It's not like he converted to Prolog. Mapping from one procedurally
oriented block structured language to another is not particularly
difficult.
I tried Ida Pro several years ago. It was crap.
I have never tried Ghidra. Maybe someday.
In article <11ar89j$2mdpm$2@dont-email.me>,
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
On 10/15/2026 9:56 AM, Richard wrote:
Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code
<11amvre$15far$1@dont-email.me> thusly:
Huh, so somebody has actually built a decent decompiler.
It's been around for decades. It's called Ida Pro. The NSA published
an open source one called Ghidra. It's actually not hard to recognize
the output of a particular compiler and reverse engineer stack frames,
arguments, etc.
What the LLM brings to the picture is speculating meaningful
datatypes, names, patterns, etc., on top of the mechanical
decompilation.
Why do I doubt
this even though ESR says otherwise?
Maybe because you don't have experience with existing reverse
compilers (try Ghidra, since it's free) and LLMs?
And he has a translator from Borland Pascal to Rust?
It's not like he converted to Prolog. Mapping from one procedurally
oriented block structured language to another is not particularly
difficult.
I tried Ida Pro several years ago. It was crap.
I have never tried Ghidra. Maybe someday.
Turbo Pascal was kind of amazing. Lightning fast compile on 8086, and
ran on oddball hardware like the DEC Rainbow.
On 10/15/2026 10:05 AM, Scott Dorsey wrote:
Lynn McGuire-a <lynnmcguire5@gmail.com> wrote:
Huh, so somebody has actually built a decent decompiler.-a Why do I doubt >>> this even though ESR says otherwise?
Because decompiling some languages isn't that hard.-a Humans can do it
pretty
well, although it's harder for machines.-a It helps a lot if you have a
symbol
table (which it sounds like they did in the example ESR cites).
Now... that said... I wouldn't trust anything ESR ever says and I
would not
hold him up as an authority.
And he has a translator from Borland Pascal to Rust?
That seems like a step down, doesn't it?
--scott
Yes on the step down to Rust.-a I wrote a lot of Turbo Pascal code back
in the 1980s but I have to admit that I am a C++ fanboi through and through.-a And at my age, it will hard to change my mind on that unless
you are writing embedded code.
I have translated over 200,000 lines of Fortran 66/77 code to C++ this
year so far.-a Trying to get to 300,000 lines of Fortran 66/77 code
before the end of the year.
Lynn
Gary Scott <garylscott@sbcglobal.net> wrote:
And you can write high quality code in Fortran more so with modern versions.
I am not sure I agree with that. The matrix operations in f90 are wonderful and make compiler optimizations for vector machines so much easier. But pointers? Engineers should never be trusted with pointers.
Scott Dorsey <kludge@panix.com> schrieb:
Gary Scott <garylscott@sbcglobal.net> wrote:
And you can write high quality code in Fortran more so with modern versions. >>I am not sure I agree with that. The matrix operations in f90 are wonderful >> and make compiler optimizations for vector machines so much easier. But
pointers? Engineers should never be trusted with pointers.
You hardly need pointers in modern Fortran. For very many, if
not most, use cases allocatable variables do the job just fine,
and the compiler does the memory management for you.
Thomas Koenig <tkoenig@netcologne.de> wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Gary Scott <garylscott@sbcglobal.net> wrote:
And you can write high quality code in Fortran more so with modern versions.
I am not sure I agree with that. The matrix operations in f90 are wonderful
and make compiler optimizations for vector machines so much easier. But >>> pointers? Engineers should never be trusted with pointers.
You hardly need pointers in modern Fortran. For very many, if
not most, use cases allocatable variables do the job just fine,
and the compiler does the memory management for you.
This is true. But that doesn't mean engineers won't use them. And they will put them in common blocks so they can store something as a pointer and then read it as an integer.
But you can get at the internal representation of pointers via the
TRANSFER function, or you can pass them via the C interoperability
features.
Putting them in COMMON blocks and then accessing them via type
punning would be a useless thing to do.
Thomas Koenig <tkoenig@netcologne.de> wrote:
But you can get at the internal representation of pointers via the
TRANSFER function, or you can pass them via the C interoperability >>features.
Putting them in COMMON blocks and then accessing them via type
punning would be a useless thing to do.
Don't ask me, I just fix this stuff.
Thomas Koenig <tkoenig@netcologne.de> wrote:;^D
But you can get at the internal representation of pointers via the
TRANSFER function, or you can pass them via the C interoperability
features.
Putting them in COMMON blocks and then accessing them via type
punning would be a useless thing to do.
Don't ask me, I just fix this stuff.
Scott Dorsey <kludge@panix.com> schrieb:
Thomas Koenig <tkoenig@netcologne.de> wrote:
But you can get at the internal representation of pointers via the
TRANSFER function, or you can pass them via the C interoperability
features.
Putting them in COMMON blocks and then accessing them via type
punning would be a useless thing to do.
Don't ask me, I just fix this stuff.
Do you actually encounter such code? Pointers in COMMON blocks
sounds extremely weird. Or do you mean Cray pointers?
Do you have an example?
Scott Dorsey <kludge@panix.com> schrieb:
Thomas Koenig <tkoenig@netcologne.de> wrote:
But you can get at the internal representation of pointers via the >>>TRANSFER function, or you can pass them via the C interoperability >>>features.
Putting them in COMMON blocks and then accessing them via type
punning would be a useless thing to do.
Don't ask me, I just fix this stuff.
Do you actually encounter such code? Pointers in COMMON blocks
sounds extremely weird. Or do you mean Cray pointers?
Thomas Koenig <tkoenig@netcologne.de> wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Thomas Koenig <tkoenig@netcologne.de> wrote:
But you can get at the internal representation of pointers via the
TRANSFER function, or you can pass them via the C interoperability
features.
Putting them in COMMON blocks and then accessing them via type
punning would be a useless thing to do.
Don't ask me, I just fix this stuff.
Do you actually encounter such code? Pointers in COMMON blocks
sounds extremely weird. Or do you mean Cray pointers?
I encounter a LOT of code written by engineers who think they know about
new language features but don't really.
But what they lose in missing comments, they make up for in spurious gotos. --scott
Thomas Koenig <tkoenig@netcologne.de> wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Thomas Koenig <tkoenig@netcologne.de> wrote:
But you can get at the internal representation of pointers via the
TRANSFER function, or you can pass them via the C interoperability
features.
Putting them in COMMON blocks and then accessing them via type
punning would be a useless thing to do.
Don't ask me, I just fix this stuff.
Do you actually encounter such code? Pointers in COMMON blocks
sounds extremely weird. Or do you mean Cray pointers?
I encounter a LOT of code written by engineers who think they know about
new language features but don't really.
But what they lose in missing comments, they make up for in spurious gotos. --scott
One of the things that I am enjoying is that F2C gets rid of about 75%
of the Fortran Gotos. The remaining 25% Gotos usually make some sense.
Ok, a little sense that any C or C++ programmer would have never used a
goto there.
I guess I take umbrage at your goto statement. I do nothing of the like.
groovy:: ; do that groovy thing
.call_entry max_args=33,home_args=true,preserve=<r3,r5>
movl (ap),r3 ; boogity boogity boogity
moval 4(ap),r5 ; yeah, you got it baby
ret ; go back and do it again
.psect idata,wrt,noexe,quad
.align quad
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75%
of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>Ok, a little sense that any C or C++ programmer would have never used a >>goto there.
It drives me up the wall when people use a goto to jump out of a do loop.
The compiler is doing so much cleanup work that the programmer never sees.
Scott Dorsey <kludge@panix.com> schrieb:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75%
of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>> Ok, a little sense that any C or C++ programmer would have never used a >>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop.
The compiler is doing so much cleanup work that the programmer never sees.
Again, care to give an example?
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75%
of the Fortran Gotos. The remaining 25% Gotos usually make some sense.
Ok, a little sense that any C or C++ programmer would have never used a
goto there.
It drives me up the wall when people use a goto to jump out of a do loop.
The compiler is doing so much cleanup work that the programmer never sees. --scott
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75%
of the Fortran Gotos. The remaining 25% Gotos usually make some sense.
Ok, a little sense that any C or C++ programmer would have never used a
goto there.
It drives me up the wall when people use a goto to jump out of a do loop.
The compiler is doing so much cleanup work that the programmer never sees.
Why do you care about unseen work that the compiler is doing? I
guarantee that most programmers in these 64 bit days do not care.
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:Why do you care about unseen work that the compiler is doing? I
One of the things that I am enjoying is that F2C gets rid of about 75% >>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>> Ok, a little sense that any C or C++ programmer would have never used a >>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>> The compiler is doing so much cleanup work that the programmer never sees. >>
guarantee that most programmers in these 64 bit days do not care.
Because I want my code to run fast! I do very much seem to be in the minority today, it is true.
--scott
I've come across complaints -- that I don't have handy -- that compilers sometimes under-optimize, or otherwise cannot be told to do the right
thing.
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75%
of the Fortran Gotos. The remaining 25% Gotos usually make some sense.
Ok, a little sense that any C or C++ programmer would have never used a
goto there.
It drives me up the wall when people use a goto to jump out of a do loop.
The compiler is doing so much cleanup work that the programmer never sees.
--scott
Why do you care about unseen work that the compiler is doing? I
guarantee that most programmers in these 64 bit days do not care.
On 20/10/2026 18:28, Thomas Koenig wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:Again, care to give an example?
One of the things that I am enjoying is that F2C gets rid of about 75% >>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>> Ok, a little sense that any C or C++ programmer would have never used a >>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>> The compiler is doing so much cleanup work that the programmer never sees. >>
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>> Ok, a little sense that any C or C++ programmer would have never used a >>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>> The compiler is doing so much cleanup work that the programmer never sees.
I'd really like to know what that cleanup work is supposed to be (as
somebody who is involved with Fortran compiler development).
On 10/20/2026 1:46 AM, Titus G wrote:
On 20/10/2026 18:28, Thomas Koenig wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Lynn McGuire-a <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>>> of the Fortran Gotos.-a The remaining 25% Gotos usually make some
sense.
Ok, a little sense that any C or C++ programmer would have never
used a
goto there.
It drives me up the wall when people use a goto to jump out of a do
loop.
The compiler is doing so much cleanup work that the programmer never
sees.
Again, care to give an example?
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf
pt
On 10/20/2026 1:46 AM, Titus G wrote:
On 20/10/2026 18:28, Thomas Koenig wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:Again, care to give an example?
One of the things that I am enjoying is that F2C gets rid of about 75% >>>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>>> Ok, a little sense that any C or C++ programmer would have never used a >>>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>>> The compiler is doing so much cleanup work that the programmer never sees. >>>
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
In article <11b8b2k$p44i$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>Cryptoengineer <petertrei@gmail.com> wrote:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
I have seen a structured assembler class and it's actually not a bad way
to think at all. Having LOOPZ and REP* and similar instructions make it >easier to think about do loops.
On 10/20/2026 1:46 AM, Titus G wrote:
On 20/10/2026 18:28, Thomas Koenig wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Lynn McGuire-a <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>>> of the Fortran Gotos.-a The remaining 25% Gotos usually make some
sense.
Ok, a little sense that any C or C++ programmer would have never
used a
goto there.
It drives me up the wall when people use a goto to jump out of a do
loop.
The compiler is doing so much cleanup work that the programmer never
sees.
Again, care to give an example?
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:Why do you care about unseen work that the compiler is doing? I
One of the things that I am enjoying is that F2C gets rid of about 75% >>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>> Ok, a little sense that any C or C++ programmer would have never used a >>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>> The compiler is doing so much cleanup work that the programmer never sees. >>
guarantee that most programmers in these 64 bit days do not care.
Because I want my code to run fast! I do very much seem to be in the minority today, it is true.
On Tue, 20 Oct 2026 17:15:28 -0000 (UTC)
Thomas Koenig <tkoenig@netcologne.de> wrote:
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/19/2026 5:57 PM, Scott Dorsey wrote:I'd really like to know what that cleanup work is supposed to be (as
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>>> Ok, a little sense that any C or C++ programmer would have never used a >>>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>>> The compiler is doing so much cleanup work that the programmer never sees. >>
somebody who is involved with Fortran compiler development).
If C/C++ had multi level break and continue keywords goto would almost
never be needed**. There's no reason they can't be added - along with a lot of
other useful but basic fatures (eg non POD switch, native concatting numbers to
std::string without calling to_string) - but I guess the committee are too busy
circle jerking with esoteric crap no one will ever use (eg concepts) to bother.
On Tue, 20 Oct 2026 13:20:40 -0400
Cryptoengineer <petertrei@gmail.com> wrote:
On 10/20/2026 1:46 AM, Titus G wrote:
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>> Ok, a little sense that any C or C++ programmer would have never used a >>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>> The compiler is doing so much cleanup work that the programmer never sees.
I'd really like to know what that cleanup work is supposed to be (as
somebody who is involved with Fortran compiler development).
I am beginning to suspect that Scott is the only person in the
world who sees this supposed inefficiency.
--scott
Why do you care about unseen work that the compiler is doing? I
guarantee that most programmers in these 64 bit days do not care.
For very many problems, there is no need to be efficient - it very
certainly does not matter if a program that is executed once takes
0.01 s or 0.1s.
But the attitude of not caring about speed can have grave results
when the inefficiencies pile up. People who use Python for
everything may find that instead of 0.1 s, their code suddenly
runs for hours, when it would need seconds in a compiled language.
Or look at the pile of resource-wasting junk like Microsoft
Teams runnig on top of the pile of resource-wasting junk called
Microsoft Windows. Teams grabs a humungous amount of memory so 16
GB is borderline unusable in a commercial enviroment. Makes the
recent memory price hike all the more interesting...
Don't know about your code, but I remember waiting a long time
for Aspen simulations... but then again, those diverge from
a converged solution, which shows that if Aspen has the first
clue about numerical methods, they are very good at hiding it.
I just hope your software is better, at least in that respect.
On Tue, 20 Oct 2026 17:15:28 -0000 (UTC)
Thomas Koenig <tkoenig@netcologne.de> wrote:
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/19/2026 5:57 PM, Scott Dorsey wrote:I'd really like to know what that cleanup work is supposed to be (as
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>>> Ok, a little sense that any C or C++ programmer would have never used a >>>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>>> The compiler is doing so much cleanup work that the programmer never sees. >>
somebody who is involved with Fortran compiler development).
If C/C++ had multi level break and continue keywords goto would almost
never be needed**. There's no reason they can't be added - along with a lot of
other useful but basic fatures (eg non POD switch, native concatting numbers to
std::string without calling to_string) - but I guess the committee are too busy
circle jerking with esoteric crap no one will ever use (eg concepts) to bother.
** The setting a flag method which has to be checked in every nested loop test
is just an assinine way to code.
On 2026-10-20, boltar@battlestar.co.uk <boltar@battlestar.co.uk> wrote:
On Tue, 20 Oct 2026 13:20:40 -0400
Cryptoengineer <petertrei@gmail.com> wrote:
On 10/20/2026 1:46 AM, Titus G wrote:
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
Of course. He was a CS weenie - any mention of low-level
programming makes those types turn purple.
The undisciplined use of GOTOs is bad, agreed.
In article <11b8b2k$p44i$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
Cryptoengineer <petertrei@gmail.com> wrote:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
I have seen a structured assembler class and it's actually not a bad way
to think at all. Having LOOPZ and REP* and similar instructions make it easier to think about do loops.
The key to writing structured assembly is commenting.
--scott
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>> Ok, a little sense that any C or C++ programmer would have never used a >>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>> The compiler is doing so much cleanup work that the programmer never sees.
I'd really like to know what that cleanup work is supposed to be (as
somebody who is involved with Fortran compiler development).
I am beginning to suspect that Scott is the only person in the
world who sees this supposed inefficiency.
--scott
Why do you care about unseen work that the compiler is doing? I
guarantee that most programmers in these 64 bit days do not care.
For very many problems, there is no need to be efficient - it very
certainly does not matter if a program that is executed once takes
0.01 s or 0.1s.
But the attitude of not caring about speed can have grave results
when the inefficiencies pile up. People who use Python for
everything may find that instead of 0.1 s, their code suddenly
runs for hours, when it would need seconds in a compiled language.
Or look at the pile of resource-wasting junk like Microsoft
Teams runnig on top of the pile of resource-wasting junk called
Microsoft Windows. Teams grabs a humungous amount of memory so 16
GB is borderline unusable in a commercial enviroment. Makes the
recent memory price hike all the more interesting...
Don't know about your code, but I remember waiting a long time
for Aspen simulations... but then again, those diverge from
a converged solution, which shows that if Aspen has the first
clue about numerical methods, they are very good at hiding it.
I just hope your software is better, at least in that respect.
The key to writing any software is lots of commenting.
In article <11b8b2k$p44i$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
Cryptoengineer <petertrei@gmail.com> wrote:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
I have seen a structured assembler class and it's actually not a bad way
to think at all. Having LOOPZ and REP* and similar instructions make it easier to think about do loops.
The key to writing structured assembly is commenting.
On 10/20/2026 9:39 PM, Scott Dorsey wrote:
Because I want my code to run fast! I do very much seem to be in the
minority today, it is true.
I presume you're working on some /hot code/, and will comment according-
ly.
I've come across complaints -- that I don't have handy -- that compilers >sometimes under-optimize, or otherwise cannot be told to do the right
thing. One memorable complaint was the inability of then-GCC to align
a specific loop to the cache -- I believe a 16 byte boundary -- it was
only everything -- with the resulting drop in performance everywhere
else -- or nothing because there was no #pragma nor [[attribute]] to say >/this loop needs to be cache aligned/.
What do you do in these circumstances? Has this happened to you at all?
On Tue, 20 Oct 2026 13:20:40 -0400
Cryptoengineer <petertrei@gmail.com> wrote:
On 10/20/2026 1:46 AM, Titus G wrote:
On 20/10/2026 18:28, Thomas Koenig wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>>>> of the Fortran Gotos. The remaining 25% Gotos usually make some sense. >>>>>> Ok, a little sense that any C or C++ programmer would have never used a >>>>>> goto there.
It drives me up the wall when people use a goto to jump out of a do loop. >>>>> The compiler is doing so much cleanup work that the programmer never sees.
Again, care to give an example?
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
On 2026-10-20, boltar@battlestar.co.uk <boltar@battlestar.co.uk> wrote:
On Tue, 20 Oct 2026 13:20:40 -0400
Cryptoengineer <petertrei@gmail.com> wrote:
On 10/20/2026 1:46 AM, Titus G wrote:
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
Of course. He was a CS weenie - any mention of low-level
programming makes those types turn purple.
On 10/19/2026 5:57 PM, Scott Dorsey wrote:
Lynn McGuire-a <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75%
of the Fortran Gotos.-a The remaining 25% Gotos usually make some sense. >>> Ok, a little sense that any C or C++ programmer would have never used a
goto there.
It drives me up the wall when people use a goto to jump out of a do loop.
The compiler is doing so much cleanup work that the programmer never
sees.
--scott
Why do you care about unseen work that the compiler is doing?-a I
guarantee that most programmers in these 64 bit days do not care.
On 10/20/2026 12:15 PM, Thomas Koenig wrote:
Don't know about your code, but I remember waiting a long time
for Aspen simulations... but then again, those diverge from
a converged solution, which shows that if Aspen has the first
clue about numerical methods, they are very good at hiding it.
I just hope your software is better, at least in that respect.
Most of our convergence methods use Newton-Raphson, yes that Isaac
Newton, to start, very quick to solve if it solves. If that spirals out
of control then we use the halving method, brute force and very slow.
If that fails then we use an interpolation method, also very slow. If
that fails (the flash is infeasible), then we report the failure to the user.
Our rigorous four phase flash is the worst since it solves two sets of k-values simultaneously with a vapor-liquid-solid fugacity based solid flash. The four phases are vapor, hydrocarbon liquid, aqueous liquid,
and solid. Almost 300,000 lines of Fortran 66/77 code that I am
converting to C++.
And there are exceptions all over the place to the above since our
software is Frankenstein consisting of the Design, Distill, Refine, and Gasplant Plus programs merged together.
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/20/2026 12:15 PM, Thomas Koenig wrote:
Don't know about your code, but I remember waiting a long time
for Aspen simulations... but then again, those diverge from
a converged solution, which shows that if Aspen has the first
clue about numerical methods, they are very good at hiding it.
I just hope your software is better, at least in that respect.
Most of our convergence methods use Newton-Raphson, yes that Isaac
Newton, to start, very quick to solve if it solves. If that spirals out
of control then we use the halving method, brute force and very slow.
If that fails then we use an interpolation method, also very slow. If
that fails (the flash is infeasible), then we report the failure to the
user.
Sounds reasonable, but...
How can bisection fail? If you have bracketed your roots and
have no singularities it always succeeds.
Hmm... molar fractions less than zero, maybe?
Our rigorous four phase flash is the worst since it solves two sets of
k-values simultaneously with a vapor-liquid-solid fugacity based solid
flash. The four phases are vapor, hydrocarbon liquid, aqueous liquid,
and solid. Almost 300,000 lines of Fortran 66/77 code that I am
converting to C++.
For two variables, of course, bisection will not work.
And there are exceptions all over the place to the above since our
software is Frankenstein consisting of the Design, Distill, Refine, and
Gasplant Plus programs merged together.
I can imagine...
On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:
The undisciplined use of GOTOs is bad, agreed.
Is there such a thing as a *disciplined* use of gotos?
I find the C code I write tends to do a lot of dynamic resource
allocations. These can sometimes fail with errors. So error recovery
will invariably involve cleaning up those parts of the allocations
which already succeeded. Gotos are no good for this; you need to exit
levels of structure nesting one by one, disposing of allocations as
you go.
On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:
The undisciplined use of GOTOs is bad, agreed.
Is there such a thing as a *disciplined* use of gotos?
On 10/20/2026 1:22 PM, Scott Dorsey wrote:
In article <11b8b2k$p44i$1@dont-email.me>,-a <boltar@battlestar.co.uk>
wrote:
Cryptoengineer <petertrei@gmail.com> wrote:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
I have seen a structured assembler class and it's actually not a bad way
to think at all.-a Having LOOPZ and REP* and similar instructions make it
easier to think about do loops.
The key to writing structured assembly is commenting.
--scott
The key to writing any software is lots of commenting.
About a third of my calculation engine was written pre 1978 (250,000
lines of Fortran 66 code) and that code cost us money to sit on a drum
drive on a Univac 1108.-a So no comments for that code except where
somebody came along and threw something in there after 1977.-a Sometimes
the later comments are correct, sometimes the later comments are wrong.
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:A drink? Ahh some brain coolants. Well, they are needed from time to
On 10/20/2026 9:39 PM, Scott Dorsey wrote:
Because I want my code to run fast! I do very much seem to be in the
minority today, it is true.
I presume you're working on some /hot code/, and will comment according-
ly.
It's not super hot, but it's often pretty dense dsp stuff and requires extensive commenting to describe exactly what equations are for and how
they are being used.
Unfortunately so much of the code I deal with has comments like
C BRAINDAMAGE! ROCKWELL-COLLINS BRAINDAMAGE!
Which are expressive and they are good warnings that something is about
to follow which has to do with hardware design deficiencies but not
actually very informative about what they are.
I've come across complaints -- that I don't have handy -- that compilers
sometimes under-optimize, or otherwise cannot be told to do the right
thing. One memorable complaint was the inability of then-GCC to align
a specific loop to the cache -- I believe a 16 byte boundary -- it was
only everything -- with the resulting drop in performance everywhere
else -- or nothing because there was no #pragma nor [[attribute]] to say
/this loop needs to be cache aligned/.
There used to be a lot of complaints like that around here, but these
days gcc is so much better than it was even a decade ago. The new
gfortran is not perfect but it's entirely acceptable and takes advantage
of the good backend developed for gcc. The older g77 was excruciating.
I'd read the .a files that came out and just want to hit my head on the
desk.
What do you do in these circumstances? Has this happened to you at all?
I go home and I have a drink and I try not to think about it. Yes, it
could run a lot better but....
On 2026-10-20, boltar@battlestar.co.uk <boltar@battlestar.co.uk> wrote:
On Tue, 20 Oct 2026 13:20:40 -0400
Cryptoengineer <petertrei@gmail.com> wrote:
On 10/20/2026 1:46 AM, Titus G wrote:
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
Of course. He was a CS weenie - any mention of low-level
programming makes those types turn purple.
Although Structured Programming introduced some good concepts,
it also built a following of fanatics more bent on crucifying
infidels than writing good practical programs. Some people
came to see the number of function calls a program made as
a figure of merit, resulting in dozens of tiny functions that
caused control to jump all over the place (which made virtual
memory systems thrash). And the end result wasn't that much
more readable.
The undisciplined use of GOTOs is bad, agreed. But the
undisciplined use of function calls isn't a whole lot better.
After all, a function call is just a GOTO paired with a
"come from", so in the end it's all still spaghetti code -
it's just that the "structured" code runs double strands.
On 2026-10-20, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
I find the C code I write tends to do a lot of dynamic resource
allocations. These can sometimes fail with errors. So error
recovery will invariably involve cleaning up those parts of the
allocations which already succeeded. Gotos are no good for this;
you need to exit levels of structure nesting one by one, disposing
of allocations as you go.
I know that a lot of CS types are going to stick pins into little
dolls that look like me for saying this, but IMHO resource pointers,
handles, etc. should be global.
** The setting a flag method which has to be checked in every nested
loop test is just an [asinine] way to code.
But the attitude of not caring about speed can have grave results
when the inefficiencies pile up.
Most of our convergence methods use Newton-Raphson, yes that Isaac
Newton, to start, very quick to solve if it solves.
If that spirals out of control then we use the halving method, brute
force and very slow. If that fails then we use an interpolation
method, also very slow. If that fails (the flash is infeasible),
then we report the failure to the user.
Multi-level break and continue (named loops) is on its way to C++, and
will almost certainly be accepted sooner or later (since it is already
in the draft of the next C standard):
<https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3568r0.html>
On 10/20/2026 1:46 AM, Titus G wrote:
On 20/10/2026 18:28, Thomas Koenig wrote:
Scott Dorsey <kludge@panix.com> schrieb:
Lynn McGuire-a <lynnmcguire5@gmail.com> wrote:
One of the things that I am enjoying is that F2C gets rid of about 75% >>>>> of the Fortran Gotos.-a The remaining 25% Gotos usually make some
sense.
Ok, a little sense that any C or C++ programmer would have never
used a
goto there.
It drives me up the wall when people use a goto to jump out of a do
loop.
The compiler is doing so much cleanup work that the programmer never
sees.
Again, care to give an example?
I thought that what was called Structured Programming became an
inviolable law when invented by whom I do not know but suspect that
bugger for the bottle or even earlier.
ITYM:
Edgar Dijkstra: Go To Statement Considered Harmful
https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf
pt
On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote:
I know that a lot of CS types are going to stick pins into little
dolls that look like me for saying this, but IMHO resource pointers,
handles, etc. should be global.
Surely any variable which is only used locally to a particular block
should be declared local to that block. Why should resource pointers
be any different?
Ah, I do love zombie comments, where someone has changed the code but
left the comments as they were.
Ah, I do love zombie comments, where someone has changed the code but
left the comments as they were.
i += 2; /* add 1 to i */
On 2026-10-21, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote:
I know that a lot of CS types are going to stick pins into little
dolls that look like me for saying this, but IMHO resource
pointers, handles, etc. should be global.
Surely any variable which is only used locally to a particular
block should be declared local to that block. Why should resource
pointers be any different?
Many resource pointers aren't local, though. Consider a program
which loads a table from a file, then uses it for lookups while
processing data in another file. You might decompose the program
into a function that loads the table, and another that performs
lookups. The main routine calls the table load routine, and opens
the file to be processed. It then loops reading records, calling the
lookup function each time. The table, dynamically allocated by the
table load function, must remain allocated when the allocator exits,
and must be available to the lookup function on each call; it cannot
be local to either of those functions.
... everything was rewritten using Structured Programming and COBOL
which had a marvellously fast file indexing system and it became
possible to read other programmers' programs with such advantages
being great for the bureau but not so demanding and therefore
rewarding for programmers.
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every nested
loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it works >perfectly well.
On 20/10/2026 19:24, boltar@battlestar.co.uk wrote:
If C/C++ had multi level break and continue keywords goto would almost
never be needed**. There's no reason they can't be added - along with a lot >of
other useful but basic fatures (eg non POD switch, native concatting numbers >to
std::string without calling to_string) - but I guess the committee are too >busy
circle jerking with esoteric crap no one will ever use (eg concepts) to >bother.
Multi-level break and continue (named loops) is on its way to C++, and
will almost certainly be accepted sooner or later (since it is already
in the draft of the next C standard):
And people /do/ use concepts, even if you do not.
You might want to do some research before insulting the people who are >actually doing the work in driving languages forward.
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow -
whereas a goto out of a deeply nested loops is blindingly obvious -
and its less efficient.
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow -
whereas a goto out of a deeply nested loops is blindingly obvious -
and its less efficient.
The goto from the deep inner block to the outer one is rCLblindingly >obviousrCY ... ly wrong.
What about the cleanup?
On 2026-10-20, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:
The undisciplined use of GOTOs is bad, agreed.
Is there such a thing as a *disciplined* use of gotos?
Yes, especially in COBOL or assembly language. For instance,
a GOTO to the end of a function ensures any of its cleanup code
gets executed, and fulfils a goal of structured proramming:
each function has one exit point.
I find the C code I write tends to do a lot of dynamic resource
allocations. These can sometimes fail with errors. So error recovery
will invariably involve cleaning up those parts of the allocations
which already succeeded. Gotos are no good for this; you need to exit
levels of structure nesting one by one, disposing of allocations as
you go.
I know that a lot of CS types are going to stick pins into little
dolls that look like me for saying this, but IMHO resource pointers,
handles, etc. should be global. Possible exceptions are resources
that are going to be used solely by the current function - but even
then, if that function calls another function that fails horribly,
there's stuff that might not get cleaned up. That's why all my
C programs contain a function quit_cleanup(char *errmsg), which
de-allocates all resources and then exits (displaying "errmsg"
if it isn't NULL). I can call that function anywhere, safe in
the knowledge that by the time it finishes (it never returns),
everything will have be freed.
On Tue, 20 Oct 2026 17:15:28 -0000 (UTC), Thomas Koenig wrote:
But the attitude of not caring about speed can have grave results
when the inefficiencies pile up.
ThatrCOs not usually how code works, though. Execution time tends to
follow a Pareto distribution -- spend your effort on the 10% of the
code where 90% of the time is being spent, and that gives significant improvements without having to mess around with the other 90% of the
code.
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow -
whereas a goto out of a deeply nested loops is blindingly obvious -
and its less efficient.
The goto from the deep inner block to the outer one is rCLblindingly obviousrCY ... ly wrong.
What about the cleanup?
According to William Hyde <wthyde1953@gmail.com>:
Ah, I do love zombie comments, where someone has changed the code but
left the comments as they were.
i += 2; /* add 1 to i */
On Wed, 21 Oct 2026 07:55:39 -0000 (UTC)
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> wrote:
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow -
whereas a goto out of a deeply nested loops is blindingly obvious -
and its less efficient.
The goto from the deep inner block to the outer one is rCLblindingly
obviousrCY ... ly wrong.
Fine, well you stick with your gotos-are-bad religious doctrine based on something one guy said 50 years ago and the rest of us will carry on writing usable and easy to follow code.
What about the cleanup?
What about it? you think a flag test in a loop automagically fixes that?
In article <11b9bn2$28tm$2@gal.iecc.com>, John Levine <johnl@taugh.com> wrote:
According to William Hyde <wthyde1953@gmail.com>:
Ah, I do love zombie comments, where someone has changed the code but >>>left the comments as they were.
i += 2; /* add 1 to i */
And then you find out it *does* add 1 to i. Somehow.
ted@loft.tnolan.com (Ted Nolan <tednolan>) writes:
In article <11b9bn2$28tm$2@gal.iecc.com>, John Levine <johnl@taugh.com> wrote:
According to William Hyde <wthyde1953@gmail.com>:
Ah, I do love zombie comments, where someone has changed the code but >>>>left the comments as they were.
i += 2; /* add 1 to i */
And then you find out it *does* add 1 to i. Somehow.
Fixed point i with one fractional bit. Or something.
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking >about and add nothing of actual value for the jobbing programmer trying to >solve a problem.
In article <11b9qna$pqb8$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking
about and add nothing of actual value for the jobbing programmer trying to >> solve a problem.
I kind of thought that way once. Then I worked with someone who decided
to solve a problem that was NP-hard. I mentioned to him, "you know this is NP-hard, you'll never make it work for a reasonable number of elements"
but he was convinced there was a solution. He worked on it for about a year before getting fired.
--scott
i += 2; /* add 1 to i */
And then you find out it *does* add 1 to i. Somehow.
On Tue, 20 Oct 2026 20:50:58 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 20/10/2026 19:24, boltar@battlestar.co.uk wrote:
If C/C++ had multi level break and continue keywords goto would almostof
never be needed**. There's no reason they can't be added - along with
a lot
other useful but basic fatures (eg non POD switch, native concattingto
numbers
std::string without calling to_string) - but I guess the committeebusy
are too
circle jerking with esoteric crap no one will ever use (eg concepts) tobother.
Multi-level break and continue (named loops) is on its way to C++, and
will almost certainly be accepted sooner or later (since it is already
in the draft of the next C standard):
They should have been added 30 years ago.
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking about and add nothing of actual value for the jobbing programmer trying to solve a problem.
You might want to do some research before insulting the people who are
actually doing the work in driving languages forward.
Driving it forward into a ditch. The language is already so needlessly complicated that students just swerve it for more user friendly ones,
mainly
Python. And Rust is already nudging C aside. If they ever add a decent object model to it then C++ will be next in the firing line.
If I was starting out today in IT I wouldn't touch C++ with the proverbial barge pole.
i += 2; /* add 1 to i */
And then you find out it *does* add 1 to i. Somehow.
Very small values of 2.
De
On 10/21/2026 11:06 PM, Scott Dorsey wrote:
In article <11b9qna$pqb8$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>> David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking >>> about and add nothing of actual value for the jobbing programmer trying to >>> solve a problem.
I kind of thought that way once. Then I worked with someone who decided
to solve a problem that was NP-hard. I mentioned to him, "you know this is >> NP-hard, you'll never make it work for a reasonable number of elements"
but he was convinced there was a solution. He worked on it for about a year >> before getting fired.
During that year, did he rewrite the code in Rust too?
In article <11b9qna$pqb8$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking >>about and add nothing of actual value for the jobbing programmer trying to >>solve a problem.
I kind of thought that way once. Then I worked with someone who decided
to solve a problem that was NP-hard. I mentioned to him, "you know this is >NP-hard, you'll never make it work for a reasonable number of elements"
but he was convinced there was a solution. He worked on it for about a year >before getting fired.
On 21/10/2026 09:47, boltar@battlestar.co.uk wrote:
They should have been added 30 years ago.
That's your opinion, so I won't argue with it. I haven't felt the need
of them myself, but I appreciate that some people expect to find them
Wishing they had been added 30 years ago does nothing - adding your
voice of support in the C++ standards mailing lists, or asking gcc to
add it as an extension in C++ might be more useful.
Yeah, on university CS courses. They're just more metaprogramming fucking
about and add nothing of actual value for the jobbing programmer trying to >> solve a problem.
I use them in my code. I am not alone in that.
It's okay to consider them as "advanced", or something that "ordinary" >programmers don't need - there's lots of stuff in C++ that most people
don't need, but which exists so that it's easier to write efficient >libraries that "ordinary" programmers /do/ use.
Driving it forward into a ditch. The language is already so needlessly
complicated that students just swerve it for more user friendly ones,
mainly
Python. And Rust is already nudging C aside. If they ever add a decent
object model to it then C++ will be next in the firing line.
If I was starting out today in IT I wouldn't touch C++ with the proverbial >> barge pole.
Ok. Again, that's your opinion.
On Wed, 21 Oct 2026 17:57:35 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 21/10/2026 09:47, boltar@battlestar.co.uk wrote:
They should have been added 30 years ago.
That's your opinion, so I won't argue with it.-a I haven't felt the
need of them myself, but I appreciate that some people expect to find
them
So you've never had to jump out of deeply nested loops? Are you the
"hello world" guy?
Wishing they had been added 30 years ago does nothing - adding your
voice of support in the C++ standards mailing lists, or asking gcc to
add it as an extension in C++ might be more useful.
Its unlikely any compiler authors would add an extension that fundamentally changes the core flow of control without it being part of the standard.
Yeah, on university CS courses. They're just more metaprogramming
fucking
about and add nothing of actual value for the jobbing programmer
trying to
solve a problem.
I use them in my code.-a I am not alone in that.
So fill us in on exactly what problem they solve because I've yet to see
any use case that couldn't have been done with template specialisation, conditionals and typeid(). But I guess if you like yet more obtuse syntax that makes compilers even more bloated and bug prone then I'm sure they're
a winner.
It's okay to consider them as "advanced", or something that "ordinary"
programmers don't need - there's lots of stuff in C++ that most people
don't need, but which exists so that it's easier to write efficient
libraries that "ordinary" programmers /do/ use.
As I've already pointed out - there are far more mundane features that
your average programmer WOULD use than the commitee can't be bothered to
add probably because there's less peer kudos on that kind of thing than a load of highbrow bullshit that looks cool on a CS lecture whiteboard.
Driving it forward into a ditch. The language is already so needlessly
complicated that students just swerve it for more user friendly ones,
mainly
Python. And Rust is already nudging C aside. If they ever add a
decent object model to it then C++ will be next in the firing line.
If I was starting out today in IT I wouldn't touch C++ with the
proverbial
barge pole.
Ok.-a Again, that's your opinion.
Take a look around you. How many new startups are recruiting C++ devs?
On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
Take a look around you. How many new startups are recruiting C++ devs?
We see it all the time. Of course, different programming fields want >different languages - C++ is suitable for some things, and less so for
other things. There is no one language to fit all usage.
There's plenty I don't like about C++ too. But I don't have some weird >conspiracy theory about how it is being destroyed by some ivory tower >academics that want C++ to be hard so that they can look smart, or
whatever your delusions are.
David Brown <david.brown@hesbynett.no> wrote:
On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
Take a look around you. How many new startups are recruiting C++ devs?
We see it all the time. Of course, different programming fields want >>different languages - C++ is suitable for some things, and less so for >>other things. There is no one language to fit all usage.
There's plenty I don't like about C++ too. But I don't have some weird >>conspiracy theory about how it is being destroyed by some ivory tower >>academics that want C++ to be hard so that they can look smart, or >>whatever your delusions are.
Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added >something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core >language since 2011. Great, but what about processes? When do we get them? >Sure, I could just use fork() but then I could also just use pthread_create() >too.
According to William Hyde <wthyde1953@gmail.com>:
Ah, I do love zombie comments, where someone has changed the code but
left the comments as they were.
i += 2; /* add 1 to i */
On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
kludge@panix.com (Scott Dorsey) wrote:
In article <11b9qna$pqb8$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>> David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking >>> about and add nothing of actual value for the jobbing programmer trying to >>> solve a problem.
I kind of thought that way once. Then I worked with someone who decided
to solve a problem that was NP-hard. I mentioned to him, "you know this is >> NP-hard, you'll never make it work for a reasonable number of elements"
but he was convinced there was a solution. He worked on it for about a year >> before getting fired.
I've no idea what point you're trying to make there.
kludge@panix.com (Scott Dorsey) wrote:
In article <11b9qna$pqb8$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>>David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking >>>about and add nothing of actual value for the jobbing programmer trying to >>>solve a problem.
I kind of thought that way once. Then I worked with someone who decided
to solve a problem that was NP-hard. I mentioned to him, "you know this is >>NP-hard, you'll never make it work for a reasonable number of elements"
but he was convinced there was a solution. He worked on it for about a year >>before getting fired.
I've no idea what point you're trying to make there.
On Wed, 21 Oct 2026 07:55:39 -0000 (UTC), Lawrence DrCOOliveiro wrote:
What about the cleanup?
What about it? you think a flag test in a loop automagically fixes that?
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow
- whereas a goto out of a deeply nested loops is blindingly
obvious - and its less efficient.
The goto from the deep inner block to the outer one is rCLblindingly
obviousrCY ... ly wrong.
What about the cleanup?
What cleanup, exactly? We are talking Fortran, remember.
i += 2; /* add 1 to i */
Oh how fun!
A co-worker actually tracked down such an issue. It turned out that
in certain cases of misuse of indirection, you could assign new
values to constants, such that '2' might have the value 1.
I occasionally use GOTOs, but usually only after considering other alternatives. The flag test is the big red flag. If I have to keep
testing a flag for several layers to get out of a loop, there has to
be a better way.
On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow
- whereas a goto out of a deeply nested loops is blindingly
obvious - and its less efficient.
The goto from the deep inner block to the outer one is rCLblindingly
obviousrCY ... ly wrong.
What about the cleanup?
What cleanup, exactly? We are talking Fortran, remember.
The principle applies to Fortran as it does to any language where you
have to explicitly manage storage allocations.
On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow
- whereas a goto out of a deeply nested loops is blindingly
obvious - and its less efficient.
The goto from the deep inner block to the outer one is rCLblindingly
obviousrCY ... ly wrong.
What about the cleanup?
What cleanup, exactly? We are talking Fortran, remember.
The principle applies to Fortran as it does to any language where you
have to explicitly manage storage allocations.
On Wed, 21 Oct 2026 12:17:48 -0700, Chris M. Thomasson wrote:
i += 2; /* add 1 to i */
Oh how fun!
ThatrCOs not the kind of comment I would have written, because I canrCOt
see how it could ever have been useful. Perhaps something more explanatory, like (wild guess)
i += 2; /* increment occurrences */
and then the reader looks at the surrounding code to see what exactly
are the rCLoccurrencesrCY being counted up, and that either confirms that
2 is the right number to add, or it does not.
On Wed, 21 Oct 2026 20:26:29 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
Take a look around you. How many new startups are recruiting C++ devs?
We see it all the time.-a Of course, different programming fields want
different languages - C++ is suitable for some things, and less so for
other things.-a There is no one language to fit all usage.
There's plenty I don't like about C++ too.-a But I don't have some
weird conspiracy theory about how it is being destroyed by some ivory
tower academics that want C++ to be hard so that they can look smart,
or whatever your delusions are.
Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core language since 2011. Great, but what about processes? When do we get them? Sure, I could just use fork() but then I could also just use pthread_create()
too.
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote:
The principle applies to Fortran as it does to any language where you
have to explicitly manage storage allocations.
Fortran 77 does not have dynamic memory allocation. So, again,
how *exactly* does using GOTO to break out of a Fortran 77 do
loop require cleanup?
On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote:
The principle applies to Fortran as it does to any language where you
have to explicitly manage storage allocations.
Fortran 77 does not have dynamic memory allocation. So, again,
how *exactly* does using GOTO to break out of a Fortran 77 do
loop require cleanup?
Read that again: rCLexplicitly manage storage allocationsrCY.
On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
A co-worker actually tracked down such an issue. It turned out that
in certain cases of misuse of indirection, you could assign new
values to constants, such that '2' might have the value 1.
Certain early Fortran implementations. CouldnrCOt happen in any other language ...
On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
A co-worker actually tracked down such an issue. It turned out that
in certain cases of misuse of indirection, you could assign new
values to constants, such that '2' might have the value 1.
Certain early Fortran implementations. CouldnrCOt happen in any other language ...
On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote:
The principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.
Fortran 77 does not have dynamic memory allocation. So, again, how
*exactly* does using GOTO to break out of a Fortran 77 do loop
require cleanup?
Read that again: rCLexplicitly manage storage allocationsrCY.
Sure, what is the EXACT clean up that you envision?
On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to follow
- whereas a goto out of a deeply nested loops is blindingly
obvious - and its less efficient.
The goto from the deep inner block to the outer one is rCLblindingly
obviousrCY ... ly wrong.
What about the cleanup?
What cleanup, exactly? We are talking Fortran, remember.
The principle applies to Fortran as it does to any language where you
have to explicitly manage storage allocations.
On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
A co-worker actually tracked down such an issue. It turned out that
in certain cases of misuse of indirection, you could assign new
values to constants, such that '2' might have the value 1.
Certain early Fortran implementations. CouldnrCOt happen in any other >language ...
On Thu, 22 Oct 2026 02:17:59 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>
The principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.
Fortran 77 does not have dynamic memory allocation. So, again, how
*exactly* does using GOTO to break out of a Fortran 77 do loop
require cleanup?
Read that again: rCLexplicitly manage storage allocationsrCY.
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
On Thu, 22 Oct 2026 03:35:07 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 02:17:59 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>
The principle applies to Fortran as it does to any language
where you have to explicitly manage storage allocations.
Fortran 77 does not have dynamic memory allocation. So, again,
how *exactly* does using GOTO to break out of a Fortran 77 do
loop require cleanup?
Read that again: rCLexplicitly manage storage allocationsrCY.
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
There isn't any "storage allocation" to cleanup.
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>>
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to
follow - whereas a goto out of a deeply nested loops is
blindingly obvious - and its less efficient.
The goto from the deep inner block to the outer one is
rCLblindingly obviousrCY ... ly wrong.
What about the cleanup?
What cleanup, exactly? We are talking Fortran, remember.
The principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.
DO loops do not introduce scope in Fortran.
On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
There isn't any "storage allocation" to cleanup.
Not in your example. Which is why it was irrelevant.
On 10/21/26 17:37, Lawrence DrCOOliveiro wrote:
On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
A co-worker actually tracked down such an issue. It turned out that
in certain cases of misuse of indirection, you could assign new
values to constants, such that '2' might have the value 1.
Certain early Fortran implementations. CouldnrCOt happen in any other
language ...
Probably called a subroutine with constant 2 as an argument, which the subroutine modified. I don't think FORTRAN used dummy arguments or call- by-value.
On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
There isn't any "storage allocation" to cleanup.
Not in your example. Which is why it was irrelevant.
Then give a Fortran 77 example that requires cleanup.
You can't, can you?
Using GOTO to jump out of do-loop in Fortran 77 does
not lead to some mysterious "storage allocation" to
cleanup.
PS: a smart compiler would actually not generate code
to execute the do-loop for the code in my example.
On Thu, 22 Oct 2026 03:46:30 -0000 (UTC), Thomas Koenig wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> schrieb:
On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>>>
On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
** The setting a flag method which has to be checked in every
nested loop test is just an [asinine] way to code.
If you have to do cleanup at each level before exiting, then it
works perfectly well.
It may well work but it doesn't make it good. Its harder to
follow - whereas a goto out of a deeply nested loops is
blindingly obvious - and its less efficient.
The goto from the deep inner block to the outer one is
rCLblindingly obviousrCY ... ly wrong.
What about the cleanup?
What cleanup, exactly? We are talking Fortran, remember.
The principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.
DO loops do not introduce scope in Fortran.
Nobody said anything about rCLscoperCY.
On Wed, 21 Oct 2026 20:26:29 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
Take a look around you. How many new startups are recruiting C++ devs?
We see it all the time.-a Of course, different programming fields want
different languages - C++ is suitable for some things, and less so for
other things.-a There is no one language to fit all usage.
There's plenty I don't like about C++ too.-a But I don't have some
weird conspiracy theory about how it is being destroyed by some ivory
tower academics that want C++ to be hard so that they can look smart,
or whatever your delusions are.
Not sure why you think its conspiracy anything.
I use the language on a
daily basis and everytime a new version comes out I hope they've added something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core language since 2011. Great, but what about processes? When do we get them? Sure, I could just use fork() but then I could also just use pthread_create()
too.
On 10/22/2026 12:56 PM, Steven G. Kargl wrote:
On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
There isn't any "storage allocation" to cleanup.
Not in your example. Which is why it was irrelevant.
Then give a Fortran 77 example that requires cleanup.
You can't, can you?
Using GOTO to jump out of do-loop in Fortran 77 does
not lead to some mysterious "storage allocation" to
cleanup.
PS: a smart compiler would actually not generate code
to execute the do-loop for the code in my example.
Open Watcom Fortran 77 has /allocate/ and /deallocate/ according to a
quick glance at the manual, but I have never used them.
I guess the point is we don't want to allocate in a loop?
On Thu, 22 Oct 2026 14:34:20 +0800, Johann 'Myrkraverk' Oskarsson wrote:
On 10/22/2026 12:56 PM, Steven G. Kargl wrote:
On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
There isn't any "storage allocation" to cleanup.
Not in your example. Which is why it was irrelevant.
Then give a Fortran 77 example that requires cleanup.
You can't, can you?
Using GOTO to jump out of do-loop in Fortran 77 does
not lead to some mysterious "storage allocation" to
cleanup.
PS: a smart compiler would actually not generate code
to execute the do-loop for the code in my example.
Open Watcom Fortran 77 has /allocate/ and /deallocate/ according to a
quick glance at the manual, but I have never used them.
Dynamic memory management via allocate/deallocate was introduce
in Fortran 90. Open Watcom Fortran 77 may have added those as
an extension. The Fortran 77 standard does have a dynamic memory
feature. But, this seems irrelevant to Lawrence, who has coined
the term "storage allocation", which is not Fortran terminology.
We are now waiting for a definition for this term.
I guess the point is we don't want to allocate in a loop?
I allocate memory in do-loops all time. It would be a significant pessimization to write something like
integer, allocatable :: i(:)
i = [0] ! A 1-element array.
do j = 1, 9
i = [i,j] ! Re-allocate i on assignment
end do
10 print *, i
end
Note, there is no clean up of 'storage allocation' when the
loop terminates. The Fortran standard does not mandate when
memory that may have been freed during the re-allocation is
actually garbaged collected. The program could return memory
to the system during the re-allocation or when the program
terminates.
On Thu, 22 Oct 2026 02:17:59 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>
The principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.
Fortran 77 does not have dynamic memory allocation. So, again, how
*exactly* does using GOTO to break out of a Fortran 77 do loop
require cleanup?
Read that again: rCLexplicitly manage storage allocationsrCY.
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
In article <11bb1da$qfn9$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>Not sure why you think its conspiracy anything. I use the language on a >>daily basis and everytime a new version comes out I hope they've added >>something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core >>language since 2011. Great, but what about processes? When do we get them? >>Sure, I could just use fork() but then I could also just use pthread_create() >>too.
One can implement a pretty reasonable threads library given the
virtual machine model of standard C or C++. Processes? With
their own address spaces, credentials, resource limits, IPC
mechanisms, potentially running different programs, and so on?
Not so much. You need an operating system for that, son.
On 10/21/26 10:50, boltar@battlestar.co.uk wrote:
On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
kludge@panix.com (Scott Dorsey) wrote:
In article <11b9qna$pqb8$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming fucking >>>> about and add nothing of actual value for the jobbing programmer trying to >>>> solve a problem.
I kind of thought that way once. Then I worked with someone who decided >>> to solve a problem that was NP-hard. I mentioned to him, "you know this is >>> NP-hard, you'll never make it work for a reasonable number of elements"
but he was convinced there was a solution. He worked on it for about a year
before getting fired.
I've no idea what point you're trying to make there.
He's trying to say that his university CS work paid off.
I agree that the work for a CS degree is useful. If nothing else I >understand more now.
On Wed, 21 Oct 2026 08:05:02 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 07:55:39 -0000 (UTC), Lawrence DrCOOliveiro wrote:
What about the cleanup?
What about it? you think a flag test in a loop automagically fixes that?
It needs to be done at each level before exiting to the outer level.
I can show you some example code, if you like.
On 10/22/2026 2:48 AM, boltar@battlestar.co.uk wrote:
Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added
something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core >> language since 2011. Great, but what about processes? When do we get them? >> Sure, I could just use fork() but then I could also just use
pthread_create()
too.
There are what, three process models to wrap up? The Unix/Linux model,
the N.T. model, and OpenVMS.
If you need anything too different from those three, you can just fail
with a compilation error on #include <process> or whatever.
It isn't too hard to create a modern abstraction that does mostly the
right thing.
On 21/10/2026 20:48, boltar@battlestar.co.uk wrote:
Not sure why you think its conspiracy anything.
When a group of people or entities are working together with a secret
agenda that is opposing (or at least independent of) their claimed open >agenda, that's a conspiracy. The phrase "conspiracy theory" is usually >applied when someone believes their is a conspiracy without suitable >evidence or justification.
Thus your opinion of the C++ standards committee's work and motivation
is a conspiracy theory. It's not a remotely dangerous one - but it is
still a daft one.
languages already cover most needs of most users. /No one/ uses all the >features of C++, or Python, or Java. No one is interested in /all/ the
new features they gain. That does not mean they can't evolve and
improve. If I look at Wikipedia's list of what is new in C++20, there
are about 20 language changes and 15 major library changes. I use
perhaps 4 or 5 of these, and am somewhat interested in a couple more.
For C++23, the list of changes is much longer, but there is only one
that made me change to -std=gnu++23. But for a much larger proportion
of the changes, I can understand how they could be useful to other people.
Plus there's unexplained omissions - eg threads have been part of the core >> language since 2011. Great, but what about processes? When do we get them? >> Sure, I could just use fork() but then I could also just use
pthread_create()
too.
Equally, no language can support all the features that users might want.
For the particular case of why C++ supports threads but not processes,
the answer should be obvious.
On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 03:35:07 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 02:17:59 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>
On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>>
The principle applies to Fortran as it does to any language
where you have to explicitly manage storage allocations.
Fortran 77 does not have dynamic memory allocation. So, again,
how *exactly* does using GOTO to break out of a Fortran 77 do
loop require cleanup?
Read that again: rCLexplicitly manage storage allocationsrCY.
Sure, what is the EXACT clean up that you envision?
rCLStorage allocationsrCY.
There isn't any "storage allocation" to cleanup.
Not in your example. Which is why it was irrelevant.
On Wed, 21 Oct 2026 19:01:38 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bb1da$qfn9$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>>Not sure why you think its conspiracy anything. I use the language on a >>>daily basis and everytime a new version comes out I hope they've added >>>something useful but since 2014 its been a law of diminishing returns. >>>Plus there's unexplained omissions - eg threads have been part of the core >>>language since 2011. Great, but what about processes? When do we get them? >>>Sure, I could just use fork() but then I could also just use pthread_create()
too.
One can implement a pretty reasonable threads library given the
virtual machine model of standard C or C++. Processes? With
Virtual machine? Wrong language , comp.lang.java is that way --->
their own address spaces, credentials, resource limits, IPC
mechanisms, potentially running different programs, and so on?
Not so much. You need an operating system for that, son.
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Most of us have a CS degree. But then we go out into the real world, get a >job and find out what real programming on real products entails, not a load >of virtual academic naval gazing.
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bb1da$qfn9$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>>Not sure why you think its conspiracy anything. I use the language on a >>>daily basis and everytime a new version comes out I hope they've added >>>something useful but since 2014 its been a law of diminishing returns. >>>Plus there's unexplained omissions - eg threads have been part of the core >>>language since 2011. Great, but what about processes? When do we get them? >>>Sure, I could just use fork() but then I could also just use pthread_create()
too.
One can implement a pretty reasonable threads library given the
virtual machine model of standard C or C++. Processes? With
Virtual machine? Wrong language , comp.lang.java is that way --->
their own address spaces, credentials, resource limits, IPC
mechanisms, potentially running different programs, and so on?
Not so much. You need an operating system for that, son.
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
On Wed, 21 Oct 2026 08:05:02 -0000 (UTC), boltar wrote:
On Wed, 21 Oct 2026 07:55:39 -0000 (UTC), Lawrence DrCOOliveiro wrote:
What about the cleanup?
What about it? you think a flag test in a loop automagically fixes that?
It needs to be done at each level before exiting to the outer level.
I can show you some example code, if you like.
Most of us have a CS degree. But then we go out into the real world, get a job and find out what real programming on real products entails, not a load of virtual academic naval gazing.
On Thu, 22 Oct 2026 09:51:46 +0800
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:
On 10/22/2026 2:48 AM, boltar@battlestar.co.uk wrote:
Not sure why you think its conspiracy anything. I use the language
on a daily basis and everytime a new version comes out I hope
they've added something useful but since 2014 its been a law of
diminishing returns. Plus there's unexplained omissions - eg
threads have been part of the core language since 2011. Great, but
what about processes? When do we get them? Sure, I could just use
fork() but then I could also just use pthread_create()
too.
There are what, three process models to wrap up? The Unix/Linux
model, the N.T. model, and OpenVMS.
If you need anything too different from those three, you can just
fail with a compilation error on #include <process> or whatever.
It isn't too hard to create a modern abstraction that does mostly the
right thing.
Exactly.
On Wed, 21 Oct 2026 14:12:47 -0700
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/21/26 10:50, boltar@battlestar.co.uk wrote:
On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
kludge@panix.com (Scott Dorsey) wrote:
In article <11b9qna$pqb8$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more
metaprogramming fucking about and add nothing of actual value
for the jobbing programmer trying to solve a problem.
I kind of thought that way once. Then I worked with someone who
decided to solve a problem that was NP-hard. I mentioned to him,
"you know this is NP-hard, you'll never make it work for a
reasonable number of elements" but he was convinced there was a
solution. He worked on it for about a year
before getting fired.
I've no idea what point you're trying to make there.
He's trying to say that his university CS work paid off.
I agree that the work for a CS degree is useful. If nothing else I >understand more now.
Most of us have a CS degree.
But then we go out into the real world,
get a job and find out what real programming on real products
entails, not a load of virtual academic naval gazing.
On Thu, 22 Oct 2026 09:20:53 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 21/10/2026 20:48, boltar@battlestar.co.uk wrote:
Not sure why you think its conspiracy anything.
When a group of people or entities are working together with a secret
agenda that is opposing (or at least independent of) their claimed
open agenda, that's a conspiracy.-a The phrase "conspiracy theory" is
usually applied when someone believes their is a conspiracy without
suitable evidence or justification.
Thus your opinion of the C++ standards committee's work and motivation
is a conspiracy theory.-a It's not a remotely dangerous one - but it is
still a daft one.
Only in your mind is it a conspirary theory. You seem unable to tell the difference between a criticism of being out of touch and a conspiracy.
You'd probably do well in Maga.
languages already cover most needs of most users.-a /No one/ uses all
the features of C++, or Python, or Java.-a No one is interested in /
all/ the new features they gain.-a That does not mean they can't evolve
and improve.-a If I look at Wikipedia's list of what is new in C++20,
there are about 20 language changes and 15 major library changes.-a I
use perhaps 4 or 5 of these, and am somewhat interested in a couple
more. For C++23, the list of changes is much longer, but there is only
one that made me change to -std=gnu++23.-a But for a much larger
proportion of the changes, I can understand how they could be useful
to other people.
Constantly adding very nich features to a language is not a sign of the language evolving, its a sign of it running out of steam.
Plus there's unexplained omissions - eg threads have been part of the
core
language since 2011. Great, but what about processes? When do we get
them?
Sure, I could just use fork() but then I could also just use
pthread_create()
too.
Equally, no language can support all the features that users might want.
Useful core basic features should be done before any niche features.
For the particular case of why C++ supports threads but not processes,
the answer should be obvious.
No, its not obvious because there is no good reason why it couldn't provide the facility. Whats that you say? Not all platforms support multi process? Newsflash - not all platforms support threading, eg PICs. HTH.
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
On Wed, 21 Oct 2026 14:12:47 -0700
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/21/26 10:50, boltar@battlestar.co.uk wrote:
On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
kludge@panix.com (Scott Dorsey) wrote:
In article <11b9qna$pqb8$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming
fucking
about and add nothing of actual value for the jobbing programmer
trying to
solve a problem.
I kind of thought that way once.-a Then I worked with someone who
decided
to solve a problem that was NP-hard.-a I mentioned to him, "you know
this is
NP-hard, you'll never make it work for a reasonable number of elements" >>>> but he was convinced there was a solution.-a He worked on it for
about a year
before getting fired.
I've no idea what point you're trying to make there.
He's trying to say that his university CS work paid off.
I agree that the work for a CS degree is useful. If nothing else I
understand more now.
Most of us have a CS degree. But then we go out into the real world, get a job and find out what real programming on real products entails, not a load of virtual academic naval gazing.
On Wed, 21 Oct 2026 14:12:47 -0700
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/21/26 10:50, boltar@battlestar.co.uk wrote:
On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
kludge@panix.com (Scott Dorsey) wrote:
In article <11b9qna$pqb8$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
David Brown <david.brown@hesbynett.no> wrote:
And people /do/ use concepts, even if you do not.
Yeah, on university CS courses. They're just more metaprogramming
fucking
about and add nothing of actual value for the jobbing programmer
trying to
solve a problem.
I kind of thought that way once.-a Then I worked with someone who
decided
to solve a problem that was NP-hard.-a I mentioned to him, "you know
this is
NP-hard, you'll never make it work for a reasonable number of elements" >>>> but he was convinced there was a solution.-a He worked on it for
about a year
before getting fired.
I've no idea what point you're trying to make there.
He's trying to say that his university CS work paid off.
I agree that the work for a CS degree is useful. If nothing else I
understand more now.
Most of us have a CS degree. But then we go out into the real world, get a job and find out what real programming on real products entails, not a load of virtual academic naval gazing.
On 10/22/2026 2:48 AM, boltar@battlestar.co.uk wrote:
On Wed, 21 Oct 2026 20:26:29 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
Take a look around you. How many new startups are recruiting C++ devs? >>>>
We see it all the time.-a Of course, different programming fields want
different languages - C++ is suitable for some things, and less so
for other things.-a There is no one language to fit all usage.
There's plenty I don't like about C++ too.-a But I don't have some
weird conspiracy theory about how it is being destroyed by some ivory
tower academics that want C++ to be hard so that they can look smart,
or whatever your delusions are.
Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added
something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the
core
language since 2011. Great, but what about processes? When do we get
them?
Sure, I could just use fork() but then I could also just use
pthread_create()
too.
There are what, three process models to wrap up?-a The Unix/Linux model,
the N.T. model, and OpenVMS.
If you need anything too different from those three, you can just fail
with a compilation error on #include <process> or whatever.
It isn't too hard to create a modern abstraction that does mostly the
right thing.
On 2026-10-22 12:02, Scott Lurndal wrote:
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
And could you tell me where I might find that description? The word
"virtual" appears in the C standard only when describing one of the
committee meetings. No two of words in "virtual machine model" appear >consecutively anywhere in the C++ standard.
Somebody who knows the first thing about Fortran, which you
clearly don't, might have realized that scope is the only
way to mandate storage allocation/deallocation in Fortran.
Thomas Koenig <tkoenig@netcologne.de> writes:
[...]
Somebody who knows the first thing about Fortran, which you
clearly don't, might have realized that scope is the only
way to mandate storage allocation/deallocation in Fortran.
Is that true in more recent versions of Fortran?
A quick web search indicates that Fortran 90 added "allocate"
and "deallocate". If I understand correctly, you might have an
"allocate" inside a DO loop, and breaking out of the loop could
bypass the corresponding "deallocate".
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach if
you allocate random stuff here and there.
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote:
The principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.
So, why can't you provide an example of storage allocation, where
cleanup is relevant, so that using a GOTO would be problematic. That
way we could have some idea what you're talking about.
On Thu, 22 Oct 2026 11:18:03 -0400, James Kuyper wrote:goto error;
On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence DrCOOliveiro wrote:
The principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.
So, why can't you provide an example of storage allocation, where
cleanup is relevant, so that using a GOTO would be problematic. That
way we could have some idea what you're talking about.
The technique I use is based on a form of structured programming
called a rCLNassi-Shneiderman diagramrCY. The overall structure looks like
... initialize object pointer to NULL ...
do /*once*/
{
... possible other stuff ...
... allocate object pointer ...
if (error occurred)
break;
... possible other stuff using object pointer ...error:
}
while (false);
... call free(3) (or equivalent) on object pointer ...
So you can see there is no way out of the inner block without passing
through the dispose call. Using gotos would contribute nothing except
make it harder to assure yourself of the simplicity of the control
flow.
'break' is just another name for 'goto label'. Fortran offers
'cycle' and 'exit' to either return to the top of a loop (
similar to C's 'continue') or to jump out of loop. Fortran
has named constructs, so one can use 'cycle' and 'exit' on
(deeply?) nested constructs.
On Fri, 23 Oct 2026 03:33:44 -0000 (UTC), Lawrence DrCOOliveiro wrote:--- Synchronet 3.22a-Linux NewsLink 1.2
So you can see there is no way out of the inner block without passing
through the dispose call.
'break' is just another name for 'goto label'.
Using gotos would contribute nothing except make it harder to
assure yourself of the simplicity of the control flow.
PS: We're still waiting on a definition of "storage allocation"
... allocate object pointer ...
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach if
you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I gather thererCOs been a proposal thatrCOs been kicking around for some years, to adopt something based on Cairo
<https://www.cairographics.org/>.
"Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> writes:
[...]
'break' is just another name for 'goto label'. Fortran offers
'cycle' and 'exit' to either return to the top of a loop (
similar to C's 'continue') or to jump out of loop. Fortran
has named constructs, so one can use 'cycle' and 'exit' on
(deeply?) nested constructs.
Any given C break statement is equivalent to a goto statement that
jumps just after the enclosing loop or switch statement.
But "break" is useful because it can't branch to any arbitrary point
in the enclosing function. It can only break out of a specific
enclosing construct. That makes the code easier to read and write.
BTW, the next C standard is planned to add named loops and breaks,
which are also proposed for C++. Some C compilers already implement
them as an extension.
On Fri, 23 Oct 2026 04:10:39 -0000 (UTC), Steven G. Kargl wrote:
On Fri, 23 Oct 2026 03:33:44 -0000 (UTC), Lawrence DrCOOliveiro wrote:
So you can see there is no way out of the inner block without passing
through the dispose call.
'break' is just another name for 'goto label'.
Using gotos would contribute nothing except make it harder to
assure yourself of the simplicity of the control flow.
PS: We're still waiting on a definition of "storage allocation"
... allocate object pointer ...
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to
initialize it?
On 10/22/2026 8:21 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a
user interface programming model for quite a long time.
First they need a standardized graphics API.
I gather thererCOs been a proposal thatrCOs been kicking around for
some years, to adopt something based on Cairo
<https://www.cairographics.org/>.
That's a fairly decent one.
Keith Thompson <Keith.S.Thompson+u@gmail.com> schrieb:
But "break" is useful because it can't branch to any arbitrary
point in the enclosing function. It can only break out of a
specific enclosing construct. That makes the code easier to read
and write.
The goto usually isn't the problem, you see it and you see where its
target is.
boltar@battlestar.co.uk writes:
Virtual machine? Wrong language , comp.lang.java is that way --->
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
You need an OS to do threading properly too. Theres a reason green threads >>in java were a joke.
There have been, in the past, threading models that support both
hardware threads and pure software threads (e.g. SVR4.2ES/MP)
in a single application. It was not a joke then, it's not a joke now.
In article <11bd7tj$rh4f$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>
Most of us have a CS degree. But then we go out into the real world, get a >>job and find out what real programming on real products entails, not a load >>of virtual academic naval gazing.
That's because it's not a trade school degree. It's not there to teach
you to program, it's there to teach you the fundamentals that you need to >properly understand programming.
Engineering schools are even more that way. They don't teach you much >engineering, but they give you all the background that you need to learn >engineering.
If you just want a job, getting one of these degrees is not for you. It's >not there for that.
On 10/21/2026 8:51 PM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/22/2026 2:48 AM, boltar@battlestar.co.uk wrote:
On Wed, 21 Oct 2026 20:26:29 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
Take a look around you. How many new startups are recruiting C++ devs? >>>>>
We see it all the time.-a Of course, different programming fields
want different languages - C++ is suitable for some things, and less
so for other things.-a There is no one language to fit all usage.
There's plenty I don't like about C++ too.-a But I don't have some
weird conspiracy theory about how it is being destroyed by some
ivory tower academics that want C++ to be hard so that they can look
smart, or whatever your delusions are.
Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added
something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the
core
language since 2011. Great, but what about processes? When do we get
them?
Sure, I could just use fork() but then I could also just use
pthread_create()
too.
There are what, three process models to wrap up?-a The Unix/Linux model,
the N.T. model, and OpenVMS.
If you need anything too different from those three, you can just fail
with a compilation error on #include <process> or whatever.
It isn't too hard to create a modern abstraction that does mostly the
right thing.
Now add the User Interface systems for the operating systems.-a And the current Apple system does not even have a C++ user interface.
I have been advocating for quite a while that C++ should add a user interface programming model for quite a long time.
Lynn
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>You need an OS to do threading properly too. Theres a reason green threads >>in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
On Thu, 22 Oct 2026 14:51:31 -0000 (UTC)
boltar@battlestar.co.uk wrote:
I agree that the work for a CS degree is useful. If nothing else I
understand more now.
Most of us have a CS degree.
I don't have it.
How do you know about most?
On Thu, 22 Oct 2026 16:02:35 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@battlestar.co.uk writes:
Virtual machine? Wrong language , comp.lang.java is that way --->
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
Its a fictious apple. All it means in reality is intermediate code output
by the compiler - but then in the gnu and llvm tool chains for example ALL the
compilers AFAIK do that, there's nothing unique to C/C++.
On 10/21/2026 8:51 PM, Johann 'Myrkraverk' Oskarsson wrote:
It isn't too hard to create a modern abstraction that does mostly the
right thing.
Now add the User Interface systems for the operating systems. And the >current Apple system does not even have a C++ user interface.
I have been advocating for quite a while that C++ should add a user >interface programming model for quite a long time.
On 10/23/2026 4:41 AM, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
Lynn
In my opinion, it was a tragedy they didn't in C++98.
Programming isn't pure engineering - its a combination of engineering, logic, art and a trade.
On 10/23/2026 4:01 PM, boltar@caprica.universe wrote:
Programming isn't pure engineering - its a combination of engineering, logic,
art and a trade.
And sometimes mathematics. More than one programmer has had to invent
On Fri, 23 Oct 2026 16:02:51 +0800
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> gabbled:
On 10/23/2026 4:41 AM, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
Lynn
In my opinion, it was a tragedy they didn't in C++98.
In Windows the graphics system just starts up. On the unix X windows system initial startup requires a server IP address with optional screen number then
doing a network connect. Also I don't know the win32 graphics subsystem but
I suspect it differs fundamentally from the X Windows model so I have no idea
how you'd square that circle unless the only API you provide is for top level
GUI components as per libraries such as Gtk and Qt.
On Thu, 22 Oct 2026 22:48:29 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Thu, 22 Oct 2026 14:51:31 -0000 (UTC)
boltar@battlestar.co.uk wrote:
I agree that the work for a CS degree is useful. If nothing else
I understand more now.
Most of us have a CS degree.
I don't have it.
How do you know about most?
Oh I dunno, maybe 30 years in the industry working with probably
hundreds of different programmers.
On 10/23/2026 3:58 PM, boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 16:02:35 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@battlestar.co.uk writes:
Virtual machine? Wrong language , comp.lang.java is that way --->
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
Its a fictious apple. All it means in reality is intermediate code
output by the compiler - but then in the gnu and llvm tool chains
for example ALL the compilers AFAIK do that, there's nothing unique
to C/C++.
There is at least one -- now quite old -- C++ compiler that goes
direct- ly to machine code, and doesn't output any assembly at all.
That's Open Watcom.
And if you want to use that compiler abstractly, you can use DOS [1]
as a physical manifestation of the /abstract machine/.
[1] MS-DOS, PC-DOS, DR-DOS, FreeDOS -- I'm not picky.
On Fri, 23 Oct 2026 16:06:47 +0800
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:
On 10/23/2026 3:58 PM, boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 16:02:35 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@battlestar.co.uk writes:
Virtual machine? Wrong language , comp.lang.java is that way --->
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
Its a fictious apple. All it means in reality is intermediate code
output by the compiler - but then in the gnu and llvm tool chains
for example ALL the compilers AFAIK do that, there's nothing unique
to C/C++.
There is at least one -- now quite old -- C++ compiler that goes
direct- ly to machine code, and doesn't output any assembly at all.
That's Open Watcom.
And if you want to use that compiler abstractly, you can use DOS [1]
as a physical manifestation of the /abstract machine/.
[1] MS-DOS, PC-DOS, DR-DOS, FreeDOS -- I'm not picky.
DOS/360 (originally simply DOS) would not do it?
On 10/23/2026 4:14 PM, boltar@caprica.universe wrote:
In Windows the graphics system just starts up. On the unix X windows system >> initial startup requires a server IP address with optional screen number
then
doing a network connect. Also I don't know the win32 graphics subsystem but >> I suspect it differs fundamentally from the X Windows model so I have no
idea
how you'd square that circle unless the only API you provide is for top
level
GUI components as per libraries such as Gtk and Qt.
The point I was trying to make was that in 1997, when the C++ standard
got finalized, IUP,
https://iup.sf.net/
On Fri, 23 Oct 2026 08:05:13 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 22:48:29 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Thu, 22 Oct 2026 14:51:31 -0000 (UTC)
boltar@battlestar.co.uk wrote:
I agree that the work for a CS degree is useful. If nothing else
I understand more now.
Most of us have a CS degree.
I don't have it.
How do you know about most?
Oh I dunno, maybe 30 years in the industry working with probably
hundreds of different programmers.
My experience in industry beats yours by few years.
And my statistics differ - CS graduates are not majority of computer >programmers. At best, they are plurality.
Regardless, the point was not industry, but audience of five particular >newsgroups.
On 2026-10-22 12:02, Scott Lurndal wrote:
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
And could you tell me where I might find that description? The word
"virtual" appears in the C standard only when describing one of the
committee meetings. No two of words in "virtual machine model" appear consecutively anywhere in the C++ standard.
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I gather thererCOs been a proposal thatrCOs been kicking around for some years, to adopt something based on Cairo
<https://www.cairographics.org/>.
On Thu, 22 Oct 2026 22:29:45 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to
initialize it?
IrCOm assuming that all that BASIC programming hasnrCOt got to your head,
and yourCOre not serious. ;)
On 23/10/2026 05:21, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I hope that never happens. There are large numbers of graphics APIs,
with huge ranges of what they support, how they work and their balance >between features, efficiency, portability, size, hardware support, and
what they are used for.
People who think C++ should have a standardised graphics API usually
mean they want to standardise the API they use on the one application
On Fri, 23 Oct 2026 16:22:06 +0800
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> gabbled:
On 10/23/2026 4:14 PM, boltar@caprica.universe wrote:
In Windows the graphics system just starts up. On the unix X windows
system
initial startup requires a server IP address with optional screen
number then
doing a network connect. Also I don't know the win32 graphics
subsystem but
I suspect it differs fundamentally from the X Windows model so I have
no idea
how you'd square that circle unless the only API you provide is for
top level
GUI components as per libraries such as Gtk and Qt.
The point I was trying to make was that in 1997, when the C++ standard
got finalized, IUP,
-a https://iup.sf.net/
Had a look, requires Lua. No thanks.
On 22/10/2026 22:25, James Kuyper wrote:
On 2026-10-22 12:02, Scott Lurndal wrote:The term in both the C and C++ standards is "abstract machine", but I
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
think it was quite obvious that this is Dan meant when he wrote "virtual machine". ...
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach if
you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to initialize it?
On Thu, 22 Oct 2026 12:19:49 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bd7tj$rh4f$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>>
Most of us have a CS degree. But then we go out into the real world, get a >>> job and find out what real programming on real products entails, not a load >>> of virtual academic naval gazing.
That's because it's not a trade school degree. It's not there to teach
you to program, it's there to teach you the fundamentals that you need to
properly understand programming.
No, it teaches you fundamentals of certain aspects of computer paradigms such as databases, graphics, AI. Most people into computers learn actual programming
long before they hit university.
Engineering schools are even more that way. They don't teach you much
engineering, but they give you all the background that you need to learn
engineering.
Programming isn't pure engineering - its a combination of engineering, logic, art and a trade.
If you just want a job, getting one of these degrees is not for you. It's >> not there for that.
Bill Gates never earned a degree. He seemed to do ok.
On 10/23/26 01:01, boltar@caprica.universe wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
On 23/10/2026 05:21, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I hope that never happens.-a There are large numbers of graphics APIs,
with huge ranges of what they support, how they work and their balance between features, efficiency, portability, size, hardware support, and
what they are used for.
People who think C++ should have a standardised graphics API usually
mean they want to standardise the API they use on the one application
type that they write.
I gather thererCOs been a proposal thatrCOs been kicking around for some
years, to adopt something based on Cairo
<https://www.cairographics.org/>.
On 23/10/2026 08:25, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 22:29:45 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to
initialize it?
IrCOm assuming that all that BASIC programming hasnrCOt got to your head,
and yourCOre not serious. ;)
Chris' wording is perhaps poor, but the principle is right.
I don't know PL/I or Fortran, but in C if you have :
-a-a-a-atypedef struct data_struct { int a; int xs[20]; } S ;
-a-a-a-aS build_some_data(void) {
-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a s.a = 123;
-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) s.xs[i] = i;
-a-a-a-a-a-a-a return s;
-a-a-a-a}
-a-a-a-avoid foo() {
-a-a-a-a-a-a-a S s = build_some_data();
-a-a-a-a}
then it is typically handled as though you had written :
-a-a-a-avoid build_some_data(S * p) {
-a-a-a-a-a-a-a p->a = 123;
-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) p->xs[i] = i;
-a-a-a-a-a-a-a return;
-a-a-a-a}
-a-a-a-avoid foo() {
-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a build_some_data(&s);
-a-a-a-a}
That is - the caller creates the /space/ for the returned object, but
does not do any kind of initialisation.-a It passes a pointer to that
space as a hidden parameter to the function that wants to return the
object.
That principle should work fine in any language, as long as the size of
the returned object is known by the caller code.
On Fri, 23 Oct 2026 11:42:38 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Fri, 23 Oct 2026 08:05:13 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 22:48:29 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Thu, 22 Oct 2026 14:51:31 -0000 (UTC)
boltar@battlestar.co.uk wrote:
I agree that the work for a CS degree is useful. If nothing else
I understand more now.
Most of us have a CS degree.
I don't have it.
How do you know about most?
Oh I dunno, maybe 30 years in the industry working with probably
hundreds of different programmers.
My experience in industry beats yours by few years.
And my statistics differ - CS graduates are not majority of computer
programmers. At best, they are plurality.
Regardless, the point was not industry, but audience of five particular
newsgroups.
Well, the majority of people in programming have some kind of STEM degree, not necessarily CS. For example if you can do electronic engineering or advance maths then programming concepts probably arn't going to be a big deal for you though I have seen plenty of code written by engineers and while it works it tends to be messy. More a case of get the job done fast so we can get on with the real work rather than create something efficient and maintainable.
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Considering how much of my career I've spent working around poor
design decisions and outright bugs in Windows, I'd say that is
self-evident.
Bill Gates never earned a degree. He seemed to do ok.
AFAIK you can't pin that one on him; the Tandy Model 100 was the last
product he actually wrote code for, and that came out in '83, right at
the beginning of development on Windows 1.0. Dunno that he did much on >MS-DOS, either, as the core of that was Tim Paterson's work in, erm, >"adapating" the design of CP/M to the 8086.
On 10/23/2026 5:18 AM, boltar@caprica.universe wrote:
On Fri, 23 Oct 2026 11:42:38 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Fri, 23 Oct 2026 08:05:13 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 22:48:29 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Thu, 22 Oct 2026 14:51:31 -0000 (UTC)
boltar@battlestar.co.uk wrote:
I agree that the work for a CS degree is useful. If nothing else >>>>>>> I understand more now.
Most of us have a CS degree.
I don't have it.
How do you know about most?
Oh I dunno, maybe 30 years in the industry working with probably
hundreds of different programmers.
My experience in industry beats yours by few years.
And my statistics differ - CS graduates are not majority of computer
programmers. At best, they are plurality.
Regardless, the point was not industry, but audience of five particular
newsgroups.
Well, the majority of people in programming have some kind of STEM degree, >> not necessarily CS. For example if you can do electronic engineering or
advance maths then programming concepts probably arn't going to be a big deal
for you though I have seen plenty of code written by engineers and while it >> works it tends to be messy. More a case of get the job done fast so we can >> get on with the real work rather than create something efficient and
maintainable.
I have a degree in Biochemistry, and spent 5 year in a medical research
lab being professionally unpleasant to rats before switch careers to >software.
It helped that at that time (early 80s) almost no one had a CS degree.
He continued doing code reviews well into the Win 7 era, and a lot of
people wound up having to clean up after him. He was always very
hands-on. I remember in 1978 him being the third tier tech support
hotline for MBASIC bugs. He was incredibly rude.
On 10/22/26 22:29, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to
initialize it?
That obviously wouldn't work, since then the caller would have to
know something about the object beforehand.
On Fri, 23 Oct 2026 04:22:13 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 04:10:39 -0000 (UTC), Steven G. Kargl wrote:
On Fri, 23 Oct 2026 03:33:44 -0000 (UTC), Lawrence DrCOOliveiro wrote:
So you can see there is no way out of the inner block without passing
through the dispose call.
'break' is just another name for 'goto label'.
Using gotos would contribute nothing except make it harder to
assure yourself of the simplicity of the control flow.
PS: We're still waiting on a definition of "storage allocation"
... allocate object pointer ...
Nice use of quoting without adding context.
On 23/10/2026 05:21, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a
user interface programming model for quite a long time.
First they need a standardized graphics API.
I gather thererCOs been a proposal thatrCOs been kicking around for
some years, to adopt something based on Cairo
<https://www.cairographics.org/>.
You need something with subsets. At least a "basic" subset, a "full"
subset, and something in between that satisfies most uses. Or maybe
subsets for different purposes, but they should all be compatible.
On 2026-10-23, Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/23/26 01:01, boltar@caprica.universe wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Considering how much of my career I've spent working around poor
design decisions and outright bugs in Windows, I'd say that is
self-evident.
On Fri, 23 Oct 2026 05:54:44 -0000 (UTC), Steven G. Kargl wrote:
On Fri, 23 Oct 2026 04:22:13 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 04:10:39 -0000 (UTC), Steven G. Kargl wrote:
On Fri, 23 Oct 2026 03:33:44 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>> So you can see there is no way out of the inner block without passing >>>>> through the dispose call.
'break' is just another name for 'goto label'.
Using gotos would contribute nothing except make it harder to
assure yourself of the simplicity of the control flow.
PS: We're still waiting on a definition of "storage allocation"
... allocate object pointer ...
Nice use of quoting without adding context.
Just pointing out (in case you didnrCOt notice) that the points you were raising were already addressed in the posting you were (supposedly)
replying to ...
On Thu, 22 Oct 2026 22:31:07 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:21 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a
user interface programming model for quite a long time.
First they need a standardized graphics API.
I gather thererCOs been a proposal thatrCOs been kicking around for
some years, to adopt something based on Cairo
<https://www.cairographics.org/>.
That's a fairly decent one.
It is (based on PostScript but goes beyond it), but the draft proposal
IrCOve seen is somewhat butchered. No text/font API, for a start.
The JavaScript browser-based 2D Canvas API is also based on Cairo, and
that was also butchered, albeit in a different way.
On 10/23/26 01:01, boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 12:19:49 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bd7tj$rh4f$1@dont-email.me>,-a <boltar@battlestar.co.uk>
wrote:
Most of us have a CS degree. But then we go out into the real world,
get a
job and find out what real programming on real products entails, not
a load
of virtual academic naval gazing.
That's because it's not a trade school degree.-a It's not there to teach >>> you to program, it's there to teach you the fundamentals that you
need to
properly understand programming.
No, it teaches you fundamentals of certain aspects of computer
paradigms such
as databases, graphics, AI. Most people into computers learn actual
programming
long before they hit university.
Engineering schools are even more that way.-a They don't teach you much
engineering, but they give you all the background that you need to learn >>> engineering.
Programming isn't pure engineering - its a combination of engineering,
logic,
art and a trade.
If you just want a job, getting one of these degrees is not for you.
It's
not there for that.
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
On 23/10/2026 05:21, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I hope that never happens.-a There are large numbers of graphics APIs,
with huge ranges of what they support, how they work and their balance between features, efficiency, portability, size, hardware support, and
what they are used for.
People who think C++ should have a standardised graphics API usually
mean they want to standardise the API they use on the one application
type that they write.
I gather thererCOs been a proposal thatrCOs been kicking around for some
years, to adopt something based on Cairo
<https://www.cairographics.org/>.
Fwiw, Cairo is up on vcpkg, so its really easy to build and
integrate with any MSVC project.
https://vcpkg.io/en/package/cairo
On Thu, 22 Oct 2026 22:31:07 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:21 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a
user interface programming model for quite a long time.
First they need a standardized graphics API.
I gather thererCOs been a proposal thatrCOs been kicking around for
some years, to adopt something based on Cairo
<https://www.cairographics.org/>.
That's a fairly decent one.
It is (based on PostScript but goes beyond it), but the draft proposal
IrCOve seen is somewhat butchered. No text/font API, for a start.
The JavaScript browser-based 2D Canvas API is also based on Cairo, and
that was also butchered, albeit in a different way.
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads >>> in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but not a process library. Its perfectly possible to simulate a multiprocess enviroment. How do you think pure software versions of virtual machines work?
Bill Gates wrote the Microsoft Basic compiler and interpreter for
the Altair 8080 in 2K of ram using assembly language. Take that as
you will.
On Thu, 22 Oct 2026 12:19:49 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bd7tj$rh4f$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>>
Most of us have a CS degree. But then we go out into the real world, get a >>> job and find out what real programming on real products entails, not a load >>> of virtual academic naval gazing.
That's because it's not a trade school degree. It's not there to teach
you to program, it's there to teach you the fundamentals that you need to
properly understand programming.
No, it teaches you fundamentals of certain aspects of computer paradigms such as databases, graphics, AI. Most people into computers learn actual programming
long before they hit university.
Engineering schools are even more that way. They don't teach you much
engineering, but they give you all the background that you need to learn
engineering.
Programming isn't pure engineering - its a combination of engineering, logic, art and a trade.
If you just want a job, getting one of these degrees is not for you. It's >> not there for that.
Bill Gates never earned a degree. He seemed to do ok.
On Fri, 23 Oct 2026 16:37:37 GMT
Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Considering how much of my career I've spent working around poor
design decisions and outright bugs in Windows, I'd say that is
self-evident.
AFAIK you can't pin that one on him; the Tandy Model 100 was the last
product he actually wrote code for, and that came out in '83, right at
the beginning of development on Windows 1.0. Dunno that he did much on MS-DOS, either, as the core of that was Tim Paterson's work in, erm, "adapating" the design of CP/M to the 8086.
On Fri, 23 Oct 2026 12:48:58 -0700, Chris M. Thomasson wrote:
Fwiw, Cairo is up on vcpkg, so its really easy to build and
integrate with any MSVC project.
https://vcpkg.io/en/package/cairo
Do you get Fontconfig and FreeType as well?
I thought Windows had native equivalents to all this functionality
anyway, yet here you are, reimplementing the entire Free Software
stack in parallel to it.
On Fri, 23 Oct 2026 16:37:37 GMT, Charlie Gibbs wrote:
On 2026-10-23, Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/23/26 01:01, boltar@caprica.universe wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Considering how much of my career I've spent working around poor
design decisions and outright bugs in Windows, I'd say that is
self-evident.
Remember that current rCLWindowsrCY actually means rCLWindows NTrCY. Which was
primarily the brainchild of Dave Cutler, who came from the nest of Unix-haters at DEC.
In short, Gates couldnrCOt have done what Microsoft achieved on his own.
John Ames <commodorejohn@gmail.com> wrote:
AFAIK you can't pin that one on him; the Tandy Model 100 was the last >>product he actually wrote code for, and that came out in '83, right at
the beginning of development on Windows 1.0. Dunno that he did much on >>MS-DOS, either, as the core of that was Tim Paterson's work in, erm, >>"adapating" the design of CP/M to the 8086.
He continued doing code reviews well into the Win 7 era, and a lot of
people wound up having to clean up after him. He was always very hands-on.
I remember in 1978 him being the third tier tech support hotline for
MBASIC bugs. He was incredibly rude.
On 10/23/26 02:45, David Brown wrote:
On 23/10/2026 08:25, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 22:29:45 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the >>>>> caller?
Have the caller have the object before hand and call a function to
initialize it?
IrCOm assuming that all that BASIC programming hasnrCOt got to your head, >>> and yourCOre not serious. ;)
Chris' wording is perhaps poor, but the principle is right.
I don't know PL/I or Fortran, but in C if you have :
-a-a-a-a-atypedef struct data_struct { int a; int xs[20]; } S ;
-a-a-a-a-aS build_some_data(void) {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a s.a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) s.xs[i] = i;
-a-a-a-a-a-a-a-a return s;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s = build_some_data();
-a-a-a-a-a}
then it is typically handled as though you had written :
-a-a-a-a-avoid build_some_data(S * p) {
-a-a-a-a-a-a-a-a p->a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) p->xs[i] = i;
-a-a-a-a-a-a-a-a return;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a build_some_data(&s);
-a-a-a-a-a}
That is - the caller creates the /space/ for the returned object, but
does not do any kind of initialisation.-a It passes a pointer to that
space as a hidden parameter to the function that wants to return the
object.
That principle should work fine in any language, as long as the size
of the returned object is known by the caller code.
That last sentence is why it would not work fine,
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>>You need an OS to do threading properly too. Theres a reason green threads >>>in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but >not a process library. Its perfectly possible to simulate a multiprocess >enviroment.
How do you think pure software versions of virtual machines work?
On 2026-10-23 05:28, David Brown wrote:
On 22/10/2026 22:25, James Kuyper wrote:
On 2026-10-22 12:02, Scott Lurndal wrote:The term in both the C and C++ standards is "abstract machine", but I
The C/C++ "Virtual Machine Model" as described in the language
specifications is an apple.
think it was quite obvious that this is Dan meant when he wrote "virtual
machine". ...
I suspected as much, but it seemed a sufficiently odd mistake that I
wasn't sure.
On 10/23/26 02:45, David Brown wrote:
On 23/10/2026 08:25, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 22:29:45 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the >>>>> caller?
Have the caller have the object before hand and call a function to
initialize it?
IrCOm assuming that all that BASIC programming hasnrCOt got to your head, >>> and yourCOre not serious. ;)
Chris' wording is perhaps poor, but the principle is right.
I don't know PL/I or Fortran, but in C if you have :
-a-a-a-a-atypedef struct data_struct { int a; int xs[20]; } S ;
-a-a-a-a-aS build_some_data(void) {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a s.a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) s.xs[i] = i;
-a-a-a-a-a-a-a-a return s;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s = build_some_data();
-a-a-a-a-a}
then it is typically handled as though you had written :
-a-a-a-a-avoid build_some_data(S * p) {
-a-a-a-a-a-a-a-a p->a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) p->xs[i] = i;
-a-a-a-a-a-a-a-a return;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a build_some_data(&s);
-a-a-a-a-a}
That is - the caller creates the /space/ for the returned object, but
does not do any kind of initialisation.-a It passes a pointer to that
space as a hidden parameter to the function that wants to return the
object.
That principle should work fine in any language, as long as the size
of the returned object is known by the caller code.
That last sentence is why it would not work fine,
On Fri, 23 Oct 2026 09:02:50 -0700, Peter Flass wrote:
On 10/22/26 22:29, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to
initialize it?
That obviously wouldn't work, since then the caller would have to
know something about the object beforehand.
And what if the object didnrCOt consist of just *one*
dynamically-allocated block, but needed links to other blocks as well?
What if it needed objects dynamically allocated by other APIs, the
details of which are internal to those APIs? Is the caller required to
know about all these implementation details?
In short, the concept doesnrCOt scale, because it completely breaks the concept of data abstraction.
And it just pushes the dynamic-allocation problem elsewhere, without
making it easier.
On 10/22/26 22:29, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach if
you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to
initialize it?
That obviously wouldn't work, since then the caller would have to know something about the object beforehand. I think you'd have to depend on
the compiler to destroy the object when it goes out of scope, unless the caller destroys it itself.
On 23/10/2026 05:21, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I hope that never happens.
There are large numbers of graphics APIs,
with huge ranges of what they support, how they work and their balance between features, efficiency, portability, size, hardware support, and
what they are used for.
On 10/23/2026 1:03 AM, boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green
threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system.-a I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading
library but
not a process library. Its perfectly possible to simulate a multiprocess
enviroment. How do you think pure software versions of virtual
machines work?
Well, a process lib needs to have certain things. Imvvho, at least
access to robust mutex?
David Brown <david.brown@hesbynett.no> schrieb:
On 23/10/2026 05:21, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I hope that never happens.
I have one Fortran program which has an excellent graphics API,
it writes Postscript. Works fine. Can't do any mouse clicks on
it and expect anything to happen, though :-)
Works for all programming languages as long as they do text I/O.
There are large numbers of graphics APIs,
with huge ranges of what they support, how they work and their balance
between features, efficiency, portability, size, hardware support, and
what they are used for.
I guess mine is an example rather restricted graphics API, then :-)
On Fri, 23 Oct 2026 19:20:50 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 05:54:44 -0000 (UTC), Steven G. Kargl wrote:
On Fri, 23 Oct 2026 04:22:13 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 04:10:39 -0000 (UTC), Steven G. Kargl wrote:
On Fri, 23 Oct 2026 03:33:44 -0000 (UTC), Lawrence DrCOOliveiro wrote: >>>>>> So you can see there is no way out of the inner block without passing >>>>>> through the dispose call.
'break' is just another name for 'goto label'.
Using gotos would contribute nothing except make it harder to
assure yourself of the simplicity of the control flow.
PS: We're still waiting on a definition of "storage allocation"
... allocate object pointer ...
Nice use of quoting without adding context.
Just pointing out (in case you didnrCOt notice) that the points you were
raising were already addressed in the posting you were (supposedly)
replying to ...
And, we are still waiting for your definition of "storage allocation"
and its needed cleanup in the context of Fortran 77. It as been pointed
out to you multiple times that Fortran 77 does not have dynamic memory allocation. Fortran 77 does not have pointers and it does not have
objects. So, what is this mythical cleanup of storage allocation in
Fortran 77?
It's okay to admit that you were making a some generalization that
does not apply to Fortran 77.
That obviously wouldn't work, since then the caller would have to
know something about the object beforehand.
On Fri, 23 Oct 2026 08:05:13 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 22:48:29 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Thu, 22 Oct 2026 14:51:31 -0000 (UTC)
boltar@battlestar.co.uk wrote:
I agree that the work for a CS degree is useful. If nothing else
I understand more now.
Most of us have a CS degree.
I don't have it.
How do you know about most?
Oh I dunno, maybe 30 years in the industry working with probably
hundreds of different programmers.
My experience in industry beats yours by few years.
And my statistics differ - CS graduates are not majority of computer programmers.
On 10/23/2026 12:19 PM, Lawrence DrCOOliveiro wrote:
In short, the concept doesnrCOt scale, because it completely breaks
the concept of data abstraction.
And it just pushes the dynamic-allocation problem elsewhere,
without making it easier.
It can be made to work ...
On 10/23/2026 12:19 PM, Lawrence DrCOOliveiro wrote:
That obviously wouldn't work, since then the caller would have to
know something about the object beforehand.
non sequitur?
Fwiw, vcpkg has a lot of them, ready to automatically build and
integrate. vcpkg is actually... Well, its pretty nice and so far...
Seems to work for me.
I have one Fortran program which has an excellent graphics API, it
writes Postscript. Works fine. Can't do any mouse clicks on it and
expect anything to happen, though :-)
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
In short, Gates couldnrCOt have done what Microsoft achieved on his own.
Sort of like an evil genius commanding his legion of minions...
Michael S wrote:I studied to be a physicist, got a BS from Caltech, and did postgraduate
My experience in industry beats yours by few years.
And my statistics differ - CS graduates are not majority of computer
programmers.
In the 70s and early 80s there was little demand for people with
graduate degrees in physics. Most of my fellow students went on to work
in computer science or drove taxis when their postdoctoral positions expired.
I am a lousy driver and so-so programmer (at best) so I was forced to
stick with it.
Well, for me. I had LOGO, PILOT and BASIC on my first Atari when I
was a little kiddo in the early to mid 80's. Born in 1977. I had
some books to go with them. So, I read the damn books. Started
programming!
On Fri, 23 Oct 2026 13:02:44 -0700, Chris M. Thomasson wrote:
Well, for me. I had LOGO, PILOT and BASIC on my first Atari when I
was a little kiddo in the early to mid 80's. Born in 1977. I had
some books to go with them. So, I read the damn books. Started
programming!
My first exposure to a real computer system was a DEC PDP-11. I
remember the first time I saw an Apple II running LOGO. Somebody tried telling it to do a file I/O command without a floppy in the drive. It
ground away for a few seconds, and then produced an error message --
of course.
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
To me, that was like a splash in the face with a pail of cold water.
The idea of an error message phrased in plain, approachable language
(using a first-person pronoun, even) instead of technical terms?? That
was a revelation.
On 2026-10-23 17:40, William Hyde wrote:
Michael S wrote:I studied to be a physicist, got a BS from Caltech, and did postgraduate
My experience in industry beats yours by few years.
And my statistics differ - CS graduates are not majority of computer
programmers.
In the 70s and early 80s there was little demand for people with
graduate degrees in physics. Most of my fellow students went on to work
in computer science or drove taxis when their postdoctoral positions
expired.
I am a lousy driver and so-so programmer (at best) so I was forced to
stick with it.
work at Cambridge. I reached that point in the 90s. I learned computer programming only with the intent of using it as a tool in support of my physics. That idea foundered on two rocks: while I am very good at understanding advanced physics, I'm not particularly good at the practicalities of experimental physics, and my imagination isn't good
enough to make a good theoretical physicist. I ended up being a
programmer who specialized in scientific programming, rather than a
scientist who uses computer programs.
On Fri, 23 Oct 2026 12:55:02 -0700, Chris M. Thomasson wrote:
Fwiw, vcpkg has a lot of them, ready to automatically build and
integrate. vcpkg is actually... Well, its pretty nice and so far...
Seems to work for me.
How does it work for end-users? Are your dependencies automatically
brought in when they install your package? How are they kept
up-to-date?
On 10/23/2026 3:46 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 12:55:02 -0700, Chris M. Thomasson wrote:
Fwiw, vcpkg has a lot of them, ready to automatically build and
integrate. vcpkg is actually... Well, its pretty nice and so far...
Seems to work for me.
How does it work for end-users? Are your dependencies automatically
brought in when they install your package? How are they kept
up-to-date?
Oh yeah. In your build directory, say Debug or Release, it has all of
the built shared libs and everything you need to run it.
Keeping them up to date is, afaict, manual.
On Fri, 23 Oct 2026 13:56:49 -0700, Chris M. Thomasson wrote:
On 10/23/2026 12:19 PM, Lawrence DrCOOliveiro wrote:
In short, the concept doesnrCOt scale, because it completely breaks
the concept of data abstraction.
And it just pushes the dynamic-allocation problem elsewhere,
without making it easier.
It can be made to work ...
IrCOm sure itrCOs *possible*, but what is the *point*?
The whole aim of levels of abstraction is to tame the multi-headed
beast of complexity that is computer programming. What you are doing
here is breaking down those levels, all in the aid of, I donrCOt know,
just to keep using gotos in your code, or something.
On Fri, 23 Oct 2026 14:29:22 -0700, Chris M. Thomasson wrote:
On 10/23/2026 12:19 PM, Lawrence DrCOOliveiro wrote:
That obviously wouldn't work, since then the caller would have to
know something about the object beforehand.
non sequitur?
I donrCOt care, because ... I didnrCOt say that.
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Fri, 23 Oct 2026 13:02:44 -0700, Chris M. Thomasson wrote:
Well, for me. I had LOGO, PILOT and BASIC on my first Atari when I
was a little kiddo in the early to mid 80's. Born in 1977. I had
some books to go with them. So, I read the damn books. Started
programming!
My first exposure to a real computer system was a DEC PDP-11. I
remember the first time I saw an Apple II running LOGO. Somebody tried
telling it to do a file I/O command without a floppy in the drive. It
ground away for a few seconds, and then produced an error message --
of course.
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
To me, that was like a splash in the face with a pail of cold water.
The idea of an error message phrased in plain, approachable language
(using a first-person pronoun, even) instead of technical terms?? That
was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back
in my mainframe days, I learned to hate catch-all error messages;
they're the sign of a programmer who's too lazy to try to help
the user. If something goes wrong, I want to be given some clues
as to where to look. But more and more these days, your typical
error message is "Something went wrong." Nothing more. This kind
of conduct should be condemned.
Think of it from a support person's point of view. A user calls
and says, "I have an error message." "OK," you reply, "what is
the message?" "It doesn't work." That's what the user would have
said anyway - we've just wasted some time, and we still have to
start the same old game of Twenty Questions.
I'm not saying that we should go back to the days of cryptic error
codes. But an error message can be both friendly and helpful.
For your case, how about something like "There is no disk in the
drive" or "The disk is write-protected"? And then follow it with
an error code for those of us who know how to interpret them.
Users shouldn't be made to guess what the computer already knows.
On 10/23/2026 3:42 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 13:56:49 -0700, Chris M. Thomasson wrote:
On 10/23/2026 12:19 PM, Lawrence DrCOOliveiro wrote:
In short, the concept doesnrCOt scale, because it completely breaks
the concept of data abstraction.
And it just pushes the dynamic-allocation problem elsewhere,
without making it easier.
It can be made to work ...
IrCOm sure itrCOs *possible*, but what is the *point*?
The whole aim of levels of abstraction is to tame the multi-headed
beast of complexity that is computer programming. What you are
doing here is breaking down those levels, all in the aid of, I
donrCOt know, just to keep using gotos in your code, or something.
Well, not about goto's and such. Just so a lib can inform the caller
as to what it needs to work with. The caller sets it up, then calls
into the init etc. Its being used in a lot of places. Take Vulkan.
On 10/23/2026 3:46 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 12:55:02 -0700, Chris M. Thomasson wrote:
Fwiw, vcpkg has a lot of them, ready to automatically build and
integrate. vcpkg is actually... Well, its pretty nice and so
far... Seems to work for me.
How does it work for end-users? Are your dependencies automatically
brought in when they install your package? How are they kept
up-to-date?
Oh yeah. In your build directory, say Debug or Release, it has all
of the built shared libs and everything you need to run it.
Keeping them up to date is, afaict, manual.
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
The idea of an error message phrased in plain, approachable
language (using a first-person pronoun, even) instead of technical
terms?? That was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back in my
mainframe days, I learned to hate catch-all error messages; they're
the sign of a programmer who's too lazy to try to help the user. If
something goes wrong, I want to be given some clues as to where to
look. But more and more these days, your typical error message is
"Something went wrong." Nothing more. This kind of conduct should be condemned.
On 10/15/2026 2:13 PM, Lynn McGuire wrote:
On 10/15/2026 10:05 AM, Scott Dorsey wrote:
Lynn McGuire-a <lynnmcguire5@gmail.com> wrote:
Huh, so somebody has actually built a decent decompiler.-a Why do I
doubt
this even though ESR says otherwise?
Because decompiling some languages isn't that hard.-a Humans can do it
pretty
well, although it's harder for machines.-a It helps a lot if you have
a symbol
table (which it sounds like they did in the example ESR cites).
Now... that said... I wouldn't trust anything ESR ever says and I
would not
hold him up as an authority.
And he has a translator from Borland Pascal to Rust?
That seems like a step down, doesn't it?
--scott
Yes on the step down to Rust.-a I wrote a lot of Turbo Pascal code back
in the 1980s but I have to admit that I am a C++ fanboi through and
through.-a And at my age, it will hard to change my mind on that unless
you are writing embedded code.
I have translated over 200,000 lines of Fortran 66/77 code to C++ this
year so far.-a Trying to get to 300,000 lines of Fortran 66/77 code
before the end of the year.
Lynn
Be sure to let us know, we'll throw a party.
Actually, I'm close enough that that's possible.
Why does Mozilla Firefox update itself just about every week?
On Fri, 23 Oct 2026 16:37:37 GMT, Charlie Gibbs wrote:
On 2026-10-23, Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/23/26 01:01, boltar@caprica.universe wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Considering how much of my career I've spent working around poor
design decisions and outright bugs in Windows, I'd say that is
self-evident.
Remember that current rCLWindowsrCY actually means rCLWindows NTrCY. Which was >primarily the brainchild of Dave Cutler, who came from the nest of >Unix-haters at DEC.
Perhaps it was the corporate culture with Bill Gates at the helm that >attracted Cutler to Microsoft. But look at some of the boneheaded
decisions he made (or propagated from old DOS-based Windows), just so
NT wouldnrCOt look like Unix, which continue to haunt Microsoft to this
day.
On 10/23/2026 11:06 AM, Peter Flass wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the
Altair 8080 in 2K of ram using assembly language. Take that as you will.
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads >>>>in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but >>not a process library. Its perfectly possible to simulate a multiprocess >>enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
On 10/23/26 02:34, David Brown wrote:
On 23/10/2026 05:21, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 15:41:15 -0500, Lynn McGuire wrote:
I have been advocating for quite a while that C++ should add a user
interface programming model for quite a long time.
First they need a standardized graphics API.
I hope that never happens.-a There are large numbers of graphics APIs,
with huge ranges of what they support, how they work and their balance
between features, efficiency, portability, size, hardware support, and
what they are used for.
People who think C++ should have a standardised graphics API usually
mean they want to standardise the API they use on the one application
type that they write.
I gather thererCOs been a proposal thatrCOs been kicking around for some >>> years, to adopt something based on Cairo
<https://www.cairographics.org/>.
You need something with subsets. At least a "basic" subset, a "full"
subset, and something in between that satisfies most uses. Or maybe
subsets for different purposes, but they should all be compatible.
On 10/23/26 02:45, David Brown wrote:
On 23/10/2026 08:25, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 22:29:45 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach
if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the >>>>> caller?
Have the caller have the object before hand and call a function to
initialize it?
IrCOm assuming that all that BASIC programming hasnrCOt got to your head, >>> and yourCOre not serious. ;)
Chris' wording is perhaps poor, but the principle is right.
I don't know PL/I or Fortran, but in C if you have :
-a-a-a-a-atypedef struct data_struct { int a; int xs[20]; } S ;
-a-a-a-a-aS build_some_data(void) {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a s.a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) s.xs[i] = i;
-a-a-a-a-a-a-a-a return s;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s = build_some_data();
-a-a-a-a-a}
then it is typically handled as though you had written :
-a-a-a-a-avoid build_some_data(S * p) {
-a-a-a-a-a-a-a-a p->a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) p->xs[i] = i;
-a-a-a-a-a-a-a-a return;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a build_some_data(&s);
-a-a-a-a-a}
That is - the caller creates the /space/ for the returned object, but
does not do any kind of initialisation.-a It passes a pointer to that
space as a hidden parameter to the function that wants to return the
object.
That principle should work fine in any language, as long as the size
of the returned object is known by the caller code.
That last sentence is why it would not work fine,
On 10/23/26 01:01, boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 12:19:49 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bd7tj$rh4f$1@dont-email.me>,-a <boltar@battlestar.co.uk>
wrote:
Most of us have a CS degree. But then we go out into the real world,
get a
job and find out what real programming on real products entails, not
a load
of virtual academic naval gazing.
That's because it's not a trade school degree.-a It's not there to teach >>> you to program, it's there to teach you the fundamentals that you
need to
properly understand programming.
No, it teaches you fundamentals of certain aspects of computer
paradigms such
as databases, graphics, AI. Most people into computers learn actual
programming
long before they hit university.
Engineering schools are even more that way.-a They don't teach you much
engineering, but they give you all the background that you need to learn >>> engineering.
Programming isn't pure engineering - its a combination of engineering,
logic,
art and a trade.
If you just want a job, getting one of these degrees is not for you.
It's
not there for that.
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads >>>>>in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>operating system. I mean, POSIX already does an ok job of >>>>standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but >>>not a process library. Its perfectly possible to simulate a multiprocess >>>enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote: >>> On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but >>> not a process library. Its perfectly possible to simulate a multiprocess >>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
boltar@caprica.universe writes:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>>On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> >wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>>operating system. I mean, POSIX already does an ok job of >>>>>standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but >>>>not a process library. Its perfectly possible to simulate a multiprocess >>>>enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
It doesn't. It does have an abstraction wrapper around
whatever threading support the target host has.
boltar@caprica.universe writes:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but
not a process library. Its perfectly possible to simulate a multiprocess >>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
It doesn't. It does have an abstraction wrapper around
whatever threading support the target host has.
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads >>>>>in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>operating system. I mean, POSIX already does an ok job of >>>>standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but >>>not a process library. Its perfectly possible to simulate a multiprocess >>>enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
Still, somebody had to decide to make the MS-DOS COPY command refuse
to copy zero-length files - something which CP/M's PIP did happily.
On 10/23/2026 11:06 AM, Peter Flass wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the >>Altair 8080 in 2K of ram using assembly language. Take that as you will.
Gates when he put his mind to it could certainly program. Even Sinclair >required 4K for BASIC in the ZX80 for example. But some of his technical
(and business) decisions leave a lot to be desired.
On 10/24/26 01:21, boltar@caprica.universe wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but
not a process library. Its perfectly possible to simulate a multiprocess >>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
You can have co-operative threads. IBM CICS used to run lots of threads >(tasks) concurrently, and ran them well.
In article <11bhpo6$2lpjl$1@dont-email.me>, <boltar@caprica.universe> wrote:
Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
On 10/23/2026 11:06 AM, Peter Flass wrote:Gates when he put his mind to it could certainly program. Even Sinclair
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the
Altair 8080 in 2K of ram using assembly language. Take that as you will. >>
required 4K for BASIC in the ZX80 for example. But some of his technical
(and business) decisions leave a lot to be desired.
But the ZX80 (and most later MBASICs) had floating point.
--scott
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but
not a process library. Its perfectly possible to simulate a multiprocess >>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
- Dan C.
On Fri, 23 Oct 2026 23:31:41 GMT, Charlie Gibbs wrote:
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
The idea of an error message phrased in plain, approachable
language (using a first-person pronoun, even) instead of technical
terms?? That was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back in my
mainframe days, I learned to hate catch-all error messages; they're
the sign of a programmer who's too lazy to try to help the user. If
something goes wrong, I want to be given some clues as to where to
look. But more and more these days, your typical error message is
"Something went wrong." Nothing more. This kind of conduct should be
condemned.
This was not like that though, was it? On systems of that era, you
would typically get something like rCLDISK ERRORrCY or rCLI/O ERRORrCY. The plain-language message was no less specific than that.
Do you want more detail about what went wrong? Perhaps a CRC
validation failure? Sector-addressing failure? Missing address/data
marks? Invalid GCR/RLL encoding?
That kind of low-level detail might be helpful to somebody (perhaps a hardware engineer) trying to fix the problem. And perhaps it should
appear in a system log somewhere.
And it wouldnrCOt have mattered much in this case, anyway, since it
would have been obvious to anybodyrCi sitting or standing in front of the machine, that the most likely cause was the fact that there was no
disk in the drive.
rCiAnybody who had made much use of floppy disks on micros, anyway.
boltar@caprica.universe writes:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but
not a process library. Its perfectly possible to simulate a multiprocess >>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
It doesn't. It does have an abstraction wrapper around
whatever threading support the target host has.
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but
not a process library. Its perfectly possible to simulate a multiprocess >>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
On Fri, 23 Oct 2026 17:01:28 -0700, Chris M. Thomasson wrote:
On 10/23/2026 3:42 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 13:56:49 -0700, Chris M. Thomasson wrote:
On 10/23/2026 12:19 PM, Lawrence DrCOOliveiro wrote:
In short, the concept doesnrCOt scale, because it completely breaks
the concept of data abstraction.
And it just pushes the dynamic-allocation problem elsewhere,
without making it easier.
It can be made to work ...
IrCOm sure itrCOs *possible*, but what is the *point*?
The whole aim of levels of abstraction is to tame the multi-headed
beast of complexity that is computer programming. What you are
doing here is breaking down those levels, all in the aid of, I
donrCOt know, just to keep using gotos in your code, or something.
Well, not about goto's and such. Just so a lib can inform the caller
as to what it needs to work with. The caller sets it up, then calls
into the init etc. Its being used in a lot of places. Take Vulkan.
Where in Vulkan? Exposing implementation details to the caller not
only increases complexity, it also limits the implementorrCOs ability to change those details later.
Iiic, vkGetBufferMemoryRequirements and vkGetImageMemoryRequirements,
which return a VkMemoryRequirements struct containing size, alignment,
and memoryTypeBits. The caller allocates the memory with
vkAllocateMemory and binds it with vkBindBufferMemory.
Also, iirc io_uring: IORING_SETUP_NO_MMAP (Linux 6.5+) lets the caller supply the memory for the rings and SQE array. It must be suitably
aligned (page or huge page), and the caller has to compute how big it
needs to be from the entry count and flags.
So it can be made to work.
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but
not a process library. Its perfectly possible to simulate a multiprocess >>>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
On 10/23/2026 8:44 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 23:31:41 GMT, Charlie Gibbs wrote:
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
The idea of an error message phrased in plain, approachable
language (using a first-person pronoun, even) instead of technical
terms?? That was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back in my
mainframe days, I learned to hate catch-all error messages; they're
the sign of a programmer who's too lazy to try to help the user. If
something goes wrong, I want to be given some clues as to where to
look. But more and more these days, your typical error message is
"Something went wrong." Nothing more. This kind of conduct should be
condemned.
This was not like that though, was it? On systems of that era, you
would typically get something like rCLDISK ERRORrCY or rCLI/O ERRORrCY. The >> plain-language message was no less specific than that.
Do you want more detail about what went wrong? Perhaps a CRC
validation failure? Sector-addressing failure? Missing address/data
marks? Invalid GCR/RLL encoding?
That kind of low-level detail might be helpful to somebody (perhaps a
hardware engineer) trying to fix the problem. And perhaps it should
appear in a system log somewhere.
And it wouldnrCOt have mattered much in this case, anyway, since it
would have been obvious to anybodyrCi sitting or standing in front of the
machine, that the most likely cause was the fact that there was no
disk in the drive.
rCiAnybody who had made much use of floppy disks on micros, anyway.
Iirc, BASIC had a fun error. I cannot remember the damn exact phrase, it
was something like expression too complex or something.
Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
Still, somebody had to decide to make the MS-DOS COPY command refuse
to copy zero-length files - something which CP/M's PIP did happily.
That's a bug and not a feature. Sometimes you want to have a zero-length file in place as a semaphore.
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason
green threads in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading
library but not a process library. Its perfectly possible to
simulate a multiprocess enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual >memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
On 10/23/2026 8:33 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 17:01:28 -0700, Chris M. Thomasson wrote:
On 10/23/2026 3:42 PM, Lawrence DrCOOliveiro wrote:
The whole aim of levels of abstraction is to tame the
multi-headed beast of complexity that is computer programming.
What you are doing here is breaking down those levels, all in the
aid of, I donrCOt know, just to keep using gotos in your code, or
something.
Well, not about goto's and such. Just so a lib can inform the
caller as to what it needs to work with. The caller sets it up,
then calls into the init etc. Its being used in a lot of places.
Take Vulkan.
Where in Vulkan? Exposing implementation details to the caller not
only increases complexity, it also limits the implementorrCOs ability
to change those details later.
Iiic, vkGetBufferMemoryRequirements and
vkGetImageMemoryRequirements, which return a VkMemoryRequirements
struct containing size, alignment, and memoryTypeBits. The caller
allocates the memory with vkAllocateMemory and binds it with vkBindBufferMemory.
Or what about miniaudiorCOs ma_engine_get_heap_size plus ma_engine_init_preallocated
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason
green threads in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading
library but not a process library. Its perfectly possible to
simulate a multiprocess enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to care
about C.
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done.
All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
It does not look like variety in this field is bigger than in case of >threads. More like it is smaller.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
In article <20261025011151.000038ef@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a
reason green threads in java were a joke.
Weird that you think you need a operating system for
threads, yet you want C to standardize processes which also
... need an operating system. I mean, POSIX already does
an ok job of standardizing the sorts of process-y things
you would expect from, you know, an operating system.
I'm simply pointing out the inconsistency in having a
threading library but not a process library. Its perfectly
possible to simulate a multiprocess enviroment.
So write a simulator in your language of choice. You don't
need the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A
process runs in its own address space. (at least these days,
before virtual memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to
care about C.
First, he's a big boy, and I'm sure he can answer for himself.
But ok then, C++, not C. The questions still stand.
Second, while in theory threads can be implemented by C++ >compilers+language support library, in practice I had never seen it
done.
This is not saying much about anything aside from the countours
of your own experience, I'm afraid.
All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
In the late 1990s, into the early 2000s, most "threads" on
Unix-style systems were implemented in userspace, in the C
library, often by exposing the "normal" system call endpoints
in the library, but making them thin wrappers around equivalent
asynchronous system calls.
There was even a paper about using the Xinu pedagogical system
from Doug Comer to implement something very close to threads on
4.2BSD, with signals and a context saving/restoration primitive
to approximate a timer interrupt.
For a more recent historical example the FreeBSD MP library was
initially implemented this way, as were pre-LinuxThreasd threads
on Linux; Solaris threads up until Solaris 2.6 or so similarly.
Of course, it wasn't a great way to do things because if
something _did_ block...well, there went your concurrency.
Making Unix systems multithreaded was challenging because of
decades of software that was written assuming a single-threaded
userspace environment (the kernel had been "multithreaded" since
very near the start, even if much of the system was written
assuming a single processor; but parallelism is not the same
thing as concurrency), and this was compounded because people
were trying to implement complex M:N threading models; Sun did
this, and FreeBSD tried with their KSEs; the Linux people did
not. While cool in theory, M:N threading relied on very
specific usage patterns to work well in practice, and almost no
one actually wrote software that way, so you ended up with
userspace threads fighting the kernel scheeduler, and vice
versa.
More recently, the Akaros research system introduced the notion
of a "many-core process" and pushed fine-grained "thread"
scheduling entirely to userspace; the kernel is totally unaware
of how userspace schedules anything. That system uses an N:C
model, where $C$ is the number of *cores* assigned to a process
(all system calls in Akaros are asychronous by design, to avoid
the pitfalls of user-threads blocking on synchronous kernel
services that beset Unix).
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
C, and C++, have had `system()` for as long as I can remember,
if you just want to run a program (note that both `posix_spawn`
and `CreateProcess` take the names of programs to run in that
new process).
It does not look like variety in this field is bigger than in case of >threads. More like it is smaller.
Nope. But if you think differently, see the questions above.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
- Dan C.
On 2026-10-24, Scott Dorsey <kludge@panix.com> wrote:
Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
Still, somebody had to decide to make the MS-DOS COPY command refuse
to copy zero-length files - something which CP/M's PIP did happily.
That's a bug and not a feature. Sometimes you want to have a zero-length
file in place as a semaphore.
Exactly. Another case is a month-to-date accumulator
at the beginning of the month.
Still, I've heard some pretty amazing attempts to justify this
design flaw as a feature.
In article <11bhpo6$2lpjl$1@dont-email.me>, <boltar@caprica.universe> wrote:
Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
On 10/23/2026 11:06 AM, Peter Flass wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the >>>Altair 8080 in 2K of ram using assembly language. Take that as you will.
Gates when he put his mind to it could certainly program. Even Sinclair >>required 4K for BASIC in the ZX80 for example. But some of his technical >>(and business) decisions leave a lot to be desired.
But the ZX80 (and most later MBASICs) had floating point.
--scott
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>>On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> >wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>>operating system. I mean, POSIX already does an ok job of >>>>>standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but >>>>not a process library. Its perfectly possible to simulate a multiprocess >>>>enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
In article <11bhpo6$2lpjl$1@dont-email.me>, <boltar@caprica.universe> wrote: >>Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
On 10/23/2026 11:06 AM, Peter Flass wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the >>>Altair 8080 in 2K of ram using assembly language. Take that as you will.
Gates when he put his mind to it could certainly program. Even Sinclair >>required 4K for BASIC in the ZX80 for example. But some of his technical >>(and business) decisions leave a lot to be desired.
But the ZX80 (and most later MBASICs) had floating point.
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of threads >>(tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only different >processes, so you had to do a fork and then synchronize with the other >process. This wasn't a dealbreaker and we did plenty of stuff that way,
but having threads available was very nice and made for many operations >becoming more convenient to write.
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe> >wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> >wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> >wrote:
You need an OS to do threading properly too. Theres a reason green >threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library >but
not a process library. Its perfectly possible to simulate a multiprocess >>>>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual >>memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe> wrote:
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
- Dan C.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
I supported an IBM 9370 back in the 90s and whatever operating system
it ran (completely different to the 3090 mainframe with JCL, etc it
was supposed to replace) didn't allow zero length files.
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason >>>>>>>>> green threads in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>>>>> operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading
library but not a process library. Its perfectly possible to
simulate a multiprocess enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to care
about C.
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done. All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
It does not look like variety in this field is bigger than in case of threads. More like it is smaller.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bhpo6$2lpjl$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
On 10/23/2026 11:06 AM, Peter Flass wrote:Gates when he put his mind to it could certainly program. Even Sinclair >>>required 4K for BASIC in the ZX80 for example. But some of his technical >>>(and business) decisions leave a lot to be desired.
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the >>>>Altair 8080 in 2K of ram using assembly language. Take that as you will. >>>
But the ZX80 (and most later MBASICs) had floating point.
The ZX80 ran Sinclair Basic, it had nothing to do with MS and it was integer >only. The ZX81 had flowing point basic and had an 8K ROM which is still >bloody impressive.
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <20261025011151.000038ef@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
[snip]
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done.
This is not saying much about anything aside from the countours
of your own experience, I'm afraid.
[snip history showing a long line of "OS Threads" implemented
as a library]
How any of this trivia has anything to do with real-world
implementations of C++11 threads?
I mentioned that in one of my earlier responses to boltar.
However there exist situation in which system() is not a satisfactory >replacement for spawn(), most often because overhead of launching shell >sometimes matters.
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >model/api are? Yet somehow C++ provides a common wrapper for both. There is >no reason the same can't be done for processes and your irrelevant waffle >about past issues of threading on *nix don't change that.
Jerry Brown <jerry@jwbrown.co.uk.invalid> schrieb:
I supported an IBM 9370 back in the 90s and whatever operating system
it ran (completely different to the 3090 mainframe with JCL, etc it
was supposed to replace) didn't allow zero length files.
VM/CMS?
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both. There is >> no reason the same can't be done for processes and your irrelevant waffle
about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
- Dan C.
On 10/25/26 02:30, Thomas Koenig wrote:
Jerry Brown <jerry@jwbrown.co.uk.invalid> schrieb:
I supported an IBM 9370 back in the 90s and whatever operating system
it ran (completely different to the 3090 mainframe with JCL, etc it
was supposed to replace) didn't allow zero length files.
VM/CMS?
Or some version of DOD/360? They had a couple of versions, I think. They kept trying to make it easier to install and maintain, but it was still
DOS.
Those times I want to run something now I use VM, because it is so much simpler.
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to care
about C.
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done. All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
It does not look like variety in this field is bigger than in case of >threads. More like it is smaller.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
In article <20261025084234.0000449c@yahoo.com>,<snip>
Michael S <already5chosen@yahoo.com> wrote:
How any of this trivia has anything to do with real-world
implementations of C++11 threads?
Your statement, "while in theory threads can be implemented by
C++ compilers+language support library, in practice I had never
seen it done" is probably strictly true: you, individually, have
never seen it done.
But that does not imply that it has never been done. In
fact, it has; many times over. There are complications, but it
can be done. That is what I was telling you, supported by
examples.
On Fri, 23 Oct 2026 21:00:30 -0000 (UTC), Thomas Koenig wrote:
I have one Fortran program which has an excellent graphics API, it
writes Postscript. Works fine. Can't do any mouse clicks on it and
expect anything to happen, though :-)
PostScript was a very influential graphics API, but it is only fit for
the museum nowadays. It was designed for putting marks on paper, not
for updating pixels on a computer screen.
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>no reason the same can't be done for processes and your irrelevant waffle >>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <20261025084234.0000449c@yahoo.com>,<snip>
Michael S <already5chosen@yahoo.com> wrote:
How any of this trivia has anything to do with real-world
implementations of C++11 threads?
Your statement, "while in theory threads can be implemented by
C++ compilers+language support library, in practice I had never
seen it done" is probably strictly true: you, individually, have
never seen it done.
But that does not imply that it has never been done. In
fact, it has; many times over. There are complications, but it
can be done. That is what I was telling you, supported by
examples.
Although it does, generally, rely on specific operating system
interfaces (e.g. makecontext, setcontext, et alia).
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>>no reason the same can't be done for processes and your irrelevant waffle >>>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question with a question.
Given I've been programming on unix for over 30 years and have written dozens >of applications using multi process and multi threading and sometimes using both
I'm quite well aware of the differences. Perhaps you arn't which is why you >need me to tell you. Well go do your own research.
In the meantime I'll ask one last time - why do you think C++ can provide
a threading wrapper API but not a multi process one?
Take your time.
In article <YHpDS.27364$9b8f.4666@fx39.iad>,
Scott Lurndal <slp53@pacbell.net> wrote:
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <20261025084234.0000449c@yahoo.com>,<snip>
Michael S <already5chosen@yahoo.com> wrote:
How any of this trivia has anything to do with real-world >>>>implementations of C++11 threads?
Your statement, "while in theory threads can be implemented by
C++ compilers+language support library, in practice I had never
seen it done" is probably strictly true: you, individually, have
never seen it done.
But that does not imply that it has never been done. In
fact, it has; many times over. There are complications, but it
can be done. That is what I was telling you, supported by
examples.
Although it does, generally, rely on specific operating system
interfaces (e.g. makecontext, setcontext, et alia).
That's true. But no one said that one can use strict ISO C++ to
implement the C++ standard library.
Regardless, if you can set the stack pointer, you can build a
reasonable cooperative threading library purely in userspace,
without the OS caring.
In article <11bl9qm$10h8f$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Sun, 25 Oct 2026 13:34:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>>>no reason the same can't be done for processes and your irrelevant waffle >>>>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question with a question.
In other words, you don't know.
In the meantime I'll ask one last time - why do you think C++ can provide
a threading wrapper API but not a multi process one?
You've got system(), right? What, precisely, do you want this
On 10/25/26 06:34, Dan Cross wrote:
[snip]
What do you think that a "thread" is?
What do you think that a "process" is?
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
with a question.[snip]
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question
In other words, you don't know.
Oh do piss off you bore, i'm not going to humour you while
you try to unpaint
yourself from a corner. You clearly have no idea why C++
implements one API
but not the other but you wanted to try and sound clever
anyway. Whoops, didn't
turn out quite how you expected did it?
C++ can provideIn the meantime I'll ask one last time - why do you think
a threading wrapper API but not a multi process one?
You've got system(), right? What, precisely, do you want this
system?? ROTFL!! :)
Oh dear, you really have no clue!
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
Regardless, if you can set the stack pointer, you can build a
reasonable cooperative threading library purely in userspace,
without the OS caring.
Oh really? You seem to have forgotten about the program
counter not to
mentioning pushing and popping all the other cpu registers
and flags at context
switch.
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both. There >> is
no reason the same can't be done for processes and your irrelevant waffle >> about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
In article <11bker0$2pa7q$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Sat, 24 Oct 2026 13:53:39 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bhpo6$2lpjl$1@dont-email.me>, <boltar@caprica.universe> wrote:
Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
On 10/23/2026 11:06 AM, Peter Flass wrote:Gates when he put his mind to it could certainly program. Even Sinclair >>>> required 4K for BASIC in the ZX80 for example. But some of his technical >>>> (and business) decisions leave a lot to be desired.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the >>>>> Altair 8080 in 2K of ram using assembly language. Take that as you will. >>>>Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though. >>>>>
But the ZX80 (and most later MBASICs) had floating point.
The ZX80 ran Sinclair Basic, it had nothing to do with MS and it was integer >> only. The ZX81 had flowing point basic and had an 8K ROM which is still
bloody impressive.
I did not realize that the ZX80 was integer only! I thought it was more
or less like the ZX81 with everything stuffed into an asic.
--scott
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe>
wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>> model/api are? Yet somehow C++ provides a common wrapper for both. There >>>> is
no reason the same can't be done for processes and your irrelevant waffle >>>> about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
On 10/25/2026 1:19 PM, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
-a Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>,-a <boltar@caprica.universe> >>>> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>>> model/api are? Yet somehow C++ provides a common wrapper for both.
There
is
no reason the same can't be done for processes and your irrelevant
waffle
about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
-a-a-a-a- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Based on 40+ years of usenet experience, the only thing which will stop
the cross posting is the death of this thread.
pt
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe>
wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>> model/api are? Yet somehow C++ provides a common wrapper for both. There >>>> is
no reason the same can't be done for processes and your irrelevant waffle >>>> about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
On 25/10/2026 18:19, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
-a Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>,-a <boltar@caprica.universe> >>>> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>>> model/api are? Yet somehow C++ provides a common wrapper for both.
There
is
no reason the same can't be done for processes and your irrelevant
waffle
about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
-a-a-a-a- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Was it ever relevant to that group?-a At least one person in this thread
is renowned for his irritating habit of adding every newsgroup he can
think of to lists.-a "This post is in English - I'll add alt.languages.english to the list.-a I see there was a number mentioned - I've added sci.maths for their thoughts.-a I've just thought about
thoughts, so alt.philosophy is needed too".
David Brown wrote:
On 25/10/2026 18:19, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
-a Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>,-a <boltar@caprica.universe> >>>>> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows
threading
model/api are? Yet somehow C++ provides a common wrapper for both. >>>>>> There
is
no reason the same can't be done for processes and your irrelevant >>>>>> waffle
about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
-a-a-a-a- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Was it ever relevant to that group?-a At least one person in this
thread is renowned for his irritating habit of adding every newsgroup
he can think of to lists.-a "This post is in English - I'll add
alt.languages.english to the list.-a I see there was a number mentioned
- I've added sci.maths for their thoughts.-a I've just thought about
thoughts, so alt.philosophy is needed too".
Sorry about that. I only did it because Eternal September, if I take
away one of the Newsgroups: listings, it won't let me post. In such a
case it only allows 3 newsgroups. That won't do for this thread.
On Fr 23 Okt 2026 at 22:49, Lawrence DrCOOliveiro wrote:
PostScript was a very influential graphics API, but it is only fit
for the museum nowadays. It was designed for putting marks on
paper, not for updating pixels on a computer screen.
There was also display postscript from SUN.
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe>
wrote:On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe>
wrote:On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk>
threads
You need an OS to do threading properly too. Theres a reason >>>>>>>> green
butin java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>>>> operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a
threading library
not a process library. Its perfectly possible to simulate a
multiprocess enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A
process runs in its own address space. (at least these days, before >>virtual memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
Who mentioned C? I was talking about C++ which has a threading API
already. Do try and keep up.
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++ >>standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading model/api are? Yet somehow C++ provides a common wrapper for both.
There is no reason the same can't be done for processes and your
irrelevant waffle about past issues of threading on *nix don't change
that.
On Sat, 24 Oct 2026 13:57:02 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of threads
(tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only different
processes, so you had to do a fork and then synchronize with the other
process. This wasn't a dealbreaker and we did plenty of stuff that way,
but having threads available was very nice and made for many operations
becoming more convenient to write.
Unfortunately most win32 programmers don't really understand multiprocess programming because the w32 API is so borked so use threads even when seperate process would be more appropriate.
On Sat, 24 Oct 2026 13:57:02 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of threads
(tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only different
processes, so you had to do a fork and then synchronize with the other
process. This wasn't a dealbreaker and we did plenty of stuff that way,
but having threads available was very nice and made for many operations
becoming more convenient to write.
Unfortunately most win32 programmers don't really understand multiprocess programming because the w32 API is so borked so use threads even when seperate process would be more appropriate.
On Sat, 24 Oct 2026 16:41:22 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> >> wrote:
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library but
not a process library. Its perfectly possible to simulate a multiprocess >>>>> enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
The differences are utterly irrelevant when it comes to prividing a common API to the functionality but thank you for demonstrating you had no answer
to my question.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the
Altair 8080 in 2K of ram using assembly language. Take that as you will.
On Sun, 25 Oct 2026 16:15:21 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <YHpDS.27364$9b8f.4666@fx39.iad>,
Scott Lurndal <slp53@pacbell.net> wrote:
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <20261025084234.0000449c@yahoo.com>,<snip>
Michael S <already5chosen@yahoo.com> wrote:
How any of this trivia has anything to do with real-world
implementations of C++11 threads?
Your statement, "while in theory threads can be implemented by
C++ compilers+language support library, in practice I had never
seen it done" is probably strictly true: you, individually, have
never seen it done.
But that does not imply that it has never been done. In
fact, it has; many times over. There are complications, but it
can be done. That is what I was telling you, supported by
examples.
Although it does, generally, rely on specific operating system
interfaces (e.g. makecontext, setcontext, et alia).
That's true. But no one said that one can use strict ISO C++ to
implement the C++ standard library.
Regardless, if you can set the stack pointer, you can build a
reasonable cooperative threading library purely in userspace,
without the OS caring.
Oh really? You seem to have forgotten about the program counter not to mentioning pushing and popping all the other cpu registers and flags at context
switch.
On Sun, 25 Oct 2026 16:31:56 +0100, Andreas Eder wrote:
On Fr 23 Okt 2026 at 22:49, Lawrence DrCOOliveiro wrote:
PostScript was a very influential graphics API, but it is only fit
for the museum nowadays. It was designed for putting marks on
paper, not for updating pixels on a computer screen.
There was also display postscript from SUN.
Display PostScript was from Adobe.
You could be thinking of NeWS, which was from Sun. It slightly
predated X11, and they pretty much abandoned it after adopting X11
wholesale, like the entire rest of the Unix industry.
But neither Display PostScript nor NeWS made any changes to the
PostScript graphics model; it was still designed around making marks
on paper, not for updating pixels on a computer screen.
The Apple ][ was also integer only. The Apple ][+ had floating point.
The top 16k of memory was ROM supporting the OS and BASIC. Relatively
roomy compared to the ZX80/81.
pt--
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach if
you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the
caller?
Have the caller have the object before hand and call a function to initialize it?
On Sun, 25 Oct 2026 13:34:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>>no reason the same can't be done for processes and your irrelevant waffle >>>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question with a question. Given I've been programming on unix for over 30 years and have written dozens of applications using multi process and multi threading and sometimes using both
I'm quite well aware of the differences. Perhaps you arn't which is why you need me to tell you. Well go do your own research.
In the meantime I'll ask one last time - why do you think C++ can provide
a threading wrapper API but not a multi process one?
Take your time.
Cryptoengineer <petertrei@gmail.com> wrote:
The Apple ][ was also integer only. The Apple ][+ had floating point.
The top 16k of memory was ROM supporting the OS and BASIC. Relatively
roomy compared to the ZX80/81.
Yes, the INTBASIC was Apple code, while APPLESOFT BASIC was written by Microsoft on contract to Apple. APPLESOFT worked pretty well aside from programmable functions. It could do realtime FFTs at 0.5 samp/sec which
was good enough for some interesting things.
You could upgrade the roms in your original Apple ][ to the ][+ roms
for what seemed like a fortune to me at the time but which was probably
quite reasonable. I think you lost Sweet-16 in the process though.
--scott
pt
Bill Gates wrote the Microsoft Basic compiler and interpreter for the
Altair 8080 in 2K of ram using assembly language. Take that as you will.
On Sun, 25 Oct 2026 08:41:48 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both.
Actually, implementing C++11 (or C11) threads fully in user space on pre-Vista Win32 (i.e. before addition of support for conditional
variables to OS API) would be quite challenging. I don't know if
anybody bothered.
I think that it is possible, but if you want it robust then it (cond. variables) will cost you significant overhead relatively to "native" synchronization primitives.
There is no reason the same can't be done for processes and your
irrelevant waffle about past issues of threading on *nix don't change
that.
Dick-measuring competitions are integral part of Usenet tradition.
Even analogous, to say, an API that says read n bytes and store into
buffer. Well, the caller has lifetime of said buffer. The caller makes
the buffer, calls into the function.
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:wrote:
In article <11bhppd$2lpkc$1@dont-email.me>, <boltar@caprica.universe>
wrote:On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>, <boltar@caprica.universe>
threadsOn Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>, <boltar@battlestar.co.uk> >> wrote:
You need an OS to do threading properly too. Theres a reason green
in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>>>>> operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading library >> but
not a process library. Its perfectly possible to simulate a multiprocess
enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
Who mentioned C? I was talking about C++ which has a threading API already. Do try and keep up.
On Sat, 24 Oct 2026 12:17:47 -0700
Peter Flass <Peter@Iron-Spring.com> gabbled:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
What, pray tell, do you think that a _thread_ is?-a And how is it
different from a _process_?-a For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
-a-a-a-a- Dan C.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
With copy-on-write process models the actual difference is a bit less
clear cut.
On Sun, 25 Oct 2026 16:16:26 -0700, Chris M. Thomasson wrote:
Even analogous, to say, an API that says read n bytes and store into
buffer. Well, the caller has lifetime of said buffer. The caller makes
the buffer, calls into the function.
So how is the caller supposed to manage that memory?
On Sun, 25 Oct 2026 16:16:26 -0700, Chris M. Thomasson wrote:
Even analogous, to say, an API that says read n bytes and store into
buffer. Well, the caller has lifetime of said buffer. The caller makes
the buffer, calls into the function.
So how is the caller supposed to manage that memory?
I had a quick look at that. It seems to have to do with the reality of graphics hardware implementing different kinds of memory with
different kinds of characteristics, and the impossibility of
completely such ignoring such issues in real-time 3D rendering.
I expect higher-level APIs (e.g. game engines) will wrap all this
behind their own higher-level abstractions, so regular
programmers/game creators donrCOt have to worry about it.
In short, itrCOs an abstraction that leaks that you accept only because
you have to, not because itrCOs a good idea for abstractions in general.
If you can successfully hide issues of memory and other resource
allocation behind your abstraction, you would still rather do it than
not.
So, to get back to my point, the technique I use is based on a form of structured programming called a rCLNassi-Shneiderman diagramrCY. The
overall structure looks like
... initialize object pointer to NULL ...
do /*once*/
{
... possible other stuff ...
... allocate object pointer ...
if (error occurred)
break;
... possible other stuff using object pointer ...
}
while (false);
... call free(3) (or equivalent) on object pointer ...
So you can see there is no way out of the inner block without passing
through the dispose call. Using gotos would contribute nothing except
make it harder to assure yourself of the simplicity of the control
flow.
Looks deceptively simple. But the same technique can scale up to quite complex cases.
Cryptoengineer <petertrei@gmail.com> wrote:
The Apple ][ was also integer only. The Apple ][+ had floating point.
The top 16k of memory was ROM supporting the OS and BASIC. Relatively
roomy compared to the ZX80/81.
Yes, the INTBASIC was Apple code, while APPLESOFT BASIC was written by Microsoft on contract to Apple. APPLESOFT worked pretty well aside from programmable functions. It could do realtime FFTs at 0.5 samp/sec which
was good enough for some interesting things.
You could upgrade the roms in your original Apple ][ to the ][+ roms
for what seemed like a fortune to me at the time but which was probably
quite reasonable. I think you lost Sweet-16 in the process though.
--scott
pt
On 26/10/2026 06:19, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
snip
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Yes. You are correct, but there are several from r.a.sf.written making a contribution and although it is mainly above my pay grade, I am still reading. In Thunderbird, it is extremely easy to mark a thread as
ignored after which you will not be annoyed by further posts on that
topic. Easier than complaining.
A caller provided buffer is normal with a lot of API's out there.
Managing the memory is the callerrCOs job in C anyway.
A lib that never allocates behind your back is what you
want in embedded, kernel, and arena code ...
I distinctly recall working with Sweet-16 on my ][+ back in the day,
but can't recall the details.
Jerry Brown <jerry@jwbrown.co.uk.invalid> schrieb:
I supported an IBM 9370 back in the 90s and whatever operating system
it ran (completely different to the 3090 mainframe with JCL, etc it
was supposed to replace) didn't allow zero length files.
VM/CMS?
In article <11blaui$2q6vd$1@dont-email.me>, <boltar@caprica.universe> wrote: >>anyway. Whoops, didn't
turn out quite how you expected did it?
Actually, it "turned out" juat about exactly as I expected it
would.
Oh dear, you really have no clue!
You're snotty little attitude aside, I note that you can't even
arriculate what, exactly, it is that you want. "Argument by
insult" seems about par for the course here, but using that to
hide your ignorance both doesn't work and makes you look
incredbily insecure.
Anyway, go ahead and keep flailing. Ta!
In article <11blaoq$2q6jk$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Sun, 25 Oct 2026 16:15:21 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
Regardless, if you can set the stack pointer, you can build a
reasonable cooperative threading library purely in userspace,
without the OS caring.
Oh really? You seem to have forgotten about the program
counter not to
mentioning pushing and popping all the other cpu registers
and flags at context
switch.
One last hint: where do you think those thjngs arw stored? If
you could define what a thread is, maybe you'd have a clue
about how those are handled. :-)
On Sun, 25 Oct 2026 08:41:48 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both.
Actually, implementing C++11 (or C11) threads fully in user space on >pre-Vista Win32 (i.e. before addition of support for conditional
variables to OS API) would be quite challenging. I don't know if
anybody bothered.
I think that it is possible, but if you want it robust then it (cond. >variables) will cost you significant overhead relatively to "native" >synchronization primitives.
On 10/25/2026 1:34 AM, boltar@caprica.universe wrote:
On Sat, 24 Oct 2026 13:57:02 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of threads >>>> (tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only different
processes, so you had to do a fork and then synchronize with the other
process. This wasn't a dealbreaker and we did plenty of stuff that way, >>> but having threads available was very nice and made for many operations
becoming more convenient to write.
Unfortunately most win32 programmers don't really understand multiprocess
programming because the w32 API is so borked so use threads even when
seperate process would be more appropriate.
Windows has what we need to run multi process. Even for a Mutex...
Remember WAIT_ABANDONED?
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a common >> API to the functionality but thank you for demonstrating you had no answer >> to my question.
Ummm... It is relevant. Every process has a single thread of execution,
but not all processes have multiple threads.
On Sun, 25 Oct 2026 09:30:12 -0000 (UTC), Thomas Koenig ><tkoenig@netcologne.de> wrote:
Jerry Brown <jerry@jwbrown.co.uk.invalid> schrieb:
I supported an IBM 9370 back in the 90s and whatever operating system
it ran (completely different to the 3090 mainframe with JCL, etc it
was supposed to replace) didn't allow zero length files.
VM/CMS?
That's ringing a vague bell.
My time on the 9370 was short compared to the 3090, so all I can
remember were things like the file handling was MUCH simpler (no need
specify record types and block sizes and the foreground scripting
language REXX was much nicer than the CLIST we used on the mainframe -
it had stacks for storing and processing data, which was fun.
The only command I can remember was when I had my operator hat on and
a user wanted to access the 3422 tape drive I had to ATTACH the
physical 3 digit id of the tape drive to the logical 3 digit id they
were using (in retrospect I see this was its equivalent of unix mount >command).
that doesn't mean its a good idea.
On Sun, 25 Oct 2026 22:56:19 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 25 Oct 2026 08:41:48 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both.
Actually, implementing C++11 (or C11) threads fully in user space on >>pre-Vista Win32 (i.e. before addition of support for conditional
variables to OS API) would be quite challenging. I don't know if
anybody bothered.
I think that it is possible, but if you want it robust then it (cond. >>variables) will cost you significant overhead relatively to "native" >>synchronization primitives.
C++ threading didn't have 3 level locking until 2017 making it effectively >useless IMO. Perhaps that was down to the lowest common denominator called >Windows.
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it effectively >>useless IMO. Perhaps that was down to the lowest common denominator called >>Windows.
Mind defining your terminology? "3 level locking", in particular?
Assigning a canonical "lock number" to each lock, and failing a lock
request for a lock with a lower number than that already held is
a design pattern that has been around since 1980 (in Burroughs
mainframes it was implemented in hardware). Easy enough to do
prior to C++17 in software.
And your assertion that a language that doesn't support it intrinsically
is "useless" is ridiculous.
In article <11bn80e$11hkj$1@dont-email.me>, <boltar@caprica.universe> wrote: >>Oh please, try a bit harder. You can do anything you want in ring 0 assembler,
that doesn't mean its a good idea.
As someone who is spending his morning writing 8051 code, I think it can be
a very very good idea.
On Sun, 25 Oct 2026 14:22:34 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a
common
API to the functionality but thank you for demonstrating you had no
answer
to my question.
Ummm... It is relevant. Every process has a single thread of
execution, but not all processes have multiple threads.
No shit sherlock, thanks for the heads up. Your point is?
In article <11bnlrn$ghl$1@panix2.panix.com>,
Scott Dorsey <kludge@panix.com> wrote:
In article <11bn80e$11hkj$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>Oh please, try a bit harder. You can do anything you want in ring 0 assembler,
that doesn't mean its a good idea.
As someone who is spending his morning writing 8051 code, I think it can be >>a very very good idea.
The irony is that, by definition, if you are running something
in userspace, it's not in "Ring 0" anyway.
Basically that methinks you insult too much. Your wisdom here isn't
worth a sack of beans. I haven't learned one thing from you.
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it >>effectively useless IMO. Perhaps that was down to the lowest common >>denominator called Windows.
Mind defining your terminology? "3 level locking", in particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section block)
This is basic stuff FFS. C++ finally got around to #2 with
shared_mutex in 2017 and its rather critical for certain algorithms.
Assigning a canonical "lock number" to each lock, and failing a lock >request for a lock with a lower number than that already held is
a design pattern that has been around since 1980 (in Burroughs
mainframes it was implemented in hardware). Easy enough to do
prior to C++17 in software.
Thats something else entirely.
And your assertion that a language that doesn't support it
intrinsically is "useless" is ridiculous.
Not useless then, just less useful.
On Sun, 25 Oct 2026 14:19:14 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:34 AM, boltar@caprica.universe wrote:
On Sat, 24 Oct 2026 13:57:02 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass-a <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of
threads
(tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only different >>>> processes, so you had to do a fork and then synchronize with the other >>>> process.-a This wasn't a dealbreaker and we did plenty of stuff that
way,
but having threads available was very nice and made for many operations >>>> becoming more convenient to write.
Unfortunately most win32 programmers don't really understand
multiprocess
programming because the w32 API is so borked so use threads even when
seperate process would be more appropriate.
Windows has what we need to run multi process. Even for a Mutex...
Remember WAIT_ABANDONED?
win32 can't do fork() making it effectively a totally useless API for a
lot of multiprocess development.
Creating a brand new process is fine if
you don't need any complicated shared state such as when kicking off something
on the command line or creating a pipe (something else win32 is shit at)
but
thats about it.
On Sun, 25 Oct 2026 17:14:18 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11blaui$2q6vd$1@dont-email.me>,
<boltar@caprica.universe> wrote:
anyway. Whoops, didn't
turn out quite how you expected did it?
Actually, it "turned out" juat about exactly as I expected it
would.
You have low expectations then.
Oh dear, you really have no clue!
You're snotty little attitude aside, I note that you can't even
Anyone who equates system() with multiprocess programming doesn't
know wtf they're talking about. Hows that for a snotty aside?
arriculate what, exactly, it is that you want. "Argument by
insult" seems about par for the course here, but using that to
hide your ignorance both doesn't work and makes you look
incredbily insecure.
Anyway, go ahead and keep flailing. Ta!
Go ahead and remain clueless.
On Sun, 25 Oct 2026 22:56:19 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 25 Oct 2026 08:41:48 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both.
Actually, implementing C++11 (or C11) threads fully in user space on
pre-Vista Win32 (i.e. before addition of support for conditional
variables to OS API) would be quite challenging. I don't know if
anybody bothered.
I think that it is possible, but if you want it robust then it (cond.
variables) will cost you significant overhead relatively to "native"
synchronization primitives.
C++ threading didn't have 3 level locking until 2017 making it effectively useless IMO. Perhaps that was down to the lowest common denominator called Windows.
On Sun, 25 Oct 2026 14:19:14 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:34 AM, boltar@caprica.universe wrote:
On Sat, 24 Oct 2026 13:57:02 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of
threads (tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only
different processes, so you had to do a fork and then synchronize
with the other process. This wasn't a dealbreaker and we did
plenty of stuff that way, but having threads available was very
nice and made for many operations becoming more convenient to
write.
Unfortunately most win32 programmers don't really understand
multiprocess programming because the w32 API is so borked so use
threads even when seperate process would be more appropriate.
Windows has what we need to run multi process. Even for a Mutex... >Remember WAIT_ABANDONED?
win32 can't do fork() making it effectively a totally useless API for
a lot of multiprocess development. Creating a brand new process is
fine if you don't need any complicated shared state such as when
kicking off something on the command line or creating a pipe
(something else win32 is shit at) but thats about it.
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)Still don't really know what he means by 3 level locking. Using lock
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest common
denominator called Windows.
Mind defining your terminology? "3 level locking", in particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11. https://learn.microsoft.com/en-us/windows/win32/sync/slim-reader-writer--srw--locks
Of course WinXP remained popular for few more years, approximately up
until 2nd half of 2010, but that too predates publication of C++11 in 2011-09.
This is basic stuff FFS. C++ finally got around to #2 with
shared_mutex in 2017 and its rather critical for certain algorithms.
Assigning a canonical "lock number" to each lock, and failing a lock
request for a lock with a lower number than that already held is
a design pattern that has been around since 1980 (in Burroughs
mainframes it was implemented in hardware). Easy enough to do
prior to C++17 in software.
Thats something else entirely.
And your assertion that a language that doesn't support it
intrinsically is "useless" is ridiculous.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even by mistake.
But then, I don't write complicated apps on "big" computers day in day
out.
On Sun, 25 Oct 2026 14:22:34 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a
common
API to the functionality but thank you for demonstrating you had no
answer
to my question.
Ummm... It is relevant. Every process has a single thread of
execution, but not all processes have multiple threads.
No shit sherlock, thanks for the heads up. Your point is?
On Sun, 25 Oct 2026 19:28:00 -0700, Chris M. Thomasson wrote:
A lib that never allocates behind your back is what you
want in embedded, kernel, and arena code ...
Even kernels want a common memory-management architecture, so addon
modules donrCOt have to reinvent memory management on their own.
Think of something like allocating low-priority cache memory, for
stuff that can be dumped if necessary: that needs to be managed in the
core of the kernel, so that if apps need regular memory for things
they want to keep in memory, the kernel can free up cache as necessary
to make more memory available.
Stop trying to rationalize away the whole point of dynamic memory
allocation.
On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
A caller provided buffer is normal with a lot of API's out there.
No it isnrCOt. ItrCOs not a good way to manage things, anyway: instead of solving the resource-allocation problem once and for all in the
library API, you are pushing the burden onto all the client code, each
one of which has to solve it for itself.
ThatrCOs a dumb way to design things.
On Sun, 25 Oct 2026 19:21:00 -0700, Chris M. Thomasson wrote:
Managing the memory is the callerrCOs job in C anyway.
Does that apply to the caller of library APIs like malloc(3) and
free(3)?
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
On 10/25/2026 8:40 PM, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:21:00 -0700, Chris M. Thomasson wrote:
Managing the memory is the callerrCOs job in C anyway.
Does that apply to the caller of library APIs like malloc(3) and
free(3)?
Yes. The caller calls malloc, if it succeeded, the caller needs to free
what it got... Right?
On 10/26/2026 12:45 PM, Michael S wrote:
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest
common denominator called Windows.
Mind defining your terminology? "3 level locking", in
particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section
block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11. https://learn.microsoft.com/en-us/windows/win32/sync/slim-reader-writer--srw--locks
Of course WinXP remained popular for few more years, approximately
up until 2nd half of 2010, but that too predates publication of
C++11 in 2011-09.
This is basic stuff FFS. C++ finally got around to #2 with
shared_mutex in 2017 and its rather critical for certain
algorithms.
Assigning a canonical "lock number" to each lock, and failing a
lock request for a lock with a lower number than that already
held is a design pattern that has been around since 1980 (in
Burroughs mainframes it was implemented in hardware). Easy
enough to do prior to C++17 in software.
Thats something else entirely.
And your assertion that a language that doesn't support it
intrinsically is "useless" is ridiculous.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even byStill don't really know what he means by 3 level locking. Using lock
mistake. But then, I don't write complicated apps on "big"
computers day in day out.
hashing where an address is hashed into a lock index such that no
object needs its own lock is nothing new. But it needs to be sorted
and deduped.
On Mon, 26 Oct 2026 13:12:24 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> wrote:
On 10/26/2026 12:45 PM, Michael S wrote:
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)Still don't really know what he means by 3 level locking. Using lock
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest
common denominator called Windows.
Mind defining your terminology? "3 level locking", in
particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section
block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
https://learn.microsoft.com/en-us/windows/win32/sync/slim-reader-writer--srw--locks
Of course WinXP remained popular for few more years, approximately
up until 2nd half of 2010, but that too predates publication of
C++11 in 2011-09.
This is basic stuff FFS. C++ finally got around to #2 with
shared_mutex in 2017 and its rather critical for certain
algorithms.
Assigning a canonical "lock number" to each lock, and failing a
lock request for a lock with a lower number than that already
held is a design pattern that has been around since 1980 (in
Burroughs mainframes it was implemented in hardware). Easy
enough to do prior to C++17 in software.
Thats something else entirely.
And your assertion that a language that doesn't support it
intrinsically is "useless" is ridiculous.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even by
mistake. But then, I don't write complicated apps on "big"
computers day in day out.
hashing where an address is hashed into a lock index such that no
object needs its own lock is nothing new. But it needs to be sorted
and deduped.
He explained it in the post above.
It seem that he mistyped few things in explanation, but it is possible
to understand intentions. He is talking about std::shared_mutex.
On 10/25/2026 8:40 PM, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:21:00 -0700, Chris M. Thomasson wrote:
Managing the memory is the callerrCOs job in C anyway.
Does that apply to the caller of library APIs like malloc(3) and
free(3)?
Yes. The caller calls malloc, if it succeeded, the caller needs to free
what it got... Right?
Say a lib that has foo_create... Well, the damn called must remember
to call foo_destroy, right?
HUH? How do you call say, fread without a user provided buffer?
If you need dynamic memory fine.
On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:
HUH? How do you call say, fread without a user provided buffer?
Relevance being?
On Mon, 26 Oct 2026 13:23:59 -0700, Chris M. Thomasson wrote:
If you need dynamic memory fine.
What the hell do you think we have been talking about this whole
time??
On Mon, 26 Oct 2026 13:33:37 -0700, Chris M. Thomasson wrote:
Say a lib that has foo_create... Well, the damn called must remember
to call foo_destroy, right?
Are you backpedalling from your previous idea that the caller must
allocate the memory for the library to use?
On 26/10/2026 21:29, Chris M. Thomasson wrote:
On 10/25/2026 8:40 PM, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:21:00 -0700, Chris M. Thomasson wrote:
Managing the memory is the callerrCOs job in C anyway.
Does that apply to the caller of library APIs like malloc(3) and
free(3)?
Yes. The caller calls malloc, if it succeeded, the caller needs to
free what it got... Right?
Exactly.-a The caller is responsible for /managing/ the memory (or it can pass on that responsibility to something else).-a malloc and free are provide and dispose of memory, they do not manage it.
Shared state? Just use memory mapped files. You don't need
pipes/sockets etc. You need to know how to properly sync things.
On 10/23/26 01:01, boltar@caprica.universe wrote:
On Thu, 22 Oct 2026 12:19:49 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bd7tj$rh4f$1@dont-email.me>,-a <boltar@battlestar.co.uk>
wrote:
Most of us have a CS degree. But then we go out into the real world,
get a
job and find out what real programming on real products entails, not
a load
of virtual academic naval gazing.
That's because it's not a trade school degree.-a It's not there to teach >>> you to program, it's there to teach you the fundamentals that you
need to
properly understand programming.
No, it teaches you fundamentals of certain aspects of computer
paradigms such
as databases, graphics, AI. Most people into computers learn actual
programming
long before they hit university.
Engineering schools are even more that way.-a They don't teach you much
engineering, but they give you all the background that you need to learn >>> engineering.
Programming isn't pure engineering - its a combination of engineering,
logic,
art and a trade.
If you just want a job, getting one of these degrees is not for you.
It's
not there for that.
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
On 10/26/2026 2:45 PM, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:33:37 -0700, Chris M. Thomasson wrote:
Say a lib that has foo_create... Well, the damn called must
remember to call foo_destroy, right?
Are you backpedalling from your previous idea that the caller must
allocate the memory for the library to use?
Where did I say must?
On Mon, 26 Oct 2026 14:53:48 -0700, Chris M. Thomasson wrote:
On 10/26/2026 2:45 PM, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:33:37 -0700, Chris M. Thomasson wrote:
Say a lib that has foo_create... Well, the damn called must
remember to call foo_destroy, right?
Are you backpedalling from your previous idea that the caller must
allocate the memory for the library to use?
Where did I say must?
You said rCLManaging the memory is the callerrCOs job in C anyway.rCY You didnrCOt say rCLcould be the callerrCOs jobrCY as in rCLthe caller could have a
choicerCY, you said rCL*is* the callerrCOs jobrCY. No choice. I.e. the caller *must* manage memory.
On Sun, 25 Oct 2026 19:21:00 -0700, Chris M. Thomasson wrote:
Managing the memory is the callerrCOs job in C anyway.
Does that apply to the caller of library APIs like malloc(3) and
free(3)?
On Mon, 26 Oct 2026 14:53:48 -0700, Chris M. Thomasson wrote:
On 10/26/2026 2:45 PM, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:33:37 -0700, Chris M. Thomasson wrote:
Say a lib that has foo_create... Well, the damn called must
remember to call foo_destroy, right?
Are you backpedalling from your previous idea that the caller must
allocate the memory for the library to use?
Where did I say must?
You said rCLManaging the memory is the callerrCOs job in C anyway.rCY You didnrCOt say rCLcould be the callerrCOs jobrCY as in rCLthe caller could have a
choicerCY, you said rCL*is* the callerrCOs jobrCY. No choice. I.e. the caller *must* manage memory.
On Wed, 21 Oct 2026 19:01:38 -0000 (UTC)Processes are almost self-contained virtual machines. Unix has one of
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bb1da$qfn9$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>> Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added
something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core >>> language since 2011. Great, but what about processes? When do we get them? >>> Sure, I could just use fork() but then I could also just use pthread_create()
too.
One can implement a pretty reasonable threads library given the
virtual machine model of standard C or C++. Processes? With
Virtual machine? Wrong language , comp.lang.java is that way --->
their own address spaces, credentials, resource limits, IPC
mechanisms, potentially running different programs, and so on?
Not so much. You need an operating system for that, son.
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Michael S <already5chosen@yahoo.com> writes:
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to care
about C.
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done. All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
It does not look like variety in this field is bigger than in case of
threads. More like it is smaller.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
For which we, thankfully, have POSIX on most non-windows operating
systems.
On 23/10/2026 18:57, Peter Flass wrote:
On 10/23/26 02:45, David Brown wrote:
On 23/10/2026 08:25, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 22:29:45 -0700, Chris M. Thomasson wrote:
On 10/22/2026 8:19 PM, Lawrence DrCOOliveiro wrote:
On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
That's why I try to use PL/I AUTOMATIC (stack) storage and not
allocate a lot of stuff. You need to have a disciplined approach >>>>>>> if you allocate random stuff here and there.
What if yourCOre building an object that needs to be returned to the >>>>>> caller?
Have the caller have the object before hand and call a function to
initialize it?
IrCOm assuming that all that BASIC programming hasnrCOt got to your head, >>>> and yourCOre not serious. ;)
Chris' wording is perhaps poor, but the principle is right.
I don't know PL/I or Fortran, but in C if you have :
-a-a-a-a-atypedef struct data_struct { int a; int xs[20]; } S ;
-a-a-a-a-aS build_some_data(void) {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a s.a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) s.xs[i] = i;
-a-a-a-a-a-a-a-a return s;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s = build_some_data();
-a-a-a-a-a}
then it is typically handled as though you had written :
-a-a-a-a-avoid build_some_data(S * p) {
-a-a-a-a-a-a-a-a p->a = 123;
-a-a-a-a-a-a-a-a for (int i = 0; i < 20; i++) p->xs[i] = i;
-a-a-a-a-a-a-a-a return;
-a-a-a-a-a}
-a-a-a-a-avoid foo() {
-a-a-a-a-a-a-a-a S s;
-a-a-a-a-a-a-a-a build_some_data(&s);
-a-a-a-a-a}
That is - the caller creates the /space/ for the returned object, but
does not do any kind of initialisation.-a It passes a pointer to that
space as a hidden parameter to the function that wants to return the
object.
That principle should work fine in any language, as long as the size
of the returned object is known by the caller code.
That last sentence is why it would not work fine,
OK.-a Knowing the size of the returned object is an absolute requirement
for pre-allocation by the caller, and it is a requirement that is fine
for a lot of situations and a lot of languages.-a But if it is not the
case for PL/I, Fortran, or any other particular language (or particular function in any language), then I fully agree - the object's space can't
be handled by the caller.
On 2026-10-24, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 10/23/2026 8:44 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 23:31:41 GMT, Charlie Gibbs wrote:
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
The idea of an error message phrased in plain, approachable
language (using a first-person pronoun, even) instead of technical
terms?? That was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back in my
mainframe days, I learned to hate catch-all error messages; they're
the sign of a programmer who's too lazy to try to help the user. If
something goes wrong, I want to be given some clues as to where to
look. But more and more these days, your typical error message is
"Something went wrong." Nothing more. This kind of conduct should be
condemned.
This was not like that though, was it? On systems of that era, you
would typically get something like rCLDISK ERRORrCY or rCLI/O ERRORrCY. The >>> plain-language message was no less specific than that.
Do you want more detail about what went wrong? Perhaps a CRC
validation failure? Sector-addressing failure? Missing address/data
marks? Invalid GCR/RLL encoding?
That kind of low-level detail might be helpful to somebody (perhaps a
hardware engineer) trying to fix the problem. And perhaps it should
appear in a system log somewhere.
And it wouldnrCOt have mattered much in this case, anyway, since it
would have been obvious to anybodyrCi sitting or standing in front of the >>> machine, that the most likely cause was the fact that there was no
disk in the drive.
rCiAnybody who had made much use of floppy disks on micros, anyway.
Iirc, BASIC had a fun error. I cannot remember the damn exact phrase, it
was something like expression too complex or something.
"Who is General Failure and why is he reading my disk?"
On Sat, 24 Oct 2026 13:27:30 -0700, Chris M. Thomasson wrote:
Or what about miniaudiorCOs ma_engine_get_heap_size plus
ma_engine_init_preallocated
No idea about that, but the same principle would apply.
On Sat, 24 Oct 2026 13:27:30 -0700, Chris M. Thomasson wrote:
Or what about miniaudiorCOs ma_engine_get_heap_size plus
ma_engine_init_preallocated
No idea about that, but the same principle would apply.
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)Seems so! Damn it.
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 14:19:14 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:34 AM, boltar@caprica.universe wrote:
On Sat, 24 Oct 2026 13:57:02 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of
threads (tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only
different processes, so you had to do a fork and then synchronize
with the other process. This wasn't a dealbreaker and we did
plenty of stuff that way, but having threads available was very
nice and made for many operations becoming more convenient to
write.
Unfortunately most win32 programmers don't really understand
multiprocess programming because the w32 API is so borked so use
threads even when seperate process would be more appropriate.
Windows has what we need to run multi process. Even for a Mutex...
Remember WAIT_ABANDONED?
win32 can't do fork() making it effectively a totally useless API for
a lot of multiprocess development. Creating a brand new process is
fine if you don't need any complicated shared state such as when
kicking off something on the command line or creating a pipe
(something else win32 is shit at) but thats about it.
You are clueless about Windows. That's o.k.
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
On 25/10/2026 00:11, Michael S wrote:
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass-a <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason >>>>>>>>>> green threads in java were a joke.
Weird that you think you need a operating system for threads, >>>>>>>>> yet you want C to standardize processes which also ... need an >>>>>>>>> operating system.-a I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect >>>>>>>>> from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading >>>>>>>> library but not a process library. Its perfectly possible to
simulate a multiprocess enviroment.
So write a simulator in your language of choice.-a You don't need >>>>>>> the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is?-a And how is it
different from a _process_?-a For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
-a-a-a-a- Dan C.
First, he was talking about C++. Unlike me, he does not appear to care
about C.
Second, while in theory threads can be implemented by C++
compilers+language-a support library, in practice I had never seen it
done. All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
It does not look like variety in this field is bigger than in case of
threads. More like it is smaller.
No one is suggesting that the threads themselves are implemented in
pure, standard, portable C++.-a You need an underlying OS or support of
some sort if you are going to have preemptable threads.-a It's the same principle as IO and file access.
But the difference between threads and processes is very simple from the viewpoint of C and C++.-a Suppose you have a global (i.e., external
linkage) variable :
-a-a-a-aint x;
Two threads that have "int a = x;" see the same "x" (ignoring data races
and synchronisation).-a Two processes see completely different "x".[...]
On 10/23/2026 8:39 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 16:58:04 -0700, Chris M. Thomasson wrote:
Keeping them up to date is, afaict, manual.
In the Linux world, we have rCLdevelopmentrCY packages versus rCLruntimerCY >> packages.
The development package contains the source includes, pkg-config
info etc. The runtime version includes the actual shared library.
So your built package has a dependency on the latter; when a user
tries to install your package, it should automatically pull in the
latter as necessary.
Example from my system:
lrwxrwxrwx 1 root root 13 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so -> libcairo.so.2
lrwxrwxrwx 1 root root 21 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2 -> libcairo.so.2.11804.4
-rw-r--r-- 1 root root 1366728 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11804.4
Where did these come from?
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so.2
libcairo2:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so.2
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so
libcairo2-dev:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so
Notice how the development library is not versioned, but is just a
symlink to a versioned library.
The runtime library is always versioned. This allows multiple
versions of the library to be present at once, with some older
packages, that havenrCOt been rebuilt, still depending on an older
version, while up-to-date packages make use of the newer version.
I was in the linux world for a whiel, along with solaris, etc. But
Windows, oh my. vcpkg is a big turn.
Processes are almost self-contained virtual machines. Unix has one
of the cleanest implementations around, and the fork() system call
combined with copy-on-write is very elegant. None of the other
operating system I have worked with have anything remotely like it.
VMS was also quite elegant, but so different that I think it would
be impossible to simulate one on the other (in either direction).
Threads are much simpler. Multiple strands of execution in a shared
address space. All the language needs to do is provide one shared
vocabulary to allow code portability.
To me it is obvious that threads can and should be standardized, while processes are generally not portable.
On 10/25/2026 2:45 AM, David Brown wrote:
No one is suggesting that the threads themselves are implemented in
pure, standard, portable C++.-a You need an underlying OS or support of
some sort if you are going to have preemptable threads.-a It's the same
principle as IO and file access.
But the difference between threads and processes is very simple from
the viewpoint of C and C++.-a Suppose you have a global (i.e., external
linkage) variable :
-a-a-a-a-aint x;
Two threads that have "int a = x;" see the same "x" (ignoring data
races and synchronisation).-a Two processes see completely different
"x".[...]
Bingo. So, trying to imply that system is something okay for multi
process, well, good luck. Daft. C/C++ has no std way to deal with multi process. But, we can use C/C++ to program for it all day long. Interesting.
On 27/10/2026 04:44, Chris M. Thomasson wrote:
On 10/25/2026 2:45 AM, David Brown wrote:
No one is suggesting that the threads themselves are implemented
in pure, standard, portable C++.a You need an underlying OS or
support of some sort if you are going to have preemptable threads.
It's the same principle as IO and file access.
But the difference between threads and processes is very simple
from the viewpoint of C and C++.a Suppose you have a global (i.e.,
external linkage) variable :
aaaaaint x;
Two threads that have "int a = x;" see the same "x" (ignoring data
races and synchronisation).a Two processes see completely
different "x".[...]
Bingo. So, trying to imply that system is something okay for multi process, well, good luck. Daft. C/C++ has no std way to deal with
multi process. But, we can use C/C++ to program for it all day
long. Interesting.
There are, of course, languages and runtime systems that handle
processes too. An obvious example is Python. But it does it using a significantly "thicker" abstraction layer, combined with a
significant run-time system to manage it all. And as a programmer,
you have to be aware that you can't access global data from different processes, in the way you can do from different threads - you can
only use data that is explicitly shared, or of appropriate data
structures (like the process-aware queues). Behind the scenes, there
is a lot of work to pass and synchronise all this using named pipes, memmapped shared files, etc. While C++ programmers are used to there
being a certain degree of "hidden work" (unlike in C, where work is
much more explicit), this kind of thing is not at all a match for the
C++ philosophy.
And there are languages like Erlang that divide everything into micro-processes, and use the same mechanisms for controlling and
passing data around regardless of whether this little processes are
in the same thread, or different threads, different OS processes, or different computers. That works because there are very narrow and
tightly controlled mechanisms for sharing data.
Note that these are both languages that run on a VM, not compiled
languages.
On Tue, 27 Oct 2026 09:06:26 +0100
David Brown <david.brown@hesbynett.no> wrote:
[snip]
And there are languages like Erlang that divide everything into
micro-processes, and use the same mechanisms for controlling and
passing data around regardless of whether this little processes are
in the same thread, or different threads, different OS processes, or
different computers. That works because there are very narrow and
tightly controlled mechanisms for sharing data.
Note that these are both languages that run on a VM, not compiled
languages.
What you wrote about Erlang resembles MPI, which of course is readily >available for many compiled or jitted languages, including Fortran, C
and C++.
I tried to utilize MPI 20 years ago, but the thinking behind it is to >different from mine, so I ran away in horror.
On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:[restore snippage]>> On 2026-10-25 23:39, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
A caller provided buffer is normal with a lot of API's out there.
No it isnrCOt. ItrCOs not a good way to manage things, anyway: instead of >>> solving the resource-allocation problem once and for all in the
library API, you are pushing the burden onto all the client code, each
one of which has to solve it for itself.
ThatrCOs a dumb way to design things.
HUH? How do you call say, fread without a user provided buffer?
Relevance being?
In article <20261027102255.00006052@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Tue, 27 Oct 2026 09:06:26 +0100
David Brown <david.brown@hesbynett.no> wrote:
[snip]
And there are languages like Erlang that divide everything into
micro-processes, and use the same mechanisms for controlling and
passing data around regardless of whether this little processes are
in the same thread, or different threads, different OS processes, or
different computers. That works because there are very narrow and
tightly controlled mechanisms for sharing data.
Note that these are both languages that run on a VM, not compiled
languages.
What you wrote about Erlang resembles MPI, which of course is readily >>available for many compiled or jitted languages, including Fortran, C
and C++.
I tried to utilize MPI 20 years ago, but the thinking behind it is to >>different from mine, so I ran away in horror.
Erlang uses the "actor" model to represent concurrency; state is
held by each actor, and actors communicate via message passing,
potentially changing state in response to messages. This is a
model for _concurrency_, in which multiple independent threads
of execution are coordinated to some in a single system.
On 2026-10-26 17:45, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:[restore snippage]>> On 2026-10-25 23:39, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
A caller provided buffer is normal with a lot of API's out there.
No it isnrCOt. ItrCOs not a good way to manage things, anyway: instead of >>>> solving the resource-allocation problem once and for all in the
library API, you are pushing the burden onto all the client code, each >>>> one of which has to solve it for itself.
ThatrCOs a dumb way to design things.
HUH? How do you call say, fread without a user provided buffer?
Relevance being?
fread() uses a caller-provided buffer, which, according to your previous comment, "push[es] the burden onto all the client code, each one of
which has to solve it for itself", so according to you, "That's a dumb
way to design things"..If that isn't your actual opinion of fread(),
your comments need to be at least a little more nuanced to avoid
applying to fread().
On 10/27/26 08:00, James Kuyper wrote:
On 2026-10-26 17:45, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:[restore snippage]>> On 2026-10-25 23:39, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
A caller provided buffer is normal with a lot of API's out there.
No it isnrCOt. ItrCOs not a good way to manage things, anyway: instead of >>>>> solving the resource-allocation problem once and for all in the
library API, you are pushing the burden onto all the client code, each >>>>> one of which has to solve it for itself.
ThatrCOs a dumb way to design things.
HUH? How do you call say, fread without a user provided buffer?
Relevance being?
fread() uses a caller-provided buffer, which, according to your previous
comment, "push[es] the burden onto all the client code, each one of
which has to solve it for itself", so according to you, "That's a dumb
way to design things"..If that isn't your actual opinion of fread(),
your comments need to be at least a little more nuanced to avoid
applying to fread().
The difference is that the size of the buffer for fread() is the maximum
you want/expect to read. The size of an object is the size it is, not >necessarily what you expect. If you don't provide enough space you will >truncate.
On 2026-10-26 17:45, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:
On 2026-10-25 23:39, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
A caller provided buffer is normal with a lot of API's out there.
No it isnrCOt. ItrCOs not a good way to manage things, anyway:
instead of solving the resource-allocation problem once and for
all in the library API, you are pushing the burden onto all the
client code, each one of which has to solve it for itself.
ThatrCOs a dumb way to design things.
HUH? How do you call say, fread without a user provided buffer?
Relevance being?
fread() uses a caller-provided buffer, which, according to your previous comment, "push[es] the burden onto all the client code, each one of
which has to solve it for itself", so according to you, "That's a dumb
way to design things"..
On 2026-10-25 20:42, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 16:16:26 -0700, Chris M. Thomasson wrote:
Even analogous, to say, an API that says read n bytes and store into
buffer. Well, the caller has lifetime of said buffer. The caller makes
the buffer, calls into the function.
So how is the caller supposed to manage that memory?
On Tue, 27 Oct 2026 11:00:08 -0400, James Kuyper wrote:
On 2026-10-26 17:45, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:
On 2026-10-25 23:39, Lawrence DrCOOliveiro wrote:
On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
A caller provided buffer is normal with a lot of API's out there.
No it isnrCOt. ItrCOs not a good way to manage things, anyway:
instead of solving the resource-allocation problem once and for
all in the library API, you are pushing the burden onto all the
client code, each one of which has to solve it for itself.
ThatrCOs a dumb way to design things.
HUH? How do you call say, fread without a user provided buffer?
Relevance being?
fread() uses a caller-provided buffer, which, according to your previous
comment, "push[es] the burden onto all the client code, each one of
which has to solve it for itself", so according to you, "That's a dumb
way to design things"..
Not even paying attention to whatrCOs being said in the parts you
quoted, never mind the parts you didnrCOt. Note my remark above about rCLsolving the resource allocation problemrCY; elsewhere I asked: rCLWhat if yourCOre building an object that needs to be returned to the caller?rCY
Not clear yet what werCOre talking about here? WerCOre not talking about random API calls, werCOre talking about libraries that need to create
and manage abstract objects that encapsulate the function they are
providing!
... without the context that applies elsewhere, your comment about
resource allocation comes off as a non-sequitur.
On Tue, 27 Oct 2026 21:35:09 -0400, James Kuyper wrote:No, none of those comments appear anywhere in this sub-thread as
... without the context that applies elsewhere, your comment about
resource allocation comes off as a non-sequitur.
ThatrCOs just an excuse. Other comments of mine, from further back in
this particular line of this thread:
* rCLWhat if yourCOre building an object that needs to be returned to the
caller?rCY
* rCLThe principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.rCY
* rCLIf you have to do cleanup at each level before exiting, then it works
perfectly well.rCY
Did you notice any of that?
On Tue, 27 Oct 2026 21:35:09 -0400, James Kuyper wrote:
... without the context that applies elsewhere, your comment about
resource allocation comes off as a non-sequitur.
ThatrCOs just an excuse. Other comments of mine, from further back in
this particular line of this thread:
* rCLWhat if yourCOre building an object that needs to be returned to the
caller?rCY
* rCLThe principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.rCY
* rCLIf you have to do cleanup at each level before exiting, then it works
perfectly well.rCY
Did you notice any of that?
From elsewhere in the discussion:
I find the C code I write tends to do a lot of dynamic resource
allocations. These can sometimes fail with errors. So error
recovery will invariably involve cleaning up those parts of the
allocations which already succeeded. Gotos are no good for this;
you need to exit levels of structure nesting one by one, disposing
of allocations as you go.
I put together an example here
<https://gitlab.com/ldo/a_structured_discipline_of_programming>.
This is an extension module that offers services to Python code,
because that is just about the worst example I could think of, for
those who think gotos can cut it.
Did you pay attention to any of that?
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 14:22:34 -0700Basically that methinks you insult too much. Your wisdom here isn't
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a
common
API to the functionality but thank you for demonstrating you had no
answer
to my question.
Ummm... It is relevant. Every process has a single thread of
execution, but not all processes have multiple threads.
No shit sherlock, thanks for the heads up. Your point is?
worth a sack of beans. I haven't learned one thing from you.
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest common
denominator called Windows.
Mind defining your terminology? "3 level locking", in particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even by mistake.
But then, I don't write complicated apps on "big" computers day in day
out.
On 10/26/2026 3:01 AM, boltar@caprica.universe wrote:
Creating a brand new process is fine if
you don't need any complicated shared state such as when kicking off
something
on the command line or creating a pipe (something else win32 is shit at)
but
thats about it.
Shared state? Just use memory mapped files. You don't need pipes/sockets >etc. You need to know how to properly sync things.
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
The problem with system() is not that. Often not even an efficiency.
The problem with system() identified most easily if we ask ourself "Why
do we want xyz in standard library?"
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)
boltar@caprica.universe wrote:
win32 can't do fork() making it effectively a totally useless API for
a lot of multiprocess development. Creating a brand new process is
fine if you don't need any complicated shared state such as when
kicking off something on the command line or creating a pipe
(something else win32 is shit at) but thats about it.
You are clueless about Windows. That's o.k.
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
On Mon, 26 Oct 2026 13:10:46 -0600
Blaine <cactus_DAC@yahoo.com> gabbled:
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 14:22:34 -0700Basically that methinks you insult too much. Your wisdom here isn't
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a >>>>> common
API to the functionality but thank you for demonstrating you had no >>>>> answer
to my question.
Ummm... It is relevant. Every process has a single thread of
execution, but not all processes have multiple threads.
No shit sherlock, thanks for the heads up. Your point is?
worth a sack of beans. I haven't learned one thing from you.
Thats your problem, not mine.
On Mon, 26 Oct 2026 13:03:25 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/26/2026 3:01 AM, boltar@caprica.universe wrote:
Creating a brand new process is fine if
you don't need any complicated shared state such as when kicking off
something
on the command line or creating a pipe (something else win32 is shit
at) but
thats about it.
Shared state? Just use memory mapped files. You don't need
pipes/sockets etc. You need to know how to properly sync things.
Oh really? So you receive an incoming connection to a socket via an
accept()
call. In unix you can fork() at that point so the connecting client has a server process all to itself with all the state instantly copied from the parent process. HOw do you mimic that in windows? Start the server process from scratch and pass it a ton of state via the command line or using some roll-your-own shared memory nonsense? Give me a break. I guess in
windows it
spawns a thread leading to the issue of a single thread crashing
bringing down
the entire application - something multiprocess completely avoids.
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an efficiency.
The problem with system() identified most easily if we ask ourself
"Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do with
it is collect its exit code when its done. You can't communicate with
it via pipes, you can't control it via signals (well, not easily),
you can't set its process group, tty and on and on.
Oh, and it also
fires up the default shell to do the actual execution making it
hideously inefficient.
No serious unix dev uses system() unless thay
have absolutely no choice or it really is a case of "go run this, I
don't care what happens".
On Mon, 26 Oct 2026 22:09:01 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)
boltar@caprica.universe wrote:
win32 can't do fork() making it effectively a totally useless API
for a lot of multiprocess development. Creating a brand new
process is fine if you don't need any complicated shared state
such as when kicking off something on the command line or creating
a pipe (something else win32 is shit at) but thats about it.
You are clueless about Windows. That's o.k.
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
OK, whats the windows API call thats the equivalent of fork()? I'm not talking about CreateProcessA() which doesn't even come close.
On Mon, 26 Oct 2026 13:03:25 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/26/2026 3:01 AM, boltar@caprica.universe wrote:
Creating a brand new process is fine if
you don't need any complicated shared state such as when kicking off
something
on the command line or creating a pipe (something else win32 is shit
at) but
thats about it.
Shared state? Just use memory mapped files. You don't need pipes/
sockets etc. You need to know how to properly sync things.
Oh really? So you receive an incoming connection to a socket via an
accept()
call. In unix you can fork() at that point so the connecting client has a server process all to itself with all the state instantly copied from the parent process. HOw do you mimic that in windows? Start the server process from scratch and pass it a ton of state via the command line or using some roll-your-own shared memory nonsense? Give me a break. I guess in
windows it
spawns a thread leading to the issue of a single thread crashing
bringing down
the entire application - something multiprocess completely avoids.
On Mon, 26 Oct 2026 21:45:17 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest common
denominator called Windows.
Mind defining your terminology? "3 level locking", in particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
And unix got pthreads in 1995. Windows a decade late as usual.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even by mistake.
But then, I don't write complicated apps on "big" computers day in day
out.
Fine, most people will never use it, but for certain things its vital.
On 10/28/2026 1:58 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 21:45:17 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:If you have to ask....
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest common >>>>>> denominator called Windows.
Mind defining your terminology?-a-a "3 level locking", in particular? >>>>
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock-a - all threads other than the one in section block) >>>>
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
And unix got pthreads in 1995. Windows a decade late as usual.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even by mistake.
But then, I don't write complicated apps on "big" computers day in day
out.
Fine, most people will never use it, but for certain things its vital.
Its simple, if you don't like windows, do use the damn pile.
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an efficiency.
The problem with system() identified most easily if we ask ourself "Why
do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do with it is collect its exit code when its done. You can't communicate with it via
pipes, you can't control it via signals (well, not easily), you can't set its process group, tty and on and on. Oh, and it also fires up the default shell to
do the actual execution making it hideously inefficient. No serious unix dev uses system() unless thay have absolutely no choice or it really is a case of "go run this, I don't care what happens".
On Tue, 27 Oct 2026 21:35:09 -0400, James Kuyper wrote:
... without the context that applies elsewhere, your comment about
resource allocation comes off as a non-sequitur.
ThatrCOs just an excuse. Other comments of mine, from further back in
this particular line of this thread:
* rCLWhat if yourCOre building an object that needs to be returned to the
caller?rCY
* rCLThe principle applies to Fortran as it does to any language where
you have to explicitly manage storage allocations.rCY
* rCLIf you have to do cleanup at each level before exiting, then it works
perfectly well.rCY
Did you notice any of that?
From elsewhere in the discussion:
I find the C code I write tends to do a lot of dynamic resource
allocations. These can sometimes fail with errors. So error
recovery will invariably involve cleaning up those parts of the
allocations which already succeeded. Gotos are no good for this;
you need to exit levels of structure nesting one by one, disposing
of allocations as you go.
I put together an example here
<https://gitlab.com/ldo/a_structured_discipline_of_programming>.
This is an extension module that offers services to Python code,
because that is just about the worst example I could think of, for
those who think gotos can cut it.
Did you pay attention to any of that?
On Mon, 26 Oct 2026 21:45:17 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest
common denominator called Windows.
Mind defining your terminology? "3 level locking", in
particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section
block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
And unix got pthreads in 1995. Windows a decade late as usual.
On Wed, 28 Oct 2026 09:08:44 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:09:01 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)
boltar@caprica.universe wrote:
win32 can't do fork() making it effectively a totally useless API
for a lot of multiprocess development. Creating a brand new
process is fine if you don't need any complicated shared state
such as when kicking off something on the command line or creating
a pipe (something else win32 is shit at) but thats about it.
You are clueless about Windows. That's o.k.
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
OK, whats the windows API call thats the equivalent of fork()? I'm not
talking about CreateProcessA() which doesn't even come close.
There is no equivalent for fork(). But nearly all things that Posix
devs achieve by fork() followed by one or another magic incantation and
then followed by exec() can be achived on Windows as well, typically by
means of one or another magic flag in parameters of CreateProcess or
of one of it's more complicated cousins (CreateProcessAsUser, >CreateProcessWithLogon, CreateProcessWithToken, may be others). These
things never fascinated me, so I am not an expert.
Now, there were cases where Unix programmers used fork() without
following it by exec(), but I would think that in the recent 25-30 years
such programming patterns are discouraged in favor of threads.
On 10/28/2026 2:01 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 13:03:25 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/26/2026 3:01 AM, boltar@caprica.universe wrote:
Creating a brand new process is fine if
you don't need any complicated shared state such as when kicking off
something
on the command line or creating a pipe (something else win32 is shit
at) but
thats about it.
Shared state? Just use memory mapped files. You don't need pipes/
sockets etc. You need to know how to properly sync things.
Oh really? So you receive an incoming connection to a socket via an
accept()
call. In unix you can fork() at that point so the connecting client has a
server process all to itself with all the state instantly copied from the
parent process. HOw do you mimic that in windows? Start the server process >> from scratch and pass it a ton of state via the command line or using some >> roll-your-own shared memory nonsense? Give me a break. I guess in
windows it
spawns a thread leading to the issue of a single thread crashing
bringing down
the entire application - something multiprocess completely avoids.
On Windows? Get used to
https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsadup
licatesocketa
DuplicateHandle
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an efficiency.
The problem with system() identified most easily if we ask ourself "Why
do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do with it is >> collect its exit code when its done. You can't communicate with it via
pipes, you can't control it via signals (well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up the default shell >to
do the actual execution making it hideously inefficient. No serious unix dev >> uses system() unless thay have absolutely no choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block until
the process is done.
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled threads
+ assortment of synchronization primitives since very beginning (1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
On Wed, 28 Oct 2026 14:04:02 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:01 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 13:03:25 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/26/2026 3:01 AM, boltar@caprica.universe wrote:
Creating a brand new process is fine if
you don't need any complicated shared state such as when kicking
off something
on the command line or creating a pipe (something else win32 is
shit at) but
thats about it.
Shared state? Just use memory mapped files. You don't need pipes/
sockets etc. You need to know how to properly sync things.
Oh really? So you receive an incoming connection to a socket via an
accept()
call. In unix you can fork() at that point so the connecting client
has a
server process all to itself with all the state instantly copied from
the
parent process. HOw do you mimic that in windows? Start the server
process
from scratch and pass it a ton of state via the command line or using
some
roll-your-own shared memory nonsense? Give me a break. I guess in
windows it
spawns a thread leading to the issue of a single thread crashing
bringing down
the entire application - something multiprocess completely avoids.
On Windows? Get used to
https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-
winsock2-wsadup
licatesocketa
DuplicateHandle
Right, lets duplicate everything manually - so much easier than one
system call.
And thats just file descriptors.
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up theto
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up theto
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up theto
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
The thread design for SVR4 Unix started in the late 80s and
released in 1993.
Digital published "Evolving the UNIX System Interface to
Support Multithreaded Programs" September 28, 1987.
(Paul R. McJones and Garret F. Swart).
The "The Topaz Operating System User's Guide" in that document
describes the thread interface. (DIGITAL Systems Research
Center operating system) for both VAX/Ultrix and the Firefly/Taos >implementation.
Here's a link to the paper published a couple years later:
https://softwarepreservation.computerhistory.org/modula2+/doc/McJones_Swart-Evolving-1989.pdf
And here's a link to the full technical report #21 (including the manual)
https://ftp.zx.net.nz/pub/archive/gatekeeper.dec.com/pub/DEC/SRC/research-reports/SRC-021.pdf
On Thu, 29 Oct 2026 22:26:40 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200to
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up the
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
You are likely right. Otherwise OS will kill my_subprocess at about the
same time the caller of system() gets control back.
I would not figure it out myself.
rCLThe end of software secrecy is almost upon us. The death of closed source, and the final triumph of open source. rCY -Eric S. Raymond.
In article <20261030005434.00005458@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Thu, 29 Oct 2026 22:26:40 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most
easily if we ask ourself "Why do we want xyz in standard
library?"
The problem with system is its fire and forget - all you can
do with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via
signals (well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires upto
the default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller
block until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
You are likely right. Otherwise OS will kill my_subprocess at about
the same time the caller of system() gets control back.
I would not figure it out myself.
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
```
term% cat a.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
struct tm *t;
time_t now = time(NULL);
printf("Starting child, time is %s", asctime(gmtime(&now)));
sleep(5);
now = time(NULL);
printf("Bye bye, now is %s", asctime(gmtime(&now)));
}
term% cat b.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
time_t now = time(NULL);
printf("Parent starting, time is %s", asctime(gmtime(&now)));
system("./a &");
printf("./a started in background\n");
sleep(2);
now = time(NULL);
printf("Ahhh!!! time is %s", asctime(gmtime(&now)));
return 0;
}
term% make a
cc -O2 -pipe -o a a.c
term% make b
cc -O2 -pipe -o b b.c
term% ./b
Parent starting, time is Fri Oct 30 02:21:06 2026
./a started in background
Starting child, time is Fri Oct 30 02:21:06 2026
Ahhh!!! time is Fri Oct 30 02:21:08 2026
term% Bye bye, now is Fri Oct 30 02:21:11 2026
```
- Dan C.
On 10/29/2026 9:19 AM, boltar@caprica.universe wrote:
Right, lets duplicate everything manually - so much easier than one
system call.
And thats just file descriptors.
Do we actually need everything, or just a subset?
On Fri, 30 Oct 2026 02:22:43 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <20261030005434.00005458@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Thu, 29 Oct 2026 22:26:40 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
[snip]
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
You are likely right. Otherwise OS will kill my_subprocess at about
the same time the caller of system() gets control back.
I would not figure it out myself.
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
--- Synchronet 3.22a-Linux NewsLink 1.2```
term% cat a.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
time_t now = time(NULL);
printf("Starting child, time is %s", asctime(gmtime(&now)));
sleep(5);
now = time(NULL);
printf("Bye bye, now is %s", asctime(gmtime(&now)));
}
term% cat b.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
time_t now = time(NULL);
printf("Parent starting, time is %s", asctime(gmtime(&now)));
system("./a &");
printf("./a started in background\n");
sleep(2);
now = time(NULL);
printf("Ahhh!!! time is %s", asctime(gmtime(&now)));
return 0;
}
term% make a
cc -O2 -pipe -o a a.c
term% make b
cc -O2 -pipe -o b b.c
term% ./b
Parent starting, time is Fri Oct 30 02:21:06 2026
./a started in background
Starting child, time is Fri Oct 30 02:21:06 2026
Ahhh!!! time is Fri Oct 30 02:21:08 2026
term% Bye bye, now is Fri Oct 30 02:21:11 2026
```
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
The OS will not kill your program when the shell started by
`system` exits or anything;
nor will the shell itself.
In article <20261030105900.000020ce@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing". Why would it be any different?
On Thu, 29 Oct 2026 22:39:22 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
Implementing threads is trivial compared to implementing multi processes with shared memory. Adding them to a pre-existing kernel might be tricky but when you're building one from scratch as per NT then its hardly a big deal.
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing". Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a Windows
dev might not appreciate that on unix there is no demarcation - a GUI app simply has a network connection to the X server and it can either sit in
an event loop waiting for events - as per a windows main thread - or go do other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the
"other things" are in one or more other threads. There are
altogether too many programs that hang the GUI while "other things"
are going on. That should never happen!
Threading is still definitely useful, mainly for performance, where
the bottleneck is in CPU usage. But if a program is spending most of
its time waiting for I/O over the network, or for a user to initiate a
GUI action, or something external and relatively slow like that, then coroutines keep things simpler.
I've always tried to avoid the complexities of threading; in most
cases I can get away with round-robin scheduling. But I found that
some servers are very slow to respond, and even when trying to do a non-blocking setup of a TCP/IP connection, the connect() API would unavoidably block. I had to spin that part off into its own thread
to keep the rest of the program (including other connections) from
hanging.
On 10/30/26 17:07, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing". Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a Windows
dev might not appreciate that on unix there is no demarcation - a GUI app
simply has a network connection to the X server and it can either sit in
an event loop waiting for events - as per a windows main thread - or go do >> other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the "other >things" are in one or more other threads. There are altogether too many >programs that hang the GUI while "other things" are going on. That
should never happen!
The trend nowadays is to revive the old coroutine concept, in a new
guise called rCLstacklessrCY coroutines. These give you support for async >operations, but with transfers of control being made explicit at
rCLawaitrCY points, rather than unpredictably as with full preemptive >threading. This greatly reduces the opportunity for race conditions.
Credit to Microsoft for pioneering this, but nowadays you see the idea >popping up in JavaScript and Python and who knows where else.
HererCOs a fun little thing: if you set a socket to nonblocking and then
do the connect(2) call, it will seemingly fail with an EINPROGRESS
error. But in fact, the connection attempt gets initiated, and you can >monitor its subsequent progress from your event loop.
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)On what planet?
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> gabbled:
HererCOs a fun little thing: if you set a socket to nonblocking and
then do the connect(2) call, it will seemingly fail with an
EINPROGRESS error. But in fact, the connection attempt gets
initiated, and you can monitor its subsequent progress from your
event loop.
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them
which is their main raison d'etre,
but on unix they're a very powerful tool. For simple servers with a
low workload they can allow single threaded development simplifying
the code immensely.
On Fri, 30 Oct 2026 20:37:14 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 10/30/26 17:07, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S-a <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on.-a Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing".-a Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a
Windows
dev might not appreciate that on unix there is no demarcation - a GUI
app
simply has a network connection to the X server and it can either sit in >>> an event loop waiting for events - as per a windows main thread - or
go do
other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the "other
things" are in one or more other threads. There are altogether too many
programs that hang the GUI while "other things" are going on. That
should never happen!
If its multithreaded but that still happens someone probably has created
too
many critical sections with too many locks.
On Fri, 30 Oct 2026 20:37:14 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 10/30/26 17:07, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S-a <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on.-a Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing".-a Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a
Windows
dev might not appreciate that on unix there is no demarcation - a GUI
app
simply has a network connection to the X server and it can either sit in >>> an event loop waiting for events - as per a windows main thread - or
go do
other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the "other
things" are in one or more other threads. There are altogether too many
programs that hang the GUI while "other things" are going on. That
should never happen!
If its multithreaded but that still happens someone probably has created
too
many critical sections with too many locks.
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid> gabbled:
Here=E2=80=99s a fun little thing: if you set a socket to nonblocking and >> >then do the connect(2) call, it will seemingly fail with an=20
EINPROGRESS error. But in fact, the connection attempt gets
initiated, and you can monitor its subsequent progress from your
event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On 10/31/2026 2:38 AM, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 20:37:14 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 10/30/26 17:07, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S-a <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on.-a Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing".-a Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a
Windows
dev might not appreciate that on unix there is no demarcation - a GUI >>>> app
simply has a network connection to the X server and it can either sit in >>>> an event loop waiting for events - as per a windows main thread - or
go do
other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the "other
things" are in one or more other threads. There are altogether too many
programs that hang the GUI while "other things" are going on. That
should never happen!
If its multithreaded but that still happens someone probably has created
too
many critical sections with too many locks.
What do you mean? Is the GUI deadlocking?
On 10/31/2026 2:38 AM, boltar@caprica.universe wrote:
If its multithreaded but that still happens someone probably has created
too
many critical sections with too many locks.
Makes no sense at all. Have you taken a look at my multex? It can create
a shit lod of mutexes, and never deadlock. It keeps a strict locking
order. Sorts and dedups the mutexes. Also, notice that an object does
not need its own mutex:
On Sat, 31 Oct 2026 04:14:05 GMT, Charlie Gibbs wrote:
I've always tried to avoid the complexities of threading; in most
cases I can get away with round-robin scheduling. But I found that
some servers are very slow to respond, and even when trying to do a
non-blocking setup of a TCP/IP connection, the connect() API would
unavoidably block. I had to spin that part off into its own thread
to keep the rest of the program (including other connections) from
hanging.
HererCOs a fun little thing: if you set a socket to nonblocking and then
do the connect(2) call, it will seemingly fail with an EINPROGRESS
error. But in fact, the connection attempt gets initiated, and you can monitor its subsequent progress from your event loop.
From the ERRORS section of <https://manpages.debian.org/connect(2)>:
EINPROGRESS
The socket is nonblocking and the connection cannot be
completed immediately. (UNIX domain sockets failed with EAGAIN
instead.) It is possible to select(2) or poll(2) for
completion by selecting the socket for writing. After
select(2) indicates writability, use getsockopt(2) to read the
SO_ERROR option at level SOL_SOCKET to determine whether
connect() completed successfully (SO_ERROR is zero) or
unsuccessfully (SO_ERROR is one of the usual error codes
listed here, explaining the reason for the failure).
IrCOm not sure about doing this sort of thing from other libraries that
wrap socket connections (e.g. SSL/TLS libraries); for these, the usual fallback is still available, as you say, by turning a blocking call
into a nonblocking one by pushing it off to a separate thread.
On Sat, 31 Oct 2026 19:56:10 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid>
gabbled:
Here=E2=80=99s a fun little thing: if you set a socket to=20
nonblocking and then do the connect(2) call, it will seemingly
fail with an EINPROGRESS error. But in fact, the connection
attempt gets initiated, and you can monitor its subsequent
progress from your event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11. https://learn.microsoft.com/en-us/windows/win32/sync/slim-reader- writer--srw--locks
Of course WinXP remained popular for few more years, approximately up
until 2nd half of 2010, but that too predates publication of C++11 in 2011-09.
On Sat, 31 Oct 2026 13:11:29 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/31/2026 2:38 AM, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 20:37:14 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 10/30/26 17:07, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S-a <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started >>>>>>>> on.-a Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing".-a Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a
Windows
dev might not appreciate that on unix there is no demarcation - a
GUI app
simply has a network connection to the X server and it can either
sit in
an event loop waiting for events - as per a windows main thread -
or go do
other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the
"other things" are in one or more other threads. There are
altogether too many
programs that hang the GUI while "other things" are going on. That
should never happen!
If its multithreaded but that still happens someone probably has
created too
many critical sections with too many locks.
What do you mean? Is the GUI deadlocking?
What do I mean? If you don't understand the concepts of multithreading then maybe stay out of the discussion.
On Sat, 31 Oct 2026 13:14:47 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/31/2026 2:38 AM, boltar@caprica.universe wrote:
If its multithreaded but that still happens someone probably has
created too
many critical sections with too many locks.
Makes no sense at all. Have you taken a look at my multex? It can create
WTF has your multex got to do with anything? No one was talking about your code so don't use this discussion as some excuse to show off some code you wrote than no one cares about.
a shit lod of mutexes, and never deadlock. It keeps a strict locking
order. Sorts and dedups the mutexes. Also, notice that an object does
not need its own mutex:
Thats nice.
tl;dr
rCLThe end of software secrecy is almost upon us. The death of closed source, and the final triumph of open source. rCY -Eric S. Raymond.I have provided Claude Code with snippets of coderCoroughly a screen's
-a-a https://www.battleswarmblog.com/?p=73639
"I should have realized this a few months ago when I successfully
decompiled the game of Firefighter from an ancient DOS shareware binary.
My robot friend was able to tell it had been written in Borland Pascal
from looking at the data layout; it gave me back very readable Pascal
code with sensibly chosen function and variable names. I transpiled it
to Rust and now ship it as part of my heritage games collection."
Huh, so somebody has actually built a decent decompiler.-a Why do I doubt this even though ESR says otherwise?
And he has a translator from Borland Pascal to Rust?
On Tue, 20 Oct 2026 15:06:48 -0500, Lynn McGuire wrote:
The key to writing any software is lots of commenting.
A key point about comments is they should explain *why* the code is
On 10/20/2026 2:22 PM, Scott Dorsey wrote:
In article <11b8b2k$p44i$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>> Cryptoengineer <petertrei@gmail.com> wrote:
Edgar Dijkstra: Go To Statement Considered Harmful
A man who clearly never programmed in assembler.
I have seen a structured assembler class and it's actually not a bad way
to think at all. Having LOOPZ and REP* and similar instructions make it
easier to think about do loops.
The key to writing structured assembly is commenting.
The key to writing [] assembly is commenting.
Fixed That For You.
pt
On Tue, 20 Oct 2026 20:20:39 -0000 (UTC), Lawrence D|+Oliveiro wrote:
On Tue, 20 Oct 2026 15:06:48 -0500, Lynn McGuire wrote:
The key to writing any software is lots of commenting.
A key point about comments is they should explain *why* the code is
the win for comment it is when code explain itself with 0 comment
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able,
but don't like them.
It has nothing to do with availability and functionality of select/poll
on Windows.
On 11/1/2026 1:33 AM, boltar@caprica.universe wrote:
What do you mean? Is the GUI deadlocking?
What do I mean? If you don't understand the concepts of multithreading then >> maybe stay out of the discussion.
Ummm. I think you are the one that does not know what the heck they are >talking about.
On 11/1/2026 1:34 AM, boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 13:14:47 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/31/2026 2:38 AM, boltar@caprica.universe wrote:WTF has your multex got to do with anything? No one was talking about your >> code so don't use this discussion as some excuse to show off some code you >> wrote than no one cares about.
If its multithreaded but that still happens someone probably has
created too
many critical sections with too many locks.
Makes no sense at all. Have you taken a look at my multex? It can create >>
It uses a table of a lot of mutexes. Never deadlocks. So, you need to
study up? You said "too many critical sections with too many locks."
Well, if you don't know how to use them, don't use them. Learn first?
Op 02.nov.2026 om 10:54 schreef Rosario19:
On Tue, 20 Oct 2026 20:20:39 -0000 (UTC), Lawrence D|+Oliveiro wrote:
On Tue, 20 Oct 2026 15:06:48 -0500, Lynn McGuire wrote:
The key to writing any software is lots of commenting.
A key point about comments is they should explain *why* the code is
the win for comment it is when code explain itself with 0 comment
Code can only explain what it does, what the algorithm is.
Code cannot explain why that algorithm was chosen. That is where
comments are for.
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able,
but don't like them.
It has nothing to do with availability and functionality of select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on sockets.
Unfortuately, a lot of people (especially CS weenies) love to loudly proclaim, "My code is so readable that no comments are necessary!"
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order
to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on
sockets.
On Sun, 1 Nov 2026 18:04:13 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/1/2026 1:34 AM, boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 13:14:47 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/31/2026 2:38 AM, boltar@caprica.universe wrote:
If its multithreaded but that still happens someone probably has
created too
many critical sections with too many locks.
Makes no sense at all. Have you taken a look at my multex? It can
create
WTF has your multex got to do with anything? No one was talking about
your
code so don't use this discussion as some excuse to show off some
code you
wrote than no one cares about.
It uses a table of a lot of mutexes. Never deadlocks. So, you need to
study up? You said "too many critical sections with too many locks."
Well, if you don't know how to use them, don't use them. Learn first?
I have no desire to spend hours trawling through someones pet project so they
can make a point about what a L337 coder they are. HTH.
On Sun, 1 Nov 2026 18:03:06 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/1/2026 1:33 AM, boltar@caprica.universe wrote:
What do you mean? Is the GUI deadlocking?
What do I mean? If you don't understand the concepts of
multithreading then
maybe stay out of the discussion.
Ummm. I think you are the one that does not know what the heck they
are talking about.
Yeah, ok. I've only been using pthreads for the last 25 years but sure,
what
do I know.
On 10/27/2026 3:45 AM, Michael S wrote:
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
https://learn.microsoft.com/en-us/windows/win32/sync/slim-reader-
writer--srw--locks
Of course WinXP remained popular for few more years, approximately up
until 2nd half of 2010, but that too predates publication of C++11 in
2011-09.
Wasn't that work done in preparation for the C++11 standard?-a I did not
keep track of the standard's discussion, but presumably Microsoft had
people both on the C++ standard's committee, and the Vista programming
team.
Best wishes, and happy standards!
On Sat, 31 Oct 2026 19:56:10 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid> gabbled: >>>> Here=E2=80=99s a fun little thing: if you set a socket to nonblocking and >>>> then do the connect(2) call, it will seemingly fail with an
EINPROGRESS error. But in fact, the connection attempt gets=20
initiated, and you can monitor its subsequent progress from your
event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On this one where you see code that is only multithreaded in order to serve individual sockets, not because it needs to be.
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able,
but don't like them.
It has nothing to do with availability and functionality of select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on sockets.
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order
to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on
sockets.
That's nonsense. That part of Winsock2 API did not change since 1993.
That is, in early 2000s they added poll() (WAASAPoll), but select() is
the same BSD select() from the very beginning, just a little easier to
use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files and
pipes) then your statement would make more sense*.
But it does not sound like you really want to make sense. You strongly
prefer mindless bashing.
----
* - Although,
1) of course, there (in Win32) exist not too complicated alternative
methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing waiting
for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing sockets with pipes could still make sense, infrequently.
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order
to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on
sockets.
That's nonsense. That part of Winsock2 API did not change since 1993.
That is, in early 2000s they added poll() (WAASAPoll), but select() is
the same BSD select() from the very beginning, just a little easier to
use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files and
pipes) then your statement would make more sense*.
But it does not sound like you really want to make sense. You strongly
prefer mindless bashing.
----
* - Although,
1) of course, there (in Win32) exist not too complicated alternative
methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing waiting
for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing sockets with pipes could still make sense, infrequently.
On 2026-10-31, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Sat, 31 Oct 2026 04:14:05 GMT, Charlie Gibbs wrote:
I've always tried to avoid the complexities of threading; in most
cases I can get away with round-robin scheduling. But I found that
some servers are very slow to respond, and even when trying to do a
non-blocking setup of a TCP/IP connection, the connect() API would
unavoidably block. I had to spin that part off into its own thread
to keep the rest of the program (including other connections) from
hanging.
HererCOs a fun little thing: if you set a socket to nonblocking and then
do the connect(2) call, it will seemingly fail with an EINPROGRESS
error. But in fact, the connection attempt gets initiated, and you can
monitor its subsequent progress from your event loop.
From the ERRORS section of <https://manpages.debian.org/connect(2)>:
EINPROGRESS
The socket is nonblocking and the connection cannot be
completed immediately. (UNIX domain sockets failed with EAGAIN
instead.) It is possible to select(2) or poll(2) for
completion by selecting the socket for writing. After
select(2) indicates writability, use getsockopt(2) to read the
SO_ERROR option at level SOL_SOCKET to determine whether
connect() completed successfully (SO_ERROR is zero) or
unsuccessfully (SO_ERROR is one of the usual error codes
listed here, explaining the reason for the failure).
IrCOm not sure about doing this sort of thing from other libraries that
wrap socket connections (e.g. SSL/TLS libraries); for these, the usual
fallback is still available, as you say, by turning a blocking call
into a nonblocking one by pushing it off to a separate thread.
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
On 11/2/2026 6:42 PM, Charlie Gibbs wrote:
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
These are for high performance systems. But, they solve a lot of
problems. Say your program starts to gain a lot of users?
On 11/2/2026 1:46 PM, Michael S wrote:
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex
on sockets.
That's nonsense. That part of Winsock2 API did not change since
1993. That is, in early 2000s they added poll() (WAASAPoll), but
select() is the same BSD select() from the very beginning, just a
little easier to use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files
and pipes) then your statement would make more sense*.
But it does not sound like you really want to make sense. You
strongly prefer mindless bashing.
----
* - Although,
1) of course, there (in Win32) exist not too complicated alternative methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing
waiting for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing sockets with pipes could still make sense,
infrequently.
Have you ever used IOCP on windows?
On Mon, 2 Nov 2026 15:03:44 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> wrote:
On 11/2/2026 1:46 PM, Michael S wrote:
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex
on sockets.
That's nonsense. That part of Winsock2 API did not change since
1993. That is, in early 2000s they added poll() (WAASAPoll), but
select() is the same BSD select() from the very beginning, just a
little easier to use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files
and pipes) then your statement would make more sense*.
But it does not sound like you really want to make sense. You
strongly prefer mindless bashing.
----
* - Although,
1) of course, there (in Win32) exist not too complicated alternative
methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing
waiting for file I/O with waiting for sockets is a bad idea. OTOH,
Multiplexing sockets with pipes could still make sense,
infrequently.
Have you ever used IOCP on windows?
No, I didn't.
IMHO, IO compleiion ports "solve" problems that do not exist today
and mostly did not exist since 15-20 years ago.
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able,
but don't like them.
It has nothing to do with availability and functionality of select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on sockets.
By "multiplex on sockets" do you mean supporting more then one connection
on a single socket? Serious question here: could you tell me how this can
be useful?
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
Last time I had the misfortune to use win32 it couldn't multiplex on
sockets.
That's nonsense. That part of Winsock2 API did not change since 1993.
That is, in early 2000s they added poll() (WAASAPoll), but select() is
the same BSD select() from the very beginning, just a little easier to
use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files and
pipes) then your statement would make more sense*.
2) today, with nearly all file I/O deeply cached, multiplexing waiting
for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing >sockets with pipes could still make sense, infrequently.
On 11/1/2026 1:32 AM, boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 19:56:10 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid> gabbled: >>>>> Here=E2=80=99s a fun little thing: if you set a socket to nonblocking and >>>>> then do the connect(2) call, it will seemingly fail with an
EINPROGRESS error. But in fact, the connection attempt gets=20
initiated, and you can monitor its subsequent progress from your
event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On this one where you see code that is only multithreaded in order to serve >> individual sockets, not because it needs to be.
Either you are trolling or don't have a clue?
On Mon, 2 Nov 2026 14:59:26 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/1/2026 1:32 AM, boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 19:56:10 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid>
gabbled:
Here=E2=80=99s a fun little thing: if you set a socket to=20
nonblocking and
then do the connect(2) call, it will seemingly fail with an
EINPROGRESS error. But in fact, the connection attempt gets
initiated, and you can monitor its subsequent progress from your
event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On this one where you see code that is only multithreaded in order to
serve
individual sockets, not because it needs to be.
Either you are trolling or don't have a clue?
Seems to be your standard response to anyone you disagree with. Go back under
your bridge.
On Mon, 2 Nov 2026 14:59:26 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/1/2026 1:32 AM, boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 19:56:10 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid>
gabbled:
Here=E2=80=99s a fun little thing: if you set a socket to=20
nonblocking and
then do the connect(2) call, it will seemingly fail with an
EINPROGRESS error. But in fact, the connection attempt gets
initiated, and you can monitor its subsequent progress from your
event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On this one where you see code that is only multithreaded in order to
serve
individual sockets, not because it needs to be.
Either you are trolling or don't have a clue?
Seems to be your standard response to anyone you disagree with. Go back under
your bridge.
On Mon, 02 Nov 2026 16:51:47 GMT
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to >>>>> serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able, >>>> but don't like them.
It has nothing to do with availability and functionality of select/poll >>>> on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on sockets.
By "multiplex on sockets" do you mean supporting more then one connection
on a single socket? Serious question here: could you tell me how this can >> be useful?
No I don't mean that and I can't be bother explaining what multiplexing means to someone who's clearly never used it.
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <20261027102255.00006052@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Tue, 27 Oct 2026 09:06:26 +0100
David Brown <david.brown@hesbynett.no> wrote:
[snip]
And there are languages like Erlang that divide everything into
micro-processes, and use the same mechanisms for controlling and
passing data around regardless of whether this little processes are
in the same thread, or different threads, different OS processes, or
different computers. That works because there are very narrow and
tightly controlled mechanisms for sharing data.
Note that these are both languages that run on a VM, not compiled
languages.
What you wrote about Erlang resembles MPI, which of course is readily
available for many compiled or jitted languages, including Fortran, C
and C++.
I tried to utilize MPI 20 years ago, but the thinking behind it is to
different from mine, so I ran away in horror.
Erlang uses the "actor" model to represent concurrency; state is
held by each actor, and actors communicate via message passing,
potentially changing state in response to messages. This is a
model for _concurrency_, in which multiple independent threads
of execution are coordinated to some in a single system.
Chorus (the microkernel) worked in a similar fashion. The
microkernel coordinated between actors using message passing.
The actors implemented the higher level operating system
functionality. The Amadeus project, for example, implemented
a version of unix on top of the microkernel using message
passing between actors (The Object manager handled files and
filesystems, the Process actor handled the POSIX process
and thread (SVR4.2ES/MP threads) interfaces including fork,
and light-weight processes that implemented threads, and
the Streams actor provide system V streams support and
networking.
Unisys released the OS as part of their massively parallel
OPUS computer system.
On Mon, 26 Oct 2026 19:51:23 -0700, Chris M. Thomasson wrote:
On 10/23/2026 8:39 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 16:58:04 -0700, Chris M. Thomasson wrote:
Keeping them up to date is, afaict, manual.
In the Linux world, we have rCLdevelopmentrCY packages versus rCLruntimerCY >>> packages.
The development package contains the source includes, pkg-config
info etc. The runtime version includes the actual shared library.
So your built package has a dependency on the latter; when a user
tries to install your package, it should automatically pull in the
latter as necessary.
Example from my system:
lrwxrwxrwx 1 root root 13 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so -> libcairo.so.2
lrwxrwxrwx 1 root root 21 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2 -> libcairo.so.2.11804.4
-rw-r--r-- 1 root root 1366728 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11804.4
Where did these come from?
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so.2 >>> libcairo2:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so.2
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so
libcairo2-dev:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so
Notice how the development library is not versioned, but is just a
symlink to a versioned library.
The runtime library is always versioned. This allows multiple
versions of the library to be present at once, with some older
packages, that havenrCOt been rebuilt, still depending on an older
version, while up-to-date packages make use of the newer version.
I was in the linux world for a whiel, along with solaris, etc. But
Windows, oh my. vcpkg is a big turn.
Windows isnrCOt even in the same league, is it.
For the particular case of why C++ supports threads but not processes,
the answer should be obvious.
Peter Flass <Peter@Iron-Spring.com> writes:
On 10/27/26 08:00, James Kuyper wrote:
On 2026-10-26 17:45, Lawrence DrCOOliveiro wrote:
On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:[restore snippage]>> On 2026-10-25 23:39, Lawrence DrCOOliveiro wrote: >>>>>> On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
A caller provided buffer is normal with a lot of API's out there. >>>>>>No it isnrCOt. ItrCOs not a good way to manage things, anyway: instead of
solving the resource-allocation problem once and for all in the
library API, you are pushing the burden onto all the client code, each >>>>>> one of which has to solve it for itself.
ThatrCOs a dumb way to design things.
HUH? How do you call say, fread without a user provided buffer?
Relevance being?
fread() uses a caller-provided buffer, which, according to your previous >>> comment, "push[es] the burden onto all the client code, each one of
which has to solve it for itself", so according to you, "That's a dumb
way to design things"..If that isn't your actual opinion of fread(),
your comments need to be at least a little more nuanced to avoid
applying to fread().
The difference is that the size of the buffer for fread() is the maximum
you want/expect to read. The size of an object is the size it is, not
necessarily what you expect. If you don't provide enough space you will
truncate.
Which isn't a significant issue with fread, since the underlying stdio
buffer (or kernel file cache or terminal driver buffer) will hold the
unread information for the next call to fread.
fread(3) is basically obsolete for most high-performance applications
which map the file directly into the process address space (mmap).
On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
Seems to be your standard response to anyone you disagree with. Go back
under
your bridge.
Really? Why do you have a hatred for say, IOCP? If so, you must also
HATE AIO, or io_uring?
On 11/4/26 09:48, boltar@caprica.universe wrote:
On Mon, 02 Nov 2026 16:51:47 GMT
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to >>>>>> serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able, >>>>> but don't like them.
It has nothing to do with availability and functionality of select/poll >>>>> on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on >sockets.
By "multiplex on sockets" do you mean supporting more then one connection >>> on a single socket? Serious question here: could you tell me how this can >>> be useful?
No I don't mean that and I can't be bother explaining what multiplexing means
to someone who's clearly never used it.
Don't be so smug. You could at least give him a hint.
If you bother enough to reply, you might as well show
that you know.
On Wed, 4 Nov 2026 02:22:52 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
Seems to be your standard response to anyone you disagree with. Go
back under
your bridge.
Really? Why do you have a hatred for say, IOCP? If so, you must also
HATE AIO, or io_uring?
I never mentioned IOCP but looking at it, yeah, looks like your standard Windows approach of chucking threads at everything.
On 11/4/2026 8:22 AM, boltar@caprica.universe wrote:
On Wed, 4 Nov 2026 02:22:52 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
Seems to be your standard response to anyone you disagree with. Go
back under
your bridge.
Really? Why do you have a hatred for say, IOCP? If so, you must also
HATE AIO, or io_uring?
I never mentioned IOCP but looking at it, yeah, looks like your standard
Windows approach of chucking threads at everything.
Huh? You mean a thread pool, sometimes we can oversubscribe and use
hardware threads * 2
I don't think you should mock IOCP. Then you would be mocking AIO, or >io_uring.
On Wed, 4 Nov 2026 10:56:20 -0800I sometimes just reserve space in the page file and let the OS lazy write/read.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/4/2026 8:22 AM, boltar@caprica.universe wrote:
On Wed, 4 Nov 2026 02:22:52 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
Seems to be your standard response to anyone you disagree with. Go
back under
your bridge.
Really? Why do you have a hatred for say, IOCP? If so, you must also
HATE AIO, or io_uring?
I never mentioned IOCP but looking at it, yeah, looks like your standard >>> Windows approach of chucking threads at everything.
Huh? You mean a thread pool, sometimes we can oversubscribe and use
hardware threads * 2
I don't care if its a thread ocean, its still threads being used where they're
possibly not needed. Obviously depends on load. But if I'm writing a client such as ssh where the only I/O is via stdin and the socket I'm going to multiplex them in select() or poll(), not have 2 seperate threads.
I don't think you should mock IOCP. Then you would be mocking AIO, or
io_uring.
I don't give a toss about IOCP, its a windows thing.
On Wed, 4 Nov 2026 11:24:54 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 11/4/26 09:48, boltar@caprica.universe wrote:
On Mon, 02 Nov 2026 16:51:47 GMTsockets.
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote: >>>>
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or >>>>>> able,
but don't like them.
It has nothing to do with availability and functionality of
select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on
By "multiplex on sockets" do you mean supporting more then one
connection
on a single socket?-a Serious question here: could you tell me how
this can
be useful?
No I don't mean that and I can't be bother explaining what
multiplexing means
to someone who's clearly never used it.
Don't be so smug. You could at least give him a hint.
If you bother enough to reply, you might as well show
that you know.
Right, because typing "IO multiplexing" into google or an AI is such an arduous task.
On 11/4/26 17:24, boltar@caprica.universe wrote:Unless you didn't pay attention yet, boltar is asshole and proud at
On Wed, 4 Nov 2026 11:24:54 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 11/4/26 09:48, boltar@caprica.universe wrote:
On Mon, 02 Nov 2026 16:51:47 GMTsockets.
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe>
wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines.
Or able,
but don't like them.
It has nothing to do with availability and functionality of
select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't
multiplex on
By "multiplex on sockets" do you mean supporting more then one
connection
on a single socket?a Serious question here: could you tell me
how this can
be useful?
No I don't mean that and I can't be bother explaining what
multiplexing means
to someone who's clearly never used it.
Don't be so smug. You could at least give him a hint.
If you bother enough to reply, you might as well show
that you know.
Right, because typing "IO multiplexing" into google or an AI is
such an arduous task.
That's fine too, as a hint, no issue there.
'Multiplexing' is a copiously overloaded concept, so a little
bit of help to steer him into the right direction is not out
of place.
Let's leave it at that.
Jeroen Belleman
On Wed, 4 Nov 2026 23:53:55 +0100
Jeroen Belleman <jeroen@nospam.please> wrote:
'Multiplexing' is a copiously overloaded concept, so a little
bit of help to steer him into the right direction is not out
of place.
=20
Let's leave it at that.
=20
Jeroen Belleman
Unless you didn't pay attention yet, boltar is asshole and proud at
that.
Or arshole? I'm not sure what is a correct spelling in his area.
On 2026-11-03, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/2/2026 6:42 PM, Charlie Gibbs wrote:
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >>>
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient, >>>>> so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
These are for high performance systems. But, they solve a lot of
problems. Say your program starts to gain a lot of users?
In our environment that should never happen.
The only legitimate
users are those that are other elements of our software package.
Any others (or too many seemingly legitimate users) get a rejection
message, followed by disconnection.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 59:34:19 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
4 files (9,632K bytes) |
| Messages: | 286,017 |