🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.rust
514 messages
514 total messages Page 10 of 11 Started by Lynn McGuire Wed, 14 Oct 2026 04:18
Page 10 of 11 • 514 total messages
Re: “The end of software secrecy is almost upon us”
#471
Author: Lawrence D’Oliveiro
Date: Tue, 27 Oct 2026 05:56
43 lines
3950 bytes
On Mon, 26 Oct 2026 19:51:23 -0700, Chris M. Thomasson wrote:

> On 10/23/2026 8:39 PM, Lawrence D’Oliveiro 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 “development” packages versus “runtime”
>> 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 haven’t 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 isn’t even in the same league, is it.
Re: “The end of software secrecy is almost upon us”
#456
Author: Charlie Gibbs
Date: Sat, 31 Oct 2026 04:14
20 lines
2284 bytes
On 2026-10-30, Lawrence D’Oliveiro <ldo@nz.invalid> wrote:

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

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Re: “The end of software secrecy is almost upon us”
#457
Author: Lawrence D’Oliveiro
Date: Sat, 31 Oct 2026 05:37
32 lines
3368 bytes
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.

Here’s 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).

I’m 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.
Re: Re: “The end of software secrecy is almost upon
#458
Author: boltar
Date: Sat, 31 Oct 2026 09:38
30 lines
2917 bytes
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  <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!

If its multithreaded but that still happens someone probably has created too
many critical sections with too many locks.
Re: “The end of software secrecy is almost upon
#460
Author: boltar
Date: Sat, 31 Oct 2026 09:45
30 lines
2418 bytes
On Fri, 30 Oct 2026 22:35:05 -0000 (UTC)
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> gabbled:
>The trend nowadays is to revive the old coroutine concept, in a new
>guise called “stackless” coroutines. These give you support for async
>operations, but with transfers of control being made explicit at
>“await” points, rather than unpredictably as with full preemptive
>threading. This greatly reduces the opportunity for race conditions.

Coroutines are just a complicated way to re-implement a function with a load
of statics.

eg:

void myfunc()
{
	static int i = 0;
	for(;;++i)
	{
		[do something based on value of i]
		[return when some condition met]
	}
}

Also the C++ implementation is so bad its unusable.

>Credit to Microsoft for pioneering this, but nowadays you see the idea
>popping up in JavaScript and Python and who knows where else.

Python nailed it - you just call "yield", job done.
Re: “The end of software secrecy is almost upon
#459
Author: boltar
Date: Sat, 31 Oct 2026 09:47
13 lines
2282 bytes
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> gabbled:
>Here’s 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.
Re: “The end of software secrecy is almost upon
#461
Author: Michael S
Date: Sat, 31 Oct 2026 17:56
24 lines
2641 bytes
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 =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> gabbled:
> >Here’s 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 

On what planet?

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

Re: “The end of software secrecy is almost upon us"
#462
Author: anthk
Date: Sat, 31 Oct 2026 18:02
23 lines
2129 bytes
Lynn McGuire wrote:
> “The end of software secrecy is almost upon us. The death of closed 
> source, and the final triumph of open source. ” -Eric S. Raymond.
>     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.  Why do I
> doubt
> this even though ESR says otherwise?
> 
> And he has a translator from Borland Pascal to Rust?
> 
> Lynn
> 

ESR it's using AI.
Re: “The end of software secrecy is almost upon
#463
Author: Chris M. Thomasson
Date: Sat, 31 Oct 2026 20:11
37 lines
3300 bytes
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  <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!
> 
> 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?
Re: “The end of software secrecy is almost upon
#464
Author: Chris M. Thomasson
Date: Sat, 31 Oct 2026 20:14
278 lines
8516 bytes
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  <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!
> 
> 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:





So, I have the most recent version and coded up my old multex algo. It 
100% dead lock free and allows a thread to locks multiple objects in any 
order and lock them. All of the lock ordering is taken care of in the 
finalize function. Basically a thread seeds its per thread lock indices 
with addresses to objects it wants to lock. Calls finalize, then locks 
them. Does its thing and then unlocks them. Fwiw, here is my Relacy test 
output:

struct ct_multex_relacy_test_v000
65% (65536/100000)
iterations: 100000
total time: 9390
throughput: 10649


D:\ct_dev\ct_msvc\projects\ct_relacy_test\x64\Debug\ct_relacy_test.exe 
(process 13356) exited with code 0 (0x0).
Press any key to close this window . . .


Any my 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;
}



/*
#include <relacy/relacy.hpp>
#include <iostream>


int
main()
{
     std::cout << "ct_relacy_test\n";
     std::cout << "____________________________________________" << 
std::endl;

     {

     }

     std::cout << "____________________________________________" << 
std::endl;
     std::cout << "ct_relacy_test fin! :^)\n";

     return 0;
}

*/


Re: “The end of software secrecy is almost upon
#465
Author: boltar
Date: Sun, 01 Nov 2026 08:32
22 lines
2539 bytes
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
>> >initiated, and you can monitor its subsequent progress from your
>> >event loop. =20
>>=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.
Re: Re: “The end of software secrecy is almost upon
#466
Author: boltar
Date: Sun, 01 Nov 2026 08:33
43 lines
3398 bytes
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  <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!
>> 
>> 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.
Re: Re: “The end of software secrecy is almost upon
#467
Author: boltar
Date: Sun, 01 Nov 2026 08:34
22 lines
2329 bytes
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
Re: “The end of software secrecy is almost upon us”
#468
Author: Charlie Gibbs
Date: Sun, 01 Nov 2026 19:40
45 lines
3649 bytes
On 2026-10-31, Lawrence D’Oliveiro <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.
>
> Here’s 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).
>
> I’m 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.

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Re: “The end of software secrecy is almost upon
#469
Author: Michael S
Date: Sun, 01 Nov 2026 19:59
32 lines
3037 bytes
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
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 initiated, and you can monitor its subsequent
> >> >progress from your event loop. =20  
> >>=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.
> 

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.
Re: “The end of software secrecy is almost upon
#470
Author: Johann 'Myrkraverk' Oskarsson
Date: Sun, 01 Nov 2026 22:17
21 lines
2548 bytes
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?  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!
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: Structured Programming (was Re: “The end of software secrecy is almost upon us”)
#473
Author: Lawrence D’Oliveiro
Date: Sun, 01 Nov 2026 23:38
142 lines
6857 bytes
Anyway, to get the discussion back on track:

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.

Problems I am trying to address:

  * Leaking memory: allocating something and forgetting to dispose of
    it
  * Double-free: the opposite problem, trying to free a memory block
    that has already been freed

The basic structured-programming pattern I follow is:

  1: Initialize a pointer variable to `NULL`
  2: Allocate memory for the pointer (this might fail)
  3: Correctly free the pointer memory, regardless of allocation
     success/failure

This project uses the implementation of a Python extension module as a
specific example, since Python itself is a highly dynamic language,
and so code that is written in a lower-level-language like C for
interfacing to Python typically has to deal a lot with allocation and
management of Python objects and other dynamic memory.

In more concrete terms, the code pattern looks like this:

    PyObject * obj = NULL; /* step 1 */
    do /*once*/
      {
        ... possible other stuff ...
        allocate obj; /* step 2 */
        if (PyErr_Occurred())
            break;
        ... possible other stuff using obj ...
      }
    while (false);
    Py_XDECREF(obj); /* step 3 */

Assuming there are no `goto`s in the “...” parts (or `return`
statements, or shenanigans like `setjmp`(3)/`longjmp`(3)), it should
be clear that, regardless of what happens in those parts (provided
they don’t free or reallocate `obj`), any memory allocated to `obj`
will be correctly freed.

Key to this pattern is the fact that `Py_XDECREF` is a noop (and
raises no error) if it is passed a `NULL` pointer. This is also the
semantics of the `free`(3) routine in the C standard library, and I
recommend that any memory-disposal routine you create implement the
same behaviour. It saves checking for unallocated storage in the
cleanup code: just unconditionally dispose of everything temporary
that might have been allocated.

The above basic structure scales easily. For example, coping with
multiple objects needing allocating:

    PyObject * obj1 = NULL;
    PyObject * obj2 = NULL;
    do /*once*/
      {
        ... possible other stuff ...
        allocate obj1;
        if (PyErr_Occurred())
            break;
        ... possible other stuff using obj1 ...
        allocate obj2;
        if (PyErr_Occurred())
            break;
        ... possible other stuff using obj1 and obj2 ...
      }
    while (false);
    Py_XDECREF(obj1);
    Py_XDECREF(obj2);

Nested blocks:

    PyObject * obj1 = NULL;
    do /*once*/
      {
        ... possible other stuff ...
        allocate obj1;
        if (PyErr_Occurred())
            break;
        ... possible other stuff using obj1 ...
          {
            PyObject * obj2 = NULL;
            do /*once*/
              {
                ... even more possible stuff using obj1 ...
                allocate obj2;
                if (PyErr_Occurred())
                    break;
                ... possible other stuff using obj1 and obj2 ...
              }
            while (false);
            Py_XDECREF(obj2);
          }
        if (PyErr_Occurred())
            break;
        ... yet more possible stuff using obj1 ...
      }
    while (false);
    Py_XDECREF(obj1);

Allocation within loops:

    for (ssize_t i = 0;;)
      {
        if (i == nr_items)
            break;
        PyObject * const item = PyTuple_GetItem(items, i);
        if (item == NULL)
            break;
          {
            PyObject * key = NULL;
            PyObject * value = NULL;
            do /*once*/
              {
                ... construct key ...
                if (PyErr_Occurred())
                    break;
                ... construct value ...
                if (PyErr_Occurred())
                    break;
                if (PyDict_SetItem(tempresult, key, value) < 0)
                    break;
              }
            while (false);
            Py_XDECREF(key);
            Py_XDECREF(value);
          }
        if (PyErr_Occurred())
            break;
        ++i;
      } /*for*/
    if (PyErr_Occurred())
        break;

Etc, etc.
Re: “The end of software secrecy is almost upon
#472
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 02:03
49 lines
3827 bytes
On 11/1/2026 1:33 AM, boltar@caprica.universe wrote:
> 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  <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!
>>>
>>> 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.
> 

Ummm. I think you are the one that does not know what the heck they are 
talking about.
Re: “The end of software secrecy is almost upon
#474
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 02:04
30 lines
2861 bytes
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?

> 
>> 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
> 
Re: “The end of software secrecy is almost upon us"
#475
Author: Bonita Montero
Date: Mon, 02 Nov 2026 09:30
29 lines
3137 bytes
Am 14.10.2026 um 06:18 schrieb Lynn McGuire:
> “The end of software secrecy is almost upon us. The death of closed 
> source, and the final triumph of open source. ” -Eric S. Raymond.
>     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.  Why do I doubt 
> this even though ESR says otherwise?
> 
> And he has a translator from Borland Pascal to Rust?
I have provided Claude Code with snippets of code—roughly a screen's
worth in length—on several occasions. At times, it flagged errors that
weren't actually errors at all.
It is quite possible that AI has reached a point where it can
effectively translate small blocks of assembly code into high-level
programming languages. However, based on my own experience with high-
level code, I am skeptical that this would work well for larger, more
complex applications.
There are already AI-assisted tools for converting COBOL to Java, but
even then, a developer must review the entire codebase afterward, as
the conversion is never 100% accurate.
Given this, I consider it unlikely that the process will perform any
better in the long run.
Re: The end of software secrecy is almost upon
#476
Author: Rosario19
Date: Mon, 02 Nov 2026 09:54
9 lines
1873 bytes
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
Re: The end of software secrecy is almost upon
#477
Author: Rosario19
Date: Mon, 02 Nov 2026 09:58
26 lines
2405 bytes
On Tue, 20 Oct 2026 16:40:47 -0400, Cryptoengineer wrote:

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

no it is the right code easy to understand
comment can be avoid if someone use meaning varible (even if one char
b= buffer, b=binary b=ebx ecc)

>Fixed That For You.
>
>pt
>
Re: The end of software secrecy is almost upon
#481
Author: Fred. Zwarts
Date: Mon, 02 Nov 2026 10:11
15 lines
2181 bytes
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.
Re: “The end of software secrecy is almost upon
#480
Author: boltar
Date: Mon, 02 Nov 2026 15:43
15 lines
2255 bytes
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.
Re: Re: “The end of software secrecy is almost upon
#478
Author: boltar
Date: Mon, 02 Nov 2026 15:44
15 lines
2154 bytes
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.
Re: Re: “The end of software secrecy is almost upon
#479
Author: boltar
Date: Mon, 02 Nov 2026 15:45
25 lines
2744 bytes
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.
Re: The end of software secrecy is almost upon
#482
Author: Charlie Gibbs
Date: Mon, 02 Nov 2026 16:51
28 lines
2340 bytes
On 2026-11-02, Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:

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

Unfortuately, a lot of people (especially CS weenies) love to
loudly proclaim, "My code is so readable that no comments are
necessary!"  (Sometimes they apply this argument to their choice
of programming language as well.)  They're usually wrong.

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Re: “The end of software secrecy is almost upon
#483
Author: Charlie Gibbs
Date: Mon, 02 Nov 2026 16:51
32 lines
2629 bytes
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?

My Win32 code does accept multiple incoming connections on the same
port number, but each one gets its own socket.  And to get back on
thread (ahem), it uses a single thread with nonblocking sockets.

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Re: The end of software secrecy is almost upon
#485
Author: Lawrence D’Oliveiro
Date: Mon, 02 Nov 2026 20:06
7 lines
1971 bytes
On Mon, 02 Nov 2026 16:51:46 GMT, Charlie Gibbs wrote:

> Unfortuately, a lot of people (especially CS weenies) love to loudly
> proclaim, "My code is so readable that no comments are necessary!"

Wasn’t that the argument made by the “business” users for COBOL? That
the language was practically English anyway ... ?
Re: “The end of software secrecy is almost upon
#484
Author: Michael S
Date: Mon, 02 Nov 2026 21:46
39 lines
3462 bytes
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.

Re: “The end of software secrecy is almost upon
#486
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 22:33
32 lines
3115 bytes
On 11/2/2026 7:45 AM, boltar@caprica.universe wrote:
> 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.
> 

The code is not all that complicated?
Re: “The end of software secrecy is almost upon
#487
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 22:34
21 lines
2546 bytes
On 11/2/2026 7:44 AM, boltar@caprica.universe wrote:
> 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.
> 

So you know what you wrote is odd wrt using too many mutexes? You 
snipped it out.
Re: “The end of software secrecy is almost upon
#488
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 22:54
22 lines
2654 bytes
On 11/1/2026 2:17 PM, Johann 'Myrkraverk' Oskarsson wrote:
> 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?  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.

I think so.


> 
> 
> Best wishes, and happy standards!
Re: “The end of software secrecy is almost upon
#489
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 22:59
25 lines
2904 bytes
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
>>>> initiated, and you can monitor its subsequent progress from your
>>>> event loop. =20
>>> =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?
Re: “The end of software secrecy is almost upon
#490
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 23:00
18 lines
2589 bytes
On 11/2/2026 7:43 AM, 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.
> 

Ever use Nt say 4.0? IOCP?
Re: “The end of software secrecy is almost upon
#491
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 23:02
44 lines
3824 bytes
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.
> 
> 

Well, before IOCP we would need to use WaitForMultipleObjects, iirc. But 
there was a trick we had to use. We had to alter the indices! Shift 
them, or even randomize them.
Re: “The end of software secrecy is almost upon
#492
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 23:03
42 lines
3685 bytes
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?
Re: “The end of software secrecy is almost upon us”
#493
Author: Chris M. Thomasson
Date: Mon, 02 Nov 2026 23:06
49 lines
4254 bytes
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
> On 2026-10-31, Lawrence D’Oliveiro <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.
>>
>> Here’s 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).
>>
>> I’m 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.
> 

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
Re: “The end of software secrecy is almost upon us”
#494
Author: Charlie Gibbs
Date: Tue, 03 Nov 2026 02:42
31 lines
2558 bytes
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.

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Re: “The end of software secrecy is almost upon us”
#495
Author: Chris M. Thomasson
Date: Tue, 03 Nov 2026 05:09
30 lines
3094 bytes
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.
> 

Well, on Linux we have aio or io_uring. The latter is more low level 
than the Windows IOCP.
Re: “The end of software secrecy is almost upon us”
#496
Author: Chris M. Thomasson
Date: Tue, 03 Nov 2026 05:11
30 lines
3125 bytes
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?
Re: “The end of software secrecy is almost upon us”
#497
Author: Charlie Gibbs
Date: Tue, 03 Nov 2026 07:15
43 lines
3268 bytes
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.

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Re: “The end of software secrecy is almost upon
#499
Author: Michael S
Date: Tue, 03 Nov 2026 19:51
52 lines
4001 bytes
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.

Re: “The end of software secrecy is almost upon
#500
Author: Chris M. Thomasson
Date: Tue, 03 Nov 2026 21:10
58 lines
4310 bytes
On 11/3/2026 11:51 AM, Michael S wrote:
> 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.
> 

Are you suggesting that IOCP is useless? What about AIO or io_uring? AIO 
is basically IOCP anyway. io_uring is special, but still uses a 
"completion" setup.

Re: “The end of software secrecy is almost upon
#498
Author: boltar
Date: Wed, 04 Nov 2026 08:48
29 lines
2765 bytes
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.
Re: “The end of software secrecy is almost upon
#501
Author: boltar
Date: Wed, 04 Nov 2026 08:54
26 lines
2871 bytes
On Mon, 2 Nov 2026 23:46:58 +0200
Michael S <already5chosen@yahoo.com> gabbled:
>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*. 

Yes, for some bizarre reason MS implemented the userspace sockets as some
kind of handle instead of an integer file descriptor like every other sockets
library.

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

Depends on the use case.
Re: Re: “The end of software secrecy is almost upon
#502
Author: boltar
Date: Wed, 04 Nov 2026 08:54
31 lines
2971 bytes
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 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
>>>> =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.
Re: “The end of software secrecy is almost upon
#503
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:22
39 lines
3404 bytes
On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
> 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 
>>>>>> 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
>>>>> =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.
> 

Really? Why do you have a hatred for say, IOCP? If so, you must also 
HATE AIO, or io_uring?
Re: “The end of software secrecy is almost upon
#504
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:24
43 lines
3498 bytes
On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
> 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 
>>>>>> 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
>>>>> =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.
> 

Before you listen to this, be sure to not in a mood to get really pissed 
off:

https://youtu.be/mrKKBBUQnYg

;^) too late. Your fate of windows is misguided. It has some fun things.
Re: “The end of software secrecy is almost upon
#505
Author: Jeroen Belleman
Date: Wed, 04 Nov 2026 10:24
38 lines
3377 bytes
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.

Like, search for "unix select", or something?

Jeroen Belleman
Page 10 of 11 • 514 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