Thread View: rec.arts.sf.written
313 messages
313 total messages
Page 5 of 7
Started by Lynn McGuire
Wed, 14 Oct 2026 04:18
Page 5 of 7 • 313 total messages
Re: “The end of software secrecy is almost upon
Author: Dan Cross
Date: Sun, 25 Oct 2026 17:18
Date: Sun, 25 Oct 2026 17:18
20 lines
1702 bytes
1702 bytes
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. :-) - Dan C.
Re: “The end of software secrecy is almost upon
Author: Cryptoengineer
Date: Sun, 25 Oct 2026 17:58
Date: Sun, 25 Oct 2026 17:58
34 lines
2978 bytes
2978 bytes
On 10/25/2026 8:10 AM, Scott Dorsey wrote: > 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: >>>>>>> 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. >> >> 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 > 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
Re: âThe end of software secrecy is almost upon
Author: Cryptoengineer
Date: Sun, 25 Oct 2026 18:03
Date: Sun, 25 Oct 2026 18:03
35 lines
2794 bytes
2794 bytes
On 10/25/2026 1:19 PM, Robert Woodward wrote: > 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. > Based on 40+ years of usenet experience, the only thing which will stop the cross posting is the death of this thread. pt
Re: âThe end of software secrecy is almost upon
Author: Blaine
Date: Sun, 25 Oct 2026 18:21
Date: Sun, 25 Oct 2026 18:21
50 lines
3382 bytes
3382 bytes
Cryptoengineer wrote: > On 10/25/2026 1:19 PM, Robert Woodward wrote: >> 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. >> > > Based on 40+ years of usenet experience, the only thing which will stop > the cross posting is the death of this thread. > > pt What struck me about Game of Thrones was that the monarchy existed in Game of Thrones for the sole reason of some guys conspiring in Chapter One about taking it for themselves. What a bunch of polymaths. -- Can you strip away so we may start again? "There’s a switch and they don't seem authentic or themselves. It feels like I’m an unnecessary body and it’s a waste of time to even be there." -- Grim, playful Blaine.
Re: âThe end of software secrecy is almost upon
Author: David Brown
Date: Sun, 25 Oct 2026 18:26
Date: Sun, 25 Oct 2026 18:26
46 lines
3538 bytes
3538 bytes
On 25/10/2026 18:19, Robert Woodward wrote: > 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. > Was it ever relevant to that group? At least one person in this thread is renowned for his irritating habit of adding every newsgroup he can think of to lists. "This post is in English - I'll add alt.languages.english to the list. I see there was a number mentioned - I've added sci.maths for their thoughts. I've just thought about thoughts, so alt.philosophy is needed too". Anyone who feels that might refer to them could do their part towards making the world a nicer place, and either quit that habit, or leave Usenet. As I don't follow any of these groups other than C++, I can't say if it is topical or not in the other groups. I certainly don't mind if irrelevant groups are removed, but there is a real risk that some twit will re-add them. Then you still have the pointless (to you) threads, but now they are also fragmented.
Re: âThe end of software secrecy is almost upon
Author: Blaine
Date: Sun, 25 Oct 2026 18:29
Date: Sun, 25 Oct 2026 18:29
52 lines
3652 bytes
3652 bytes
David Brown wrote: > On 25/10/2026 18:19, Robert Woodward wrote: >> 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. >> > > Was it ever relevant to that group? At least one person in this thread > is renowned for his irritating habit of adding every newsgroup he can > think of to lists. "This post is in English - I'll add > alt.languages.english to the list. I see there was a number mentioned - > I've added sci.maths for their thoughts. 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. -- Can you strip away so we may start again? "There’s a switch and they don't seem authentic or themselves. It feels like I’m an unnecessary body and it’s a waste of time to even be there." -- Grim, playful Blaine.
Re: âThe end of software secrecy is almost upon
Author: David Brown
Date: Sun, 25 Oct 2026 18:59
Date: Sun, 25 Oct 2026 18:59
56 lines
3909 bytes
3909 bytes
On 25/10/2026 19:29, Blaine wrote: > David Brown wrote: >> On 25/10/2026 18:19, Robert Woodward wrote: >>> 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. >>> >> >> Was it ever relevant to that group? At least one person in this >> thread is renowned for his irritating habit of adding every newsgroup >> he can think of to lists. "This post is in English - I'll add >> alt.languages.english to the list. I see there was a number mentioned >> - I've added sci.maths for their thoughts. 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. > I was not thinking of you. (And in the case of this thread, the original poster cross-posted wildly to start with.) I've nothing against the occasional cross-post thread, and some threads can be relevant to multiple groups. A comparison to C++ and Fortran could easily be relevant to c.l.fortran and c.l.c++. It's mass cross-posting to irrelevant groups that bugs me (and many others).
Re: “The end of software secrecy is almost upon
Author: Michael S
Date: Sun, 25 Oct 2026 20:24
Date: Sun, 25 Oct 2026 20:24
78 lines
4401 bytes
4401 bytes
On Sun, 25 Oct 2026 08:37:22 -0000 (UTC) boltar@caprica.universe wrote: > 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: > >>> 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. > > Who mentioned C? I was talking about C++ which has a threading API > already. Do try and keep up. > In that regard, C and C++ are very similar. Similar primitives modeled mostly on Posix threads were added to both languages at approximately the same time. https://en.cppreference.com/c/thread The difference is not in this specific case, but in generally more conservative attitude of C committee relatively to its C++ counterpart w.r.t. extending Standard library.
Re: âThe end of software secrecy is almost upon
Author: Titus G
Date: Sun, 25 Oct 2026 20:43
Date: Sun, 25 Oct 2026 20:43
19 lines
2259 bytes
2259 bytes
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.
Re: “The end of software secrecy is almost upon
Author: Michael S
Date: Sun, 25 Oct 2026 20:56
Date: Sun, 25 Oct 2026 20:56
38 lines
2873 bytes
2873 bytes
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.
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Sun, 25 Oct 2026 21:19
Date: Sun, 25 Oct 2026 21:19
22 lines
2509 bytes
2509 bytes
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?
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Sun, 25 Oct 2026 21:21
Date: Sun, 25 Oct 2026 21:21
21 lines
2461 bytes
2461 bytes
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. > > What about separate multi threaded processes?
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Sun, 25 Oct 2026 21:22
Date: Sun, 25 Oct 2026 21:22
44 lines
3457 bytes
3457 bytes
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote: > 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. > Ummm... It is relevant. Every process has a single thread of execution, but not all processes have multiple threads.
Re: “The end of software secrecy is almost upon
Author: Peter Moylan
Date: Sun, 25 Oct 2026 21:29
Date: Sun, 25 Oct 2026 21:29
10 lines
1908 bytes
1908 bytes
On 24/10/26 06:49, Lynn McGuire wrote: > > 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. Then someone translated it into an African language and called it Mbasic. -- Peter Moylan peter@pmoylan.org http://www.pmoylan.org Newcastle, NSW
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Sun, 25 Oct 2026 21:31
Date: Sun, 25 Oct 2026 21:31
40 lines
3290 bytes
3290 bytes
On 10/25/2026 9:29 AM, boltar@caprica.universe wrote: > 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>, >>>> Michael S <already5chosen@yahoo.com> wrote: >>> <snip> >>>>> 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. > Make Fibers in 100% pure C++? But those are not threads. Multiple fibers can run on a single thread. Although, I think they can run on multiple threads as well. So, multiple threads, multiple fibers per thread.
Re: Re: “The end of software secrecy is almost upon
Author: Scott Dorsey
Date: Sun, 25 Oct 2026 23:06
Date: Sun, 25 Oct 2026 23:06
21 lines
1612 bytes
1612 bytes
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 -- "C'est un Nagra. C'est suisse, et tres, tres precis."
Threads and processes (was: Re: "The end of software secrecy is almost upon)
Author: Nuno Silva
Date: Sun, 25 Oct 2026 23:48
Date: Sun, 25 Oct 2026 23:48
42 lines
3178 bytes
3178 bytes
On 2026-10-25, 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. > 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. It tends to be somewhat easy to get lost in misunderstandings even when using the very same language. So, if you're discussing threads and/or processes, explaining what do you mean by these two concepts at least ensures there's one less source of potential misunderstandings. With that in account, it's less than stellar not to answer. And then kind of pulling rank to do so... "Le langage est source de malentendus." -- Saint-Exupèry -- Nuno Silva
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 00:07
Date: Mon, 26 Oct 2026 00:07
23 lines
2411 bytes
2411 bytes
On 10/25/2026 4:06 PM, Scott Dorsey wrote: > 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 > > IIGS with some extra memory, and a HD, beat a Mac back in the say, iirc, Mac SE. The Mac iicx, or iise, well they were pretty fun.
Re: Re: “The end of software secrecy is almost upon
Author: Rich Alderson
Date: Mon, 26 Oct 2026 00:10
Date: Mon, 26 Oct 2026 00:10
26 lines
2186 bytes
2186 bytes
Lynn McGuire <lynnmcguire5@gmail.com> writes:
> 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.
The original Altair BASIC is only an interpreter; there is no compiler
available.
The interpreter requires 4K minimum to run.
The interpreter is assembled from source on a PDP-10 with at least 128K (and
preferably more) of 36 bit words,because it's implemented as local system call
macros in PDP-10 assembler.
Bill wrote the basic framework, Monte Davidoff wrote the transcendental math
functions, and Paul Allen wrote the PDP-10 code to do the assembly.
NB: I worked for Paul building Living Computers: Museum+Labs and working there
as an engineer from 2003-2018, then till 2020 when we closed due to the pandemic.
I've seen the original code, with named attributions.
--
Rich Alderson news@alderson.users.panix.com
Audendum est, et veritas investiganda; quam etiamsi non assequamur,
omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
--Galen
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 00:22
Date: Mon, 26 Oct 2026 00:22
582 lines
10905 bytes
10905 bytes
On 10/25/2026 1:56 PM, Michael S wrote:
> 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.
>
>
>
>
>
>
I tried to do a little something, no atomics, but, since I am able to
access comp.lang.c++ agai, lets see if I can find it:
https://groups.google.com/g/comp.lang.c/c/WPH7ed5uS4Y/m/ohiP-hUWkcAJ
Content:
___________________________________
________________________________________________________________
#if ! defined (CT_C11_THREADS_H_EMULATION_H)
# define CT_C11_THREADS_H_EMULATION_H 1
# if defined (__cplusplus)
extern "C"
{
# endif
#if defined (CT_C11_THREADS_H_PRINTF_LOG)
# include <stdio.h>
# define CT_C11_THREADS_H_PRINTF(mp_exp) printf mp_exp
#else
# define CT_C11_THREADS_H_PRINTF(mp_exp) ((void)(0))
#endif
#include <stdlib.h>
#include <pthread.h>
#include <assert.h>
typedef int (*ct_thrd_start_t) (void*);
struct ct_thrd_user
{
pthread_t ptid;
};
struct ct_thrd_sys
{
ct_thrd_start_t fp_user;
void* user_ctx;
int user_ret;
};
enum ct_thrd_sys_status
{
ct_thrd_success = 0,
ct_thrd_nomem = 1,
ct_thrd_timedout = 2,
ct_thrd_busy = 3,
ct_thrd_error = 4
};
/* low-level system threading API's
__________________________________________________________________*/
static struct ct_thrd_sys*
ct_thrd_sys_create(
ct_thrd_start_t fp_user,
void* user_ctx
);
static void
ct_thrd_sys_destroy(
struct ct_thrd_sys* const self
);
static void*
ct_thrd_sys_entry(
void* self_raw
);
struct ct_thrd_sys*
ct_thrd_sys_create(
ct_thrd_start_t fp_user,
void* user_ctx
){
struct ct_thrd_sys* const self = malloc(sizeof(*self));
if (self)
{
self->fp_user = fp_user;
self->user_ctx = user_ctx;
self->user_ret = 0;
}
CT_C11_THREADS_H_PRINTF(("ct_thrd_sys_create = %p\r\n", (void*)self));
return self;
}
void
ct_thrd_sys_destroy(
struct ct_thrd_sys* const self
){
free(self);
CT_C11_THREADS_H_PRINTF(
("ct_thrd_sys_destroy(self = %p)\r\n", (void*)self)
);
}
void*
ct_thrd_sys_entry(
void* self_raw
){
struct ct_thrd_sys* const self = self_raw;
CT_C11_THREADS_H_PRINTF(
("ct_thrd_sys_entry(self_raw = %p):Enter\r\n", self_raw)
);
self->user_ret = self->fp_user(self->user_ctx);
CT_C11_THREADS_H_PRINTF(
("ct_thrd_sys_entry(self_raw = %p):Exit = %p\r\n", self_raw,
(void*)self)
);
return self;
}
/* C11 emulation API layer
__________________________________________________________________*/
/* Threading API
______________________________________________________________*/
typedef struct ct_thrd_user ct_thrd_t;
static int
ct_thrd_create(
ct_thrd_t* uself,
ct_thrd_start_t fp_user,
void* user_ctx
);
static int
ct_thrd_join(
ct_thrd_t self,
int* user_retv
);
int
ct_thrd_create(
ct_thrd_t* uself,
ct_thrd_start_t fp_user,
void* user_ctx
){
struct ct_thrd_sys* const self =
ct_thrd_sys_create(fp_user, user_ctx);
if (self)
{
int status = pthread_create(&uself->ptid, NULL, ct_thrd_sys_entry,
self);
if (! status)
{
return ct_thrd_success;
}
ct_thrd_sys_destroy(self);
}
return ct_thrd_nomem;
}
int
ct_thrd_join(
ct_thrd_t self,
int* user_retv
){
void* ptjret = NULL;
pthread_join(self.ptid, &ptjret);
if (ptjret)
{
struct ct_thrd_sys* const self = ptjret;
if (user_retv)
{
*user_retv = self->user_ret;
}
ct_thrd_sys_destroy(self);
return ct_thrd_success;
}
return ct_thrd_error;
}
/* Thread Specific Storage API
______________________________________________________________*/
typedef pthread_key_t ct_tss_t;
typedef void(*ct_tss_dtor_t) (void*);
static int
ct_tss_create(
ct_tss_t* self,
ct_tss_dtor_t fp_user_dtor
);
static void
ct_tss_delete(
ct_tss_t self
);
static int
ct_tss_set(
ct_tss_t self,
void* user_ctx
);
#define ct_tss_get(mp_self) pthread_getspecific((mp_self))
int
ct_tss_create(
ct_tss_t* self,
ct_tss_dtor_t fp_user_dtor
){
int status = pthread_key_create(self, fp_user_dtor);
if (!status)
{
return ct_thrd_success;
}
return ct_thrd_error;
}
void
ct_tss_delete(
ct_tss_t self
){
int status = pthread_key_delete(self);
if (! status)
{
return;
}
assert(! status);
}
int
ct_tss_set(
ct_tss_t self,
void* user_ctx
){
int status = pthread_setspecific(self, user_ctx);
if (!status)
{
return ct_thrd_success;
}
return ct_thrd_error;
}
/* Mutex API
______________________________________________________________*/
typedef pthread_mutex_t ct_mtx_t;
enum {
ct_mtx_plain = 1,
ct_mtx_recursive = 2,
ct_mtx_timed = 4
};
int
ct_mtx_init(
ct_mtx_t* self,
int type
){
if (type == ct_mtx_plain)
{
int status = pthread_mutex_init(self, NULL);
if (! status)
{
return ct_thrd_success;
}
}
return ct_thrd_error;
}
void
ct_mtx_destroy(
ct_mtx_t* self
){
int status = pthread_mutex_destroy(self);
if (! status)
{
return;
}
assert(! status);
}
int
ct_mtx_lock(
ct_mtx_t* self
){
int status = pthread_mutex_lock(self);
if (! status)
{
return ct_thrd_success;
}
assert(! status);
return ct_thrd_error;
}
int
ct_mtx_unlock(
ct_mtx_t* self
){
int status = pthread_mutex_unlock(self);
if (!status)
{
return ct_thrd_success;
}
assert(! status);
return ct_thrd_error;
}
/* Mutex API
______________________________________________________________*/
typedef pthread_cond_t ct_cnd_t;
int
ct_cnd_init(
ct_cnd_t* self
){
int status = pthread_cond_init(self, NULL);
if (! status)
{
return ct_thrd_success;
}
return ct_thrd_error;
}
void
ct_cnd_destroy(
ct_cnd_t* self
){
int status = pthread_cond_destroy(self);
if (! status)
{
return;
}
assert(! status);
}
int
ct_cnd_signal(
ct_cnd_t* self
){
int status = pthread_cond_signal(self);
if (! status)
{
return ct_thrd_success;
}
assert(! status);
return ct_thrd_error;
}
int
ct_cnd_broadcast(
ct_cnd_t* self
){
int status = pthread_cond_broadcast(self);
if (! status)
{
return ct_thrd_success;
}
assert(! status);
return ct_thrd_error;
}
int
ct_cnd_wait(
ct_cnd_t* self,
ct_mtx_t* mtx
){
int status = pthread_cond_wait(self, mtx);
if (! status)
{
return ct_thrd_success;
}
assert(! status);
return ct_thrd_error;
}
/* Mock up the final C11 API with some macros... ;^o
______________________________________________________________*/
/* C11 threading API
_________________________________________________*/
#define thrd_success ct_thrd_success
#define thrd_nomem ct_thrd_nomem
#define thrd_timedout ct_thrd_timedout
#define thrd_busy ct_thrd_busy
#define thrd_error ct_thrd_error
#define thrd_t ct_thrd_t
#define thrd_create ct_thrd_create
#define thrd_join ct_thrd_join
/* C11 thread specific storage API
_________________________________________________*/
#define tss_t ct_tss_t
#define tss_create ct_tss_create
#define tss_delete ct_tss_delete
#define tss_set ct_tss_set
#define tss_get ct_tss_get
/* C11 mutex API
_________________________________________________*/
#define mtx_plain ct_mtx_plain
#define mtx_recursive ct_mtx_recursive
#define mtx_timed ct_mtx_timed
#define mtx_t ct_mtx_t
#define mtx_init ct_mtx_init
#define mtx_destroy ct_mtx_destroy
#define mtx_lock ct_mtx_lock
#define mtx_unlock ct_mtx_unlock
/* C11 condition variable API
_________________________________________________*/
#define cnd_t ct_cnd_t
#define cnd_init ct_cnd_init
#define cnd_destroy ct_cnd_destroy
#define cnd_signal ct_cnd_signal
#define cnd_broadcast ct_cnd_broadcast
#define cnd_wait ct_cnd_wait
# if defined (__cplusplus)
}
# endif
#endif
________________________________________________________________
This is in my personal coding style. I am sorry if it ends up pissing you
off!
;^o
Anyway, what do you think?
:^)
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 02:01
Date: Mon, 26 Oct 2026 02:01
58 lines
3934 bytes
3934 bytes
On 10/25/2026 1:37 AM, boltar@caprica.universe wrote: > 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: >>>> 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. > > Who mentioned C? I was talking about C++ which has a threading API already. > Do try and keep up. > So does C11.
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 02:03
Date: Mon, 26 Oct 2026 02:03
24 lines
2455 bytes
2455 bytes
On 10/25/2026 1:42 AM, boltar@caprica.universe wrote: > 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? 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?) > > With copy-on-write process models the actual difference is a bit less > clear cut. > Have you ever tried to sync up multiple processes each running multiple threads? When is the last time you used a robust mutex?
Re: “The end of software secrecy is almost upon
Author: Cryptoengineer
Date: Mon, 26 Oct 2026 02:54
Date: Mon, 26 Oct 2026 02:54
23 lines
2360 bytes
2360 bytes
On 10/25/2026 7:06 PM, Scott Dorsey wrote: > 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 I distinctly recall working with Sweet-16 on my ][+ back in the day, but can't recall the details. pt
Re: âThe end of software secrecy is almost upon
Author: Peter Flass
Date: Mon, 26 Oct 2026 02:54
Date: Mon, 26 Oct 2026 02:54
20 lines
2345 bytes
2345 bytes
On 10/25/26 13:43, Titus G wrote: > 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. But a lot less fun!
Re: ?The end of software secrecy is almost upon
Author: Jerry Brown
Date: Mon, 26 Oct 2026 07:59
Date: Mon, 26 Oct 2026 07:59
30 lines
2719 bytes
2719 bytes
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). -- Jerry Brown A cat may look at a king (but probably won't bother)
Re: “The end of software secrecy is almost upon
Author: boltar
Date: Mon, 26 Oct 2026 09:51
Date: Mon, 26 Oct 2026 09:51
27 lines
2104 bytes
2104 bytes
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.
Re: “The end of software secrecy is almost upon
Author: boltar
Date: Mon, 26 Oct 2026 09:54
Date: Mon, 26 Oct 2026 09:54
23 lines
2122 bytes
2122 bytes
On Sun, 25 Oct 2026 17:18:32 -0000 (UTC) cross@spitfire.i.gajendra.net (Dan Cross) gabbled: >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. :-) Oh please, try a bit harder. You can do anything you want in ring 0 assembler, that doesn't mean its a good idea.
Re: “The end of software secrecy is almost upon
Author: boltar
Date: Mon, 26 Oct 2026 09:59
Date: Mon, 26 Oct 2026 09:59
32 lines
2808 bytes
2808 bytes
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.
Re: Re: “The end of software secrecy is almost upon
Author: boltar
Date: Mon, 26 Oct 2026 10:01
Date: Mon, 26 Oct 2026 10:01
31 lines
2807 bytes
2807 bytes
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.
Re: Re: “The end of software secrecy is almost upon
Author: boltar
Date: Mon, 26 Oct 2026 10:02
Date: Mon, 26 Oct 2026 10:02
13 lines
1871 bytes
1871 bytes
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?
Re: ?The end of software secrecy is almost upon
Author: Dan Cross
Date: Mon, 26 Oct 2026 10:33
Date: Mon, 26 Oct 2026 10:33
35 lines
2405 bytes
2405 bytes
In article <5e1udl9hs8733aqpjenq0vk71v3pn25q8n@jwbrown.co.uk>, Jerry Brown <jerry@jwbrown.co.uk.invalid> wrote: >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 sounds like VM/ESA, all right. Command list `LIST` and `TYPE` and a three-field file name relative to a "minidisk"? REXX was the "usual" scripting language. VM was kind of neat. - Dan C.
Re: “The end of software secrecy is almost upon
Author: Scott Dorsey
Date: Mon, 26 Oct 2026 13:50
Date: Mon, 26 Oct 2026 13:50
9 lines
1188 bytes
1188 bytes
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. --scott -- "C'est un Nagra. C'est suisse, et tres, tres precis."
Re: “The end of software secrecy is almost upon
Author: Scott Lurndal
Date: Mon, 26 Oct 2026 14:41
Date: Mon, 26 Oct 2026 14:41
44 lines
3107 bytes
3107 bytes
boltar@caprica.universe writes: >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. > 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.
Re: “The end of software secrecy is almost upon
Author: boltar
Date: Mon, 26 Oct 2026 16:16
Date: Mon, 26 Oct 2026 16:16
33 lines
2537 bytes
2537 bytes
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.
Re: “The end of software secrecy is almost upon
Author: Dan Cross
Date: Mon, 26 Oct 2026 16:58
Date: Mon, 26 Oct 2026 16:58
14 lines
1531 bytes
1531 bytes
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. - Dan C.
Re: “The end of software secrecy is almost upon
Author: Blaine
Date: Mon, 26 Oct 2026 19:10
Date: Mon, 26 Oct 2026 19:10
26 lines
2546 bytes
2546 bytes
boltar@caprica.universe wrote: > 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? > 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. -- Can you strip away so we may start again? "There’s a switch and they don't seem authentic or themselves. It feels like I’m an unnecessary body and it’s a waste of time to even be there." -- Grim, playful Blaine.
Re: “The end of software secrecy is almost upon
Author: Scott Dorsey
Date: Mon, 26 Oct 2026 19:32
Date: Mon, 26 Oct 2026 19:32
19 lines
1638 bytes
1638 bytes
Dan Cross <cross@spitfire.i.gajendra.net> wrote: >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. On the 8051 there is only one ring. It is like Middle Earth in that regard. It does have an atomic test and set instruction, though, which is more than I can say for some machines. --scott -- "C'est un Nagra. C'est suisse, et tres, tres precis."
Re: “The end of software secrecy is almost upon
Author: Titus G
Date: Mon, 26 Oct 2026 19:43
Date: Mon, 26 Oct 2026 19:43
8 lines
1805 bytes
1805 bytes
On 27/10/2026 08:10, Blaine wrote: > 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. What a laugh. You are the clown replying to Starmaker.
Re: “The end of software secrecy is almost upon
Author: Michael S
Date: Mon, 26 Oct 2026 19:45
Date: Mon, 26 Oct 2026 19:45
54 lines
3449 bytes
3449 bytes
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 by mistake. But then, I don't write complicated apps on "big" computers day in day out.
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 20:03
Date: Mon, 26 Oct 2026 20:03
44 lines
3312 bytes
3312 bytes
On 10/26/2026 3:01 AM, 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. Afaict, its not useless. > 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.
Re: “The end of software secrecy is almost upon
Author: Michael S
Date: Mon, 26 Oct 2026 20:04
Date: Mon, 26 Oct 2026 20:04
49 lines
3254 bytes
3254 bytes
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC) boltar@caprica.universe wrote: > 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. > 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?" Sometimes the answer is "because functionality is not available otherwise". But more often functonality is available in native OS API. Not just that, typically functionality of native APIs is better than one of standard language library. So, what is the other reason? It is portability at source level + "learn once use everywhere". Here system() fails. That is, the function is the same everywhere, but string argument is OS-dependent. So, system() may be achieves functionality, but does not really help portability.
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 20:05
Date: Mon, 26 Oct 2026 20:05
35 lines
3168 bytes
3168 bytes
On 10/26/2026 2:59 AM, boltar@caprica.universe wrote: > 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. > 3 level locking? What do you mean?
Re: “The end of software secrecy is almost upon
Author: Michael S
Date: Mon, 26 Oct 2026 20:09
Date: Mon, 26 Oct 2026 20:09
45 lines
3292 bytes
3292 bytes
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC) 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.
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 20:12
Date: Mon, 26 Oct 2026 20:12
241 lines
7877 bytes
7877 bytes
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 by mistake.
> But then, I don't write complicated apps on "big" computers day in day
> out.
Still don't really know what he means by 3 level locking. Using lock
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.
(google groups wrt usenet seems to be back up now)
https://groups.google.com/g/comp.lang.c++/c/sV4WC_cBb9Q/m/SkSqpSxGCAAJ
some of my old relacy code:
#include <relacy/relacy.hpp>
#include <cstdio>
#include <cstddef>
#include <cstdlib>
#include <string>
#include <vector>
#if ! defined (NDEBUG)
# define CT_DBG_PRINTF(e) std::printf e
#else
# define CT_DBG_PRINTF(e) ((void)0)
#endif
#define CT_THREADS (5)
#define CT_MUTEX_TABLE_N (64)
struct ct_mutex_table
{
rl::mutex m_mutexs[CT_MUTEX_TABLE_N];
std::size_t
hash_ptr(
void* p
) const {
return rl::hash_ptr(p, CT_MUTEX_TABLE_N);
}
};
struct ct_thread_mutex_hash
{
std::vector<std::size_t> m_hashed_idxs;
// must be before any locks!
void finalize()
{
std::sort(
m_hashed_idxs.begin(),
m_hashed_idxs.end());
m_hashed_idxs.erase(
std::unique(
m_hashed_idxs.begin(),
m_hashed_idxs.end()),
m_hashed_idxs.end());
}
// BEFORE WE CALL, WE NEED TO sort and dedup before this.
void
lock(
ct_mutex_table& mutex_table
) {
for (auto& mtx_idx : m_hashed_idxs)
{
rl::mutex& mtx = mutex_table.m_mutexs[mtx_idx];
mtx.lock($);
}
}
// does not really even need to be reversed...
void
unlock(
ct_mutex_table& mutex_table
) {
for (auto& mtx_idx : m_hashed_idxs)
{
rl::mutex& mtx = mutex_table.m_mutexs[mtx_idx];
mtx.unlock($);
}
}
};
struct ct_state
{
ct_mutex_table m_mutex_table;
VAR_T(int) m_var_0 = 0;
VAR_T(int) m_var_1 = 1;
VAR_T(int) m_var_2 = 2;
void worker_thread_a()
{
ct_thread_mutex_hash self_hash;
self_hash.m_hashed_idxs.push_back(
m_mutex_table.hash_ptr(&m_var_0));
self_hash.m_hashed_idxs.push_back(
m_mutex_table.hash_ptr(&m_var_1));
self_hash.finalize();
self_hash.lock(m_mutex_table);
VAR(m_var_0) = 42;
VAR(m_var_1) = 128;
self_hash.unlock(m_mutex_table);
}
void worker_thread_b()
{
ct_thread_mutex_hash self_hash;
// Seed!
{
self_hash.m_hashed_idxs.push_back(
m_mutex_table.hash_ptr(&m_var_1));
self_hash.m_hashed_idxs.push_back(
m_mutex_table.hash_ptr(&m_var_0));
}
// Okay... Finalize it...
{
self_hash.finalize();
}
// Finally, we can lock the bastard!
{
self_hash.lock(m_mutex_table);
{
VAR(m_var_0) = 99;
VAR(m_var_1) = 77;
}
self_hash.unlock(m_mutex_table);
}
}
};
struct ct_multex_relacy_test_v000
: rl::test_suite<ct_multex_relacy_test_v000, CT_THREADS>
{
ct_state m_state = { };
void before()
{
// not sure to init m_state here. Is it already init?
}
void
thread(
unsigned tidx
) {
if (tidx == 0)
m_state.worker_thread_a();
else
m_state.worker_thread_b();
}
};
int main(int argc, char** argv)
{
{
rl::test_params p;
p.iteration_count = argc > 1 ? (unsigned)atoi(argv[1]) : 100000;
p.execution_depth_limit = 100000;
if (argc > 2) {
std::string m = argv[2];
if (m == "full") p.search_type = rl::sched_full;
else if (m == "bound") { p.search_type = rl::sched_bound;
p.context_bound = argc > 3 ? atoi(argv[3]) : 2; }
}
rl::simulate<ct_multex_relacy_test_v000>(p);
}
return 0;
}
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 20:20
Date: Mon, 26 Oct 2026 20:20
18 lines
2250 bytes
2250 bytes
On 10/26/2026 3:02 AM, boltar@caprica.universe wrote: > 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? > My point is that you seem to be daft on these issues. Are you trolling?
Re: “The end of software secrecy is almost upon
Author: Michael S
Date: Mon, 26 Oct 2026 20:40
Date: Mon, 26 Oct 2026 20:40
68 lines
4247 bytes
4247 bytes
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) > > 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. > Still don't really know what he means by 3 level locking. Using lock > 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.
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Mon, 26 Oct 2026 20:44
Date: Mon, 26 Oct 2026 20:44
66 lines
4425 bytes
4425 bytes
On 10/26/2026 1:40 PM, Michael S wrote: > 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) >>> 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. >> Still don't really know what he means by 3 level locking. Using lock >> 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. Ahhh! I call that a read/write mutex. Okay.
Re: “The end of software secrecy is almost upon
Author: Lynn McGuire
Date: Mon, 26 Oct 2026 22:08
Date: Mon, 26 Oct 2026 22:08
63 lines
3948 bytes
3948 bytes
On 10/23/2026 11:06 AM, Peter Flass wrote: > 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>, <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. > > From what I understand, he wasn't a very good programmer, though. https://www.joelonsoftware.com/2006/06/16/my-first-billg-review/ "Then I sat down to write the Excel Basic spec, a huge document that grew to hundreds of pages. I think it was 500 pages by the time it was done. (“Waterfall,” you snicker; yeah yeah shut up.)" "In my BillG review meeting, the whole reporting hierarchy was there, along with their cousins, sisters, and aunts, and a person who came along from my team whose whole job during the meeting was to keep an accurate count of how many times Bill said the F word. The lower the f***-count, the better." "… and THERE WERE NOTES IN ALL THE MARGINS. ON EVERY PAGE OF THE SPEC. HE HAD READ THE WHOLE GODDAMNED THING AND WRITTEN NOTES IN THE MARGINS." He Read The Whole Thing! [OMG SQUEEE!] I turned down an unsolicited job at Microsoft in 1987. In retrospect, it may have been a bad decision. Then again, BillG seems to be a crazy overseer from the latest reports. Lynn
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Tue, 27 Oct 2026 02:20
Date: Tue, 27 Oct 2026 02:20
34 lines
2930 bytes
2930 bytes
On 10/25/2026 8:56 AM, Scott Lurndal wrote: > 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. POSIC, bow down, even way before C11. It still can be used, and is very nice.
Re: “The end of software secrecy is almost upon
Author: Chris M. Thomasson
Date: Tue, 27 Oct 2026 03:44
Date: Tue, 27 Oct 2026 03:44
84 lines
5403 bytes
5403 bytes
On 10/25/2026 2:45 AM, David Brown wrote: > 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 <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. >> > > No one is suggesting that the threads themselves are implemented in > pure, standard, portable C++. 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++. Suppose you have a global (i.e., external > linkage) variable : > > int x; > > Two threads that have "int a = x;" see the same "x" (ignoring data races > and synchronisation). 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.
Page 5 of 7 • 313 total messages
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads