🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

129 total messages Page 1 of 3 Started by Ross Finlayson Thu, 12 Nov 2026 17:41
Page 1 of 3 • 129 total messages
Inversion-of-control and dependency-injection in C
#1486
Author: Ross Finlayson
Date: Thu, 12 Nov 2026 17:41
46 lines
3858 bytes
Hello, dear C experts, I'm hoping you can tell me a story about
modularity and composability, about the concerns of inversion-of-control
and dependency-injection in C, basically about wiring
test-time and run-time targets, for example about conditional-includes
and various build-targets, probably mostly about function pointers.

A usual account for example might recount component frameworks,
like COM or XPCOM for example, about the concepts of components,
vis-a-vis, modularity and composability, and, satisfaction of
dependencies, vis-a-vis IPC and RPC, abstraction layers often enough,
then about adapters to dependencies, or as for resources, that
it's a bunch of makefiles with various accounts of conditional includes
and build targets about static and dynamic linking and the toolchain,
with regards to test-harness and runtime-framework and about
metaprogramming when making code generation and boilerplate and so on.


Defining an interface or layer is often enough about groups of functions
associated with context-structs to make for lifecycles
of what result alike the pure virtual or abstract or interfaces
in reference to languages like C++, about families of functions
according to the types of their signatures, then as with regards
to componentry rather generally in value-types and interface-types
like "variant" and "queryInterface()", about components that implement
multiple interfaces vis-a-vis mostly about "constructing the
object-graph" what makes for separation-of-concerns and composability,
is mostly about modularity and composability.

Then considerations of modularity as for library design affect to
reflect on how to indicate responsibilities of ownership in resources,
for example to hide contract & behavior of resources acquire/release.

What I'm figuring is that basically there is a flat name-space of
functions, there are .h and .c files (and may include "portable
assembler"), and there is the compiler-toolchain, and make or
build-scripts. Since there are only functions then dependencies their
references would basically live in structs (in structs, in structs, ...,
of function pointers), much like languages with classes and their
instances objects and subclassing overriding behavior keeping in
contract, about how to define "runtime-module" vis-a-vis "source module"
(.o files after compilation-units), about conditional-includes
and conditional-builds vis-a-vis name-mangling or the conventions of
symbols.

What, whither, when, how?
Re: Inversion-of-control and dependency-injection in C
#1487
Author: fir
Date: Thu, 12 Nov 2026 19:25
58 lines
4423 bytes
Ross Finlayson pisze:
> Hello, dear C experts, I'm hoping you can tell me a story about
> modularity and composability, about the concerns of inversion-of-control
> and dependency-injection in C, basically about wiring
> test-time and run-time targets, for example about conditional-includes
> and various build-targets, probably mostly about function pointers.
> 
> A usual account for example might recount component frameworks,
> like COM or XPCOM for example, about the concepts of components,
> vis-a-vis, modularity and composability, and, satisfaction of
> dependencies, vis-a-vis IPC and RPC, abstraction layers often enough,
> then about adapters to dependencies, or as for resources, that
> it's a bunch of makefiles with various accounts of conditional includes
> and build targets about static and dynamic linking and the toolchain,
> with regards to test-harness and runtime-framework and about
> metaprogramming when making code generation and boilerplate and so on.
> 
> 
> Defining an interface or layer is often enough about groups of functions
> associated with context-structs to make for lifecycles
> of what result alike the pure virtual or abstract or interfaces
> in reference to languages like C++, about families of functions
> according to the types of their signatures, then as with regards
> to componentry rather generally in value-types and interface-types
> like "variant" and "queryInterface()", about components that implement
> multiple interfaces vis-a-vis mostly about "constructing the
> object-graph" what makes for separation-of-concerns and composability,
> is mostly about modularity and composability.
> 
> Then considerations of modularity as for library design affect to
> reflect on how to indicate responsibilities of ownership in resources,
> for example to hide contract & behavior of resources acquire/release.
> 
> What I'm figuring is that basically there is a flat name-space of
> functions, there are .h and .c files (and may include "portable
> assembler"), and there is the compiler-toolchain, and make or
> build-scripts. Since there are only functions then dependencies their
> references would basically live in structs (in structs, in structs, ...,
> of function pointers), much like languages with classes and their
> instances objects and subclassing overriding behavior keeping in
> contract, about how to define "runtime-module" vis-a-vis "source module"
> (.o files after compilation-units), about conditional-includes
> and conditional-builds vis-a-vis name-mangling or the conventions of
> symbols.
> 
> What, whither, when, how?
> 

this is not a large group and stating such soecific and wide question 
you minimalise the chance of answers to it to nearly zero

you can enentually "answer to yourself" (as some say i do? well if i 
state question and some cant answer it after some time i myself may 
answer it) - though im usually not answering my own questions 
(sometimes) but simply "adding" more thoughts to prewious ones
(which is qute good coz articles splitted on more parts ere better)

Re: Inversion-of-control and dependency-injection in C
#1488
Author: Bonita Montero
Date: Thu, 12 Nov 2026 19:38
11 lines
1894 bytes
Am 12.11.2026 um 18:41 schrieb Ross Finlayson:

> Hello, dear C experts, I'm hoping you can tell me a story about
> modularity and composability, about the concerns of inversion-of-control
> and dependency-injection in C, basically about wiring
> test-time and run-time targets, for example about conditional-includes
> and various build-targets, probably mostly about function pointers.
Works magnitudes better in C++ with std::function<> and generic
function objects. F.e. when using std::find_if, std::sort etc.
C sucks.
Re: Inversion-of-control and dependency-injection in C
#1489
Author: fir
Date: Thu, 12 Nov 2026 19:39
83 lines
5455 bytes
fir pisze:
> Ross Finlayson pisze:
>> Hello, dear C experts, I'm hoping you can tell me a story about
>> modularity and composability, about the concerns of inversion-of-control
>> and dependency-injection in C, basically about wiring
>> test-time and run-time targets, for example about conditional-includes
>> and various build-targets, probably mostly about function pointers.
>>
>> A usual account for example might recount component frameworks,
>> like COM or XPCOM for example, about the concepts of components,
>> vis-a-vis, modularity and composability, and, satisfaction of
>> dependencies, vis-a-vis IPC and RPC, abstraction layers often enough,
>> then about adapters to dependencies, or as for resources, that
>> it's a bunch of makefiles with various accounts of conditional includes
>> and build targets about static and dynamic linking and the toolchain,
>> with regards to test-harness and runtime-framework and about
>> metaprogramming when making code generation and boilerplate and so on.
>>
>>
>> Defining an interface or layer is often enough about groups of functions
>> associated with context-structs to make for lifecycles
>> of what result alike the pure virtual or abstract or interfaces
>> in reference to languages like C++, about families of functions
>> according to the types of their signatures, then as with regards
>> to componentry rather generally in value-types and interface-types
>> like "variant" and "queryInterface()", about components that implement
>> multiple interfaces vis-a-vis mostly about "constructing the
>> object-graph" what makes for separation-of-concerns and composability,
>> is mostly about modularity and composability.
>>
>> Then considerations of modularity as for library design affect to
>> reflect on how to indicate responsibilities of ownership in resources,
>> for example to hide contract & behavior of resources acquire/release.
>>
>> What I'm figuring is that basically there is a flat name-space of
>> functions, there are .h and .c files (and may include "portable
>> assembler"), and there is the compiler-toolchain, and make or
>> build-scripts. Since there are only functions then dependencies their
>> references would basically live in structs (in structs, in structs, ...,
>> of function pointers), much like languages with classes and their
>> instances objects and subclassing overriding behavior keeping in
>> contract, about how to define "runtime-module" vis-a-vis "source module"
>> (.o files after compilation-units), about conditional-includes
>> and conditional-builds vis-a-vis name-mangling or the conventions of
>> symbols.
>>
>> What, whither, when, how?
>>
> 
> this is not a large group and stating such soecific and wide question 
> you minimalise the chance of answers to it to nearly zero
> 
> you can enentually "answer to yourself" (as some say i do? well if i 
> state question and some cant answer it after some time i myself may 
> answer it) - though im usually not answering my own questions 
> (sometimes) but simply "adding" more thoughts to prewious ones
> (which is qute good coz articles splitted on more parts ere better)
> 
> 
overally people seem to ba rather weak in answering some more 'meta'
questions (which is not strightforward as in the net (articles etc) i 
sometimes see lile people would be interested in meta topic to,
but on c.l.c meta questions are rarely answered)

if they will do i mayself would ask:

have you noticed that mess rises in your code/projects ?
what you do with that

for exampel in my rasterizer/3d shooter prototype i read
keys - it comes from wndproc key handler but as code grows larger
damn i got not in memory where given key ich checked
(as its handy and logical to check it close to its functionality,
sometimes it is in general window handling, sometimes its in
hud block, sometimes its in the scene root area sometimes its
in the loop of objests

good luck to finding it

and that is how mess grows

(its maybe not even mess - its maybe things dont fit in my memory
so i must load it, and damn its slow
Re: Inversion-of-control and dependency-injection in C
#1491
Author: fir
Date: Thu, 12 Nov 2026 19:55
92 lines
5968 bytes
fir pisze:
> fir pisze:
>> Ross Finlayson pisze:
>>> Hello, dear C experts, I'm hoping you can tell me a story about
>>> modularity and composability, about the concerns of inversion-of-control
>>> and dependency-injection in C, basically about wiring
>>> test-time and run-time targets, for example about conditional-includes
>>> and various build-targets, probably mostly about function pointers.
>>>
>>> A usual account for example might recount component frameworks,
>>> like COM or XPCOM for example, about the concepts of components,
>>> vis-a-vis, modularity and composability, and, satisfaction of
>>> dependencies, vis-a-vis IPC and RPC, abstraction layers often enough,
>>> then about adapters to dependencies, or as for resources, that
>>> it's a bunch of makefiles with various accounts of conditional includes
>>> and build targets about static and dynamic linking and the toolchain,
>>> with regards to test-harness and runtime-framework and about
>>> metaprogramming when making code generation and boilerplate and so on.
>>>
>>>
>>> Defining an interface or layer is often enough about groups of functions
>>> associated with context-structs to make for lifecycles
>>> of what result alike the pure virtual or abstract or interfaces
>>> in reference to languages like C++, about families of functions
>>> according to the types of their signatures, then as with regards
>>> to componentry rather generally in value-types and interface-types
>>> like "variant" and "queryInterface()", about components that implement
>>> multiple interfaces vis-a-vis mostly about "constructing the
>>> object-graph" what makes for separation-of-concerns and composability,
>>> is mostly about modularity and composability.
>>>
>>> Then considerations of modularity as for library design affect to
>>> reflect on how to indicate responsibilities of ownership in resources,
>>> for example to hide contract & behavior of resources acquire/release.
>>>
>>> What I'm figuring is that basically there is a flat name-space of
>>> functions, there are .h and .c files (and may include "portable
>>> assembler"), and there is the compiler-toolchain, and make or
>>> build-scripts. Since there are only functions then dependencies their
>>> references would basically live in structs (in structs, in structs, ...,
>>> of function pointers), much like languages with classes and their
>>> instances objects and subclassing overriding behavior keeping in
>>> contract, about how to define "runtime-module" vis-a-vis "source module"
>>> (.o files after compilation-units), about conditional-includes
>>> and conditional-builds vis-a-vis name-mangling or the conventions of
>>> symbols.
>>>
>>> What, whither, when, how?
>>>
>>
>> this is not a large group and stating such soecific and wide question 
>> you minimalise the chance of answers to it to nearly zero
>>
>> you can enentually "answer to yourself" (as some say i do? well if i 
>> state question and some cant answer it after some time i myself may 
>> answer it) - though im usually not answering my own questions 
>> (sometimes) but simply "adding" more thoughts to prewious ones
>> (which is qute good coz articles splitted on more parts ere better)
>>
>>
> overally people seem to ba rather weak in answering some more 'meta'
> questions (which is not strightforward as in the net (articles etc) i 
> sometimes see lile people would be interested in meta topic to,
> but on c.l.c meta questions are rarely answered)
> 
> if they will do i mayself would ask:
> 
> have you noticed that mess rises in your code/projects ?
> what you do with that
> 
> for exampel in my rasterizer/3d shooter prototype i read
> keys - it comes from wndproc key handler but as code grows larger
> damn i got not in memory where given key ich checked
> (as its handy and logical to check it close to its functionality,
> sometimes it is in general window handling, sometimes its in
> hud block, sometimes its in the scene root area sometimes its
> in the loop of objests
> 
> good luck to finding it
> 
> and that is how mess grows
> 
> (its maybe not even mess - its maybe things dont fit in my memory
> so i must load it, and damn its slow

note i once emphasized what i call "code jumping"

the fact that in larger projest and with some specific codes
to write something you must travel thru code (mostly up and down or
jum to anothe files ) now i could extend it to this mehanism of
"memory loading" (not only you need to jump but you must memorize where 
is what) (yawn..and thsi damn slowing)
Re: Inversion-of-control and dependency-injection in C
#1492
Author: Lew Pitcher
Date: Thu, 12 Nov 2026 20:11
16 lines
1845 bytes
On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:

> Hello, dear C experts, I'm hoping you can tell me a story about
> modularity and composability, about the concerns of inversion-of-control
> and dependency-injection in C, basically about wiring
> test-time and run-time targets, for example about conditional-includes
> and various build-targets, probably mostly about function pointers.

Pardon my impertinence, but this sounds like a homework problem to me.

Could you rephrase your question without the academic wording? 

-- 
Lew Pitcher
"In Skills We Trust"
Not LLM output - I'm just like this.
Re: Inversion-of-control and dependency-injection in C
#1493
Author: Chris M. Thomasson
Date: Thu, 12 Nov 2026 20:15
14 lines
1993 bytes
On 11/12/2026 11:38 AM, Bonita Montero wrote:
> Am 12.11.2026 um 18:41 schrieb Ross Finlayson:
> 
>> Hello, dear C experts, I'm hoping you can tell me a story about
>> modularity and composability, about the concerns of inversion-of-control
>> and dependency-injection in C, basically about wiring
>> test-time and run-time targets, for example about conditional-includes
>> and various build-targets, probably mostly about function pointers.
> Works magnitudes better in C++ with std::function<> and generic
> function objects. F.e. when using std::find_if, std::sort etc.
> C sucks.
> 

C is C. Imvvvvho, C++ is better... :^) Let the flames begin.
Re: Inversion-of-control and dependency-injection in C
#1494
Author: Richard Harnden
Date: Thu, 12 Nov 2026 20:55
20 lines
2071 bytes
On 12/11/2026 20:11, Lew Pitcher wrote:
> On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
> 
>> Hello, dear C experts, I'm hoping you can tell me a story about
>> modularity and composability, about the concerns of inversion-of-control
>> and dependency-injection in C, basically about wiring
>> test-time and run-time targets, for example about conditional-includes
>> and various build-targets, probably mostly about function pointers.
> 
> Pardon my impertinence, but this sounds like a homework problem to me.
> 
> Could you rephrase your question without the academic wording?
> 

Or get an AI do to your homework?

Be careful to remove the white-on-white-very-small-font gotcha your 
professor doubtlessly put in.

Re: Inversion-of-control and dependency-injection in C
#1495
Author: Ross Finlayson
Date: Thu, 12 Nov 2026 21:15
41 lines
3467 bytes
On 11/12/2026 12:11 PM, Lew Pitcher wrote:
> On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
>
>> Hello, dear C experts, I'm hoping you can tell me a story about
>> modularity and composability, about the concerns of inversion-of-control
>> and dependency-injection in C, basically about wiring
>> test-time and run-time targets, for example about conditional-includes
>> and various build-targets, probably mostly about function pointers.
>
> Pardon my impertinence, but this sounds like a homework problem to me.
>
> Could you rephrase your question without the academic wording?
>

Not at all, meaning, no offense taken.

How about "writing testable code", what are common frameworks
or best practices for "writing testable code" in C.

I'd suggest abstraction and layers and modularity and composability,
and having an inversion-of-control/dependency-injection approach,
a convention moreso than a framework, which pretty much means wrapping
all the standard functions, then about for example having an include
where those are wrapper functions to stub and mock, and another include
where those are macros, or, perhaps, using includes, to point the
include directory for the standard library, into instead what makes
for stubbable/mockable calls to standard library and system functions,
or just leaving the headers alone and linking to modules that aren't
the standard libraries, this being an example of something like
"can't mock strftime", or, for an example.

Then, about the modularity, and pointers (to pointers to pointers
to pointers, ...) to functions, then seems about conventions of
types for typeof and the like about that like anybody else I rely
on the compiler to fail with -Wall and failing on warnings to
catch type errors, ..., has that I want to program to interfaces
and then have objects composable, ..., about using conditions of
the build, to, basically make for test-time targets and run-time
targets, with actually testing the code that goes into the build.

Re: Inversion-of-control and dependency-injection in C
#1496
Author: Ross Finlayson
Date: Thu, 12 Nov 2026 21:44
296 lines
11145 bytes
On 11/12/2026 12:55 PM, Richard Harnden wrote:
> On 12/11/2026 20:11, Lew Pitcher wrote:
>> On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
>>
>>> Hello, dear C experts, I'm hoping you can tell me a story about
>>> modularity and composability, about the concerns of inversion-of-control
>>> and dependency-injection in C, basically about wiring
>>> test-time and run-time targets, for example about conditional-includes
>>> and various build-targets, probably mostly about function pointers.
>>
>> Pardon my impertinence, but this sounds like a homework problem to me.
>>
>> Could you rephrase your question without the academic wording?
>>
>
> Or get an AI do to your homework?
>
> Be careful to remove the white-on-white-very-small-font gotcha your
> professor doubtlessly put in.
>
>


When I use "A.I." it's framed as a dialogue and I just copy the
transcripts directly, with the attributions.

I.e., I've never submitted anything to Usenet written by a bot
on my behalf.


I'm not sure whether I'd call it "distance learning", or,
"distance learning", say, ....




Like say for example I'm looking at something like this that I tapped
up this morning, and I want to figure out then how to make it so that
the guts of the workers have a nice real quality of covering all the
bases of covering all the cases, when for example according to the C
host as it were or POSIX there's signals and traps to be figured out
in accounts of "asynchronous concurrency".






Outline of "I/O-handle-bound process model"

The "I/O-handle-bound process model", is an account of a process group
in a process tree,
that works up to the bounds of 1024 many file-descriptors that a
pselect() call can poll,
with up to 1000-many file-descriptors in up to 1000-many worker
processes, for up to
1,000,000-many open connections.

The "1000-many" is basically derived from FD_SETSIZE having a limit of
1024,
and that numbered file-descriptors that can participate in non-blocking I/O
with pselect() notification of readiness, must be less than FD_SETSIZE
their value.

The basic idea is that there's a main or master process, that being also
the process group leader,
that has a "process-protocol" convention, that the master/leader, has
domain sockets
to its child processes, with up to 1000-many worker processes, then
other processes
as the listener, which accepts connections, and a logger and a metrics
process.

The listener is its own process that does accept and management (figured
IP address listing and perhaps a tiny bit of TLS business). It's figured
that it's
an Internet protocol server, and "connection-oriented", or as mostly
about TCP/IP,
and furthermore "association-oriented", about SCTP, then about UDP or
datagram
"protocols", the listener demultiplexes the packets as "connections" to
the workers.

The file-descriptors in a process are numbered, non-negative integers.

The file-descriptors 0, 1, 2 are ubiqitously stdin, stdout, stderr,
"standard input-output-error".

The file-descriptor 3 is reserved as it may be a convention for passing
open connections to created processes.

The file-descriptors 4, 5, 6 are reserved as "stdlog, stdmet, stddmp",
"logging-metrics-dump outputs".

The file-descriptors 21-1020 are reserved for "1000-many connections".

The leader uses the "1000-many connections" for domain sockets to its
"1000-many workers".

Each follower (listener, worker, ...) has a reserved file-descriptor
(11) to connect with the leader.

The leader uses file-descriptor 11 to connect to the listener.
The leader uses file-descriptor 12 to connect to an optional console.
The leader uses file-descriptor 13 to connect to an optional logger.
The leader uses file-descriptor 14 to connect to an optional metrics.

launcher

leader

logger
metrics
console

listener
worker

The model of operation describes how a process is created, according to
fork and execve.

The file-descriptors 0-10 are "standard", about stdin/stdout/stderr and
these
named stdlog/stdmet/stddmp. Usually stdin is un-read, or set to /dev/null.
Usually stdout and stderr are inherited (by all child processes) from
leader.

The stdlog and stdmet and stddmp are inherited from leader. A usual idea is
that these as file-handles may be passed to the leader for example to
the shell,
or that usually according to options, the first child processes of the
leader are
the logger and metrics, with the logger and metrics receiving all the
messages
on those handles, then the leader and all other processes sharing those
handles,
and all writing the logs and metrics to those same handles. Then, the
dumper
is an abstract output stream, outside of logging and metrics and
standard I/O.

The file-descriptors 11-20 are in the "process-protocol".

The file-descriptors 21-1020 of the leader are in the "process-protocol".
The file-descriptors 21-1020 of the listener are in the "process-protocol".
The file-descriptors 21-1020 of the workers are in the
"application-protocol".

The file-descriptor 3 in the listener is the listening socket.
The file-descriptor 3 may be passed to the leader to be passed to the
listener,
the listening socket.

leader:
4 -> stdlog
5 -> stdmet
6 -> stddmp
11 <-> logger
12 <-> metrics
13 <-> listener
14 <-> console
21-1020 <-> workers

logger:
4 <- stdlog
6 <- stddmp
11 <-> logger (leader)
12 <-> metrics

metrics:
5 <- stdmet
11 <-> logger
12 <-> metrics (leader)


listener:
4 -> stdlog
5 -> stdmet
6 -> stddmp
11 <-> logger
12 <-> metrics
13 <-> listener (leader)
14-20 <-> listening socket(s)
21-1020 <-> workers

worker:
4 -> stdlog
5 -> stdmet
6 -> stddmp
11 <-> leader
13 <-> listener
21-1020 -> connections (front-end and back-end)

Each of these has their own "main()" source code and executable,
with that each is created by leader with fork() then setting the handles
respectively, then execve() thus that the child processes start with
their open handles in the process-protocol (11-20) and stdio (0-10)
already opened and directed.

Then, the process-protocol is according to use-cases, as driven by
events, about that the domain-sockets that are under the handles
of the process-protocol, make for passing data, and also live handles,
as are the connections.


The main use-case is that the listener is bound to a listening socket,
as connections are accepted with connection-management happening
in the listener, listener passes the connection to leader, which finds or
create a worker, and passes the connection to worker, which then
proceeds to service the connection according to the application-protocol.

listener: accepts connection

listener -> leader: connection-accepted !
leader -> worker: connection-ready ?
worker -> leader: connection-ready !
leader -> listener: pass-ready !
listener -> leader: connection-pass !
leader -> worker: connection-pass !

When a connection is closed, according to the application-protocol
or if the connection drops or is severed, then worker advises leader,
then leader advises listener.

worker -> leader: connection-closed
leader -> listener: connection-closed

Then, when there are process-level events, the leader makes
commands to the workers, about graceful exit.

leader -> worker: drain connections
leader -> worker: close connections
leader -> worker: exit

Since connections and their attachments & associations
may be short-lived or long-lived, and the goal is that
there only needs be as many workers as fulfill servicing
the connections, then is that there's a process-protocol
about migrating associations (and their connections)
among workers, usually from "sparse" workers to "dense"
workers, where sparse means "not-very-full" and dense
means "not-very-empty", or from "short-lived" workers
to "long-lived" workers when connections are long-lived,
that "association migration" is in the process-protocol.

leader -> worker: emigrate-association
worker -> leader: migrate-association
leader -> worker: immigrate-association


The threading model in the process model

The basic idea of the threading model is that workers
are multi-threaded, the leader is single-threaded, and
that the threads "park" when there is no activity,
yet that the workers have one "sweeper" thread
to account for time-outs, then that as the workers
close their connections, they exit, so that under no
traffic, there is no activity, with all processes "parked".

The idea of "parking" is blocking on the inputs to the
protocols, or the event-driven pumps in the workers.

The threads basically block in pselect() waiting for
ready reading, writing, or other events, or, waiting
on a queue item, pop().

The leader parks in pselect() on 11-1024, the process-protocol.

The listener parks in pselect() about
accept() and pselect() on the listening socket and
the process-protocol sockets.

The worker has four or more threads.

reader-thread: parks in pselect() with read-interest
executor-thread: parks in pop() of application-protocol tasks
writer-thread: parks in pop() of application-protocol responses, then
blocks in pselect() while writing, then parks
sweeper-thread: according to time/alarm, runs on a frequency eg 500
milliseconds, 5 seconds, 5 minutes

When the worker is empty, after its connections close, it exits.

The logger and metrics park in pselect() on the read-side of
stdlog/stdmet/stddmp.

Thusly, at idle, with no connections, the entire process-group is
"parked" (0% CPU, "acquiescent").






Re: Inversion-of-control and dependency-injection in C
#1499
Author: Janis Papanagnou
Date: Thu, 12 Nov 2026 23:26
111 lines
7105 bytes
On 2026-11-12 22:15, Ross Finlayson wrote:
> On 11/12/2026 12:11 PM, Lew Pitcher wrote:
>> On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
>>
>>> Hello, dear C experts, I'm hoping you can tell me a story about
>>> modularity and composability, about the concerns of inversion-of-control
>>> and dependency-injection in C, basically about wiring
>>> test-time and run-time targets, for example about conditional-includes
>>> and various build-targets, probably mostly about function pointers.
>>
>> Pardon my impertinence, but this sounds like a homework problem to me.
>>
>> Could you rephrase your question without the academic wording?
> 
> Not at all, meaning, no offense taken.

Your original post and its intention had been also to me quite
unclear. Here, now, I seem to understand at what you are aiming.

(Disclaimer: my comments are just based on personal experience
in our software developing practice from the 1990's and not some
general accepted opinion or habits.)

> How about "writing testable code", what are common frameworks
> or best practices for "writing testable code" in C.

Our approach was not to "write testable code" by _adapting_ to
some existing framework. While we had standards and practices how
to design software the _tests followed our software_ (not v.v.).
One exception here was that including dedicated trace records in
our code (that could be activated specifically WRT a module and
in granularity) helped for the test evaluation and regressions.

Then we have to differentiate what tests you have in mind here;
there's various types of tests which require their own principles.
For example; Unit Tests (in our [C++] context mainly classes, in
"C" probably functions or a set of related functions) required
functions that own little test programs would call to verify all
the relevant conditions. We haven't used frameworks that created
the tests but wrote our own dedicated test-functions along with the
application functions. For our Component Tests (where components
were in our case software pieces that constitute runtime processes
with a well-defined interface) we wrote stubs that could challenge
the components on the interface levels. Such stubs could operate
some predefined procedures with well-defined input, or arbitrary
data, or be an operator-triggered manual interaction, depending on
the type of the component. Storing all the test input and output
results made regression tests possible. For the Integration Tests I
don't recall the procedures (it was done in a dedicated integration
test group); but they defined and checked the system configuration,
the interoperability (I think!) mostly manually. Malfunctions were
reported back to development accompanied by protocols, traces, and
actual data. The System Tests were checked against the specification
documents, and the Acceptance Tests against the requirements specs,
sometimes accompanied by the customers. One aspect yet not listed
was the test of the GUIs; beside manual tests we used tools to do
all that "mouse shoving and clicking". But given that the functional
tests already happened on the automatable interface level in former
stages that was effectively just to check the "UI ergonomy" ("UX")
factors. And, finally, we had our own hierarchical regression test
framework to run and document the tests on each abstraction stage.
(Eventually there were also external third-party tools existing but
back then we wrote (had to write) our own regression test framework
that fulfilled our demands.)

> 
> I'd suggest abstraction and layers and modularity and composability,

Yes, those are principles that support the mentioned QA processes.

> and having an inversion-of-control/dependency-injection approach,

(See my comment about "tests follow code (not v.v.)". - Opinions may
differ.)

> a convention moreso than a framework, which pretty much means wrapping
> all the standard functions, then about for example having an include
> where those are wrapper functions to stub and mock, and another include
> where those are macros, or, perhaps, using includes, to point the
> include directory for the standard library, into instead what makes
> for stubbable/mockable calls to standard library and system functions,
> or just leaving the headers alone and linking to modules that aren't
> the standard libraries, this being an example of something like
> "can't mock strftime", or, for an example.

Just a comment on one aspect here; yes, you have to organize your
software and tests. Key principles are the modularity, hierarchical
organization, being able to automate processes, and organize all in
some consistent way. In case your company is certified (or wants to
get certified) make sure your processes are documented and that you
can reproduce your quality processes and the results.

> 
> Then, about the modularity, and pointers (to pointers to pointers
> to pointers, ...) to functions, then seems about conventions of
> types for typeof and the like about that like anybody else I rely
> on the compiler to fail with -Wall and failing on warnings to
> catch type errors, ..., has that I want to program to interfaces
> and then have objects composable, ..., about using conditions of
> the build, to, basically make for test-time targets and run-time
> targets, with actually testing the code that goes into the build.

It's not clear to me what you want to say here but it sounds that
you want very specific ("micro-management") advice on a low level?
(If so, I can't and don't want to comment here.)

(All above from memories and off the top of my head. Hope there's
something useful for your purpose.)

Janis
Re: Inversion-of-control and dependency-injection in C
#1501
Author: Ross Finlayson
Date: Fri, 13 Nov 2026 01:22
196 lines
11681 bytes
On 11/12/2026 03:26 PM, Janis Papanagnou wrote:
> On 2026-11-12 22:15, Ross Finlayson wrote:
>> On 11/12/2026 12:11 PM, Lew Pitcher wrote:
>>> On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
>>>
>>>> Hello, dear C experts, I'm hoping you can tell me a story about
>>>> modularity and composability, about the concerns of
>>>> inversion-of-control
>>>> and dependency-injection in C, basically about wiring
>>>> test-time and run-time targets, for example about conditional-includes
>>>> and various build-targets, probably mostly about function pointers.
>>>
>>> Pardon my impertinence, but this sounds like a homework problem to me.
>>>
>>> Could you rephrase your question without the academic wording?
>>
>> Not at all, meaning, no offense taken.
>
> Your original post and its intention had been also to me quite
> unclear. Here, now, I seem to understand at what you are aiming.
>
> (Disclaimer: my comments are just based on personal experience
> in our software developing practice from the 1990's and not some
> general accepted opinion or habits.)
>
>> How about "writing testable code", what are common frameworks
>> or best practices for "writing testable code" in C.
>
> Our approach was not to "write testable code" by _adapting_ to
> some existing framework. While we had standards and practices how
> to design software the _tests followed our software_ (not v.v.).
> One exception here was that including dedicated trace records in
> our code (that could be activated specifically WRT a module and
> in granularity) helped for the test evaluation and regressions.
>
> Then we have to differentiate what tests you have in mind here;
> there's various types of tests which require their own principles.
> For example; Unit Tests (in our [C++] context mainly classes, in
> "C" probably functions or a set of related functions) required
> functions that own little test programs would call to verify all
> the relevant conditions. We haven't used frameworks that created
> the tests but wrote our own dedicated test-functions along with the
> application functions. For our Component Tests (where components
> were in our case software pieces that constitute runtime processes
> with a well-defined interface) we wrote stubs that could challenge
> the components on the interface levels. Such stubs could operate
> some predefined procedures with well-defined input, or arbitrary
> data, or be an operator-triggered manual interaction, depending on
> the type of the component. Storing all the test input and output
> results made regression tests possible. For the Integration Tests I
> don't recall the procedures (it was done in a dedicated integration
> test group); but they defined and checked the system configuration,
> the interoperability (I think!) mostly manually. Malfunctions were
> reported back to development accompanied by protocols, traces, and
> actual data. The System Tests were checked against the specification
> documents, and the Acceptance Tests against the requirements specs,
> sometimes accompanied by the customers. One aspect yet not listed
> was the test of the GUIs; beside manual tests we used tools to do
> all that "mouse shoving and clicking". But given that the functional
> tests already happened on the automatable interface level in former
> stages that was effectively just to check the "UI ergonomy" ("UX")
> factors. And, finally, we had our own hierarchical regression test
> framework to run and document the tests on each abstraction stage.
> (Eventually there were also external third-party tools existing but
> back then we wrote (had to write) our own regression test framework
> that fulfilled our demands.)
>
>>
>> I'd suggest abstraction and layers and modularity and composability,
>
> Yes, those are principles that support the mentioned QA processes.
>
>> and having an inversion-of-control/dependency-injection approach,
>
> (See my comment about "tests follow code (not v.v.)". - Opinions may
> differ.)
>
>> a convention moreso than a framework, which pretty much means wrapping
>> all the standard functions, then about for example having an include
>> where those are wrapper functions to stub and mock, and another include
>> where those are macros, or, perhaps, using includes, to point the
>> include directory for the standard library, into instead what makes
>> for stubbable/mockable calls to standard library and system functions,
>> or just leaving the headers alone and linking to modules that aren't
>> the standard libraries, this being an example of something like
>> "can't mock strftime", or, for an example.
>
> Just a comment on one aspect here; yes, you have to organize your
> software and tests. Key principles are the modularity, hierarchical
> organization, being able to automate processes, and organize all in
> some consistent way. In case your company is certified (or wants to
> get certified) make sure your processes are documented and that you
> can reproduce your quality processes and the results.
>
>>
>> Then, about the modularity, and pointers (to pointers to pointers
>> to pointers, ...) to functions, then seems about conventions of
>> types for typeof and the like about that like anybody else I rely
>> on the compiler to fail with -Wall and failing on warnings to
>> catch type errors, ..., has that I want to program to interfaces
>> and then have objects composable, ..., about using conditions of
>> the build, to, basically make for test-time targets and run-time
>> targets, with actually testing the code that goes into the build.
>
> It's not clear to me what you want to say here but it sounds that
> you want very specific ("micro-management") advice on a low level?
> (If so, I can't and don't want to comment here.)
>
> (All above from memories and off the top of my head. Hope there's
> something useful for your purpose.)
>
> Janis
>

Thanks for writing.

Usually enough these days with alike "CI/CD", ..., or the latest
buzzwords of 2018, there's "build & test & scan & deploy", usually
enough that "build & test & scan" is usually enough for "the artifacts",
the build artifacts and the test artifacts and so on.
When "automating the pipeline" and these kinds of things, it's not
un-usual that the test-suite whatever it may be, has that there are
some XML formats that are readily ingested and fungible to the
framework, vis-a-vis, usually enough it's that "./test returns
either EXIT_SUCCESS or EXIT_FAILURE and that's our predicate
and build-step and action and work-flow too in our Git Hub/Lab".

So, for whatever results "test: pass/fail", may make for that
there are fungible report formats that might be useful downstream,
for example "automated code-reviews that show what broke where, when".


So, agreeably, basically it's figured a build step.

Then, it sounds like we're both familiar with settings where
the notions of "unit tests, module tests, integration tests,
end-to-end tests, smoke-tests, sanity-tests, activation-tests",
representing ye olde "acceptance criteria" usually though often
practically "broken" or "not broken" the build, then about the
mania for "branch and line coverage, with whatever possible stubs
and mocks make the instrumented code covered", that's agreeable
and usual.


Then, about testing the black-box or white-box, say, here it's
considered that both are apropos, like for example "health checks
and internal and external health checks". Then, here's a sort of
example, if you're familiar with something like "React and Angular
and these sorts of front-ends". So, often there are things like
"jest tests then Web Driver and somebody walked through the work-flows
and it re-plays them and it only takes 8 GiB and forty-five minutes".
Well, that's with the expectation that "it has to run in the browser",
yet, at one point it was reasonably simple, for example for "React",
about 16 or 17 I suppose, to just implement "the algorithm" and just
include a file that basically modeled the runtime, then it can test
all the workflows programmatically, as a sort of example. That
got less possible when "effects" were added, yet otherwise it
was possible to have it "test" a lot faster.

It's agreeable that it may be impossible to model the system in
software when it's involved a system, and, black-box and integration
tests ("don't forget regression!"), then it may also be so that
a sort of mini-model of the surface of the library and framework
that's used, can be much, much reduced, from all the library. For
example, say "C" has 100's standard functions and "POSIX" hundreds
more. Well, often I have here programs that effectively use dozens, or
less. Then, the model of the machine is plenty involved, like "the
operating system" and "the process model" and "handles" and "sockets"
and "signals" all that, it may make sense though to make "mini-models",
basically emulating "the surface", i.e., "the test-able surface".


Then, about C, which may be less structured for abstraction as
modeling the surface of the run-time, has that many use-cases
only use a tiny, tiny fraction of the run-time, about figuring
that as modular and composable, and with basically zero available
tooling, this kind of thing.


Abstraction introduces complexity, and indirection, with the
usual idea that it compiles to what's the "zero-cost abstraction",
i.e. the abstraction gets compiled away, here basically about
replacing the implementations of the standard and library functions
with a, "mini-model", of operation, then to sort of build that
and make it re-usable, then to be able to build unit-tests off
that (and, you know, unit tests of those, ..., peeling-the-onion),
that "verified" and "certified" are like "validated" and only
"not falsified" and "not in-verified" and "not in-certified"
and "not in-validated", ..., then for "module tests" after those
unit test, then after the real build artifacts built against the
real dependencies, integration and so on.




Re: Inversion-of-control and dependency-injection in C
#1503
Author: Kenny McCormack
Date: Fri, 13 Nov 2026 05:28
28 lines
2148 bytes
In article <11d56gl$3ud5q$1@dont-email.me>,
Lew Pitcher  <lew.pitcher@digitalfreehold.ca> wrote:
>On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
>
>> Hello, dear C experts, I'm hoping you can tell me a story about
>> modularity and composability, about the concerns of inversion-of-control
>> and dependency-injection in C, basically about wiring
>> test-time and run-time targets, for example about conditional-includes
>> and various build-targets, probably mostly about function pointers.
>
>Pardon my impertinence, but this sounds like a homework problem to me.
>
>Could you rephrase your question without the academic wording? 

It is obvious AI (*) slop.  Can we just ignore this and move on?

(*) Oops.  Sorry.  I mean, "SI".

Oh, and can you believe that the SI industry is all in a tizzy and could
very well crash and wipe out trillions in paper wealth, just because of
some guy having extramarital sex?  I thought we left that sort of thing
behind in the 90s (the last time we got all in a tizzy about this sort of
thing being Bill Clinton...)

-- 
"You can safely assume that you have created God in your own image when 
it turns out that God hates all the same people you do."  -- Anne Lamott
Re: Inversion-of-control and dependency-injection in C
#1505
Author: Paul
Date: Fri, 13 Nov 2026 09:09
35 lines
2815 bytes
On Fri, 11/13/2026 12:28 AM, Kenny McCormack wrote:
> In article <11d56gl$3ud5q$1@dont-email.me>,
> Lew Pitcher  <lew.pitcher@digitalfreehold.ca> wrote:
>> On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
>>
>>> Hello, dear C experts, I'm hoping you can tell me a story about
>>> modularity and composability, about the concerns of inversion-of-control
>>> and dependency-injection in C, basically about wiring
>>> test-time and run-time targets, for example about conditional-includes
>>> and various build-targets, probably mostly about function pointers.
>>
>> Pardon my impertinence, but this sounds like a homework problem to me.
>>
>> Could you rephrase your question without the academic wording? 
> 
> It is obvious AI (*) slop.  Can we just ignore this and move on?
> 
> (*) Oops.  Sorry.  I mean, "SI".
> 
> Oh, and can you believe that the SI industry is all in a tizzy and could
> very well crash and wipe out trillions in paper wealth, just because of
> some guy having extramarital sex?  I thought we left that sort of thing
> behind in the 90s (the last time we got all in a tizzy about this sort of
> thing being Bill Clinton...)
> 

I think the issue is violation of export law.

You can see how they handle "pure diddling", in the first incident
(swept under the rug). But this is different, because of the export law thing.

If he hadn't helped the chick move 7.5 billion worth of equipment,
the metrics would be different.

   Paul
Re: Inversion-of-control and dependency-injection in C
#1506
Author: fir
Date: Fri, 13 Nov 2026 09:18
61 lines
4573 bytes
Ross Finlayson pisze:
> Hello, dear C experts, I'm hoping you can tell me a story about
> modularity and composability, about the concerns of inversion-of-control
> and dependency-injection in C, basically about wiring
> test-time and run-time targets, for example about conditional-includes
> and various build-targets, probably mostly about function pointers.
> 
> A usual account for example might recount component frameworks,
> like COM or XPCOM for example, about the concepts of components,
> vis-a-vis, modularity and composability, and, satisfaction of
> dependencies, vis-a-vis IPC and RPC, abstraction layers often enough,
> then about adapters to dependencies, or as for resources, that
> it's a bunch of makefiles with various accounts of conditional includes
> and build targets about static and dynamic linking and the toolchain,
> with regards to test-harness and runtime-framework and about
> metaprogramming when making code generation and boilerplate and so on.
> 
> 
> Defining an interface or layer is often enough about groups of functions
> associated with context-structs to make for lifecycles
> of what result alike the pure virtual or abstract or interfaces
> in reference to languages like C++, about families of functions
> according to the types of their signatures, then as with regards
> to componentry rather generally in value-types and interface-types
> like "variant" and "queryInterface()", about components that implement
> multiple interfaces vis-a-vis mostly about "constructing the
> object-graph" what makes for separation-of-concerns and composability,
> is mostly about modularity and composability.
> 
> Then considerations of modularity as for library design affect to
> reflect on how to indicate responsibilities of ownership in resources,
> for example to hide contract & behavior of resources acquire/release.
> 
> What I'm figuring is that basically there is a flat name-space of
> functions, there are .h and .c files (and may include "portable
> assembler"), and there is the compiler-toolchain, and make or
> build-scripts. Since there are only functions then dependencies their
> references would basically live in structs (in structs, in structs, ...,
> of function pointers), much like languages with classes and their
> instances objects and subclassing overriding behavior keeping in
> contract, about how to define "runtime-module" vis-a-vis "source module"
> (.o files after compilation-units), about conditional-includes
> and conditional-builds vis-a-vis name-mangling or the conventions of
> symbols.
> 
> What, whither, when, how?
> 

overally yours pyramide of this soft youre talkin about is build from 
small blocks/pieces (i dont mean pieces of code but some design pices 
(like alos this you mentioned dependency injection, inversion of 
controll and more)

if you want answers ask some specific things on those pieces..asking
on whole pyramid may be stupid as this stack of youre is probably quite
specyfic - i would guess you have so many bad design decision stacked 
its in some wayj hopeless ;c (thoug hopeless is obviously an exagerration)

i dont stack the bulshit and even in my case probblems appear when 
program is getting bigger
Re: Inversion-of-control and dependency-injection in C
#1507
Author: Bonita Montero
Date: Fri, 13 Nov 2026 12:25
5 lines
1507 bytes
Am 12.11.2026 um 21:11 schrieb Lew Pitcher:

> Pardon my impertinence, but this sounds like a homework problem to me.
Mabye that's the joke ! ;-)
Re: Inversion-of-control and dependency-injection in C
#1509
Author: Ross Finlayson
Date: Fri, 13 Nov 2026 13:07
56 lines
4315 bytes
On 11/13/2026 04:25 AM, Bonita Montero wrote:
> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>
>> Pardon my impertinence, but this sounds like a homework problem to me.
> Mabye that's the joke ! ;-)
>

Humor is appreciated since it's part of bonnehomie and good-will,
it's not a joke. (The "distance learning or distance learning"
was a joke, about "to learn something" vis-a-vis "to learn somebody",
yet that's just using humor instead of stronger insults or the
abject sumbission of the door-mat variety of throwing self under the bus.)


So, say I'm writing a usual sort of server with an idea that
basically it's about "protocols", mostly, so, living in a world
of the 7-layer OSI model, which is a pretty great abstraction and
all the Internet protocols basically live in that world of definition,
while though sometimes the network/transport then the
application/presentation layers gets switched and crossed,
point being there are systems with various accounts of moving parts
and then is for testing in isolation the parts moving and also
the moving of the parts.


Then, lots of languages make great use of "reflection", which is
an account of determining from the constructs their structure,
which one may aver that that's what parser & compilers do already,
and so if a C programmer needs reflection then if they're a real
programmer or a real coder then they'd just make their own account
of reflection and model the world in a model of the world, and
C++ it's said is getting reflection added to the giant tower of
what's become of its language and libraries and idiom shoehorned
into the language instead of libraries, or made standard, that
since "run-time-type-identification" for example since something
quite useful like "the variant data-type", sort of an "any: typed",
that "reflection" and "introspection" are how most of the unit-testing
frameworks make for inference about types then for conventions of
signatures to make it easy the "test-fixtures", or otherwise the
accounts of modularity and inversion-of-control and
dependency-injection, then about something like C that it's "just invoke
functions with data and assert(expected == actual)", that for example of
"the many main()'s" just exec'ing those from the test process
whether the tests exit(0) or exit(1), or rather as they die when
assert evaluates false, for example as with regards when running
under a debugger naturally just stopping there live in the debugger.


So, among the goals of writing frameworks or tools or tests or
systems, is that it works nicely with all the tools, according
to usually enough just the totally common standards of the toolchain and
the usual object files in the usual object formats on the usual
runtimes.


Re: Inversion-of-control and dependency-injection in C
#1510
Author: bartc
Date: Fri, 13 Nov 2026 13:27
68 lines
4760 bytes
On 13/11/2026 13:07, Ross Finlayson wrote:
> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>
>>> Pardon my impertinence, but this sounds like a homework problem to me.
>> Mabye that's the joke ! ;-)
>>
> 
> Humor is appreciated since it's part of bonnehomie and good-will,
> it's not a joke. (The "distance learning or distance learning"
> was a joke, about "to learn something" vis-a-vis "to learn somebody",
> yet that's just using humor instead of stronger insults or the
> abject sumbission of the door-mat variety of throwing self under the bus.)
> 
> 
> So, say I'm writing a usual sort of server with an idea that
> basically it's about "protocols", mostly, so, living in a world
> of the 7-layer OSI model, which is a pretty great abstraction and
> all the Internet protocols basically live in that world of definition,
> while though sometimes the network/transport then the
> application/presentation layers gets switched and crossed,
> point being there are systems with various accounts of moving parts
> and then is for testing in isolation the parts moving and also
> the moving of the parts.
> 
> 
> Then, lots of languages make great use of "reflection", which is
> an account of determining from the constructs their structure,
> which one may aver that that's what parser & compilers do already,
> and so if a C programmer needs reflection then if they're a real
> programmer or a real coder then they'd just make their own account
> of reflection and model the world in a model of the world, and
> C++ it's said is getting reflection added to the giant tower of
> what's become of its language and libraries and idiom shoehorned
> into the language instead of libraries, or made standard, that
> since "run-time-type-identification" for example since something
> quite useful like "the variant data-type", sort of an "any: typed",
> that "reflection" and "introspection" are how most of the unit-testing
> frameworks make for inference about types then for conventions of
> signatures to make it easy the "test-fixtures", or otherwise the
> accounts of modularity and inversion-of-control and
> dependency-injection, then about something like C that it's "just invoke
> functions with data and assert(expected == actual)", that for example of
> "the many main()'s" just exec'ing those from the test process
> whether the tests exit(0) or exit(1), or rather as they die when
> assert evaluates false, for example as with regards when running
> under a debugger naturally just stopping there live in the debugger.
> 
> 
> So, among the goals of writing frameworks or tools or tests or
> systems, is that it works nicely with all the tools, according
> to usually enough just the totally common standards of the toolchain and
> the usual object files in the usual object formats on the usual
> runtimes.
This is not homework. And it's not written in good faith, it is just 
gobbledygook.

I'm surprised so many here can't see it.

Here is an interesting challenge: take a list of all these buzzwords, 
and try to write a set of viable-looking but meaningless paragraphs as 
Mr RF has done.

You don't need to use a program to do it (although it would be most 
impressive as a C exercise).

You win when a human mistakes it for something profound and insightful.
Re: Inversion-of-control and dependency-injection in C
#1512
Author: Richard Harnden
Date: Fri, 13 Nov 2026 13:49
62 lines
4455 bytes
On 13/11/2026 13:07, Ross Finlayson wrote:
> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>
>>> Pardon my impertinence, but this sounds like a homework problem to me.
>> Mabye that's the joke ! ;-)
>>
> 
> Humor is appreciated since it's part of bonnehomie and good-will,
> it's not a joke. (The "distance learning or distance learning"
> was a joke, about "to learn something" vis-a-vis "to learn somebody",
> yet that's just using humor instead of stronger insults or the
> abject sumbission of the door-mat variety of throwing self under the bus.)
> 
> 
> So, say I'm writing a usual sort of server with an idea that
> basically it's about "protocols", mostly, so, living in a world
> of the 7-layer OSI model, which is a pretty great abstraction and
> all the Internet protocols basically live in that world of definition,
> while though sometimes the network/transport then the
> application/presentation layers gets switched and crossed,
> point being there are systems with various accounts of moving parts
> and then is for testing in isolation the parts moving and also
> the moving of the parts.
> 
> 
> Then, lots of languages make great use of "reflection", which is
> an account of determining from the constructs their structure,
> which one may aver that that's what parser & compilers do already,
> and so if a C programmer needs reflection then if they're a real
> programmer or a real coder then they'd just make their own account
> of reflection and model the world in a model of the world, and
> C++ it's said is getting reflection added to the giant tower of
> what's become of its language and libraries and idiom shoehorned
> into the language instead of libraries, or made standard, that
> since "run-time-type-identification" for example since something
> quite useful like "the variant data-type", sort of an "any: typed",
> that "reflection" and "introspection" are how most of the unit-testing
> frameworks make for inference about types then for conventions of
> signatures to make it easy the "test-fixtures", or otherwise the
> accounts of modularity and inversion-of-control and
> dependency-injection, then about something like C that it's "just invoke
> functions with data and assert(expected == actual)", that for example of
> "the many main()'s" just exec'ing those from the test process
> whether the tests exit(0) or exit(1), or rather as they die when
> assert evaluates false, for example as with regards when running
> under a debugger naturally just stopping there live in the debugger.
> 
> 
> So, among the goals of writing frameworks or tools or tests or
> systems, is that it works nicely with all the tools, according
> to usually enough just the totally common standards of the toolchain and
> the usual object files in the usual object formats on the usual
> runtimes.
> 
> 
> 

The answer is 'yes'. Or maybe 'no'. I'm not sure.

What was the question?
Re: Inversion-of-control and dependency-injection in C
#1511
Author: Ross Finlayson
Date: Fri, 13 Nov 2026 13:50
74 lines
5126 bytes
On 11/13/2026 05:27 AM, bartc wrote:
> On 13/11/2026 13:07, Ross Finlayson wrote:
>> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>>
>>>> Pardon my impertinence, but this sounds like a homework problem to me.
>>> Mabye that's the joke ! ;-)
>>>
>>
>> Humor is appreciated since it's part of bonnehomie and good-will,
>> it's not a joke. (The "distance learning or distance learning"
>> was a joke, about "to learn something" vis-a-vis "to learn somebody",
>> yet that's just using humor instead of stronger insults or the
>> abject sumbission of the door-mat variety of throwing self under the
>> bus.)
>>
>>
>> So, say I'm writing a usual sort of server with an idea that
>> basically it's about "protocols", mostly, so, living in a world
>> of the 7-layer OSI model, which is a pretty great abstraction and
>> all the Internet protocols basically live in that world of definition,
>> while though sometimes the network/transport then the
>> application/presentation layers gets switched and crossed,
>> point being there are systems with various accounts of moving parts
>> and then is for testing in isolation the parts moving and also
>> the moving of the parts.
>>
>>
>> Then, lots of languages make great use of "reflection", which is
>> an account of determining from the constructs their structure,
>> which one may aver that that's what parser & compilers do already,
>> and so if a C programmer needs reflection then if they're a real
>> programmer or a real coder then they'd just make their own account
>> of reflection and model the world in a model of the world, and
>> C++ it's said is getting reflection added to the giant tower of
>> what's become of its language and libraries and idiom shoehorned
>> into the language instead of libraries, or made standard, that
>> since "run-time-type-identification" for example since something
>> quite useful like "the variant data-type", sort of an "any: typed",
>> that "reflection" and "introspection" are how most of the unit-testing
>> frameworks make for inference about types then for conventions of
>> signatures to make it easy the "test-fixtures", or otherwise the
>> accounts of modularity and inversion-of-control and
>> dependency-injection, then about something like C that it's "just invoke
>> functions with data and assert(expected == actual)", that for example of
>> "the many main()'s" just exec'ing those from the test process
>> whether the tests exit(0) or exit(1), or rather as they die when
>> assert evaluates false, for example as with regards when running
>> under a debugger naturally just stopping there live in the debugger.
>>
>>
>> So, among the goals of writing frameworks or tools or tests or
>> systems, is that it works nicely with all the tools, according
>> to usually enough just the totally common standards of the toolchain and
>> the usual object files in the usual object formats on the usual
>> runtimes.
> This is not homework. And it's not written in good faith, it is just
> gobbledygook.
>
> I'm surprised so many here can't see it.
>
> Here is an interesting challenge: take a list of all these buzzwords,
> and try to write a set of viable-looking but meaningless paragraphs as
> Mr RF has done.
>
> You don't need to use a program to do it (although it would be most
> impressive as a C exercise).
>
> You win when a human mistakes it for something profound and insightful.
>

You challenge my good faith, then to hell with you.

Re: Inversion-of-control and dependency-injection in C
#1513
Author: Ross Finlayson
Date: Fri, 13 Nov 2026 13:56
84 lines
5620 bytes
On 11/13/2026 05:50 AM, Ross Finlayson wrote:
> On 11/13/2026 05:27 AM, bartc wrote:
>> On 13/11/2026 13:07, Ross Finlayson wrote:
>>> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>>>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>>>
>>>>> Pardon my impertinence, but this sounds like a homework problem to me.
>>>> Mabye that's the joke ! ;-)
>>>>
>>>
>>> Humor is appreciated since it's part of bonnehomie and good-will,
>>> it's not a joke. (The "distance learning or distance learning"
>>> was a joke, about "to learn something" vis-a-vis "to learn somebody",
>>> yet that's just using humor instead of stronger insults or the
>>> abject sumbission of the door-mat variety of throwing self under the
>>> bus.)
>>>
>>>
>>> So, say I'm writing a usual sort of server with an idea that
>>> basically it's about "protocols", mostly, so, living in a world
>>> of the 7-layer OSI model, which is a pretty great abstraction and
>>> all the Internet protocols basically live in that world of definition,
>>> while though sometimes the network/transport then the
>>> application/presentation layers gets switched and crossed,
>>> point being there are systems with various accounts of moving parts
>>> and then is for testing in isolation the parts moving and also
>>> the moving of the parts.
>>>
>>>
>>> Then, lots of languages make great use of "reflection", which is
>>> an account of determining from the constructs their structure,
>>> which one may aver that that's what parser & compilers do already,
>>> and so if a C programmer needs reflection then if they're a real
>>> programmer or a real coder then they'd just make their own account
>>> of reflection and model the world in a model of the world, and
>>> C++ it's said is getting reflection added to the giant tower of
>>> what's become of its language and libraries and idiom shoehorned
>>> into the language instead of libraries, or made standard, that
>>> since "run-time-type-identification" for example since something
>>> quite useful like "the variant data-type", sort of an "any: typed",
>>> that "reflection" and "introspection" are how most of the unit-testing
>>> frameworks make for inference about types then for conventions of
>>> signatures to make it easy the "test-fixtures", or otherwise the
>>> accounts of modularity and inversion-of-control and
>>> dependency-injection, then about something like C that it's "just invoke
>>> functions with data and assert(expected == actual)", that for example of
>>> "the many main()'s" just exec'ing those from the test process
>>> whether the tests exit(0) or exit(1), or rather as they die when
>>> assert evaluates false, for example as with regards when running
>>> under a debugger naturally just stopping there live in the debugger.
>>>
>>>
>>> So, among the goals of writing frameworks or tools or tests or
>>> systems, is that it works nicely with all the tools, according
>>> to usually enough just the totally common standards of the toolchain and
>>> the usual object files in the usual object formats on the usual
>>> runtimes.
>> This is not homework. And it's not written in good faith, it is just
>> gobbledygook.
>>
>> I'm surprised so many here can't see it.
>>
>> Here is an interesting challenge: take a list of all these buzzwords,
>> and try to write a set of viable-looking but meaningless paragraphs as
>> Mr RF has done.
>>
>> You don't need to use a program to do it (although it would be most
>> impressive as a C exercise).
>>
>> You win when a human mistakes it for something profound and insightful.
>>
>
> You challenge my good faith, then to hell with you.
>
>


Basically free humans should make a nice new clean-room take on
open source with stable interfaces, before the would-be bot-ocracy
re-writes it as a warren and maze of dark twisty passages all alike.

It might be eaten by a grue, ....

Re: Inversion-of-control and dependency-injection in C
#1514
Author: David Brown
Date: Fri, 13 Nov 2026 14:07
25 lines
2274 bytes
On 13/11/2026 14:27, bartc wrote:

> This is not homework. And it's not written in good faith, it is just 
> gobbledygook.
> 
> I'm surprised so many here can't see it.
> 
> Here is an interesting challenge: take a list of all these buzzwords, 
> and try to write a set of viable-looking but meaningless paragraphs as 
> Mr RF has done.
> 
> You don't need to use a program to do it (although it would be most 
> impressive as a C exercise).
> 
> You win when a human mistakes it for something profound and insightful.
> 

I don't think there is any bad-faith or trolling in Ross' posts - he 
seems simply incapable of writing comprehensibly.  It is gobbledygook, 
but I don't see it as intentional.

It looks like he is trying to ask something about how people test their 
C code, but I can't figure out anything more than that.

Re: Inversion-of-control and dependency-injection in C
#1515
Author: Ross Finlayson
Date: Fri, 13 Nov 2026 14:24
78 lines
5210 bytes
On 11/13/2026 05:49 AM, Richard Harnden wrote:
> On 13/11/2026 13:07, Ross Finlayson wrote:
>> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>>
>>>> Pardon my impertinence, but this sounds like a homework problem to me.
>>> Mabye that's the joke ! ;-)
>>>
>>
>> Humor is appreciated since it's part of bonnehomie and good-will,
>> it's not a joke. (The "distance learning or distance learning"
>> was a joke, about "to learn something" vis-a-vis "to learn somebody",
>> yet that's just using humor instead of stronger insults or the
>> abject sumbission of the door-mat variety of throwing self under the
>> bus.)
>>
>>
>> So, say I'm writing a usual sort of server with an idea that
>> basically it's about "protocols", mostly, so, living in a world
>> of the 7-layer OSI model, which is a pretty great abstraction and
>> all the Internet protocols basically live in that world of definition,
>> while though sometimes the network/transport then the
>> application/presentation layers gets switched and crossed,
>> point being there are systems with various accounts of moving parts
>> and then is for testing in isolation the parts moving and also
>> the moving of the parts.
>>
>>
>> Then, lots of languages make great use of "reflection", which is
>> an account of determining from the constructs their structure,
>> which one may aver that that's what parser & compilers do already,
>> and so if a C programmer needs reflection then if they're a real
>> programmer or a real coder then they'd just make their own account
>> of reflection and model the world in a model of the world, and
>> C++ it's said is getting reflection added to the giant tower of
>> what's become of its language and libraries and idiom shoehorned
>> into the language instead of libraries, or made standard, that
>> since "run-time-type-identification" for example since something
>> quite useful like "the variant data-type", sort of an "any: typed",
>> that "reflection" and "introspection" are how most of the unit-testing
>> frameworks make for inference about types then for conventions of
>> signatures to make it easy the "test-fixtures", or otherwise the
>> accounts of modularity and inversion-of-control and
>> dependency-injection, then about something like C that it's "just invoke
>> functions with data and assert(expected == actual)", that for example of
>> "the many main()'s" just exec'ing those from the test process
>> whether the tests exit(0) or exit(1), or rather as they die when
>> assert evaluates false, for example as with regards when running
>> under a debugger naturally just stopping there live in the debugger.
>>
>>
>> So, among the goals of writing frameworks or tools or tests or
>> systems, is that it works nicely with all the tools, according
>> to usually enough just the totally common standards of the toolchain and
>> the usual object files in the usual object formats on the usual
>> runtimes.
>>
>>
>>
>
> The answer is 'yes'. Or maybe 'no'. I'm not sure.
>
> What was the question?
>


How to design and make conventions and opinions and idiom and discipline
the inversion-of-control and dependency-injection
for the modularity and composability, in C? How do?

For example, "what is good style in C to be idiomatic and
direct in C toward zero-cost-abstraction, while yet directly
resulting clean modular composable object-orientation in
higher-level languages to wrap and interoperate, with
modular and composable, and re-usable, and reliable,
components in C?"

Re: Inversion-of-control and dependency-injection in C
#1516
Author: Ross Finlayson
Date: Fri, 13 Nov 2026 14:29
92 lines
5761 bytes
On 11/13/2026 06:24 AM, Ross Finlayson wrote:
> On 11/13/2026 05:49 AM, Richard Harnden wrote:
>> On 13/11/2026 13:07, Ross Finlayson wrote:
>>> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>>>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>>>
>>>>> Pardon my impertinence, but this sounds like a homework problem to me.
>>>> Mabye that's the joke ! ;-)
>>>>
>>>
>>> Humor is appreciated since it's part of bonnehomie and good-will,
>>> it's not a joke. (The "distance learning or distance learning"
>>> was a joke, about "to learn something" vis-a-vis "to learn somebody",
>>> yet that's just using humor instead of stronger insults or the
>>> abject sumbission of the door-mat variety of throwing self under the
>>> bus.)
>>>
>>>
>>> So, say I'm writing a usual sort of server with an idea that
>>> basically it's about "protocols", mostly, so, living in a world
>>> of the 7-layer OSI model, which is a pretty great abstraction and
>>> all the Internet protocols basically live in that world of definition,
>>> while though sometimes the network/transport then the
>>> application/presentation layers gets switched and crossed,
>>> point being there are systems with various accounts of moving parts
>>> and then is for testing in isolation the parts moving and also
>>> the moving of the parts.
>>>
>>>
>>> Then, lots of languages make great use of "reflection", which is
>>> an account of determining from the constructs their structure,
>>> which one may aver that that's what parser & compilers do already,
>>> and so if a C programmer needs reflection then if they're a real
>>> programmer or a real coder then they'd just make their own account
>>> of reflection and model the world in a model of the world, and
>>> C++ it's said is getting reflection added to the giant tower of
>>> what's become of its language and libraries and idiom shoehorned
>>> into the language instead of libraries, or made standard, that
>>> since "run-time-type-identification" for example since something
>>> quite useful like "the variant data-type", sort of an "any: typed",
>>> that "reflection" and "introspection" are how most of the unit-testing
>>> frameworks make for inference about types then for conventions of
>>> signatures to make it easy the "test-fixtures", or otherwise the
>>> accounts of modularity and inversion-of-control and
>>> dependency-injection, then about something like C that it's "just invoke
>>> functions with data and assert(expected == actual)", that for example of
>>> "the many main()'s" just exec'ing those from the test process
>>> whether the tests exit(0) or exit(1), or rather as they die when
>>> assert evaluates false, for example as with regards when running
>>> under a debugger naturally just stopping there live in the debugger.
>>>
>>>
>>> So, among the goals of writing frameworks or tools or tests or
>>> systems, is that it works nicely with all the tools, according
>>> to usually enough just the totally common standards of the toolchain and
>>> the usual object files in the usual object formats on the usual
>>> runtimes.
>>>
>>>
>>>
>>
>> The answer is 'yes'. Or maybe 'no'. I'm not sure.
>>
>> What was the question?
>>
>
>
> How to design and make conventions and opinions and idiom and discipline
> the inversion-of-control and dependency-injection
> for the modularity and composability, in C? How do?
>
> For example, "what is good style in C to be idiomatic and
> direct in C toward zero-cost-abstraction, while yet directly
> resulting clean modular composable object-orientation in
> higher-level languages to wrap and interoperate, with
> modular and composable, and re-usable, and reliable,
> components in C?"
>
>

Object-oriented programming, data-oriented programming,
aspect-oriented programming, table-oriented programming,
pattern-oriented programming, ....

Systems programming, ..., application programming, ...,
core programming, distributed programming, ....

Procedural, function, literate, intentional, ....

-> Modules. (Blocks and Modules, Modules and Interfaces.)

Re: Inversion-of-control and dependency-injection in C
#1519
Author: bartc
Date: Fri, 13 Nov 2026 16:01
49 lines
3063 bytes
On 13/11/2026 14:07, David Brown wrote:
> On 13/11/2026 14:27, bartc wrote:
> 
>> This is not homework. And it's not written in good faith, it is just 
>> gobbledygook.
>>
>> I'm surprised so many here can't see it.
>>
>> Here is an interesting challenge: take a list of all these buzzwords, 
>> and try to write a set of viable-looking but meaningless paragraphs as 
>> Mr RF has done.
>>
>> You don't need to use a program to do it (although it would be most 
>> impressive as a C exercise).
>>
>> You win when a human mistakes it for something profound and insightful.
>>
> 
> I don't think there is any bad-faith or trolling in Ross' posts - he 
> seems simply incapable of writing comprehensibly.  It is gobbledygook, 
> but I don't see it as intentional.
> 
> It looks like he is trying to ask something about how people test their 
> C code, but I can't figure out anything more than that.
> 

How about this which was recently posted:

RH:
 >> What was the question?
 >>
 >
RF:
 > How to design and make conventions and opinions and idiom and discipline
 > the inversion-of-control and dependency-injection
 > for the modularity and composability, in C? How do?
 >
 > For example, "what is good style in C to be idiomatic and
 > direct in C toward zero-cost-abstraction, while yet directly
 > resulting clean modular composable object-orientation in
 > higher-level languages to wrap and interoperate, with
 > modular and composable, and re-usable, and reliable,
 > components in C?"

It is just utterly meaningless. Still think this is written in good 
faith? RF is just having a laugh.


Re: Inversion-of-control and dependency-injection in C
#1520
Author: fir
Date: Fri, 13 Nov 2026 16:10
93 lines
5898 bytes
Ross Finlayson pisze:
> On 11/13/2026 05:49 AM, Richard Harnden wrote:
>> On 13/11/2026 13:07, Ross Finlayson wrote:
>>> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>>>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>>>
>>>>> Pardon my impertinence, but this sounds like a homework problem to me.
>>>> Mabye that's the joke ! ;-)
>>>>
>>>
>>> Humor is appreciated since it's part of bonnehomie and good-will,
>>> it's not a joke. (The "distance learning or distance learning"
>>> was a joke, about "to learn something" vis-a-vis "to learn somebody",
>>> yet that's just using humor instead of stronger insults or the
>>> abject sumbission of the door-mat variety of throwing self under the
>>> bus.)
>>>
>>>
>>> So, say I'm writing a usual sort of server with an idea that
>>> basically it's about "protocols", mostly, so, living in a world
>>> of the 7-layer OSI model, which is a pretty great abstraction and
>>> all the Internet protocols basically live in that world of definition,
>>> while though sometimes the network/transport then the
>>> application/presentation layers gets switched and crossed,
>>> point being there are systems with various accounts of moving parts
>>> and then is for testing in isolation the parts moving and also
>>> the moving of the parts.
>>>
>>>
>>> Then, lots of languages make great use of "reflection", which is
>>> an account of determining from the constructs their structure,
>>> which one may aver that that's what parser & compilers do already,
>>> and so if a C programmer needs reflection then if they're a real
>>> programmer or a real coder then they'd just make their own account
>>> of reflection and model the world in a model of the world, and
>>> C++ it's said is getting reflection added to the giant tower of
>>> what's become of its language and libraries and idiom shoehorned
>>> into the language instead of libraries, or made standard, that
>>> since "run-time-type-identification" for example since something
>>> quite useful like "the variant data-type", sort of an "any: typed",
>>> that "reflection" and "introspection" are how most of the unit-testing
>>> frameworks make for inference about types then for conventions of
>>> signatures to make it easy the "test-fixtures", or otherwise the
>>> accounts of modularity and inversion-of-control and
>>> dependency-injection, then about something like C that it's "just invoke
>>> functions with data and assert(expected == actual)", that for example of
>>> "the many main()'s" just exec'ing those from the test process
>>> whether the tests exit(0) or exit(1), or rather as they die when
>>> assert evaluates false, for example as with regards when running
>>> under a debugger naturally just stopping there live in the debugger.
>>>
>>>
>>> So, among the goals of writing frameworks or tools or tests or
>>> systems, is that it works nicely with all the tools, according
>>> to usually enough just the totally common standards of the toolchain and
>>> the usual object files in the usual object formats on the usual
>>> runtimes.
>>>
>>>
>>>
>>
>> The answer is 'yes'. Or maybe 'no'. I'm not sure.
>>
>> What was the question?
>>
> 
> 
> How to design and make conventions and opinions and idiom and discipline
> the inversion-of-control and dependency-injection
> for the modularity and composability, in C? How do?
> 
> For example, "what is good style in C to be idiomatic and
> direct in C toward zero-cost-abstraction, while yet directly
> resulting clean modular composable object-orientation in
> higher-level languages to wrap and interoperate, with
> modular and composable, and re-usable, and reliable,
> components in C?"
> 
in c you use dlls

its reusable, reliable, modular, as far as i know is to be wrapped in hl 
languages, its lean ad modulat and forunatly its not OOP shit, its also
probably idiomatis its direct and its about zero cost

objet orientation s trash - hovever you could do it by writing some 
things that return handles but imo if you use handles its probably bad 
design (i rarely used handles - though dont ask me how to ot use handles
as i donr remember when i wrota a code it just usually dont need
handles (or i use it minimal way, i mean if handle is assigned 
immedatelly to a global variable its less dangerous/confusing)


Re: Inversion-of-control and dependency-injection in C
#1522
Author: David Brown
Date: Fri, 13 Nov 2026 16:54
54 lines
3546 bytes
On 13/11/2026 17:01, bartc wrote:
> On 13/11/2026 14:07, David Brown wrote:
>> On 13/11/2026 14:27, bartc wrote:
>>
>>> This is not homework. And it's not written in good faith, it is just 
>>> gobbledygook.
>>>
>>> I'm surprised so many here can't see it.
>>>
>>> Here is an interesting challenge: take a list of all these buzzwords, 
>>> and try to write a set of viable-looking but meaningless paragraphs 
>>> as Mr RF has done.
>>>
>>> You don't need to use a program to do it (although it would be most 
>>> impressive as a C exercise).
>>>
>>> You win when a human mistakes it for something profound and insightful.
>>>
>>
>> I don't think there is any bad-faith or trolling in Ross' posts - he 
>> seems simply incapable of writing comprehensibly.  It is gobbledygook, 
>> but I don't see it as intentional.
>>
>> It looks like he is trying to ask something about how people test 
>> their C code, but I can't figure out anything more than that.
>>
> 
> How about this which was recently posted:
> 
> RH:
>  >> What was the question?
>  >>
>  >
> RF:
>  > How to design and make conventions and opinions and idiom and discipline
>  > the inversion-of-control and dependency-injection
>  > for the modularity and composability, in C? How do?
>  >
>  > For example, "what is good style in C to be idiomatic and
>  > direct in C toward zero-cost-abstraction, while yet directly
>  > resulting clean modular composable object-orientation in
>  > higher-level languages to wrap and interoperate, with
>  > modular and composable, and re-usable, and reliable,
>  > components in C?"
> 
> It is just utterly meaningless. Still think this is written in good 
> faith? RF is just having a laugh.
> 
His posts are not written by AI - no AI writes that badly.  And it is 
not so void of meaning and grammar that it is randomly generated.  Ross 
has written posts in this style for many years in several Usenet groups. 
  I find it hard to believe that someone would spend so much time and 
effort for a joke.
Re: Inversion-of-control and dependency-injection in C
#1526
Author: Ross Finlayson
Date: Fri, 13 Nov 2026 22:50
85 lines
5025 bytes
On 11/13/2026 08:54 AM, David Brown wrote:
> On 13/11/2026 17:01, bartc wrote:
>> On 13/11/2026 14:07, David Brown wrote:
>>> On 13/11/2026 14:27, bartc wrote:
>>>
>>>> This is not homework. And it's not written in good faith, it is just
>>>> gobbledygook.
>>>>
>>>> I'm surprised so many here can't see it.
>>>>
>>>> Here is an interesting challenge: take a list of all these
>>>> buzzwords, and try to write a set of viable-looking but meaningless
>>>> paragraphs as Mr RF has done.
>>>>
>>>> You don't need to use a program to do it (although it would be most
>>>> impressive as a C exercise).
>>>>
>>>> You win when a human mistakes it for something profound and insightful.
>>>>
>>>
>>> I don't think there is any bad-faith or trolling in Ross' posts - he
>>> seems simply incapable of writing comprehensibly.  It is
>>> gobbledygook, but I don't see it as intentional.
>>>
>>> It looks like he is trying to ask something about how people test
>>> their C code, but I can't figure out anything more than that.
>>>
>>
>> How about this which was recently posted:
>>
>> RH:
>>  >> What was the question?
>>  >>
>>  >
>> RF:
>>  > How to design and make conventions and opinions and idiom and
>> discipline
>>  > the inversion-of-control and dependency-injection
>>  > for the modularity and composability, in C? How do?
>>  >
>>  > For example, "what is good style in C to be idiomatic and
>>  > direct in C toward zero-cost-abstraction, while yet directly
>>  > resulting clean modular composable object-orientation in
>>  > higher-level languages to wrap and interoperate, with
>>  > modular and composable, and re-usable, and reliable,
>>  > components in C?"
>>
>> It is just utterly meaningless. Still think this is written in good
>> faith? RF is just having a laugh.
>>
> His posts are not written by AI - no AI writes that badly.  And it is
> not so void of meaning and grammar that it is randomly generated.  Ross
> has written posts in this style for many years in several Usenet groups.
>   I find it hard to believe that someone would spend so much time and
> effort for a joke.
>


Hm.

Yes, I've tapped 10,000's posts to Usenet with my own fat fingers.
This includes basically research and a survey into "the Foundations
of Mathematics", including a rather strong attack, then also I've
been looking into physics for a while.

I've written 100's KLOC's enterprise code, and generated tons more,
at various outlets of "big tech", among my dozens logins.

Also there are several hundred hours on my "YouTube" channel. All me.



So, here's one. Say you got a server process for sockets of the
connection-oriented or datagram-wise or association-oriented like
TCP, UDP, or SCTP, and it manages the connecting and the sending and
receiving about a million of those and is sort of fixed-size and
stable in a usual runtime. So, how do you design the interface,
about stuff like the state-machine of _protocols_, all about
_protocols_, in the application-layer and above, say, for example
the incremental-parsing and the state-machine of the protocol
and sub-protocols and upgrade-protocols and the like, what sort
of abstraction with suitable-defaults and reasonable-opinions
makes for having any sort protocol as a composable library.

People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1527
Author: Kenny McCormack
Date: Sat, 14 Nov 2026 08:09
17 lines
1718 bytes
In article <11d7fbv$1839o$2@dont-email.me>,
David Brown  <david.brown@hesbynett.no> wrote:
...
>His posts are not written by AI - no AI writes that badly.  And it is 
>not so void of meaning and grammar that it is randomly generated.  Ross 
>has written posts in this style for many years in several Usenet groups. 
>  I find it hard to believe that someone would spend so much time and 
>effort for a joke.

One word: fir.

And, BTW, "joke" isn't quite the right word.  It is more of thinking you
are on a mission from God.

-- 
A 70 year old man who watches 6 hours of TV a day, plays a lot of golf
and seems to always be in Florida is a retiree, not a president.
Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1528
Author: fir
Date: Sat, 14 Nov 2026 10:49
21 lines
2303 bytes
Kenny McCormack pisze:
> In article <11d7fbv$1839o$2@dont-email.me>,
> David Brown  <david.brown@hesbynett.no> wrote:
> ...
>> His posts are not written by AI - no AI writes that badly.  And it is
>> not so void of meaning and grammar that it is randomly generated.  Ross
>> has written posts in this style for many years in several Usenet groups.
>>   I find it hard to believe that someone would spend so much time and
>> effort for a joke.
> 
> One word: fir.
> 
> And, BTW, "joke" isn't quite the right word.  It is more of thinking you
> are on a mission from God.
> 

maybe stap talkin bulshit kenny.. this pure fact ypou dont understand 
what im saying it dont means im on a mission from god (Crom is only a 
helper)

im just doing some science on c syntax space, thats all
Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1530
Author: bartc
Date: Sat, 14 Nov 2026 12:14
15 lines
1955 bytes
On 14/11/2026 08:09, Kenny McCormack wrote:
> In article <11d7fbv$1839o$2@dont-email.me>,
> David Brown  <david.brown@hesbynett.no> wrote:
> ...
>> His posts are not written by AI - no AI writes that badly.  And it is
>> not so void of meaning and grammar that it is randomly generated.  Ross
>> has written posts in this style for many years in several Usenet groups.
>>   I find it hard to believe that someone would spend so much time and
>> effort for a joke.
> 
> One word: fir.

How about Bill Cunningham?

Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1531
Author: Kenny McCormack
Date: Sat, 14 Nov 2026 13:19
44 lines
2896 bytes
In article <11d9jb7$1tt0p$1@dont-email.me>, bartc  <bc@freeuk.com> wrote:
>On 14/11/2026 08:09, Kenny McCormack wrote:
>> In article <11d7fbv$1839o$2@dont-email.me>,
>> David Brown  <david.brown@hesbynett.no> wrote:
>> ...
>>> His posts are not written by AI - no AI writes that badly.  And it is
>>> not so void of meaning and grammar that it is randomly generated.  Ross
>>> has written posts in this style for many years in several Usenet groups.
>>>   I find it hard to believe that someone would spend so much time and
>>> effort for a joke.
>> 
>> One word: fir.
>
>How about Bill Cunningham?
>
>

Not sure I catch the reference, but I do vaguely remember that name being
someone who used to post here.

The thing is, though, when you get right down to it, nobody really knows
why anyone posts here.  I think each person who does does so for personal
reasons that are in general not fully comprehensible by anyone else.

Take the classic question: Why does Kenny McCormack post here, when all he
does is troll?  Well, he does it because it is fun and it amuses him.

But I often ask: Why does KT post here?  Since he obviously knows
everything there is to know about C, why bother posting here?  It's not
like he is ever going to learn anything (since he already knows
everything).  Now, he will say, it is because he wants to help people.
Well, this motive is already suspect (usually people who say they want to
help people have some other motive, sometimes in addition to a genuine
desire to help, but sometimes as the only motive), and, secondly, given how
much effort he puts into it, it is hard to believe that altruism is the
only reason.

And you could ask similar questions about just about everyone else who
posts to Usenet (not just this group) ?

And so it goes...

-- 
Shikata ga nai...
Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1532
Author: fir
Date: Sat, 14 Nov 2026 13:33
51 lines
3828 bytes
Kenny McCormack pisze:
> In article <11d9jb7$1tt0p$1@dont-email.me>, bartc  <bc@freeuk.com> wrote:
>> On 14/11/2026 08:09, Kenny McCormack wrote:
>>> In article <11d7fbv$1839o$2@dont-email.me>,
>>> David Brown  <david.brown@hesbynett.no> wrote:
>>> ...
>>>> His posts are not written by AI - no AI writes that badly.  And it is
>>>> not so void of meaning and grammar that it is randomly generated.  Ross
>>>> has written posts in this style for many years in several Usenet groups.
>>>>    I find it hard to believe that someone would spend so much time and
>>>> effort for a joke.
>>>
>>> One word: fir.
>>
>> How about Bill Cunningham?
>>
>>
> 
> Not sure I catch the reference, but I do vaguely remember that name being
> someone who used to post here.
> 
> The thing is, though, when you get right down to it, nobody really knows
> why anyone posts here.  I think each person who does does so for personal
> reasons that are in general not fully comprehensible by anyone else.
> 
> Take the classic question: Why does Kenny McCormack post here, when all he
> does is troll?  Well, he does it because it is fun and it amuses him.
> 
> But I often ask: Why does KT post here?  Since he obviously knows
> everything there is to know about C, why bother posting here?  It's not
> like he is ever going to learn anything (since he already knows
> everything).  Now, he will say, it is because he wants to help people.
> Well, this motive is already suspect (usually people who say they want to
> help people have some other motive, sometimes in addition to a genuine
> desire to help, but sometimes as the only motive), and, secondly, given how
> much effort he puts into it, it is hard to believe that altruism is the
> only reason.
> 
> And you could ask similar questions about just about everyone else who
> posts to Usenet (not just this group) ?
> 
> And so it goes...
> 

i post here to increase my knowledge and understanding the c and "behind 
c" and im quite succesfull in it i would say (also note my plan is to 
code and thus write here till the end of the year, maybe enlonged to 
middle of januarry so later i may vanish for few months

interesting in last years i get real long breaks on coding but this 
autumn thenx to ai it gave me a doze of fun again)
Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1533
Author: Ross Finlayson
Date: Sat, 14 Nov 2026 16:17
113 lines
6761 bytes
On 11/14/2026 05:19 AM, Kenny McCormack wrote:
> In article <11d9jb7$1tt0p$1@dont-email.me>, bartc  <bc@freeuk.com> wrote:
>> On 14/11/2026 08:09, Kenny McCormack wrote:
>>> In article <11d7fbv$1839o$2@dont-email.me>,
>>> David Brown  <david.brown@hesbynett.no> wrote:
>>> ...
>>>> His posts are not written by AI - no AI writes that badly.  And it is
>>>> not so void of meaning and grammar that it is randomly generated.  Ross
>>>> has written posts in this style for many years in several Usenet groups.
>>>>    I find it hard to believe that someone would spend so much time and
>>>> effort for a joke.
>>>
>>> One word: fir.
>>
>> How about Bill Cunningham?
>>
>>
>
> Not sure I catch the reference, but I do vaguely remember that name being
> someone who used to post here.
>
> The thing is, though, when you get right down to it, nobody really knows
> why anyone posts here.  I think each person who does does so for personal
> reasons that are in general not fully comprehensible by anyone else.
>
> Take the classic question: Why does Kenny McCormack post here, when all he
> does is troll?  Well, he does it because it is fun and it amuses him.
>
> But I often ask: Why does KT post here?  Since he obviously knows
> everything there is to know about C, why bother posting here?  It's not
> like he is ever going to learn anything (since he already knows
> everything).  Now, he will say, it is because he wants to help people.
> Well, this motive is already suspect (usually people who say they want to
> help people have some other motive, sometimes in addition to a genuine
> desire to help, but sometimes as the only motive), and, secondly, given how
> much effort he puts into it, it is hard to believe that altruism is the
> only reason.
>
> And you could ask similar questions about just about everyone else who
> posts to Usenet (not just this group) ?
>
> And so it goes...
>


Usenet is like a rather large bulletin-board system of the world,
though I guess that's what "FIDO Net" is, federated bulletin-boards.
Usenet has all the trappings the Internet, which it predates, i.e.
pre-dates not pred-ates, where "predation" and "predating" are two
different words, though, both I suppose gerunds, point being that Usenet
has been around since before the Internet, and it has URL's and
since every message ever posted is designed to have a unique ID,
then also there are bibiographic citation standards about it,
which might not mean much except that all the messages are distributed
in the widely decentralized and available to any, in the public
availability and not the public domain, as naturally authors maintain
copyright of their postings they publish.


Why people post to Usenet is for whatever reason they want
and when they do is their own business, though it's rather
explicitly not-for-commercial-purposes and it's not much
for me to say how anti-spam works.

Whether all gerunds end in "-ing" for example, there's a corner
where once-upon-a-time people with strong opinions would weigh
the question and merit the weights and politely and eruditely
argue its alternatives, with great decorum and fine collegiality.

... Or flame all day, it's a free country.

There are moderated groups, most dusty or defunct.


Then, there are issues about that since the basically return-path
is email, and email may be fakemail, and not all vectors into Usenet
care, whether "Kenny McCormack", for example, inspired or mocks
the character from "Spice Pork", who-made-who, has that it is or isn't
so, then also that long before "A.I." was shored-up and silo'ed
behind the more commercial accounts of "social media", there are
tons bots among the trolls, usually with stolen identities from
dupes on the Internet who'd never notice, yet of course that sort
of practice is way more evident in the modern commercial accounts
of "social media" with the "I.A.: instant audience" of simple
bot-fan and bot-troll accounts of click-fraud and propagandist spew.


Then, a key account of the Usenet is the co-operative aspect,
and, "The Charter". Each Usenet group has a little charter,
and used to be each one had a little "Frequently Asked Questions",
or the culture, for others it's just a feed.


Now if you'll excuse I'll go rake a leaf or wash a dish or something,
or maybe organize my closet or or take a pick-axe to a road somewhere,
yet, probably instead I might be further asking, or, telling, what
sorts of accounts go into modular software in C.


The basic idea for that is sort of an account of functions,
callback-functions, and data, in the language, what's to result models
of co-operation, about how to call various code _inside_ the runtime,
vis-a-vis, various code calling _into_ the runtime, basically mirroring
the concerns of library authors, of component authors, basically here
introducing libraries vis-a-vis components, which is about as old of
a way of looking at matters of modularity & composability as has always
been.



This message will have a permanent, unique ID, when it's published.

Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1536
Author: fir
Date: Sat, 14 Nov 2026 16:57
140 lines
7461 bytes
Ross Finlayson pisze:
> On 11/14/2026 05:19 AM, Kenny McCormack wrote:
>> In article <11d9jb7$1tt0p$1@dont-email.me>, bartc  <bc@freeuk.com> wrote:
>>> On 14/11/2026 08:09, Kenny McCormack wrote:
>>>> In article <11d7fbv$1839o$2@dont-email.me>,
>>>> David Brown  <david.brown@hesbynett.no> wrote:
>>>> ...
>>>>> His posts are not written by AI - no AI writes that badly.  And it is
>>>>> not so void of meaning and grammar that it is randomly generated.  
>>>>> Ross
>>>>> has written posts in this style for many years in several Usenet 
>>>>> groups.
>>>>>    I find it hard to believe that someone would spend so much time and
>>>>> effort for a joke.
>>>>
>>>> One word: fir.
>>>
>>> How about Bill Cunningham?
>>>
>>>
>>
>> Not sure I catch the reference, but I do vaguely remember that name being
>> someone who used to post here.
>>
>> The thing is, though, when you get right down to it, nobody really knows
>> why anyone posts here.  I think each person who does does so for personal
>> reasons that are in general not fully comprehensible by anyone else.
>>
>> Take the classic question: Why does Kenny McCormack post here, when 
>> all he
>> does is troll?  Well, he does it because it is fun and it amuses him.
>>
>> But I often ask: Why does KT post here?  Since he obviously knows
>> everything there is to know about C, why bother posting here?  It's not
>> like he is ever going to learn anything (since he already knows
>> everything).  Now, he will say, it is because he wants to help people.
>> Well, this motive is already suspect (usually people who say they want to
>> help people have some other motive, sometimes in addition to a genuine
>> desire to help, but sometimes as the only motive), and, secondly, 
>> given how
>> much effort he puts into it, it is hard to believe that altruism is the
>> only reason.
>>
>> And you could ask similar questions about just about everyone else who
>> posts to Usenet (not just this group) ?
>>
>> And so it goes...
>>
> 
> 
> Usenet is like a rather large bulletin-board system of the world,
> though I guess that's what "FIDO Net" is, federated bulletin-boards.
> Usenet has all the trappings the Internet, which it predates, i.e.
> pre-dates not pred-ates, where "predation" and "predating" are two
> different words, though, both I suppose gerunds, point being that Usenet
> has been around since before the Internet, and it has URL's and
> since every message ever posted is designed to have a unique ID,
> then also there are bibiographic citation standards about it,
> which might not mean much except that all the messages are distributed
> in the widely decentralized and available to any, in the public
> availability and not the public domain, as naturally authors maintain
> copyright of their postings they publish.
> 
> 
> Why people post to Usenet is for whatever reason they want
> and when they do is their own business, though it's rather
> explicitly not-for-commercial-purposes and it's not much
> for me to say how anti-spam works.
> 
> Whether all gerunds end in "-ing" for example, there's a corner
> where once-upon-a-time people with strong opinions would weigh
> the question and merit the weights and politely and eruditely
> argue its alternatives, with great decorum and fine collegiality.
> 
> ... Or flame all day, it's a free country.
> 
> There are moderated groups, most dusty or defunct.
> 
> 
> Then, there are issues about that since the basically return-path
> is email, and email may be fakemail, and not all vectors into Usenet
> care, whether "Kenny McCormack", for example, inspired or mocks
> the character from "Spice Pork", who-made-who, has that it is or isn't
> so, then also that long before "A.I." was shored-up and silo'ed
> behind the more commercial accounts of "social media", there are
> tons bots among the trolls, usually with stolen identities from
> dupes on the Internet who'd never notice, yet of course that sort
> of practice is way more evident in the modern commercial accounts
> of "social media" with the "I.A.: instant audience" of simple
> bot-fan and bot-troll accounts of click-fraud and propagandist spew.
> 
> 
> Then, a key account of the Usenet is the co-operative aspect,
> and, "The Charter". Each Usenet group has a little charter,
> and used to be each one had a little "Frequently Asked Questions",
> or the culture, for others it's just a feed.
> 
> 
> Now if you'll excuse I'll go rake a leaf or wash a dish or something,
> or maybe organize my closet or or take a pick-axe to a road somewhere,
> yet, probably instead I might be further asking, or, telling, what
> sorts of accounts go into modular software in C.
> 
> 
> The basic idea for that is sort of an account of functions,
> callback-functions, and data, in the language, what's to result models
> of co-operation, about how to call various code _inside_ the runtime,
> vis-a-vis, various code calling _into_ the runtime, basically mirroring
> the concerns of library authors, of component authors, basically here
> introducing libraries vis-a-vis components, which is about as old of
> a way of looking at matters of modularity & composability as has always
> been.
> 
> 
> 
> This message will have a permanent, unique ID, when it's published.
> 
> 
sckets are terribly stupid im this api for sockets should look more like

//serwer

FILE* invitation_socket = fopen("194.122.212.32", "i");

while(HowManyClientsWantToJoin()>0)
{
  CLIENT_DATA* = GetWaitingClientData(invitation_socket );
  EstablishConnection(CLIENT_DATA)
}
/// client

FILE* main_read = fopen("194.122.212.32", "r");
FILE* main_write = fopen("194.122.212.32", "w");

if(HowManyPocketsToTake(main_read )>0)
  {
    POCKET_DATA* GetPocekt(main_read );
     //...use
   }
Re: Inversion-of-control and dependency-injection in C
#1535
Author: Ross Finlayson
Date: Sat, 14 Nov 2026 17:05
400 lines
16393 bytes
On 11/12/2026 01:44 PM, Ross Finlayson wrote:
> On 11/12/2026 12:55 PM, Richard Harnden wrote:
>> On 12/11/2026 20:11, Lew Pitcher wrote:
>>> On Thu, 12 Nov 2026 09:41:04 -0800, Ross Finlayson wrote:
>>>
>>>> Hello, dear C experts, I'm hoping you can tell me a story about
>>>> modularity and composability, about the concerns of
>>>> inversion-of-control
>>>> and dependency-injection in C, basically about wiring
>>>> test-time and run-time targets, for example about conditional-includes
>>>> and various build-targets, probably mostly about function pointers.
>>>
>>> Pardon my impertinence, but this sounds like a homework problem to me.
>>>
>>> Could you rephrase your question without the academic wording?
>>>
>>
>> Or get an AI do to your homework?
>>
>> Be careful to remove the white-on-white-very-small-font gotcha your
>> professor doubtlessly put in.
>>
>>
>
>
> When I use "A.I." it's framed as a dialogue and I just copy the
> transcripts directly, with the attributions.
>
> I.e., I've never submitted anything to Usenet written by a bot
> on my behalf.
>
>
> I'm not sure whether I'd call it "distance learning", or,
> "distance learning", say, ....
>
>
>
>
> Like say for example I'm looking at something like this that I tapped
> up this morning, and I want to figure out then how to make it so that
> the guts of the workers have a nice real quality of covering all the
> bases of covering all the cases, when for example according to the C
> host as it were or POSIX there's signals and traps to be figured out
> in accounts of "asynchronous concurrency".
>
>
>
>
>
>
> Outline of "I/O-handle-bound process model"
>
> The "I/O-handle-bound process model", is an account of a process group
> in a process tree,
> that works up to the bounds of 1024 many file-descriptors that a
> pselect() call can poll,
> with up to 1000-many file-descriptors in up to 1000-many worker
> processes, for up to
> 1,000,000-many open connections.
>
> The "1000-many" is basically derived from FD_SETSIZE having a limit of
> 1024,
> and that numbered file-descriptors that can participate in non-blocking I/O
> with pselect() notification of readiness, must be less than FD_SETSIZE
> their value.
>
> The basic idea is that there's a main or master process, that being also
> the process group leader,
> that has a "process-protocol" convention, that the master/leader, has
> domain sockets
> to its child processes, with up to 1000-many worker processes, then
> other processes
> as the listener, which accepts connections, and a logger and a metrics
> process.
>
> The listener is its own process that does accept and management (figured
> IP address listing and perhaps a tiny bit of TLS business). It's figured
> that it's
> an Internet protocol server, and "connection-oriented", or as mostly
> about TCP/IP,
> and furthermore "association-oriented", about SCTP, then about UDP or
> datagram
> "protocols", the listener demultiplexes the packets as "connections" to
> the workers.
>
> The file-descriptors in a process are numbered, non-negative integers.
>
> The file-descriptors 0, 1, 2 are ubiqitously stdin, stdout, stderr,
> "standard input-output-error".
>
> The file-descriptor 3 is reserved as it may be a convention for passing
> open connections to created processes.
>
> The file-descriptors 4, 5, 6 are reserved as "stdlog, stdmet, stddmp",
> "logging-metrics-dump outputs".
>
> The file-descriptors 21-1020 are reserved for "1000-many connections".
>
> The leader uses the "1000-many connections" for domain sockets to its
> "1000-many workers".
>
> Each follower (listener, worker, ...) has a reserved file-descriptor
> (11) to connect with the leader.
>
> The leader uses file-descriptor 11 to connect to the listener.
> The leader uses file-descriptor 12 to connect to an optional console.
> The leader uses file-descriptor 13 to connect to an optional logger.
> The leader uses file-descriptor 14 to connect to an optional metrics.
>
> launcher
>
> leader
>
> logger
> metrics
> console
>
> listener
> worker
>
> The model of operation describes how a process is created, according to
> fork and execve.
>
> The file-descriptors 0-10 are "standard", about stdin/stdout/stderr and
> these
> named stdlog/stdmet/stddmp. Usually stdin is un-read, or set to /dev/null.
> Usually stdout and stderr are inherited (by all child processes) from
> leader.
>
> The stdlog and stdmet and stddmp are inherited from leader. A usual idea is
> that these as file-handles may be passed to the leader for example to
> the shell,
> or that usually according to options, the first child processes of the
> leader are
> the logger and metrics, with the logger and metrics receiving all the
> messages
> on those handles, then the leader and all other processes sharing those
> handles,
> and all writing the logs and metrics to those same handles. Then, the
> dumper
> is an abstract output stream, outside of logging and metrics and
> standard I/O.
>
> The file-descriptors 11-20 are in the "process-protocol".
>
> The file-descriptors 21-1020 of the leader are in the "process-protocol".
> The file-descriptors 21-1020 of the listener are in the "process-protocol".
> The file-descriptors 21-1020 of the workers are in the
> "application-protocol".
>
> The file-descriptor 3 in the listener is the listening socket.
> The file-descriptor 3 may be passed to the leader to be passed to the
> listener,
> the listening socket.
>
> leader:
> 4 -> stdlog
> 5 -> stdmet
> 6 -> stddmp
> 11 <-> logger
> 12 <-> metrics
> 13 <-> listener
> 14 <-> console
> 21-1020 <-> workers
>
> logger:
> 4 <- stdlog
> 6 <- stddmp
> 11 <-> logger (leader)
> 12 <-> metrics
>
> metrics:
> 5 <- stdmet
> 11 <-> logger
> 12 <-> metrics (leader)
>
>
> listener:
> 4 -> stdlog
> 5 -> stdmet
> 6 -> stddmp
> 11 <-> logger
> 12 <-> metrics
> 13 <-> listener (leader)
> 14-20 <-> listening socket(s)
> 21-1020 <-> workers
>
> worker:
> 4 -> stdlog
> 5 -> stdmet
> 6 -> stddmp
> 11 <-> leader
> 13 <-> listener
> 21-1020 -> connections (front-end and back-end)
>
> Each of these has their own "main()" source code and executable,
> with that each is created by leader with fork() then setting the handles
> respectively, then execve() thus that the child processes start with
> their open handles in the process-protocol (11-20) and stdio (0-10)
> already opened and directed.
>
> Then, the process-protocol is according to use-cases, as driven by
> events, about that the domain-sockets that are under the handles
> of the process-protocol, make for passing data, and also live handles,
> as are the connections.
>
>
> The main use-case is that the listener is bound to a listening socket,
> as connections are accepted with connection-management happening
> in the listener, listener passes the connection to leader, which finds or
> create a worker, and passes the connection to worker, which then
> proceeds to service the connection according to the application-protocol.
>
> listener: accepts connection
>
> listener -> leader: connection-accepted !
> leader -> worker: connection-ready ?
> worker -> leader: connection-ready !
> leader -> listener: pass-ready !
> listener -> leader: connection-pass !
> leader -> worker: connection-pass !
>
> When a connection is closed, according to the application-protocol
> or if the connection drops or is severed, then worker advises leader,
> then leader advises listener.
>
> worker -> leader: connection-closed
> leader -> listener: connection-closed
>
> Then, when there are process-level events, the leader makes
> commands to the workers, about graceful exit.
>
> leader -> worker: drain connections
> leader -> worker: close connections
> leader -> worker: exit
>
> Since connections and their attachments & associations
> may be short-lived or long-lived, and the goal is that
> there only needs be as many workers as fulfill servicing
> the connections, then is that there's a process-protocol
> about migrating associations (and their connections)
> among workers, usually from "sparse" workers to "dense"
> workers, where sparse means "not-very-full" and dense
> means "not-very-empty", or from "short-lived" workers
> to "long-lived" workers when connections are long-lived,
> that "association migration" is in the process-protocol.
>
> leader -> worker: emigrate-association
> worker -> leader: migrate-association
> leader -> worker: immigrate-association
>
>
> The threading model in the process model
>
> The basic idea of the threading model is that workers
> are multi-threaded, the leader is single-threaded, and
> that the threads "park" when there is no activity,
> yet that the workers have one "sweeper" thread
> to account for time-outs, then that as the workers
> close their connections, they exit, so that under no
> traffic, there is no activity, with all processes "parked".
>
> The idea of "parking" is blocking on the inputs to the
> protocols, or the event-driven pumps in the workers.
>
> The threads basically block in pselect() waiting for
> ready reading, writing, or other events, or, waiting
> on a queue item, pop().
>
> The leader parks in pselect() on 11-1024, the process-protocol.
>
> The listener parks in pselect() about
> accept() and pselect() on the listening socket and
> the process-protocol sockets.
>
> The worker has four or more threads.
>
> reader-thread: parks in pselect() with read-interest
> executor-thread: parks in pop() of application-protocol tasks
> writer-thread: parks in pop() of application-protocol responses, then
> blocks in pselect() while writing, then parks
> sweeper-thread: according to time/alarm, runs on a frequency eg 500
> milliseconds, 5 seconds, 5 minutes
>
> When the worker is empty, after its connections close, it exits.
>
> The logger and metrics park in pselect() on the read-side of
> stdlog/stdmet/stddmp.
>
> Thusly, at idle, with no connections, the entire process-group is
> "parked" (0% CPU, "acquiescent").
>
>
>
>
>
>
>


So, this sort of account is example, for an idea, of the considerations.

Why this may be considered "relevant to C", vis-a-vis, say,
"relevant to platforms & frameworks aboove the system-platform",
is because C is the ubiquitous relevant standard to systems programming.
Of course, C is just ubiquitous itself in accounts
like embedded-programming, here though in a world where all the
distributed-programming mostly is defined by standards that, for
example, as described in books like "TCP/IP Illustrated" and "Network
Programming", which outline in detail the implementations of
internetworking on the Internet, C is the milieu.

Then, "POSIX" pretty much includes C by convention and practice,
also defining a wider surface about the runtime. So, since also
a subset of POSIX runs on anything, here it's considered reasonably
relevant, unless you know a newsgroup about "modular programming
of Internet client & server and peer-to-peer platforms & frameworks
for the modern age in its bog-standard commodity monocultures of
systems & infrastructure", where it may be more particularly apropos.


So what this is then is an outline of a world where long-running
server processes, or for example looking at it the other way
a massively parallel multi-plexing client for doing jobs,
that the process-model is in a real world with limited resources,
albeit then with the guarantees given, the responsibilities & guarantees.


As you can see from reading it, or, you know, to each their own,
the idea is that these "leader", "listener", "worker" processes
would be alike "nntpd-leader", "nntpd-listener", "nntpd-worker",
with regards to "named and well-known protocols and their well-known
ports according to practice and the IANA, or for example running
protocols on 443 since that's the only port not firewalled".

So, the idea is that a model of a _protocol_, basically has
bi-directional or duplex communications, about communicating
sequential processes, these then defined in terms of the abstractions
of the platform, here "sockets" after "files", and that's the way it
is, then about moving & copying the data, and interpreting and invoking
the commands as logical, and establishing and maintaining the protocols,
since convention and specification and standard and practice.




Now, lots of people would say, "I can only look at one thing at
one time, if it's a process it needs to have only one PID so
that's it". Well, I think so too, it's involved, yet as well,
that's not the way it is. So, here this "leader" process is
a mostly tiny process whose role mostly is to get passed a
privileged port or ports, according to TCP/UDP/SCTP, then that
it can run as an un-privileged user otherwise with being able
to bind the privileged port, then it's a tiny process so that
as it fork()'s to exec/execv/execve or create processes in a
group of processes so managed, it's only got one-deep ancestry,
and about how in POSIX it must manage the masks and handlers of
process signals after "raise", "signal" or "kill", all up and
down the tree, and that's the way it is. (Another reason to
have only one process is to keep its quotas & limits and
monitoring & management a single number, yet that's why it's
in a process-group, and multiple processes for the "I/O-handle-bound
process model", which is the way it's possible to scale it up this way,
about 500K connections.)


So, that thusly being as of a sort of "library" routine, for example
that "a shell launches it and redirects its I/O the whole process-group
how it wants", then the innards or guts, is about, "protocol-modules".
(The process-group has its own, "process-protocol", otherwise all,
"application-protocols".)


Then, there are communicating-sequential-processes it serves, the
frontend and, also communicating-sequential-processes its dependencies,
the back-end, then also accounts of the half-duplex and full-duplex
what it serves, the client-server and peer-to-peer.



So, then for "libraries", and, "think like a library author" and
these kinds of things, is, "components", and, "think like a component
framework provider".



The implementors of protocols _need not care_ about the runtime of them,
about "a component framework for definition of protocol",
and, "a component framework of client & server in protocol",
or, "com-peering in protocol", then about the re-usability of
the code, in C and not ugly and hot & fast & safe & nice.








Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1537
Author: Janis Papanagnou
Date: Sat, 14 Nov 2026 17:20
18 lines
2046 bytes
On 2026-11-14 17:17, Ross Finlayson wrote:
> [...]
> 
> ... Or flame all day, it's a free country.

The latter, "it's a free country", is something I regularly hear
as statement, specifically in US movies that also play in the US.

Usenet, the Internet, etc., being supra-national (or pan-gaea) it
doesn't quite fit; there's countries [with Internet access] where
folks would be very reluctant to claim such a statement.

(Just saying...)

Janis

> [...]
Re: People who spend lots of energy posting to Usenet - and for what? (Was: Inversion-of-control and dependency-injection in C)
#1539
Author: Ross Finlayson
Date: Sat, 14 Nov 2026 18:03
41 lines
2954 bytes
On 11/14/2026 09:20 AM, Janis Papanagnou wrote:
> On 2026-11-14 17:17, Ross Finlayson wrote:
>> [...]
>>
>> ... Or flame all day, it's a free country.
>
> The latter, "it's a free country", is something I regularly hear
> as statement, specifically in US movies that also play in the US.
>
> Usenet, the Internet, etc., being supra-national (or pan-gaea) it
> doesn't quite fit; there's countries [with Internet access] where
> folks would be very reluctant to claim such a statement.
>
> (Just saying...)
>
> Janis
>
>> [...]
>

Sure, it's a free country, reflects on something like "The UN
Declaration on Universal Human Rights", authored mostly by a
Richard McKeon the great classicist and Aristotle scholar,
and signed by one of the Roosevelt's.

The egalitarianism in equal-rights and equal-protections under
democracy as rule-of-law and historicism as knowing itself is
very strongly held in many, many places, vis-a-vis Tom Paine
after Montesquieu (sp.) and Locke since Montaigne, or DesCartes,
for examples.

Of course everybody's heard of Malthus & Maslow (sp.), while
yet there are many and various accounts of will and the freedom of it.

("If you don't like it you can get out, ....")



Thanks for writing.

Re: Inversion-of-control and dependency-injection in C
#1547
Author: Tristan Wibberley
Date: Sun, 15 Nov 2026 03:10
40 lines
3126 bytes
On 13/11/2026 13:07, Ross Finlayson wrote:
> On 11/13/2026 04:25 AM, Bonita Montero wrote:
>> Am 12.11.2026 um 21:11 schrieb Lew Pitcher:
>>
>>> Pardon my impertinence, but this sounds like a homework problem to me.
>> Mabye that's the joke ! ;-)
>>
> 
> Humor is appreciated since it's part of bonnehomie and good-will,
> it's not a joke. (The "distance learning or distance learning"
> was a joke, about "to learn something" vis-a-vis "to learn somebody",
> yet that's just using humor instead of stronger insults or the
> abject sumbission of the door-mat variety of throwing self under the bus.)

"I like jokes but this isn't one. Work-from-home was a trick to collect
data about the population ..." etc.


> C++ it's said is getting reflection added to the giant tower of
> what's become of its language and libraries and idiom shoehorned

"I read that reflection is being added to the behemoth that the C++
language and libraries have become ..." etc


It looks like a "precision" style-transfer has been applied.


-- 
Tristan Wibberley

The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Re: Inversion-of-control and dependency-injection in C
#1549
Author: Tristan Wibberley
Date: Sun, 15 Nov 2026 10:26
38 lines
3502 bytes
On 13/11/2026 22:50, Ross Finlayson wrote:

> So, here's one. Say you got a server process for sockets of the
> connection-oriented or datagram-wise or association-oriented like
> TCP, UDP, or SCTP, and it manages the connecting and the sending and
> receiving about a million of those and is sort of fixed-size and
> stable in a usual runtime. So, how do you design the interface,
> about stuff like the state-machine of _protocols_, all about
> _protocols_, in the application-layer and above, say, for example
> the incremental-parsing and the state-machine of the protocol
> and sub-protocols and upgrade-protocols and the like, what sort
> of abstraction with suitable-defaults and reasonable-opinions
> makes for having any sort protocol as a composable library.


For anyone who either doesn't understand that text or doesn't get how
valuable it is just as a question unanswered: please know that it is super.

To Ross: nobody using Usenet is going to be able to give an adequate
answer. Maybe a dozen people on the planet can give such an answer and
maybe each of a dozen teams of academics could do it with several years
work.

Now that IBM, Sun and Oracle are all dead I suppose they all work for
Google now.

-- 
Tristan Wibberley

The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Re: Inversion-of-control and dependency-injection in C
#1550
Author: fir
Date: Sun, 15 Nov 2026 11:03
414 lines
12965 bytes
Tristan Wibberley pisze:
> On 13/11/2026 22:50, Ross Finlayson wrote:
> 
>> So, here's one. Say you got a server process for sockets of the
>> connection-oriented or datagram-wise or association-oriented like
>> TCP, UDP, or SCTP, and it manages the connecting and the sending and
>> receiving about a million of those and is sort of fixed-size and
>> stable in a usual runtime. So, how do you design the interface,
>> about stuff like the state-machine of _protocols_, all about
>> _protocols_, in the application-layer and above, say, for example
>> the incremental-parsing and the state-machine of the protocol
>> and sub-protocols and upgrade-protocols and the like, what sort
>> of abstraction with suitable-defaults and reasonable-opinions
>> makes for having any sort protocol as a composable library.
> 
> 
> For anyone who either doesn't understand that text or doesn't get how
> valuable it is just as a question unanswered: please know that it is super.
> 
> To Ross: nobody using Usenet is going to be able to give an adequate
> answer. Maybe a dozen people on the planet can give such an answer and
> maybe each of a dozen teams of academics could do it with several years
> work.
> 
ai may answer it in about 10 seconds:


C does not really need a special component model for this. Most of what 
you describe can be done with a fairly small number of ordinary C 
mechanisms, provided that the boundaries between them are made explicit.

The important distinction, in my opinion, is between a **source 
module**, a **runtime module**, and an **interface**.

A `.c` file is a compilation unit, not necessarily a runtime component. 
Several `.c` files may form one library or runtime component, while one 
`.c` file may contain several logically unrelated things. The actual 
runtime boundary is usually represented by an API and, if necessary, by 
a table of function pointers.

For example, instead of making an object hierarchy, one can simply define:

```c
struct renderer {
     void (*draw)(struct renderer *, const void *);
     void (*clear)(struct renderer *);
     void (*destroy)(struct renderer *);
     void *context;
};
```

An implementation constructs such a structure:

```c
struct renderer *CreateSoftwareRenderer(void);
struct renderer *CreateOpenGLRenderer(void);
```

The rest of the program only knows about `struct renderer` and its 
contract. It does not need to know which implementation was constructed.

That already gives you a fairly direct form of dependency injection:

```c
struct renderer *renderer = CreateSoftwareRenderer();
game.renderer = renderer;
```

or, even more explicitly:

```c
game.renderer.draw = SoftwareDraw;
game.renderer.clear = SoftwareClear;
game.renderer.destroy = SoftwareDestroy;
game.renderer.context = &software_state;
```

There is no fundamental requirement that the dependency be discovered 
globally. It can simply be passed to the code which needs it.

In fact, I would say that **passing dependencies explicitly is one of 
the most natural forms of dependency injection in C**.

The same technique works without function pointers when the dependency 
is data rather than behavior. For example:

```c
struct allocator {
     void *(*alloc)(struct allocator *, size_t);
     void (*free)(struct allocator *, void *);
     void *context;
};
```

Then a subsystem can receive an allocator without knowing whether it 
ultimately uses `malloc`, a pool, an arena, a debug allocator, or 
something supplied by a test harness.

This is also where ownership belongs. The interface should state things 
such as:

```c
void *ResourceCreate(...);
void ResourceDestroy(void *);
```

and document who owns the returned resource and when `Destroy` must be 
called. C has no language-level ownership system, so this is part of the 
API contract rather than something the compiler enforces.

For test-time versus run-time implementations, I would normally avoid 
conditional compilation inside the actual application code.

Instead of:

```c
#ifdef TEST
     ...
#else
     ...
#endif
```

I prefer:

```c
struct filesystem {
     int (*read)(struct filesystem *, ...);
     int (*write)(struct filesystem *, ...);
     void *context;
};
```

and then construct either:

```c
CreateRealFilesystem(...)
```

or:

```c
CreateTestFilesystem(...)
```

The application remains identical.

Conditional compilation is still useful when the implementations 
themselves genuinely require different platform facilities:

```c
#ifdef _WIN32
     ...
#elif defined(__linux__)
     ...
#endif
```

or when selecting which implementation is compiled into a particular target.

That distinction is useful:

**conditional compilation chooses code; dependency injection chooses 
behavior.**

Build systems then decide which source files participate in a target.

For example, conceptually:

```text
game
     game.c
     renderer.c
     renderer_software.c

game_test
     game.c
     renderer.c
     renderer_test.c
```

Both targets can satisfy the same interface, while linking different 
implementations.

With static linking, the boundary is mostly a linker boundary. With 
dynamic linking, it can additionally become an operating-system module 
boundary (`DLL`, `.so`, etc.). The C interface does not fundamentally 
change.

A DLL can export something as simple as:

```c
struct renderer *CreateRenderer(void);
```

and the host can obtain that symbol dynamically. The ABI then becomes 
part of the contract, which is where things such as calling conventions, 
structure layout, symbol visibility, versioning, and ownership across 
module boundaries become important.

There is also no particular reason why every dependency needs to be 
represented by a huge nested structure of function pointers. That can 
become its own form of accidental object-oriented programming.

Often this is enough:

```c
struct game {
     struct renderer *renderer;
     struct filesystem *filesystem;
     struct clock *clock;
};
```

and each interface contains only the operations that actually belong to it.

This gives you something resembling a manually constructed object graph:

```text
                  game
               /   |    \
              /    |     \
        renderer filesystem clock
           |          |       |
       software     test    fake
```

The graph is constructed at startup. The game does not construct its own 
concrete dependencies; somebody outside it does.

That is essentially the interesting part of inversion of control in C.

The phrase "IoC" can sound much more exotic than the mechanism actually 
is. At the simplest level it means:

 > Instead of this subsystem deciding what implementation it will use, 
somebody else gives it the implementation.

Function pointers are one way of doing that. Plain function arguments 
are another, and often the better one.

For example, a function such as:

```c
void Simulate(struct simulation *s,
               float (*random)(void),
               void (*log)(const char *));
```

is already dependency injection. No component framework is required.

Likewise, a callback is already a small form of inversion of control:

```c
void EnumerateFiles(const char *path,
                     void (*callback)(const char *name, void *context),
                     void *context);
```

The library controls the enumeration and calls code supplied by the caller.

So I would not start by designing "components". I would start by 
identifying **contracts**.

For each subsystem ask:

1. What does the caller need to know?
2. What must remain private?
3. Who owns the resources?
4. Which behavior needs to be replaceable?
5. Does it actually need runtime replacement, or is link-time selection 
enough?
6. Does the boundary need to cross a shared-library/ABI boundary?

Then choose the simplest mechanism:

```text
ordinary function call
         ↓
function parameter / callback
         ↓
context pointer
         ↓
struct containing function pointers
         ↓
separate static library
         ↓
dynamic library / plugin
         ↓
full component framework
```

I would only move down that list when the simpler mechanism stops being 
sufficient.

In particular, I would be rather suspicious of reproducing COM in C 
merely because COM solves a problem that C does not have. A table of 
function pointers plus a context pointer is already surprisingly close 
to the essential machinery of an object interface:

```c
struct interface {
     void *context;

     int  (*open)(void *context);
     int  (*read)(void *context, void *buffer, size_t size);
     void (*close)(void *context);
};
```

The context provides instance state, the function pointers provide 
polymorphic behavior, and the header defines the contract.

Multiple interfaces are simply multiple such tables, rather than 
multiple inheritance:

```c
struct device {
     struct input_interface input;
     struct output_interface output;
     struct diagnostic_interface diagnostic;
};
```

If a component has to support querying for optional interfaces, then 
something resembling `QueryInterface()` can certainly be implemented. 
But again, that is a convention built on ordinary C rather than a 
language feature.

There is one more important point about "modularity": **the header is 
not necessarily the interface**.

A good C module often has:

```c
foo.h
foo.c
```

where `foo.h` exposes the public contract and `foo.c` contains private 
structures and implementation details.

For example:

```c
/* foo.h */

struct foo;

struct foo *FooCreate(void);
void FooDestroy(struct foo *);
int FooDoSomething(struct foo *);
```

while `struct foo` itself is private.

That gives you opaque state without needing classes:

```c
struct foo {
     int private_state;
     ...
};
```

The caller can hold a `struct foo *` but cannot depend on its 
representation.

This is often more valuable for long-term modularity than adding another 
layer of function-pointer indirection.

So, in short, C has most of the machinery being described here, but it 
is deliberately not packaged into one language-level object/component 
system.

You have:

```text
.h/.c
     → source/module boundaries

opaque structs
     → encapsulation

function pointers + context
     → interfaces / polymorphism

callbacks
     → inversion of control

explicit parameters
     → dependency injection

constructors/factory functions
     → choosing implementations

static libraries
     → link-time composition

shared libraries
     → runtime composition

build configuration
     → selecting implementations

explicit create/destroy contracts
     → resource ownership
```

The interesting part is not that C lacks these abstractions. It is that 
**C lets you assemble them yourself**, which means the programmer also 
has to decide where the abstraction is actually justified.

And that last part is both C's freedom and C's trap.
Re: Inversion-of-control and dependency-injection in C
#1551
Author: Tristan Wibberley
Date: Sun, 15 Nov 2026 11:31
68 lines
4644 bytes
On 12/11/2026 23:26, Janis Papanagnou wrote:

> (Disclaimer: my comments are just based on personal experience
> in our software developing practice from the 1990's and not some
> general accepted opinion or habits.)

How could it be otherwise? With 8 billion people on the planet and
on-demand media with algorithms capable of segmenting the population's
information streams you'd never know what was generally accepted anyway.


On "writing testable code" he wrote:

> Our approach was not to "write testable code" by _adapting_ to
> some existing framework. While we had standards and practices how
> to design software the _tests followed our software_ (not v.v.).
> One exception here was that including dedicated trace records in
> our code (that could be activated specifically WRT a module and
> in granularity) helped for the test evaluation and regressions.

I don't really understand test trace records. It seems to me that to
test whether certain thresholds are reached one ought to use some sort
of COMEFROM targetting the notification call that marks said threshold
within the program anyway - the call that triggers the real program's
response to the threshold being breached.

If one adds special trace markers the markers may drift away from the
notification as development progresses but the real notification is all
that's needed in the code. If necessary run unit tests under a debugger
with a trap on the notification call to implement COMEFROM.

The use of data instead of such callbacks has its uses in some places
such as when the program is mapping data and the test will be
data-driven - one datum or one partial leading sequence of the data can
get a record output but then it should normally be percolated from the
inside of the program using real notification calls.


> (See my comment about "tests follow code (not v.v.)". - Opinions may
> differ.)

Tests that follow code might be good to test for operational change but
good unit testing tests against semantic intent (even though the intent
has been tempered by operational limits by the time the design has been
reduced to unit interfaces), those tests /can't/ follow code. Granted
it's hard to design without coding, but the interface typically ought to
abstract the operations fully even when you've analysed your intent by
codestorming.

If all the tests follow code directly then semantic intent isn't tested.

It's also a problem for making sure technical documentation is accurate
because the best way to be sure it is is to write it against test passes.



-- 
Tristan Wibberley

The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Re: Inversion-of-control and dependency-injection in C
#1554
Author: fir
Date: Sun, 15 Nov 2026 11:43
447 lines
15662 bytes
fir pisze:
> Tristan Wibberley pisze:
>> On 13/11/2026 22:50, Ross Finlayson wrote:
>>
>>> So, here's one. Say you got a server process for sockets of the
>>> connection-oriented or datagram-wise or association-oriented like
>>> TCP, UDP, or SCTP, and it manages the connecting and the sending and
>>> receiving about a million of those and is sort of fixed-size and
>>> stable in a usual runtime. So, how do you design the interface,
>>> about stuff like the state-machine of _protocols_, all about
>>> _protocols_, in the application-layer and above, say, for example
>>> the incremental-parsing and the state-machine of the protocol
>>> and sub-protocols and upgrade-protocols and the like, what sort
>>> of abstraction with suitable-defaults and reasonable-opinions
>>> makes for having any sort protocol as a composable library.
>>
>>
>> For anyone who either doesn't understand that text or doesn't get how
>> valuable it is just as a question unanswered: please know that it is 
>> super.
>>
>> To Ross: nobody using Usenet is going to be able to give an adequate
>> answer. Maybe a dozen people on the planet can give such an answer and
>> maybe each of a dozen teams of academics could do it with several years
>> work.
>>
> ai may answer it in about 10 seconds:
> 
> 
> C does not really need a special component model for this. Most of what 
> you describe can be done with a fairly small number of ordinary C 
> mechanisms, provided that the boundaries between them are made explicit.
> 
> The important distinction, in my opinion, is between a **source 
> module**, a **runtime module**, and an **interface**.
> 
> A `.c` file is a compilation unit, not necessarily a runtime component. 
> Several `.c` files may form one library or runtime component, while one 
> `.c` file may contain several logically unrelated things. The actual 
> runtime boundary is usually represented by an API and, if necessary, by 
> a table of function pointers.
> 
> For example, instead of making an object hierarchy, one can simply define:
> 
> ```c
> struct renderer {
>      void (*draw)(struct renderer *, const void *);
>      void (*clear)(struct renderer *);
>      void (*destroy)(struct renderer *);
>      void *context;
> };
> ```
> 
> An implementation constructs such a structure:
> 
> ```c
> struct renderer *CreateSoftwareRenderer(void);
> struct renderer *CreateOpenGLRenderer(void);
> ```
> 
> The rest of the program only knows about `struct renderer` and its 
> contract. It does not need to know which implementation was constructed.
> 
> That already gives you a fairly direct form of dependency injection:
> 
> ```c
> struct renderer *renderer = CreateSoftwareRenderer();
> game.renderer = renderer;
> ```
> 
> or, even more explicitly:
> 
> ```c
> game.renderer.draw = SoftwareDraw;
> game.renderer.clear = SoftwareClear;
> game.renderer.destroy = SoftwareDestroy;
> game.renderer.context = &software_state;
> ```
> 
> There is no fundamental requirement that the dependency be discovered 
> globally. It can simply be passed to the code which needs it.
> 
> In fact, I would say that **passing dependencies explicitly is one of 
> the most natural forms of dependency injection in C**.
> 
> The same technique works without function pointers when the dependency 
> is data rather than behavior. For example:
> 
> ```c
> struct allocator {
>      void *(*alloc)(struct allocator *, size_t);
>      void (*free)(struct allocator *, void *);
>      void *context;
> };
> ```
> 
> Then a subsystem can receive an allocator without knowing whether it 
> ultimately uses `malloc`, a pool, an arena, a debug allocator, or 
> something supplied by a test harness.
> 
> This is also where ownership belongs. The interface should state things 
> such as:
> 
> ```c
> void *ResourceCreate(...);
> void ResourceDestroy(void *);
> ```
> 
> and document who owns the returned resource and when `Destroy` must be 
> called. C has no language-level ownership system, so this is part of the 
> API contract rather than something the compiler enforces.
> 
> For test-time versus run-time implementations, I would normally avoid 
> conditional compilation inside the actual application code.
> 
> Instead of:
> 
> ```c
> #ifdef TEST
>      ...
> #else
>      ...
> #endif
> ```
> 
> I prefer:
> 
> ```c
> struct filesystem {
>      int (*read)(struct filesystem *, ...);
>      int (*write)(struct filesystem *, ...);
>      void *context;
> };
> ```
> 
> and then construct either:
> 
> ```c
> CreateRealFilesystem(...)
> ```
> 
> or:
> 
> ```c
> CreateTestFilesystem(...)
> ```
> 
> The application remains identical.
> 
> Conditional compilation is still useful when the implementations 
> themselves genuinely require different platform facilities:
> 
> ```c
> #ifdef _WIN32
>      ...
> #elif defined(__linux__)
>      ...
> #endif
> ```
> 
> or when selecting which implementation is compiled into a particular 
> target.
> 
> That distinction is useful:
> 
> **conditional compilation chooses code; dependency injection chooses 
> behavior.**
> 
> Build systems then decide which source files participate in a target.
> 
> For example, conceptually:
> 
> ```text
> game
>      game.c
>      renderer.c
>      renderer_software.c
> 
> game_test
>      game.c
>      renderer.c
>      renderer_test.c
> ```
> 
> Both targets can satisfy the same interface, while linking different 
> implementations.
> 
> With static linking, the boundary is mostly a linker boundary. With 
> dynamic linking, it can additionally become an operating-system module 
> boundary (`DLL`, `.so`, etc.). The C interface does not fundamentally 
> change.
> 
> A DLL can export something as simple as:
> 
> ```c
> struct renderer *CreateRenderer(void);
> ```
> 
> and the host can obtain that symbol dynamically. The ABI then becomes 
> part of the contract, which is where things such as calling conventions, 
> structure layout, symbol visibility, versioning, and ownership across 
> module boundaries become important.
> 
> There is also no particular reason why every dependency needs to be 
> represented by a huge nested structure of function pointers. That can 
> become its own form of accidental object-oriented programming.
> 
> Often this is enough:
> 
> ```c
> struct game {
>      struct renderer *renderer;
>      struct filesystem *filesystem;
>      struct clock *clock;
> };
> ```
> 
> and each interface contains only the operations that actually belong to it.
> 
> This gives you something resembling a manually constructed object graph:
> 
> ```text
>                   game
>                /   |    \
>               /    |     \
>         renderer filesystem clock
>            |          |       |
>        software     test    fake
> ```
> 
> The graph is constructed at startup. The game does not construct its own 
> concrete dependencies; somebody outside it does.
> 
> That is essentially the interesting part of inversion of control in C.
> 
> The phrase "IoC" can sound much more exotic than the mechanism actually 
> is. At the simplest level it means:
> 
>  > Instead of this subsystem deciding what implementation it will use, 
> somebody else gives it the implementation.
> 
> Function pointers are one way of doing that. Plain function arguments 
> are another, and often the better one.
> 
> For example, a function such as:
> 
> ```c
> void Simulate(struct simulation *s,
>                float (*random)(void),
>                void (*log)(const char *));
> ```
> 
> is already dependency injection. No component framework is required.
> 
> Likewise, a callback is already a small form of inversion of control:
> 
> ```c
> void EnumerateFiles(const char *path,
>                      void (*callback)(const char *name, void *context),
>                      void *context);
> ```
> 
> The library controls the enumeration and calls code supplied by the caller.
> 
> So I would not start by designing "components". I would start by 
> identifying **contracts**.
> 
> For each subsystem ask:
> 
> 1. What does the caller need to know?
> 2. What must remain private?
> 3. Who owns the resources?
> 4. Which behavior needs to be replaceable?
> 5. Does it actually need runtime replacement, or is link-time selection 
> enough?
> 6. Does the boundary need to cross a shared-library/ABI boundary?
> 
> Then choose the simplest mechanism:
> 
> ```text
> ordinary function call
>          ↓
> function parameter / callback
>          ↓
> context pointer
>          ↓
> struct containing function pointers
>          ↓
> separate static library
>          ↓
> dynamic library / plugin
>          ↓
> full component framework
> ```
> 
> I would only move down that list when the simpler mechanism stops being 
> sufficient.
> 
> In particular, I would be rather suspicious of reproducing COM in C 
> merely because COM solves a problem that C does not have. A table of 
> function pointers plus a context pointer is already surprisingly close 
> to the essential machinery of an object interface:
> 
> ```c
> struct interface {
>      void *context;
> 
>      int  (*open)(void *context);
>      int  (*read)(void *context, void *buffer, size_t size);
>      void (*close)(void *context);
> };
> ```
> 
> The context provides instance state, the function pointers provide 
> polymorphic behavior, and the header defines the contract.
> 
> Multiple interfaces are simply multiple such tables, rather than 
> multiple inheritance:
> 
> ```c
> struct device {
>      struct input_interface input;
>      struct output_interface output;
>      struct diagnostic_interface diagnostic;
> };
> ```
> 
> If a component has to support querying for optional interfaces, then 
> something resembling `QueryInterface()` can certainly be implemented. 
> But again, that is a convention built on ordinary C rather than a 
> language feature.
> 
> There is one more important point about "modularity": **the header is 
> not necessarily the interface**.
> 
> A good C module often has:
> 
> ```c
> foo.h
> foo.c
> ```
> 
> where `foo.h` exposes the public contract and `foo.c` contains private 
> structures and implementation details.
> 
> For example:
> 
> ```c
> /* foo.h */
> 
> struct foo;
> 
> struct foo *FooCreate(void);
> void FooDestroy(struct foo *);
> int FooDoSomething(struct foo *);
> ```
> 
> while `struct foo` itself is private.
> 
> That gives you opaque state without needing classes:
> 
> ```c
> struct foo {
>      int private_state;
>      ...
> };
> ```
> 
> The caller can hold a `struct foo *` but cannot depend on its 
> representation.
> 
> This is often more valuable for long-term modularity than adding another 
> layer of function-pointer indirection.
> 
> So, in short, C has most of the machinery being described here, but it 
> is deliberately not packaged into one language-level object/component 
> system.
> 
> You have:
> 
> ```text
> .h/.c
>      → source/module boundaries
> 
> opaque structs
>      → encapsulation
> 
> function pointers + context
>      → interfaces / polymorphism
> 
> callbacks
>      → inversion of control
> 
> explicit parameters
>      → dependency injection
> 
> constructors/factory functions
>      → choosing implementations
> 
> static libraries
>      → link-time composition
> 
> shared libraries
>      → runtime composition
> 
> build configuration
>      → selecting implementations
> 
> explicit create/destroy contracts
>      → resource ownership
> ```
> 
> The interesting part is not that C lacks these abstractions. It is that 
> **C lets you assemble them yourself**, which means the programmer also 
> has to decide where the abstraction is actually justified.
> 
> And that last part is both C's freedom and C's trap.


note i dont personally use this above approch

generally i write a program when its verious parts are vaguelly 
dependant... its not necessary good and i think more recently about this 
pinpoints

coz parts of program together may bring a mess
for example in my rasterizer/shoter 3d game prototype there is
general window part (which reads keyboard uses some kays and also "uses
hud"..and inner 3d game part which also uses keyboard/mouse and hud

it generates some mess poteintially..especially as 1 i need to manage 
some states like 2d/3d mode of window, yet two modes of camera in 3d 
mode - states become to born mess..other problem is various parts ot 
this 3d game may use those keys and hud and so,etimes it become hard to 
find  ehere is what..yet i got a problem with fainding some functions 
sometimes..as sometimes some tiny usefull functions may belong to some
modules/files but they belonging is not so obvious so if such function 
can be in five places you will notice a serious hangout in your head
localizing it

its sometimes good to make "hard split" and put one part into dll
but managing this dll is slightly more burdensome than having it all 
together so i probably prefer make this split in more heavier cases only
(im not yet quite sure - before i used dll long time, only recently in
case of revriting things i redigned the dll..and now i both slightly 
miss it and possibly somewhat less slightly dont miss it (miss its good 
side dont miss its bad side)
Re: Inversion-of-control and dependency-injection in C
#1568
Author: Bonita Montero
Date: Mon, 16 Nov 2026 15:23
13 lines
2083 bytes
Am 12.11.2026 um 21:15 schrieb Chris M. Thomasson:

> C is C. Imvvvvho, C++ is better... :^) Let the flames begin.

A frequently cited point in this context is that `std::sort()` is
typically many times faster than `qsort()`, thanks to the inlining
of the function object. Furthermore, a function object can easily
incorporate an external context by capturing it within a lambda—
something that is simply not possible with `qsort()`, where a C
-style comparison function is restricted to accessing only global
variables. This falls far short of the capabilities offered by
functional programming. In other words: C is incapable of func-
tional programming.
Re: Inversion-of-control and dependency-injection in C
#1569
Author: fir
Date: Mon, 16 Nov 2026 15:29
21 lines
2403 bytes
Bonita Montero pisze:
> Am 12.11.2026 um 21:15 schrieb Chris M. Thomasson:
> 
>> C is C. Imvvvvho, C++ is better... :^) Let the flames begin.
> 
> A frequently cited point in this context is that `std::sort()` is
> typically many times faster than `qsort()`, thanks to the inlining
> of the function object. Furthermore, a function object can easily
> incorporate an external context by capturing it within a lambda—
> something that is simply not possible with `qsort()`, where a C
> -style comparison function is restricted to accessing only global
> variables. This falls far short of the capabilities offered by
> functional programming. In other words: C is incapable of func-
> tional programming.

you can write you own sort or paste if trom the net and its not worse 
than c++

in some thread on this as maybe you remember i taka a contest ;c on c++
sort and beat it much (as far as i remember by code taken from net)
Re: Inversion-of-control and dependency-injection in C
#1570
Author: fir
Date: Mon, 16 Nov 2026 15:35
35 lines
2958 bytes
fir pisze:
> Bonita Montero pisze:
>> Am 12.11.2026 um 21:15 schrieb Chris M. Thomasson:
>>
>>> C is C. Imvvvvho, C++ is better... :^) Let the flames begin.
>>
>> A frequently cited point in this context is that `std::sort()` is
>> typically many times faster than `qsort()`, thanks to the inlining
>> of the function object. Furthermore, a function object can easily
>> incorporate an external context by capturing it within a lambda—
>> something that is simply not possible with `qsort()`, where a C
>> -style comparison function is restricted to accessing only global
>> variables. This falls far short of the capabilities offered by
>> functional programming. In other words: C is incapable of func-
>> tional programming.
> 
> you can write you own sort or paste if trom the net and its not worse 
> than c++
> 
> in some thread on this as maybe you remember i taka a contest ;c on c++
> sort and beat it much (as far as i remember by code taken from net)
> 
my own quote from google groups

"
fir
23 kwi 2022, 12:35:57
do
try radix sort, i once measured that things (on 10-yo old machine) and 
testing sorting 1MB of integers and remember c quicksort (like that from 
wikipedia) have 150 ms , c++ std:sort 111 ms,
c insertsort 111 ms also or 2 ms worse something like that, c-radix sort 
(taken from stack overflow) 17 ms beating c++:stdsort more than 3 times
for more details search "quicksort" in this group (the search in google 
groups work).."
Re: Inversion-of-control and dependency-injection in C
#1571
Author: fir
Date: Mon, 16 Nov 2026 15:38
39 lines
3131 bytes
fir pisze:
> fir pisze:
>> Bonita Montero pisze:
>>> Am 12.11.2026 um 21:15 schrieb Chris M. Thomasson:
>>>
>>>> C is C. Imvvvvho, C++ is better... :^) Let the flames begin.
>>>
>>> A frequently cited point in this context is that `std::sort()` is
>>> typically many times faster than `qsort()`, thanks to the inlining
>>> of the function object. Furthermore, a function object can easily
>>> incorporate an external context by capturing it within a lambda—
>>> something that is simply not possible with `qsort()`, where a C
>>> -style comparison function is restricted to accessing only global
>>> variables. This falls far short of the capabilities offered by
>>> functional programming. In other words: C is incapable of func-
>>> tional programming.
>>
>> you can write you own sort or paste if trom the net and its not worse 
>> than c++
>>
>> in some thread on this as maybe you remember i taka a contest ;c on c++
>> sort and beat it much (as far as i remember by code taken from net)
>>
> my own quote from google groups
> 
> "
> fir
> 23 kwi 2022, 12:35:57
> do
> try radix sort, i once measured that things (on 10-yo old machine) and 
> testing sorting 1MB of integers and remember c quicksort (like that from 
> wikipedia) have 150 ms , c++ std:sort 111 ms,
> c insertsort 111 ms also or 2 ms worse something like that, c-radix sort 
> (taken from stack overflow) 17 ms beating c++:stdsort more than 3 times
> for more details search "quicksort" in this group (the search in google 
> groups work).."

see here 
https://groups.google.com/g/comp.lang.c/c/I4lJSh45EJ0/m/ezGwgnvWDgAJ
Re: Inversion-of-control and dependency-injection in C
#1572
Author: fir
Date: Mon, 16 Nov 2026 15:39
43 lines
3243 bytes
fir pisze:
> fir pisze:
>> fir pisze:
>>> Bonita Montero pisze:
>>>> Am 12.11.2026 um 21:15 schrieb Chris M. Thomasson:
>>>>
>>>>> C is C. Imvvvvho, C++ is better... :^) Let the flames begin.
>>>>
>>>> A frequently cited point in this context is that `std::sort()` is
>>>> typically many times faster than `qsort()`, thanks to the inlining
>>>> of the function object. Furthermore, a function object can easily
>>>> incorporate an external context by capturing it within a lambda—
>>>> something that is simply not possible with `qsort()`, where a C
>>>> -style comparison function is restricted to accessing only global
>>>> variables. This falls far short of the capabilities offered by
>>>> functional programming. In other words: C is incapable of func-
>>>> tional programming.
>>>
>>> you can write you own sort or paste if trom the net and its not worse 
>>> than c++
>>>
>>> in some thread on this as maybe you remember i taka a contest ;c on c++
>>> sort and beat it much (as far as i remember by code taken from net)
>>>
>> my own quote from google groups
>>
>> "
>> fir
>> 23 kwi 2022, 12:35:57
>> do
>> try radix sort, i once measured that things (on 10-yo old machine) and 
>> testing sorting 1MB of integers and remember c quicksort (like that 
>> from wikipedia) have 150 ms , c++ std:sort 111 ms,
>> c insertsort 111 ms also or 2 ms worse something like that, c-radix 
>> sort (taken from stack overflow) 17 ms beating c++:stdsort more than 3 
>> times
>> for more details search "quicksort" in this group (the search in 
>> google groups work).."
> 
> see here 
> https://groups.google.com/g/comp.lang.c/c/I4lJSh45EJ0/m/ezGwgnvWDgAJ

lame c++ bonita
Re: Inversion-of-control and dependency-injection in C
#1573
Author: Bonita Montero
Date: Mon, 16 Nov 2026 16:31
63 lines
2942 bytes
I wrote a comparison between std::sort() and qsort() to sort an array of
4096 ints (fits in L1). On my Zen4-PC std::sort() is 4.8 times faster.
Any question ?

#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <chrono>
#include <vector>
#include <random>

using namespace std;
using namespace chrono;

int main()
{
	constexpr size_t
		N = 0x1000,
		Rounds = 10'000;
	auto test = []( auto fn ) -> double
	{
		time_point start = steady_clock::now();
		for( size_t r = Rounds; r; --r )
			fn();
		duration dur = steady_clock::now() - start;
		return (double)duration_cast<nanoseconds>( dur ).count();
	};
	vector<int>
		origin( N ),
		srt( N );
	mt19937_64 mt;
	for( int &i : origin )
		i = (int)mt();
	int dummy = 0;
	auto cpy = [&] { copy( origin.begin(), origin.end(), srt.begin() ); 
dummy += srt[0]; };
	double tRef = test( cpy );
	auto qsrt = [&]
		{
			cpy();
			qsort( srt.data(), srt.size(), sizeof( int ), +[]( const void *lhs, 
const void *rhs ) -> int
				{
					int &iLhs = *(int *)lhs, &iRhs = *(int *)rhs;
					if( iLhs == iRhs )
						return 0;
					return iLhs < iRhs ? -1 : 1;
				} );
			dummy += srt[0];
		};
	double tQsrt = test( qsrt ) - tRef;
	auto stdSrt = [&]
		{
			cpy();
			sort( srt.begin(), srt.end(), less() );
			dummy += srt[0];
		};
	double tStdSrt = test( stdSrt ) - tRef;
	cout << tQsrt / tStdSrt << endl;
	return dummy;
}

Re: Inversion-of-control and dependency-injection in C
#1574
Author: Bonita Montero
Date: Mon, 16 Nov 2026 16:32
10 lines
1798 bytes
Am 16.11.2026 um 16:39 schrieb fir:

> fir pisze:

>> see here https://groups.google.com/g/comp.lang.c/c/I4lJSh45EJ0/m/ 
>> ezGwgnvWDgAJ

> lame c++ bonita

See my other post - you suck !
Re: Inversion-of-control and dependency-injection in C
#1576
Author: fir
Date: Mon, 16 Nov 2026 17:00
156 lines
6219 bytes
Bonita Montero pisze:
> I wrote a comparison between std::sort() and qsort() to sort an array of
> 4096 ints (fits in L1). On my Zen4-PC std::sort() is 4.8 times faster.
> Any question ?
> 
> #include <iostream>
> #include <algorithm>
> #include <cstdlib>
> #include <chrono>
> #include <vector>
> #include <random>
> 
> using namespace std;
> using namespace chrono;
> 
> int main()
> {
>      constexpr size_t
>          N = 0x1000,
>          Rounds = 10'000;
>      auto test = []( auto fn ) -> double
>      {
>          time_point start = steady_clock::now();
>          for( size_t r = Rounds; r; --r )
>              fn();
>          duration dur = steady_clock::now() - start;
>          return (double)duration_cast<nanoseconds>( dur ).count();
>      };
>      vector<int>
>          origin( N ),
>          srt( N );
>      mt19937_64 mt;
>      for( int &i : origin )
>          i = (int)mt();
>      int dummy = 0;
>      auto cpy = [&] { copy( origin.begin(), origin.end(), srt.begin() ); 
> dummy += srt[0]; };
>      double tRef = test( cpy );
>      auto qsrt = [&]
>          {
>              cpy();
>              qsort( srt.data(), srt.size(), sizeof( int ), +[]( const 
> void *lhs, const void *rhs ) -> int
>                  {
>                      int &iLhs = *(int *)lhs, &iRhs = *(int *)rhs;
>                      if( iLhs == iRhs )
>                          return 0;
>                      return iLhs < iRhs ? -1 : 1;
>                  } );
>              dummy += srt[0];
>          };
>      double tQsrt = test( qsrt ) - tRef;
>      auto stdSrt = [&]
>          {
>              cpy();
>              sort( srt.begin(), srt.end(), less() );
>              dummy += srt[0];
>          };
>      double tStdSrt = test( stdSrt ) - tRef;
>      cout << tQsrt / tStdSrt << endl;
>      return dummy;
> }
> 
> 
so maybe try it right c way




typedef unsigned int UI32;

UI32 * RadixSortUnsigned(UI32 * pData, UI32 * pTemp, size_t count)
{
size_t mIndex[4][256] = {0};            // index matrix
UI32 *pDst, *pSrc, *pTmp;
size_t i,j,m,n;
UI32 u;

     for(i = 0; i < count; i++){         // generate histograms
         u = pData[i];
         for(j = 0; j < 4; j++){
             mIndex[j][(size_t)(u & 0xff)]++;
             u >>= 8;
         }
     }
     for(j = 0; j < 4; j++){             // convert to indices
         n = 0;
         for(i = 0; i < 256; i++){
             m = mIndex[j][i];
             mIndex[j][i] = n;
             n += m;
         }
     }
     pDst = pTemp;                       // radix sort
     pSrc = pData;
     for(j = 0; j < 4; j++){
         for(i = 0; i < count; i++){
             u = pSrc[i];
             m = (size_t)(u >> (j<<3)) & 0xff;
             pDst[mIndex[j][m]++] = u;
         }
         pTmp = pSrc;
         pSrc = pDst;
         pDst = pTmp;
     }
     return(pSrc);
}


typedef          int  I32;
typedef unsigned int UI32;

I32 * RadixSortSigned(I32 * pData, I32 * pTemp, size_t count)
{
size_t mIndex[4][256] = {0};            // index matrix
UI32 *pDst, *pSrc, *pTmp;
size_t i,j,m,n;
UI32 u;

     for(i = 0; i < count; i++){         // generate histograms
         u = pData[i];
         for(j = 0; j < 4; j++){
             if(j != 3)                  //  signed integer handling
                 mIndex[j][(size_t)(u & 0xff)]++;
             else
                 mIndex[j][(size_t)((u^0x80) & 0xff)]++;
             u >>= 8;
         }
     }
     for(j = 0; j < 4; j++){             // convert to indices
         n = 0;
         for(i = 0; i < 256; i++){
             m = mIndex[j][i];
             mIndex[j][i] = n;
             n += m;
         }
     }
     pDst = (UI32 *)pTemp;               // radix sort
     pSrc = (UI32 *)pData;
     for(j = 0; j < 4; j++){
         for(i = 0; i < count; i++){
             u = pSrc[i];
             if(j != 3)                  //  signed integer handling
                 m = (size_t)(u >> (j<<3)) & 0xff;
             else
                 m = (size_t)((u >> (j<<3))^0x80) & 0xff;
             pDst[mIndex[j][m]++] = u;
         }
         pTmp = pSrc;
         pSrc = pDst;
         pDst = pTmp;
     }
     return((I32 *)pSrc);
}

Page 1 of 3 • 129 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