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?
Hello, dear C experts, I'm hoping you can tell me a story aboutWorks magnitudes better in C++ with std::function<> and generic
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.
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)
fir pisze:
Ross Finlayson pisze: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,
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)
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
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.
Am 12.11.2026 um 18:41 schrieb Ross Finlayson:
Hello, dear C experts, I'm hoping you can tell me a story aboutWorks magnitudes better in C++ with std::function<> and generic
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.
function objects. F.e. when using std::find_if, std::sort etc.
C sucks.
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?
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?
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.
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.
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
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?
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...)
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?
Pardon my impertinence, but this sounds like a homework problem to me.Mabye that's the joke ! ;-)
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 ! ;-)
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 orThis is not homework. And it's not written in good faith, it is just gobbledygook.
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.
On 13/11/2026 13:07, Ross Finlayson wrote:
On 11/13/2026 04:25 AM, Bonita Montero wrote:This is not homework. And it's not written in good faith, it is just gobbledygook.
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.
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.
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.
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:This is not homework. And it's not written in good faith, it is just
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.
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.
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.
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?
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?"
Modules. (Blocks and Modules, Modules and Interfaces.)
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.-a 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.
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?"
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?"
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.-a 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.
On 13/11/2026 17:01, bartc wrote:
On 13/11/2026 14:07, David Brown wrote:His posts are not written by AI - no AI writes that badly. And it is
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:
RF:What was the question?
How to design and make conventions and opinions and idiom anddiscipline
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.
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.
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.
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.
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.
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?
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...
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...
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").
On 11/14/2026 05:19 AM, Kenny McCormack wrote:
In article <11d9jb7$1tt0p$1@dont-email.me>, bartca <bc@freeuk.com> wrote: >>> On 14/11/2026 08:09, Kenny McCormack wrote:
In article <11d7fbv$1839o$2@dont-email.me>,
David Browna <david.brown@hesbynett.no> wrote:
...
His posts are not written by AI - no AI writes that badly.a 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.
aa 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.a 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?a Well, he does it because it is fun and it amuses him.
But I often ask: Why does KT post here?a Since he obviously knows
everything there is to know about C, why bother posting here?a It's not
like he is ever going to learn anything (since he already knows
everything).a 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.
[...]
... Or flame all day, it's a free country.
[...]
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
[...]
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.)
C++ it's said is getting reflection added to the giant tower of
what's become of its language and libraries and idiom shoehorned
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.
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.
Instead of this subsystem deciding what implementation it will use,somebody else gives it the implementation.
(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.)
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.
(See my comment about "tests follow code (not v.v.)". - Opinions may
differ.)
Tristan Wibberley pisze:
On 13/11/2026 22:50, Ross Finlayson wrote:ai may answer it in about 10 seconds:
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.
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 {
-a-a-a void (*draw)(struct renderer *, const void *);
-a-a-a void (*clear)(struct renderer *);
-a-a-a void (*destroy)(struct renderer *);
-a-a-a 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 {
-a-a-a void *(*alloc)(struct allocator *, size_t);
-a-a-a void (*free)(struct allocator *, void *);
-a-a-a 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
-a-a-a ...
#else
-a-a-a ...
#endif
```
I prefer:
```c
struct filesystem {
-a-a-a int (*read)(struct filesystem *, ...);
-a-a-a int (*write)(struct filesystem *, ...);
-a-a-a 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
-a-a-a ...
#elif defined(__linux__)
-a-a-a ...
#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
-a-a-a game.c
-a-a-a renderer.c
-a-a-a renderer_software.c
game_test
-a-a-a game.c
-a-a-a renderer.c
-a-a-a 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 {
-a-a-a struct renderer *renderer;
-a-a-a struct filesystem *filesystem;
-a-a-a 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
-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a game
-a-a-a-a-a-a-a-a-a-a-a-a-a /-a-a |-a-a-a \
-a-a-a-a-a-a-a-a-a-a-a-a /-a-a-a |-a-a-a-a \
-a-a-a-a-a-a renderer filesystem clock
-a-a-a-a-a-a-a-a-a |-a-a-a-a-a-a-a-a-a |-a-a-a-a-a-a |
-a-a-a-a-a software-a-a-a-a test-a-a-a 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,
-a-a-a-a-a-a-a-a-a-a-a-a-a float (*random)(void),
-a-a-a-a-a-a-a-a-a-a-a-a-a 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,
-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a void (*callback)(const char *name, void *context),
-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 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
-a-a-a-a-a-a-a rao
function parameter / callback
-a-a-a-a-a-a-a rao
context pointer
-a-a-a-a-a-a-a rao
struct containing function pointers
-a-a-a-a-a-a-a rao
separate static library
-a-a-a-a-a-a-a rao
dynamic library / plugin
-a-a-a-a-a-a-a rao
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 {
-a-a-a void *context;
-a-a-a int-a (*open)(void *context);
-a-a-a int-a (*read)(void *context, void *buffer, size_t size);
-a-a-a 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 {
-a-a-a struct input_interface input;
-a-a-a struct output_interface output;
-a-a-a 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 {
-a-a-a int private_state;
-a-a-a ...
};
```
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
-a-a-a raA source/module boundaries
opaque structs
-a-a-a raA encapsulation
function pointers + context
-a-a-a raA interfaces / polymorphism
callbacks
-a-a-a raA inversion of control
explicit parameters
-a-a-a raA dependency injection
constructors/factory functions
-a-a-a raA choosing implementations
static libraries
-a-a-a raA link-time composition
shared libraries
-a-a-a raA runtime composition
build configuration
-a-a-a raA selecting implementations
explicit create/destroy contracts
-a-a-a raA 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.
C is C. Imvvvvho, C++ is better... :^) Let the flames begin.
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 lambdarCo
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.
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 lambdarCo
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)
fir pisze:
Bonita Montero pisze:my own quote from google groups
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 lambdarCo
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)
"
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).."
fir pisze:
fir pisze:
Bonita Montero pisze:my own quote from google groups
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 lambdarCo
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)
"
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
fir pisze:
see here https://groups.google.com/g/comp.lang.c/c/I4lJSh45EJ0/m/
ezGwgnvWDgAJ
lame c++ bonita
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 56:58:17 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
4 files (9,632K bytes) |
| Messages: | 285,828 |