🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.c++
529 messages
529 total messages Page 11 of 11 Started by Lynn McGuire Wed, 14 Oct 2026 04:18
Page 11 of 11 • 529 total messages
Re: “The end of software secrecy is almost upon
#660
Author: Chris M. Thomasson
Date: Tue, 03 Nov 2026 21:10
58 lines
4189 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
#661
Author: boltar
Date: Wed, 04 Nov 2026 08:48
29 lines
2644 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
#662
Author: boltar
Date: Wed, 04 Nov 2026 08:54
26 lines
2750 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
#663
Author: boltar
Date: Wed, 04 Nov 2026 08:54
31 lines
2850 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
#665
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:22
39 lines
3283 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
#664
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:24
43 lines
3377 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
#666
Author: Jeroen Belleman
Date: Wed, 04 Nov 2026 10:24
38 lines
3256 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
Re: “The end of software secrecy is almost upon
#667
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:34
46 lines
3744 bytes
On 10/27/2026 8:03 AM, Scott Lurndal wrote:
> cross@spitfire.i.gajendra.net (Dan Cross) writes:
>> In article <20261027102255.00006052@yahoo.com>,
>> Michael S  <already5chosen@yahoo.com> wrote:
>>> On Tue, 27 Oct 2026 09:06:26 +0100
>>> David Brown <david.brown@hesbynett.no> wrote:
>>>> [snip]
>>>> And there are languages like Erlang that divide everything into
>>>> micro-processes, and use the same mechanisms for controlling and
>>>> passing data around regardless of whether this little processes are
>>>> in the same thread, or different threads, different OS processes, or
>>>> different computers.  That works because there are very narrow and
>>>> tightly controlled mechanisms for sharing data.
>>>>
>>>> Note that these are both languages that run on a VM, not compiled
>>>> languages.
>>>
>>> What you wrote about Erlang resembles MPI, which of course is readily
>>> available for many compiled or jitted languages, including Fortran, C
>>> and C++.
>>> I tried to utilize MPI 20 years ago, but the thinking behind it is to
>>> different from mine, so I ran away in horror.
>>
>> Erlang uses the "actor" model to represent concurrency; state is
>> held by each actor, and actors communicate via message passing,
>> potentially changing state in response to messages.  This is a
>> model for _concurrency_, in which multiple independent threads
>> of execution are coordinated to some in a single system.
> 
> Chorus (the microkernel) worked in a similar fashion.   The
> microkernel coordinated between actors using message passing.
> 
> The actors implemented the higher level operating system
> functionality.   The Amadeus project, for example, implemented
> a version of unix on top of the microkernel using message
> passing between actors (The Object manager handled files and
> filesystems, the Process actor handled the POSIX process
> and thread (SVR4.2ES/MP threads) interfaces including fork,
> and light-weight processes that implemented threads, and
> the Streams actor provide system V streams support and
> networking.
> 
> Unisys released the OS as part of their massively parallel
> OPUS computer system.

There are many ways to handle proper sync in multiprocess systems. Indeed.
Re: “The end of software secrecy is almost upon us”
#668
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:36
46 lines
4080 bytes
On 10/26/2026 10:56 PM, Lawrence D’Oliveiro wrote:
> 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.

Windows is there. :^D
Re: “The end of software secrecy is almost upon
#670
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:38
7 lines
1958 bytes
On 10/22/2026 12:20 AM, David Brown wrote:
[...]
> For the particular case of why C++ supports threads but not processes, 
> the answer should be obvious.

Indeed!
Re: “The end of software secrecy is almost upon
#669
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:48
41 lines
3735 bytes
On 10/27/2026 11:36 AM, Scott Lurndal wrote:
> Peter Flass <Peter@Iron-Spring.com> writes:
>> On 10/27/26 08:00, James Kuyper wrote:
>>> On 2026-10-26 17:45, Lawrence D’Oliveiro wrote:
>>>> On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:
>>> [restore snippage]>> On 2026-10-25 23:39, Lawrence D’Oliveiro wrote:
>>>>>> On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
>>>>>>
>>>>>>> A caller provided buffer is normal with a lot of API's out there.
>>>>>>
>>>>>> No it isn’t. It’s not a good way to manage things, anyway: instead of
>>>>>> solving the resource-allocation problem once and for all in the
>>>>>> library API, you are pushing the burden onto all the client code, each
>>>>>> one of which has to solve it for itself.
>>>>>>
>>>>>> That’s a dumb way to design things.
>>>
>>>>> HUH? How do you call say, fread without a user provided buffer?
>>>>
>>>> Relevance being?
>>>
>>> fread() uses a caller-provided buffer, which, according to your previous
>>> comment, "push[es] the burden onto all the client code, each one of
>>> which has to solve it for itself", so according to you, "That's a dumb
>>> way to design things"..If that isn't your actual opinion of fread(),
>>> your comments need to be at least a little more nuanced to avoid
>>> applying to fread().
>>
>> The difference is that the size of the buffer for fread() is the maximum
>> you want/expect to read. The size of an object is the size it is, not
>> necessarily what you expect. If you don't provide enough space you will
>> truncate.
> 
> Which isn't a significant issue with fread, since the underlying stdio
> buffer (or kernel file cache or terminal driver buffer) will hold the
> unread information for the next call to fread.
> 
> fread(3) is basically obsolete for most high-performance applications
> which map the file directly into the process address space (mmap).

Ditto.
Re: Re: “The end of software secrecy is almost upon
#671
Author: boltar
Date: Wed, 04 Nov 2026 16:22
14 lines
2130 bytes
On Wed, 4 Nov 2026 02:22:52 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
>> Seems to be your standard response to anyone you disagree with. Go back 
>> under
>> your bridge.
>> 
>
>Really? Why do you have a hatred for say, IOCP? If so, you must also 
>HATE AIO, or io_uring?

I never mentioned IOCP but looking at it, yeah, looks like your standard
Windows approach of chucking threads at everything.
Re: Re: “The end of software secrecy is almost upon
#672
Author: boltar
Date: Wed, 04 Nov 2026 16:24
42 lines
3203 bytes
On Wed, 4 Nov 2026 11:24:54 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
>On 11/4/26 09:48, boltar@caprica.universe wrote:
>> On Mon, 02 Nov 2026 16:51:47 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.

Right, because typing "IO multiplexing" into google or an AI is such an
arduous task.
Re: “The end of software secrecy is almost upon
#673
Author: Chris M. Thomasson
Date: Wed, 04 Nov 2026 18:56
21 lines
2603 bytes
On 11/4/2026 8:22 AM, boltar@caprica.universe wrote:
> On Wed, 4 Nov 2026 02:22:52 -0800
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>> On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
>>> Seems to be your standard response to anyone you disagree with. Go 
>>> back under
>>> your bridge.
>>>
>>
>> Really? Why do you have a hatred for say, IOCP? If so, you must also 
>> HATE AIO, or io_uring?
> 
> I never mentioned IOCP but looking at it, yeah, looks like your standard
> Windows approach of chucking threads at everything.
> 

Huh? You mean a thread pool, sometimes we can oversubscribe and use 
hardware threads * 2

I don't think you should mock IOCP. Then you would be mocking AIO, or 
io_uring.
Re: Re: “The end of software secrecy is almost upon
#674
Author: boltar
Date: Wed, 04 Nov 2026 19:53
31 lines
2928 bytes
On Wed, 4 Nov 2026 10:56:20 -0800
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>On 11/4/2026 8:22 AM, boltar@caprica.universe wrote:
>> On Wed, 4 Nov 2026 02:22:52 -0800
>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>> On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
>>>> Seems to be your standard response to anyone you disagree with. Go 
>>>> back under
>>>> your bridge.
>>>>
>>>
>>> Really? Why do you have a hatred for say, IOCP? If so, you must also 
>>> HATE AIO, or io_uring?
>> 
>> I never mentioned IOCP but looking at it, yeah, looks like your standard
>> Windows approach of chucking threads at everything.
>> 
>
>Huh? You mean a thread pool, sometimes we can oversubscribe and use 
>hardware threads * 2

I don't care if its a thread ocean, its still threads being used where they're
possibly not needed. Obviously depends on load. But if I'm writing a client
such as ssh where the only I/O is via stdin and the socket I'm going to 
multiplex them in select() or poll(), not have 2 seperate threads.

>I don't think you should mock IOCP. Then you would be mocking AIO, or 
>io_uring.

I don't give a toss about IOCP, its a windows thing. 
Re: “The end of software secrecy is almost upon
#675
Author: Gary Scott
Date: Wed, 04 Nov 2026 20:17
34 lines
3313 bytes
On 11/4/2026 1:53 PM, boltar@caprica.universe wrote:
> On Wed, 4 Nov 2026 10:56:20 -0800
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>> On 11/4/2026 8:22 AM, boltar@caprica.universe wrote:
>>> On Wed, 4 Nov 2026 02:22:52 -0800
>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>>> On 11/4/2026 12:54 AM, boltar@caprica.universe wrote:
>>>>> Seems to be your standard response to anyone you disagree with. Go 
>>>>> back under
>>>>> your bridge.
>>>>>
>>>>
>>>> Really? Why do you have a hatred for say, IOCP? If so, you must also 
>>>> HATE AIO, or io_uring?
>>>
>>> I never mentioned IOCP but looking at it, yeah, looks like your standard
>>> Windows approach of chucking threads at everything.
>>>
>>
>> Huh? You mean a thread pool, sometimes we can oversubscribe and use 
>> hardware threads * 2
> 
> I don't care if its a thread ocean, its still threads being used where 
> they're
> possibly not needed. Obviously depends on load. But if I'm writing a client
> such as ssh where the only I/O is via stdin and the socket I'm going to 
> multiplex them in select() or poll(), not have 2 seperate threads.
> 
>> I don't think you should mock IOCP. Then you would be mocking AIO, or 
>> io_uring.
> 
> I don't give a toss about IOCP, its a windows thing.
I sometimes just reserve space in the page file and let the OS lazy 
write/read.
Re: “The end of software secrecy is almost upon
#676
Author: Jeroen Belleman
Date: Wed, 04 Nov 2026 22:53
59 lines
3851 bytes
On 11/4/26 17:24, boltar@caprica.universe wrote:
> On Wed, 4 Nov 2026 11:24:54 +0100
> Jeroen Belleman <jeroen@nospam.please> gabbled:
>> On 11/4/26 09:48, boltar@caprica.universe wrote:
>>> On Mon, 02 Nov 2026 16:51:47 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.
> 
> Right, because typing "IO multiplexing" into google or an AI is such an
> arduous task.
> 

That's fine too, as a hint, no issue there.

'Multiplexing' is a copiously overloaded concept, so a little
bit of help to steer him into the right direction is not out
of place.

Let's leave it at that.

Jeroen Belleman
Re: The end of software secrecy is almost upon
#756
Author: Rosario19
Date: Fri, 06 Nov 2026 11:43
27 lines
2688 bytes
On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote:
>On 2026-10-20, Lawrence D’Oliveiro <ldo@nz.invalid> wrote:
>
>> On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:
>>
>>> The undisciplined use of GOTOs is bad, agreed.
>>
>> Is there such a thing as a *disciplined* use of gotos?
>
>Yes, especially in COBOL or assembly language.  For instance,
>a GOTO to the end of a function ensures any of its cleanup code
>gets executed, and fulfils a goal of structured proramming:
>each function has one exit point.
>
>> I find the C code I write tends to do a lot of dynamic resource
>> allocations. These can sometimes fail with errors. So error recovery
>> will invariably involve cleaning up those parts of the allocations
>> which already succeeded. 

> Gotos are no good for this; you need to exit
>> levels of structure nesting one by one, disposing of allocations as
>> you go.

If in the start of the function all pointer are NULL, and in the end
of the function there are all the free() 
I not have find all your problems with possibly multiple goto that
point to the end of the function
Re: “The end of software secrecy is almost upon
#688
Author: Michael S
Date: Fri, 06 Nov 2026 13:38
70 lines
4246 bytes
On Wed, 4 Nov 2026 23:53:55 +0100
Jeroen Belleman <jeroen@nospam.please> wrote:

> On 11/4/26 17:24, boltar@caprica.universe wrote:
> > On Wed, 4 Nov 2026 11:24:54 +0100
> > Jeroen Belleman <jeroen@nospam.please> gabbled:  
> >> On 11/4/26 09:48, boltar@caprica.universe wrote:  
> >>> On Mon, 02 Nov 2026 16:51:47 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.  
> > 
> > Right, because typing "IO multiplexing" into google or an AI is
> > such an arduous task.
> >   
> 
> That's fine too, as a hint, no issue there.
> 
> 'Multiplexing' is a copiously overloaded concept, so a little
> bit of help to steer him into the right direction is not out
> of place.
> 
> Let's leave it at that.
> 
> Jeroen Belleman

Unless you didn't pay attention yet, boltar is asshole and proud at
that.
Or arshole? I'm not sure what is a correct spelling in his area.


Re: The end of software secrecy is almost upon
#759
Author: boltar
Date: Fri, 06 Nov 2026 16:38
36 lines
3021 bytes
On Fri, 06 Nov 2026 12:43:08 +0100
Rosario19 <Ros@invalid.invalid> gabbled:
>On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote:
>>On 2026-10-20, Lawrence D’Oliveiro <ldo@nz.invalid> wrote:
>>
>>> On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:
>>>
>>>> The undisciplined use of GOTOs is bad, agreed.
>>>
>>> Is there such a thing as a *disciplined* use of gotos?
>>
>>Yes, especially in COBOL or assembly language.  For instance,
>>a GOTO to the end of a function ensures any of its cleanup code
>>gets executed, and fulfils a goal of structured proramming:
>>each function has one exit point.
>>
>>> I find the C code I write tends to do a lot of dynamic resource
>>> allocations. These can sometimes fail with errors. So error recovery
>>> will invariably involve cleaning up those parts of the allocations
>>> which already succeeded. 
>
>> Gotos are no good for this; you need to exit
>>> levels of structure nesting one by one, disposing of allocations as
>>> you go.
>
>If in the start of the function all pointer are NULL, and in the end
>of the function there are all the free() 
>I not have find all your problems with possibly multiple goto that
>point to the end of the function

This is also a reason the only-one-exit-point nonsense mentioned above is a
Very Bad Idea unless its a simple function because you may have to do a load
of checks that wouldn't be required if the flow of control left at an earlier
point. Also with too much block nesting it becomes unreadable even in the best 
IDEs.
Re: “The end of software secrecy is almost upon
#691
Author: boltar
Date: Fri, 06 Nov 2026 16:39
20 lines
2495 bytes
On Fri, 6 Nov 2026 15:38:55 +0200
Michael S <already5chosen@yahoo.com> gabbled:
>On Wed, 4 Nov 2026 23:53:55 +0100
>Jeroen Belleman <jeroen@nospam.please> wrote:
>> 'Multiplexing' is a copiously overloaded concept, so a little
>> bit of help to steer him into the right direction is not out
>> of place.
>>=20
>> Let's leave it at that.
>>=20
>> Jeroen Belleman
>
>Unless you didn't pay attention yet, boltar is asshole and proud at
>that.
>Or arshole? I'm not sure what is a correct spelling in his area.

Neither, but don't worry about it. When you've finished your little sucky
thumb tantrum maybe mummy will pick up all the toys around your pram for you.

Re: “The end of software secrecy is almost upon
#778
Author: Waldek Hebisch
Date: Sat, 07 Nov 2026 01:17
47 lines
3413 bytes
In comp.lang.c++ Michael S <already5chosen@yahoo.com> 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.

Just curious how you solve problem of blocking in single threaded
program?  AFAIK to get data from disc one needs about 10ms or possibly
more, which is pretty long time on modern machines.  Do you assume
that all data that you need is in RAM (or will be after short startup
time)?

-- 
                              Waldek Hebisch
Re: “The end of software secrecy is almost upon us”
#711
Author: Chris M. Thomasson
Date: Sat, 07 Nov 2026 03:22
47 lines
3649 bytes
On 11/2/2026 11:15 PM, Charlie Gibbs wrote:
> 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.  

then using the high performance API's is not necessary for your 
"current" use case. But, well, what happens if it does 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.
> 

Re: “The end of software secrecy is almost upon
#781
Author: boltar
Date: Sat, 07 Nov 2026 09:41
20 lines
2524 bytes
On Sat, 7 Nov 2026 01:17:19 -0000 (UTC)
antispam@fricas.org (Waldek Hebisch) gabbled:
>In comp.lang.c++ Michael S <already5chosen@yahoo.com> wrote:
>> * - 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.
>
>Just curious how you solve problem of blocking in single threaded
>program?  AFAIK to get data from disc one needs about 10ms or possibly
>more, which is pretty long time on modern machines.  Do you assume
>that all data that you need is in RAM (or will be after short startup
>time)?

Both select() and poll() can be non blocking if you pass a zero timeout value
to them. Any file descriptors than can be read from and/or written to will be
set in the mask. 
Re: The end of software secrecy is almost upon
#785
Author: Rosario19
Date: Sat, 07 Nov 2026 12:35
39 lines
3185 bytes
On Mon, 02 Nov 2026 16:51:46 GMT, Charlie Gibbs wrote:
>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.

I m not a too much code writer
until now, making some test I can understand and can correct bug on my
code even if not commented enought (but input variable and output
variable of one function are always/ should always be commented). code
difficult as printf like functions, malloc, bignum function operators
etc in assembly too.

On others code i suspect it would be difficult for me even if
commented... the indentation and names of variable are one easy way of
comment code (i read that in a book speak on pascal language), without
write one line of comment. Writing always the same type of loop, the
same type of inizialization in the same position, the same names, I
can figure out all soon...

Re: “The end of software secrecy is almost upon
#787
Author: Michael S
Date: Sat, 07 Nov 2026 18:20
72 lines
4523 bytes
On Sat, 7 Nov 2026 01:17:19 -0000 (UTC)
antispam@fricas.org (Waldek Hebisch) wrote:

> In comp.lang.c++ Michael S <already5chosen@yahoo.com> 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.  
> 
> Just curious how you solve problem of blocking in single threaded
> program? 

I don't.
If it is important and I expect that file operation will take
significant time then I do it in another thread.
May be, if I were doing server-side I'd treat it differently, but on
cleent it's unlikely that I don't have more hardware threads than work
to do, so separate thread is just right thing to do in such case.
Assuming, of course, that performance at all matters, which is uncommon.


> AFAIK to get data from disc one needs about 10ms or possibly
> more, which is pretty long time on modern machines.

I absolutly do not care about spinning rust. For close to 15 years.

>  Do you assume
> that all data that you need is in RAM (or will be after short startup
> time)?
> 

In practice, it's extremely likely that all data is in system's file
cache, i.e. in RAM.




Re: “The end of software secrecy is almost upon
#789
Author: Chris M. Thomasson
Date: Sat, 07 Nov 2026 20:19
73 lines
4868 bytes
On 11/7/2026 10:20 AM, Michael S wrote:
> On Sat, 7 Nov 2026 01:17:19 -0000 (UTC)
> antispam@fricas.org (Waldek Hebisch) wrote:
> 
>> In comp.lang.c++ Michael S <already5chosen@yahoo.com> 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.
>>
>> Just curious how you solve problem of blocking in single threaded
>> program?
> 
> I don't.
> If it is important and I expect that file operation will take
> significant time then I do it in another thread.
> May be, if I were doing server-side I'd treat it differently, but on
> cleent it's unlikely that I don't have more hardware threads than work
> to do, so separate thread is just right thing to do in such case.
> Assuming, of course, that performance at all matters, which is uncommon.
> 
> 
>> AFAIK to get data from disc one needs about 10ms or possibly
>> more, which is pretty long time on modern machines.
> 
> I absolutly do not care about spinning rust. For close to 15 years.
> 
>>   Do you assume
>> that all data that you need is in RAM (or will be after short startup
>> time)?
>>
> 
> In practice, it's extremely likely that all data is in system's file
> cache, i.e. in RAM.

In say, IOCP, AIO, etc, we can use a single thread to handle that, no 
problem. But you will lose the concurrency the system provides. We can 
intermix file io and socket io. No problem.
Re: “The end of software secrecy is almost upon
#796
Author: boltar
Date: Sun, 08 Nov 2026 09:10
20 lines
2348 bytes
On Sat, 7 Nov 2026 20:20:54 +0200
Michael S <already5chosen@yahoo.com> gabbled:
>On Sat, 7 Nov 2026 01:17:19 -0000 (UTC)
>antispam@fricas.org (Waldek Hebisch) wrote:
>> Just curious how you solve problem of blocking in single threaded
>> program? 
>
>I don't.
>If it is important and I expect that file operation will take
>significant time then I do it in another thread.

So you don't understand the concept of non-blocking I/O.

>> AFAIK to get data from disc one needs about 10ms or possibly
>> more, which is pretty long time on modern machines.
>
>I absolutly do not care about spinning rust. For close to 15 years.

15 years ago commercial SSDs were expensive, low capacity and failure prone.
Page 11 of 11 • 529 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