Thread View: comp.lang.c
177 messages
177 total messages
Page 2 of 4
Started by fir
Sun, 22 Nov 2026 13:03
Page 2 of 4 • 177 total messages
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 10:25
Date: Thu, 26 Nov 2026 10:25
21 lines
2734 bytes
2734 bytes
Bonita Montero pisze: > Am 26.11.2026 um 11:12 schrieb fir: > >> btw i know it would be probebly more valuable by me to work on furia >> (my compiler) than working on my "lean fire shots" game prrototype but as >> i said i got quite bad last couple of years as to form and not coded at >> all this autumn (thnx to ai also0 I feld slightly better so i took >> whats easier bot indeed i probably should maybe more focus on furia in >> next year or next two years (instead of watching all that stupid news >> )..yet i will see.. im almost 50 now and inded if i have to finish it >> i probably should sit to it (though i must say i got a lot of worries >> also so its not exactly a clear path) > > You've a mental disorder and a doctor could help you. > im overally weak health..but it has not much (well some dose it has) to tehnical details in deeper c im talkin about (and wich youre to mentally weak to understood even though its quite easy to see if explained)
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 10:30
Date: Thu, 26 Nov 2026 10:30
23 lines
2663 bytes
2663 bytes
Bonita Montero pisze: > Am 26.11.2026 um 11:05 schrieb fir: > >> note what you have with use of few af assembly lines on deep c level >> in c++ >> you got by a great dose of stl bloat ... > > You don't do that because it isn't necessary. Modern compilers like g++ > or clang++ do better optimizations than >= 90% of all assembly-capable > developers. > btw c++ dont matters i that discussion sadly (maybe its sad becouse the deep c way vs c++ is exceptional contrast and thus funny) im afraid thoise more low "c successors" matters much here - and they probbaly just take this resizable basic/fundamentall array promitive (but they will add more crap to it..but the solution of this resizable array alone is nice...and not i talk on this 20 years but only on usenet so no much people are aware of this ;c, i recently found a post of 2007 if im not wrong when i was writing on this like here 20 years ago ol pl.comp.lang.c)
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 10:31
Date: Thu, 26 Nov 2026 10:31
30 lines
2736 bytes
2736 bytes
fir pisze: > Bonita Montero pisze: >> Am 26.11.2026 um 11:05 schrieb fir: >> >>> note what you have with use of few af assembly lines on deep c level >>> in c++ >>> you got by a great dose of stl bloat ... >> >> You don't do that because it isn't necessary. Modern compilers like g++ >> or clang++ do better optimizations than >= 90% of all assembly-capable >> developers. >> > > > btw c++ dont matters i that discussion sadly (maybe its sad becouse the > deep c way vs c++ is exceptional contrast and thus funny) > > im afraid thoise more low "c successors" matters much here - and they > probbaly just take this resizable basic/fundamentall array promitive > (but they will add more crap to it..but the solution of this resizable > array alone is nice...and not *note >i talk on this 20 years but only on usenet > so no much people are aware of this ;c, i recently found a post of 2007 > if im not wrong when i was writing on this like here 20 years ago ol > pl.comp.lang.c)
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 10:34
Date: Thu, 26 Nov 2026 10:34
34 lines
3127 bytes
3127 bytes
fir pisze: > Bonita Montero pisze: >> Am 26.11.2026 um 11:05 schrieb fir: >> >>> note what you have with use of few af assembly lines on deep c level >>> in c++ >>> you got by a great dose of stl bloat ... >> >> You don't do that because it isn't necessary. Modern compilers like g++ >> or clang++ do better optimizations than >= 90% of all assembly-capable >> developers. >> > > > btw c++ dont matters i that discussion sadly (maybe its sad becouse the > deep c way vs c++ is exceptional contrast and thus funny) > > im afraid thoise more low "c successors" matters much here - and they > probbaly just take this resizable basic/fundamentall array promitive > (but they will add more crap to it..but the solution of this resizable > array alone is nice...and not i talk on this 20 years but only on usenet > so no much people are aware of this ;c, i recently found a post of 2007 > if im not wrong when i was writing on this like here 20 years ago ol > pl.comp.lang.c) note this 20 yaers long its really long and realli i probbaly should implement it 10 years ago..but my bad health form stopped me a bit (some kind of burnikg out also)..but maybe in this decade we will get back to it (yet will see) right now i dont see a dwellig in compiler as so much fun but in fact im probbaly wrong and if i owuld sit to it it would be fun...so be a bit patient maybe ;c
Re: C and its pesent 'ancestos'
Author: Bonita Montero
Date: Thu, 26 Nov 2026 10:42
Date: Thu, 26 Nov 2026 10:42
5 lines
1912 bytes
1912 bytes
Am 26.11.2026 um 11:30 schrieb fir: > ... (but they will add more crap to it..but the solution of this resizable > array alone is nice... Which ballast ?
Re: C and its pesent 'ancestos'
Author: Bonita Montero
Date: Thu, 26 Nov 2026 10:50
Date: Thu, 26 Nov 2026 10:50
22 lines
2343 bytes
2343 bytes
Am 26.11.2026 um 11:21 schrieb fir: > tabbit tab[20]; > > if rabbit is a structure (if we talk on just c w ith resizable arrays, or > hipermodule if we move on more elaborate c extansions) vector<rabbit> tab; tab.emplace_back( ... ); This deals with the whole reallocations for you. Due to the guarantee of the amortized constant overhead with a capacity growth the array grows exponentially for the sake of performance. > you cal reallock internally (in c runtime) if you wnat to resize > tab.length+=80; > tab.length=tab.length+ 80; > tab.length*=3; //and so on Too much unnecessary work.
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 11:36
Date: Thu, 26 Nov 2026 11:36
19 lines
2382 bytes
2382 bytes
Bonita Montero pisze: > Am 26.11.2026 um 11:30 schrieb fir: > >> ... (but they will add more crap to it..but the solution of this >> resizable >> array alone is nice... > Which ballast ? the bloat is at least 3 kind 1. the bloat of terrible c++ syntax (oop and those generix and those all other non sane additions) 2. the bloat of stl library code/in form of source and binary 3. bloat in c++ compiler code who needs to compile thise two above yet tryin to optimize and overally loose against few lines of assembly generated in some slightly deeper c compiler
Re: C and its pesent 'ancestos'
Author: Bonita Montero
Date: Thu, 26 Nov 2026 11:48
Date: Thu, 26 Nov 2026 11:48
19 lines
2626 bytes
2626 bytes
Am 26.11.2026 um 12:36 schrieb fir: > 1. the bloat of terrible c++ syntax (oop and those generix and those all > other non sane additions) It’s only "bloat" if you aren’t up to the task of handling it. I actually find C to be much more bloated, because the things you end up having to do alongside C++ often require a significant amount of real work. > 2. the bloat of stl library code/in form of source and binary The generic parts are for the sake of convenience and performance. > 3. bloat in c++ compiler code who needs to compile thise two above yet > tryin to optimize and overally loose against few lines of assembly > generated in some slightly deeper c compiler Not true. Today's compilers optimize better than most assembly-capable developers.
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 13:09
Date: Thu, 26 Nov 2026 13:09
48 lines
3310 bytes
3310 bytes
Bonita Montero pisze: > Am 26.11.2026 um 12:36 schrieb fir: > >> 1. the bloat of terrible c++ syntax (oop and those generix and those >> all other non sane additions) > > It’s only "bloat" if you aren’t up to the task of handling it. > I actually find C to be much more bloated, because the things > you end up having to do alongside C++ often require a significant > amount of real work. > >> 2. the bloat of stl library code/in form of source and binary > > The generic parts are for the sake of convenience and performance. > >> 3. bloat in c++ compiler code who needs to compile thise two above yet >> tryin to optimize and overally loose against few lines of assembly >> generated in some slightly deeper c compiler > Not true. Today's compilers optimize better than most assembly-capable > developers. youre solame bonita it is shame you state such things on usenet.. compiler cant optimize things than capable programmer ..guess why? . . . spoily . . . . spoily (though i already talked on it years back here) . . . . . simply becouse compiler cant revrite code..capable programmer can just revrite and change that..so if you write and optimise things you can rewrite it measur rewrite - get kniow what has what cost ..then drp something etc but youre live in terrible world of c++ bigotry..more over you got a mission to spread this shit over the net .
Re: C and its pesent 'ancestos'
Author: Arnold Ziffel
Date: Thu, 26 Nov 2026 14:33
Date: Thu, 26 Nov 2026 14:33
13 lines
1890 bytes
1890 bytes
Bonita Montero <Bonita.Montero@gmail.com> wrote: > You've a mental disorder and a doctor could help you. Bonita, you cannot help someone who doesn't want to get better. You can't talk sense to a madman, or make him see that something's wrong. All you'll be getting are insults. Perhaps the best course of action is to just ignore the person. -- In defeat, malice. In victory, revenge.
Re: C and its pesent 'ancestos'
Author: Bonita Montero
Date: Thu, 26 Nov 2026 14:56
Date: Thu, 26 Nov 2026 14:56
9 lines
2306 bytes
2306 bytes
Am 26.11.2026 um 14:09 schrieb fir: > simply becouse compiler cant revrite code.. You simply don't have the experience to understand what I said. C++ has a lot of abstraction that drills down to simple code if the compiler is capable to transfor the abstraction; see f.e. constexpr -functions, which enable you to write complex algorithms which are completely evaluated at compiletime.
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 15:01
Date: Thu, 26 Nov 2026 15:01
14 lines
2242 bytes
2242 bytes
Arnold Ziffel pisze: > Bonita Montero <Bonita.Montero@gmail.com> wrote: > >> You've a mental disorder and a doctor could help you. > > Bonita, you cannot help someone who doesn't want to get better. You can't > talk sense to a madman, or make him see that something's wrong. All you'll > be getting are insults. > > Perhaps the best course of action is to just ignore the person. > ye you trolls should keep together
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Thu, 26 Nov 2026 15:02
Date: Thu, 26 Nov 2026 15:02
161 lines
8420 bytes
8420 bytes
On 11/26/2026 02:10 AM, Bonita Montero wrote:
> Am 26.11.2026 um 11:02 schrieb fir:
>
>> btw, no one understand the neccsity of
>>
>> int tab[100];
>> tab.length*=3;
>
> In C++ you dont' have to do that. In C++ you simply use emplace_back
> and let the templated runtime to the growing of the capacity. No need
> to handle with pointers yourself. And accessing the contents of a
> container is bounds-checked while debugging (optional with libstdc++,
> default with VC++).
>
>> classic c arrays but bused on realloc internally and thus being able
>> to be resized freely (i already made tham in my own compiler (unfinished)
>> ) you just emit calls to reallock when you meed those reallocking
>> cyntaxes
>
> In C++ the contained values of a vector could have an arbitrary type and
> if the values are moveable a resize is very cheap. Doing this in C is a
> magnitude more work.
>
>> void EmitResizeFromEax(chunk name)
>> {
>> FlushOutAsm("\n push eax" );
>>
>> FlushOutAsm("\n push eax" );
>> FlushOutAsmChunkPE("\n push (", name, ") ");
>> FlushOutAsm("\n call (\"msvcrt.dll\"->realloc)");
>> FlushOutAsmChunkPE("\n mov (", name, ") eax ");
>> FlushOutAsm("\n pop edx");
>> FlushOutAsm("\n pop edx");
>> FlushOutAsmChunkPE("\n mov (", name, ") eax ");
>> FlushOutAsm("\n pop eax");
>> FlushOutAsmChunkPE("\n mov (", name, "_size) eax ");
>>
>> if(emit_basic_debug_info_for_initial_reallocks)
>> {
>> // FlushOutAsm("\n mov eax (__realloc_sum_counter) ");
>> // FlushOutAsm("\n add eax %d", size);
>> // FlushOutAsm("\n mov (__realloc_sum_counter) eax");
>> //
>> //
>> // FlushOutAsm("\n push %d ", size);
>> // FlushOutAsm("\n push __reallocked_str_label");
>> // FlushOutAsm("\n call (\"msvcrt.dll\"->printf)");
>> // FlushOutAsm("\n pop edx ");
>> // FlushOutAsm("\n pop edx ");
>> }
>>
>> }
>
> Sick, totally sick !
>
>> instead of insane bulshit of c++ containers?
>
> They're much easier to handle.
>
> You don't trust into abstractions and you would be overburdened with
> a language like C++ or Rust. These abstractions that do the same thing
> you do manually in C. Instread you want to flip every bit yourself in
> C. This leads to more and less readable code.
>
One challenge I'm trying to figure out is basically
about strings and that strings are variable-length.
So, with basic operations on strings including things
like "concatenate" and "truncate", then how to deal with
the buffers is being a thing, where for example languages
like C++ their standard implementations of basic_string
for std::string might stuff a "small" string into the object's
own representation on the stack, otherwise on the heap,
or for example the data-segment for "constant" strings,
and including ideas like "string atoms" a.k.a. "string internment".
So, there's the stack and the heap, with regards to things
like "variable-length-arrays", basically for the strings and
mostly the algorithms on them like substitution/interpolation,
and formatting among all the various types, for basically an
"output" case and an "input" case to algorithms, then to
result that to all the standard routines it's a "char *",
so usually.
You might think of that as a natural algebraization about
the usual formal language's account since concatenation
and the empty string, what operator-overloading "+" makes
for string vis-a-vis whatever types and formatting them
to string, and what operator-overloading "-" makes for
truncation and whatever type is to indicate what/how/where
is to be truncated, about truncation & concatenation,
formatters & converters, and operations on strings (or
for example any other account of growing | shrinking "arrays").
Of course C doesn't have "operator-overloading" in the language,
yet so that concatenate() and truncate() can be given
function-overloading via _Generic in C, then that it's sort of
"reverse-reverse
Polish notation" like as for a usual stack-notation
operand-operand-operator that it's function-operand-operand of the
operator, pair-wise.
Then, there's * and /, the arithmetic operators, and an idea about
whether that's to align quite directly with the notion of
pointer-indirection quite like "+" aligns with concatenation, here though
basically to make for assignment-targets and the scope & state,
that what enters-scope and embodies-state in block-scope then
function-scope then globals by being reference-able, about what
"*" and "/" can mean, or for example "*=" and "/=", about basically
what makes for in-parameters and out-parameters, these kinds of
things, and not exactly like move semantics, instead basically
into-the-stack or offto-the-heap, as it were.
About then "natural" "algebraizations" about the syntax of the
language and its cousin(s), here is about concepts like "seating"
the references vis-a-vis "homing" the references, in a language
like C where there are only _pointers_, that it results for
type-safety that pointers are furthermore _typed_ as to result
then for either behaving like "seating" the references in C++,
or not, when for example the growing | shrinking of the textual
data, or other accounts of tuples or lists or otherwise "arrays",
has an entirely different approach that's yet on its own account,
"natural".
The concatenation and truncation, for example, one might aver
looks like
s += 1
intuitively formats the integer, according to formatters & converters,
then for example where
s -= 1
// or
s -= -1
truncates from the right or left, intuitively then toward the
"natural" that's what intuitive about the scope & state and
left/right branching in the procedural language, is "natural"
in the up/down jumping on the program counter, scope & state
on the core/CPU, and giant uniform global memory, scope & state
the RAM, that "scope" and "state" make a stack in the procedural
definition, and two different things, yet an array and constant block as
"CPU" or "RAM", the contents, and one thing.
So, one may aver that accounts of "typing the pointers" can make
for example pretty much exactly like C++, or quite entirely different,
then to result a model of "natural operator overloading" that results
"plain syntax in what happens to be the arithmetic operators instead
of the reference operators", arithmetic on scope & state.
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Thu, 26 Nov 2026 15:38
Date: Thu, 26 Nov 2026 15:38
230 lines
12360 bytes
12360 bytes
On 11/26/2026 07:02 AM, Ross Finlayson wrote:
> On 11/26/2026 02:10 AM, Bonita Montero wrote:
>> Am 26.11.2026 um 11:02 schrieb fir:
>>
>>> btw, no one understand the neccsity of
>>>
>>> int tab[100];
>>> tab.length*=3;
>>
>> In C++ you dont' have to do that. In C++ you simply use emplace_back
>> and let the templated runtime to the growing of the capacity. No need
>> to handle with pointers yourself. And accessing the contents of a
>> container is bounds-checked while debugging (optional with libstdc++,
>> default with VC++).
>>
>>> classic c arrays but bused on realloc internally and thus being able
>>> to be resized freely (i already made tham in my own compiler
>>> (unfinished)
>>> ) you just emit calls to reallock when you meed those reallocking
>>> cyntaxes
>>
>> In C++ the contained values of a vector could have an arbitrary type and
>> if the values are moveable a resize is very cheap. Doing this in C is a
>> magnitude more work.
>>
>>> void EmitResizeFromEax(chunk name)
>>> {
>>> FlushOutAsm("\n push eax" );
>>>
>>> FlushOutAsm("\n push eax" );
>>> FlushOutAsmChunkPE("\n push (", name, ") ");
>>> FlushOutAsm("\n call (\"msvcrt.dll\"->realloc)");
>>> FlushOutAsmChunkPE("\n mov (", name, ") eax ");
>>> FlushOutAsm("\n pop edx");
>>> FlushOutAsm("\n pop edx");
>>> FlushOutAsmChunkPE("\n mov (", name, ") eax ");
>>> FlushOutAsm("\n pop eax");
>>> FlushOutAsmChunkPE("\n mov (", name, "_size) eax ");
>>>
>>> if(emit_basic_debug_info_for_initial_reallocks)
>>> {
>>> // FlushOutAsm("\n mov eax (__realloc_sum_counter) ");
>>> // FlushOutAsm("\n add eax %d", size);
>>> // FlushOutAsm("\n mov (__realloc_sum_counter) eax");
>>> //
>>> //
>>> // FlushOutAsm("\n push %d ", size);
>>> // FlushOutAsm("\n push __reallocked_str_label");
>>> // FlushOutAsm("\n call (\"msvcrt.dll\"->printf)");
>>> // FlushOutAsm("\n pop edx ");
>>> // FlushOutAsm("\n pop edx ");
>>> }
>>>
>>> }
>>
>> Sick, totally sick !
>>
>>> instead of insane bulshit of c++ containers?
>>
>> They're much easier to handle.
>>
>> You don't trust into abstractions and you would be overburdened with
>> a language like C++ or Rust. These abstractions that do the same thing
>> you do manually in C. Instread you want to flip every bit yourself in
>> C. This leads to more and less readable code.
>>
>
>
> One challenge I'm trying to figure out is basically
> about strings and that strings are variable-length.
>
> So, with basic operations on strings including things
> like "concatenate" and "truncate", then how to deal with
> the buffers is being a thing, where for example languages
> like C++ their standard implementations of basic_string
> for std::string might stuff a "small" string into the object's
> own representation on the stack, otherwise on the heap,
> or for example the data-segment for "constant" strings,
> and including ideas like "string atoms" a.k.a. "string internment".
>
> So, there's the stack and the heap, with regards to things
> like "variable-length-arrays", basically for the strings and
> mostly the algorithms on them like substitution/interpolation,
> and formatting among all the various types, for basically an
> "output" case and an "input" case to algorithms, then to
> result that to all the standard routines it's a "char *",
> so usually.
>
>
> You might think of that as a natural algebraization about
> the usual formal language's account since concatenation
> and the empty string, what operator-overloading "+" makes
> for string vis-a-vis whatever types and formatting them
> to string, and what operator-overloading "-" makes for
> truncation and whatever type is to indicate what/how/where
> is to be truncated, about truncation & concatenation,
> formatters & converters, and operations on strings (or
> for example any other account of growing | shrinking "arrays").
>
>
> Of course C doesn't have "operator-overloading" in the language,
> yet so that concatenate() and truncate() can be given
> function-overloading via _Generic in C, then that it's sort of
> "reverse-reverse
> Polish notation" like as for a usual stack-notation
> operand-operand-operator that it's function-operand-operand of the
> operator, pair-wise.
>
>
> Then, there's * and /, the arithmetic operators, and an idea about
> whether that's to align quite directly with the notion of
> pointer-indirection quite like "+" aligns with concatenation, here though
> basically to make for assignment-targets and the scope & state,
> that what enters-scope and embodies-state in block-scope then
> function-scope then globals by being reference-able, about what
> "*" and "/" can mean, or for example "*=" and "/=", about basically
> what makes for in-parameters and out-parameters, these kinds of
> things, and not exactly like move semantics, instead basically
> into-the-stack or offto-the-heap, as it were.
>
>
> About then "natural" "algebraizations" about the syntax of the
> language and its cousin(s), here is about concepts like "seating"
> the references vis-a-vis "homing" the references, in a language
> like C where there are only _pointers_, that it results for
> type-safety that pointers are furthermore _typed_ as to result
> then for either behaving like "seating" the references in C++,
> or not, when for example the growing | shrinking of the textual
> data, or other accounts of tuples or lists or otherwise "arrays",
> has an entirely different approach that's yet on its own account,
> "natural".
>
>
> The concatenation and truncation, for example, one might aver
> looks like
>
> s += 1
>
> intuitively formats the integer, according to formatters & converters,
> then for example where
>
> s -= 1
> // or
> s -= -1
>
> truncates from the right or left, intuitively then toward the
> "natural" that's what intuitive about the scope & state and
> left/right branching in the procedural language, is "natural"
> in the up/down jumping on the program counter, scope & state
> on the core/CPU, and giant uniform global memory, scope & state
> the RAM, that "scope" and "state" make a stack in the procedural
> definition, and two different things, yet an array and constant block as
> "CPU" or "RAM", the contents, and one thing.
>
>
> So, one may aver that accounts of "typing the pointers" can make
> for example pretty much exactly like C++, or quite entirely different,
> then to result a model of "natural operator overloading" that results
> "plain syntax in what happens to be the arithmetic operators instead
> of the reference operators", arithmetic on scope & state.
>
>
>
It seems like that any account of reasonable performance about
dynamic objects besides what's straight pushed/popped the stack
up to stack-depth-limits, is going to involve abstracting away
and not calling malloc/free or variously new/delete with regards
to allocators, making the process & thread according to accounts
of "globality" of the thread then the process, according to
accounts like "allocators" or "allocations", what pretty much
resolve to free-lists, of like-sized elements, or slabs, to be
carved up of variable length elements, then for the function
to do the maintenance of the slab itself including defragmentation
and basically "reorg" it's called, or "reorganization" of the
data-structure, a usually under-served account of the "cost"
the "total cost including maintenance" of algorithms & data-structures.
Then, for accounts like free-lists and slabs, then for example
whether "arena" is a bit overloaded over time and usually these
days means means "slabs" yet was also "free-lists apiece for
various types", about locality and proximity & affinity when
for example "data local to a routine should be local in memory",
basically is about "typing the memory" as making for accounts
of "these fixed-size arrays of byte_t which is unsigned char,
sized LINE_SIZE, PAGE_SIZE, HUGE_SIZE, and to be aligned also
to LINE_SIZE, PAGE_SIZE, HUGE_SIZE like for alloc_aligned in C
or as carved from the slab or from an array of same", then for
things like NAME_SIZE = 32 with SHORT_NAME = 16 and LONG_NAME = 64
and MAX_NAME being NAME_MAX, then those being char_t as "char*",
when decayed from char[SIZE] fixed-size, is that
placeholder-substitution and formatting & conversion pretty much
universally involves a sufficiently larger bounded region to fit else
truncate the results of formatting & conversion and interpolation &
placeholder-substitution, or most usual textual routines what that
usually according to re-entrancy of routine, the thread-local is safely
holding state to maintain re-entrancy, while, otherwise it's on
the stack the thread's as it were program-stack, when those fit
on the stack and when they don't, and when they can be directly
re-used, vis-a-vis, re-allocated, according to scope & state in
the blocks and functions, about things like move in C++ or that
ridiculous-seeming same-block variable hiding which seems entirely
introducing new variables the same names in Rust, basically about
"I accept this gone" or "I want this back", "in" and "out" params,
then also that usually is "I shouldn't know or care: the functions
work on types with type-safety and whatever works, arithmetic & algebra".
So, the usual account of lifetime and storage about scope & state
and mutability and ownership and all the things like C++ gives
after references and ref-ref or about the universal/forwarding
and that templates and plain-code are two different languages now,
has that that's not the only possible game in town according to
"C", about again these sorts of "natural" accounts, sort of with
regards to the movie "The Natural" yet not so relevant, point
being that the modern many-core NUMA machine, thread-of-control CPU
scope & state and all-memory RAM scope & state, living in a hyper-vised
containerization cluster, really appreciates the
alias-less/stall-less/branch-less/call-less/fault-less, ASBCF-free, then
as with regards CMPEXCH or LL/SC, with the operating system doing
pre-emptive multithreading giving process & thread model, have already
built one.
Re: C and its pesent 'ancestos'
Author: Bonita Montero
Date: Thu, 26 Nov 2026 16:09
Date: Thu, 26 Nov 2026 16:09
103 lines
6378 bytes
6378 bytes
Am 26.11.2026 um 16:02 schrieb Ross Finlayson: You’re jumping from one topic to another—going off on tangents. I’m pretty sure I can’t follow you. I mean, I can follow what you’re saying, but I’m wondering how it fits into the context you’re responding to. > One challenge I'm trying to figure out is basically > about strings and that strings are variable-length. > > So, with basic operations on strings including things > like "concatenate" and "truncate", then how to deal with > the buffers is being a thing, where for example languages > like C++ their standard implementations of basic_string > for std::string might stuff a "small" string into the object's > own representation on the stack, otherwise on the heap, > or for example the data-segment for "constant" strings, > and including ideas like "string atoms" a.k.a. "string internment". > > So, there's the stack and the heap, with regards to things > like "variable-length-arrays", basically for the strings and > mostly the algorithms on them like substitution/interpolation, > and formatting among all the various types, for basically an > "output" case and an "input" case to algorithms, then to > result that to all the standard routines it's a "char *", > so usually. > > > You might think of that as a natural algebraization about > the usual formal language's account since concatenation > and the empty string, what operator-overloading "+" makes > for string vis-a-vis whatever types and formatting them > to string, and what operator-overloading "-" makes for > truncation and whatever type is to indicate what/how/where > is to be truncated, about truncation & concatenation, > formatters & converters, and operations on strings (or > for example any other account of growing | shrinking "arrays"). > > > Of course C doesn't have "operator-overloading" in the language, > yet so that concatenate() and truncate() can be given > function-overloading via _Generic in C, then that it's sort of > "reverse-reverse > Polish notation" like as for a usual stack-notation > operand-operand-operator that it's function-operand-operand of the > operator, pair-wise. > > > Then, there's * and /, the arithmetic operators, and an idea about > whether that's to align quite directly with the notion of > pointer-indirection quite like "+" aligns with concatenation, here though > basically to make for assignment-targets and the scope & state, > that what enters-scope and embodies-state in block-scope then > function-scope then globals by being reference-able, about what > "*" and "/" can mean, or for example "*=" and "/=", about basically > what makes for in-parameters and out-parameters, these kinds of > things, and not exactly like move semantics, instead basically > into-the-stack or offto-the-heap, as it were. > > > About then "natural" "algebraizations" about the syntax of the > language and its cousin(s), here is about concepts like "seating" > the references vis-a-vis "homing" the references, in a language > like C where there are only _pointers_, that it results for > type-safety that pointers are furthermore _typed_ as to result > then for either behaving like "seating" the references in C++, > or not, when for example the growing | shrinking of the textual > data, or other accounts of tuples or lists or otherwise "arrays", > has an entirely different approach that's yet on its own account, > "natural". > > > The concatenation and truncation, for example, one might aver > looks like > > s += 1 > > intuitively formats the integer, according to formatters & converters, > then for example where > > s -= 1 > // or > s -= -1 > > truncates from the right or left, intuitively then toward the > "natural" that's what intuitive about the scope & state and > left/right branching in the procedural language, is "natural" > in the up/down jumping on the program counter, scope & state > on the core/CPU, and giant uniform global memory, scope & state > the RAM, that "scope" and "state" make a stack in the procedural > definition, and two different things, yet an array and constant block as > "CPU" or "RAM", the contents, and one thing. > > > So, one may aver that accounts of "typing the pointers" can make > for example pretty much exactly like C++, or quite entirely different, > then to result a model of "natural operator overloading" that results > "plain syntax in what happens to be the arithmetic operators instead > of the reference operators", arithmetic on scope & state. > > >
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Thu, 26 Nov 2026 16:43
Date: Thu, 26 Nov 2026 16:43
156 lines
9181 bytes
9181 bytes
On 11/26/2026 08:09 AM, Bonita Montero wrote: > Am 26.11.2026 um 16:02 schrieb Ross Finlayson: > > You’re jumping from one topic to another—going off on tangents. > I’m pretty sure I can’t follow you. I mean, I can follow what > you’re saying, but I’m wondering how it fits into the context > you’re responding to. > >> One challenge I'm trying to figure out is basically >> about strings and that strings are variable-length. >> >> So, with basic operations on strings including things >> like "concatenate" and "truncate", then how to deal with >> the buffers is being a thing, where for example languages >> like C++ their standard implementations of basic_string >> for std::string might stuff a "small" string into the object's >> own representation on the stack, otherwise on the heap, >> or for example the data-segment for "constant" strings, >> and including ideas like "string atoms" a.k.a. "string internment". >> >> So, there's the stack and the heap, with regards to things >> like "variable-length-arrays", basically for the strings and >> mostly the algorithms on them like substitution/interpolation, >> and formatting among all the various types, for basically an >> "output" case and an "input" case to algorithms, then to >> result that to all the standard routines it's a "char *", >> so usually. >> >> >> You might think of that as a natural algebraization about >> the usual formal language's account since concatenation >> and the empty string, what operator-overloading "+" makes >> for string vis-a-vis whatever types and formatting them >> to string, and what operator-overloading "-" makes for >> truncation and whatever type is to indicate what/how/where >> is to be truncated, about truncation & concatenation, >> formatters & converters, and operations on strings (or >> for example any other account of growing | shrinking "arrays"). >> >> >> Of course C doesn't have "operator-overloading" in the language, >> yet so that concatenate() and truncate() can be given >> function-overloading via _Generic in C, then that it's sort of >> "reverse-reverse >> Polish notation" like as for a usual stack-notation >> operand-operand-operator that it's function-operand-operand of the >> operator, pair-wise. >> >> >> Then, there's * and /, the arithmetic operators, and an idea about >> whether that's to align quite directly with the notion of >> pointer-indirection quite like "+" aligns with concatenation, here though >> basically to make for assignment-targets and the scope & state, >> that what enters-scope and embodies-state in block-scope then >> function-scope then globals by being reference-able, about what >> "*" and "/" can mean, or for example "*=" and "/=", about basically >> what makes for in-parameters and out-parameters, these kinds of >> things, and not exactly like move semantics, instead basically >> into-the-stack or offto-the-heap, as it were. >> >> >> About then "natural" "algebraizations" about the syntax of the >> language and its cousin(s), here is about concepts like "seating" >> the references vis-a-vis "homing" the references, in a language >> like C where there are only _pointers_, that it results for >> type-safety that pointers are furthermore _typed_ as to result >> then for either behaving like "seating" the references in C++, >> or not, when for example the growing | shrinking of the textual >> data, or other accounts of tuples or lists or otherwise "arrays", >> has an entirely different approach that's yet on its own account, >> "natural". >> >> >> The concatenation and truncation, for example, one might aver >> looks like >> >> s += 1 >> >> intuitively formats the integer, according to formatters & converters, >> then for example where >> >> s -= 1 >> // or >> s -= -1 >> >> truncates from the right or left, intuitively then toward the >> "natural" that's what intuitive about the scope & state and >> left/right branching in the procedural language, is "natural" >> in the up/down jumping on the program counter, scope & state >> on the core/CPU, and giant uniform global memory, scope & state >> the RAM, that "scope" and "state" make a stack in the procedural >> definition, and two different things, yet an array and constant block as >> "CPU" or "RAM", the contents, and one thing. >> >> >> So, one may aver that accounts of "typing the pointers" can make >> for example pretty much exactly like C++, or quite entirely different, >> then to result a model of "natural operator overloading" that results >> "plain syntax in what happens to be the arithmetic operators instead >> of the reference operators", arithmetic on scope & state. >> >> >> > Hello. It's not much speaking to "C and its present ancestors", (not, "C and its peasant ancestors") except about the "natural" these days I guess they're calling it "mechanical sympathy" or "close-to-the-hardware", yet also that there's the process & thread model and the heap & stack model, "systematic sympathy", if C was "declarative flow-of-control, close to the hardware", that what's involved about state & scope is also about the process & thread and stack & heap. So, the usual account of dynamic allocation of textual data or strings, or bytes, here calling "unsigned char" byte_t and "signed char" char_t since those are un-used and probably will be un-used forever in C and C++ themselves, about the implicits according to _types_ in C and C++ (or, "C/C++" when the same code is hidden inside "__cplusplus"), then is about _types_ in C, and adding only a few types to the language, that are fixed-size, yet quite large than a register word, and usually accounts of multiples of cache-line size (LINE_SIZE, here when it's "64B these days, 32B not so long ago, often in pairs of cache-lines 128B, yet pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the system's account of the memory page, mostly 4Kib), then that char_t and byte_t are according to the least-addressible memory location, line-size the least-granular cache-content, and page-size the least-granular virtual memory page used for all purposes, these then being natural "types" according to C. So, any of these, is an integer multiple of the smaller ones, basically making for "slab allocators" the usual enough account, with that about 5% of the lines in the page are housekeeping, rest data, about 64B and 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling convention of the preserved and scratch registers and what the convention says to do. It's figured that these types according to the processor's "RAM" the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going to be so, not change for a generation and a half, and otherwise are parametric and parameters, i.e. constants. So, there's an idea to use "*=" and "/=", like "multiply" like "copy" or "divide" like "carve", to make allocation first-class in terms of what were called "glo-calls", globals to process & thread, vis-a-vis, "sys-calls", like malloc & free, or here mostly about alloc_aligned & free, figuring never to call malloc ever again, except that user code can do what it wants since programmer's intent.
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Thu, 26 Nov 2026 17:00
Date: Thu, 26 Nov 2026 17:00
204 lines
11534 bytes
11534 bytes
On 11/26/2026 08:43 AM, Ross Finlayson wrote: > On 11/26/2026 08:09 AM, Bonita Montero wrote: >> Am 26.11.2026 um 16:02 schrieb Ross Finlayson: >> >> You’re jumping from one topic to another—going off on tangents. >> I’m pretty sure I can’t follow you. I mean, I can follow what >> you’re saying, but I’m wondering how it fits into the context >> you’re responding to. >> >>> One challenge I'm trying to figure out is basically >>> about strings and that strings are variable-length. >>> >>> So, with basic operations on strings including things >>> like "concatenate" and "truncate", then how to deal with >>> the buffers is being a thing, where for example languages >>> like C++ their standard implementations of basic_string >>> for std::string might stuff a "small" string into the object's >>> own representation on the stack, otherwise on the heap, >>> or for example the data-segment for "constant" strings, >>> and including ideas like "string atoms" a.k.a. "string internment". >>> >>> So, there's the stack and the heap, with regards to things >>> like "variable-length-arrays", basically for the strings and >>> mostly the algorithms on them like substitution/interpolation, >>> and formatting among all the various types, for basically an >>> "output" case and an "input" case to algorithms, then to >>> result that to all the standard routines it's a "char *", >>> so usually. >>> >>> >>> You might think of that as a natural algebraization about >>> the usual formal language's account since concatenation >>> and the empty string, what operator-overloading "+" makes >>> for string vis-a-vis whatever types and formatting them >>> to string, and what operator-overloading "-" makes for >>> truncation and whatever type is to indicate what/how/where >>> is to be truncated, about truncation & concatenation, >>> formatters & converters, and operations on strings (or >>> for example any other account of growing | shrinking "arrays"). >>> >>> >>> Of course C doesn't have "operator-overloading" in the language, >>> yet so that concatenate() and truncate() can be given >>> function-overloading via _Generic in C, then that it's sort of >>> "reverse-reverse >>> Polish notation" like as for a usual stack-notation >>> operand-operand-operator that it's function-operand-operand of the >>> operator, pair-wise. >>> >>> >>> Then, there's * and /, the arithmetic operators, and an idea about >>> whether that's to align quite directly with the notion of >>> pointer-indirection quite like "+" aligns with concatenation, here >>> though >>> basically to make for assignment-targets and the scope & state, >>> that what enters-scope and embodies-state in block-scope then >>> function-scope then globals by being reference-able, about what >>> "*" and "/" can mean, or for example "*=" and "/=", about basically >>> what makes for in-parameters and out-parameters, these kinds of >>> things, and not exactly like move semantics, instead basically >>> into-the-stack or offto-the-heap, as it were. >>> >>> >>> About then "natural" "algebraizations" about the syntax of the >>> language and its cousin(s), here is about concepts like "seating" >>> the references vis-a-vis "homing" the references, in a language >>> like C where there are only _pointers_, that it results for >>> type-safety that pointers are furthermore _typed_ as to result >>> then for either behaving like "seating" the references in C++, >>> or not, when for example the growing | shrinking of the textual >>> data, or other accounts of tuples or lists or otherwise "arrays", >>> has an entirely different approach that's yet on its own account, >>> "natural". >>> >>> >>> The concatenation and truncation, for example, one might aver >>> looks like >>> >>> s += 1 >>> >>> intuitively formats the integer, according to formatters & converters, >>> then for example where >>> >>> s -= 1 >>> // or >>> s -= -1 >>> >>> truncates from the right or left, intuitively then toward the >>> "natural" that's what intuitive about the scope & state and >>> left/right branching in the procedural language, is "natural" >>> in the up/down jumping on the program counter, scope & state >>> on the core/CPU, and giant uniform global memory, scope & state >>> the RAM, that "scope" and "state" make a stack in the procedural >>> definition, and two different things, yet an array and constant block as >>> "CPU" or "RAM", the contents, and one thing. >>> >>> >>> So, one may aver that accounts of "typing the pointers" can make >>> for example pretty much exactly like C++, or quite entirely different, >>> then to result a model of "natural operator overloading" that results >>> "plain syntax in what happens to be the arithmetic operators instead >>> of the reference operators", arithmetic on scope & state. >>> >>> >>> >> > > > Hello. It's not much speaking to "C and its present ancestors", > (not, "C and its peasant ancestors") except about the "natural" these > days I guess they're calling it "mechanical sympathy" or > "close-to-the-hardware", yet also that there's the process & thread > model and the heap & stack model, "systematic sympathy", if C was > "declarative flow-of-control, close to the hardware", that what's > involved about state & scope is also about the process & thread and > stack & heap. > > > So, the usual account of dynamic allocation of textual data or strings, > or bytes, here calling "unsigned char" byte_t and "signed char" char_t > since those are un-used and probably will be un-used forever in C and > C++ themselves, about the implicits according to _types_ in C and C++ > (or, "C/C++" when the same code is hidden inside "__cplusplus"), then > is about _types_ in C, and adding only a few types to the language, > that are fixed-size, yet quite large than a register word, and usually > accounts of multiples of cache-line size (LINE_SIZE, here when it's "64B > these days, 32B not so long ago, often in pairs of cache-lines 128B, yet > pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the > system's account of the memory page, mostly 4Kib), > then that char_t and byte_t are according to the least-addressible > memory location, line-size the least-granular cache-content, and > page-size the least-granular virtual memory page used for all purposes, > these then being natural "types" according to C. > > > So, any of these, is an integer multiple of the smaller ones, basically > making for "slab allocators" the usual enough account, with that about > 5% of the lines in the page are housekeeping, rest data, about 64B and > 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling > convention of the preserved and scratch registers and what the > convention says to do. > > It's figured that these types according to the processor's "RAM" > the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going > to be so, not change for a generation and a half, and otherwise > are parametric and parameters, i.e. constants. > > > > So, there's an idea to use "*=" and "/=", like "multiply" like "copy" > or "divide" like "carve", to make allocation first-class in terms > of what were called "glo-calls", globals to process & thread, vis-a-vis, > "sys-calls", like malloc & free, or here mostly about alloc_aligned & > free, figuring never to call malloc ever again, > except that user code can do what it wants since programmer's intent. > > > Say for example there's a function and it calls functions and these functions return char-pointers or otherwise anything that's dynamically-allocated. So, the usual idea like new & delete is that either it has an allocator passed to it, or for that of course there was "placement-new' long before there was "move semantics", that it's much about "placement-new" from C++, that the caller allocates a block/slab on the stack and expects callee's to carve from the block/slab, though, it doesn't necessarily know how much to allocate, to avoid "too much" or "too little". Then, if the called functions need more to result the out-params as they would be, for example under pointers usually in C or C++ and "mutable references" usually enough in C++, about "the seating of references", and not getting into the distinct dialects of templates & procedural code about "the universal & forwarding ref-ref among accounts of l/r/x/pr/rr-values along with pointer-decay and auto and decltype the C++ 11 <-> 14", so, about "placement-new" vis-a-vis "seating the references", basically is about placement-new, then about caller laying the bed for what it expects in return, or, taking upon itself the allocation and free-ing, or responsibility, of distinguishing among called-functions what are state-less or plain-old pure, idempotent functions yet as their monad's a terminal. Then, the idea here is that callee's have a convention about thread-locals and stack-relatives, that's their default allocator. So, "uses of placement-new", in "conventions of types", about, "conventions of locals (globals)", is the sort of idea. Then the idea is that results "naturals" like "copy or carve" (in C, which happen to have most simple sorts of operator-overloads). Basically it's also an account of "allocation only returns one of LINE, PAGE, or HUGE size, and only one of those, allocate1(slab_t slab)" then for reference-routines of hyper-local allocators. About "placement-new" is, "placement-new" is ye olde way.
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Thu, 26 Nov 2026 18:10
Date: Thu, 26 Nov 2026 18:10
255 lines
14502 bytes
14502 bytes
On 11/26/2026 09:00 AM, Ross Finlayson wrote: > On 11/26/2026 08:43 AM, Ross Finlayson wrote: >> On 11/26/2026 08:09 AM, Bonita Montero wrote: >>> Am 26.11.2026 um 16:02 schrieb Ross Finlayson: >>> >>> You’re jumping from one topic to another—going off on tangents. >>> I’m pretty sure I can’t follow you. I mean, I can follow what >>> you’re saying, but I’m wondering how it fits into the context >>> you’re responding to. >>> >>>> One challenge I'm trying to figure out is basically >>>> about strings and that strings are variable-length. >>>> >>>> So, with basic operations on strings including things >>>> like "concatenate" and "truncate", then how to deal with >>>> the buffers is being a thing, where for example languages >>>> like C++ their standard implementations of basic_string >>>> for std::string might stuff a "small" string into the object's >>>> own representation on the stack, otherwise on the heap, >>>> or for example the data-segment for "constant" strings, >>>> and including ideas like "string atoms" a.k.a. "string internment". >>>> >>>> So, there's the stack and the heap, with regards to things >>>> like "variable-length-arrays", basically for the strings and >>>> mostly the algorithms on them like substitution/interpolation, >>>> and formatting among all the various types, for basically an >>>> "output" case and an "input" case to algorithms, then to >>>> result that to all the standard routines it's a "char *", >>>> so usually. >>>> >>>> >>>> You might think of that as a natural algebraization about >>>> the usual formal language's account since concatenation >>>> and the empty string, what operator-overloading "+" makes >>>> for string vis-a-vis whatever types and formatting them >>>> to string, and what operator-overloading "-" makes for >>>> truncation and whatever type is to indicate what/how/where >>>> is to be truncated, about truncation & concatenation, >>>> formatters & converters, and operations on strings (or >>>> for example any other account of growing | shrinking "arrays"). >>>> >>>> >>>> Of course C doesn't have "operator-overloading" in the language, >>>> yet so that concatenate() and truncate() can be given >>>> function-overloading via _Generic in C, then that it's sort of >>>> "reverse-reverse >>>> Polish notation" like as for a usual stack-notation >>>> operand-operand-operator that it's function-operand-operand of the >>>> operator, pair-wise. >>>> >>>> >>>> Then, there's * and /, the arithmetic operators, and an idea about >>>> whether that's to align quite directly with the notion of >>>> pointer-indirection quite like "+" aligns with concatenation, here >>>> though >>>> basically to make for assignment-targets and the scope & state, >>>> that what enters-scope and embodies-state in block-scope then >>>> function-scope then globals by being reference-able, about what >>>> "*" and "/" can mean, or for example "*=" and "/=", about basically >>>> what makes for in-parameters and out-parameters, these kinds of >>>> things, and not exactly like move semantics, instead basically >>>> into-the-stack or offto-the-heap, as it were. >>>> >>>> >>>> About then "natural" "algebraizations" about the syntax of the >>>> language and its cousin(s), here is about concepts like "seating" >>>> the references vis-a-vis "homing" the references, in a language >>>> like C where there are only _pointers_, that it results for >>>> type-safety that pointers are furthermore _typed_ as to result >>>> then for either behaving like "seating" the references in C++, >>>> or not, when for example the growing | shrinking of the textual >>>> data, or other accounts of tuples or lists or otherwise "arrays", >>>> has an entirely different approach that's yet on its own account, >>>> "natural". >>>> >>>> >>>> The concatenation and truncation, for example, one might aver >>>> looks like >>>> >>>> s += 1 >>>> >>>> intuitively formats the integer, according to formatters & converters, >>>> then for example where >>>> >>>> s -= 1 >>>> // or >>>> s -= -1 >>>> >>>> truncates from the right or left, intuitively then toward the >>>> "natural" that's what intuitive about the scope & state and >>>> left/right branching in the procedural language, is "natural" >>>> in the up/down jumping on the program counter, scope & state >>>> on the core/CPU, and giant uniform global memory, scope & state >>>> the RAM, that "scope" and "state" make a stack in the procedural >>>> definition, and two different things, yet an array and constant >>>> block as >>>> "CPU" or "RAM", the contents, and one thing. >>>> >>>> >>>> So, one may aver that accounts of "typing the pointers" can make >>>> for example pretty much exactly like C++, or quite entirely different, >>>> then to result a model of "natural operator overloading" that results >>>> "plain syntax in what happens to be the arithmetic operators instead >>>> of the reference operators", arithmetic on scope & state. >>>> >>>> >>>> >>> >> >> >> Hello. It's not much speaking to "C and its present ancestors", >> (not, "C and its peasant ancestors") except about the "natural" these >> days I guess they're calling it "mechanical sympathy" or >> "close-to-the-hardware", yet also that there's the process & thread >> model and the heap & stack model, "systematic sympathy", if C was >> "declarative flow-of-control, close to the hardware", that what's >> involved about state & scope is also about the process & thread and >> stack & heap. >> >> >> So, the usual account of dynamic allocation of textual data or strings, >> or bytes, here calling "unsigned char" byte_t and "signed char" char_t >> since those are un-used and probably will be un-used forever in C and >> C++ themselves, about the implicits according to _types_ in C and C++ >> (or, "C/C++" when the same code is hidden inside "__cplusplus"), then >> is about _types_ in C, and adding only a few types to the language, >> that are fixed-size, yet quite large than a register word, and usually >> accounts of multiples of cache-line size (LINE_SIZE, here when it's "64B >> these days, 32B not so long ago, often in pairs of cache-lines 128B, yet >> pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the >> system's account of the memory page, mostly 4Kib), >> then that char_t and byte_t are according to the least-addressible >> memory location, line-size the least-granular cache-content, and >> page-size the least-granular virtual memory page used for all purposes, >> these then being natural "types" according to C. >> >> >> So, any of these, is an integer multiple of the smaller ones, basically >> making for "slab allocators" the usual enough account, with that about >> 5% of the lines in the page are housekeeping, rest data, about 64B and >> 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling >> convention of the preserved and scratch registers and what the >> convention says to do. >> >> It's figured that these types according to the processor's "RAM" >> the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going >> to be so, not change for a generation and a half, and otherwise >> are parametric and parameters, i.e. constants. >> >> >> >> So, there's an idea to use "*=" and "/=", like "multiply" like "copy" >> or "divide" like "carve", to make allocation first-class in terms >> of what were called "glo-calls", globals to process & thread, vis-a-vis, >> "sys-calls", like malloc & free, or here mostly about alloc_aligned & >> free, figuring never to call malloc ever again, >> except that user code can do what it wants since programmer's intent. >> >> >> > > > Say for example there's a function and it calls functions and > these functions return char-pointers or otherwise anything that's > dynamically-allocated. So, the usual idea like new & delete is > that either it has an allocator passed to it, or for that of > course there was "placement-new' long before there was "move semantics", > that it's much about "placement-new" from C++, > that the caller allocates a block/slab on the stack and expects > callee's to carve from the block/slab, though, it doesn't necessarily > know how much to allocate, to avoid "too much" or "too little". > > Then, if the called functions need more to result the out-params > as they would be, for example under pointers usually in C or C++ > and "mutable references" usually enough in C++, about "the seating > of references", and not getting into the distinct dialects of templates > & procedural code about "the universal & forwarding ref-ref among > accounts of l/r/x/pr/rr-values along with pointer-decay and auto and > decltype the C++ 11 <-> 14", so, about "placement-new" vis-a-vis > "seating the references", basically is about placement-new, then > about caller laying the bed for what it expects in return, or, > taking upon itself the allocation and free-ing, or responsibility, > of distinguishing among called-functions what are state-less or > plain-old pure, idempotent functions yet as their monad's a terminal. > > > Then, the idea here is that callee's have a convention about > thread-locals and stack-relatives, that's their default allocator. > > > So, "uses of placement-new", in "conventions of types", about, > "conventions of locals (globals)", is the sort of idea. > > > Then the idea is that results "naturals" like "copy or carve" (in C, > which happen to have most simple sorts of operator-overloads). > > Basically it's also an account of "allocation only returns one of > LINE, PAGE, or HUGE size, and only one of those, allocate1(slab_t slab)" > then for reference-routines of hyper-local allocators. > > > About "placement-new" is, "placement-new" is ye olde way. > > > (Of course above there where I wrote "signed char" that's wrong, since it's defined by the implementation or usually compiler switches, then about the "... and decltype" then also is "the const and non-constness what whether you mean const or not or just in/out", that, you know, "in or out" is one of the usual things, vis-a-vis that const is more than less a hint, that the compiler can enforce while consumers ignore. I rather don't care whether char is signed or unsigned or what is its default, yet that in accounts like the processor instructions about compare whether they exist for both signed and unsigned, pretty much don't care as a suitable type would be used instead, that "char" just happens to be the most common type of expected C-strings in any sys-call expecting a C-string or array of C-strings.) So, the idea is that called-functions need some unknown amount of memory, that basically they get from the caller-function, who in its stack & heap, may be responsible for itself and its called-functions, basically usually looking to put its locals on the stack while it's yet a reasonable account of how much stack-memory a long-lived thread, for example, may have, then that both stack & heap together are "storage" as far as the language cares, yet visible for scope & state in the process & thread as far as the runtime/host cares, then about CPU & RAM memory as far as the processor cares. "Close to the hardware", then, and "in the language", is to be making for both "not too close" (to the least addressible unit of memory) and "not too far" (from the account of proximity and distance in memory), of the combined scope & state of the CPU (it can see all the registers), combined scope & state of the RAM (it's one contiguous name-space of memory), and block- and function- scoped account of thread- and process- state, and vice-versa, process- and thread-scope, and function- and block-state. Then, "placement-new" is the account of C++ for the lifecycle of objects giving them a place to live, about this "carving" (allocating) and "imbedding" or "inlaying" (free'ing), where the idea is that there's a usual account where C++'s is not apropos and Rust's "borr-w-checking pointer-stealers" is not apropos, yet that can be in C and "in the language" and "strongly-typed", with a brief account of reference routines after abstracting away standard libraries with "glo-calls" then for "sys-calls", where an account of "state & scope" then means never having to ask for a buffer because the caller's responsible for providing one (or getting more).
Re: C and its pesent 'ancestos'
Author: Bonita Montero
Date: Thu, 26 Nov 2026 18:15
Date: Thu, 26 Nov 2026 18:15
46 lines
4765 bytes
4765 bytes
Am 26.11.2026 um 19:10 schrieb Ross Finlayson: > (Of course above there where I wrote "signed char" that's wrong, > since it's defined by the implementation or usually compiler switches, > then about the "... and decltype" then also is "the const and > non-constness what whether you mean const or not or just in/out", > that, you know, "in or out" is one of the usual things, vis-a-vis > that const is more than less a hint, that the compiler can enforce > while consumers ignore. I rather don't care whether char is signed > or unsigned or what is its default, yet that in accounts like > the processor instructions about compare whether they exist for > both signed and unsigned, pretty much don't care as a suitable > type would be used instead, that "char" just happens to be the > most common type of expected C-strings in any sys-call expecting > a C-string or array of C-strings.) > > So, the idea is that called-functions need some unknown amount of > memory, that basically they get from the caller-function, who in > its stack & heap, may be responsible for itself and its > called-functions, basically usually looking to put its locals on the > stack while it's yet a reasonable account of how much stack-memory a > long-lived thread, for example, may have, then that both stack & heap > together are "storage" as far as the language cares, yet visible for > scope & state in the process & thread as far as the runtime/host > cares, then about CPU & RAM memory as far as the processor cares. > > "Close to the hardware", then, and "in the language", is to be making > for both "not too close" (to the least addressible unit of memory) > and "not too far" (from the account of proximity and distance in > memory), of the combined scope & state of the CPU (it can see all > the registers), combined scope & state of the RAM (it's one contiguous > name-space of memory), and block- and function- scoped account of > thread- and process- state, and vice-versa, process- and thread-scope, > and function- and block-state. > > Then, "placement-new" is the account of C++ for the lifecycle of objects > giving them a place to live, about this "carving" (allocating) > and "imbedding" or "inlaying" (free'ing), where the idea is that > there's a usual account where C++'s is not apropos and Rust's > "borr-w-checking pointer-stealers" is not apropos, yet that can be in > C and "in the language" and "strongly-typed", with a brief account > of reference routines after abstracting away standard libraries > with "glo-calls" then for "sys-calls", where an account of "state & > scope" then means never having to ask for a buffer because the > caller's responsible for providing one (or getting more). Tell me, do you have a teaching assignment here ?
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Thu, 26 Nov 2026 18:23
Date: Thu, 26 Nov 2026 18:23
72 lines
5927 bytes
5927 bytes
On 11/26/2026 10:15 AM, Bonita Montero wrote: > Am 26.11.2026 um 19:10 schrieb Ross Finlayson: > >> (Of course above there where I wrote "signed char" that's wrong, >> since it's defined by the implementation or usually compiler switches, >> then about the "... and decltype" then also is "the const and >> non-constness what whether you mean const or not or just in/out", >> that, you know, "in or out" is one of the usual things, vis-a-vis >> that const is more than less a hint, that the compiler can enforce >> while consumers ignore. I rather don't care whether char is signed >> or unsigned or what is its default, yet that in accounts like >> the processor instructions about compare whether they exist for >> both signed and unsigned, pretty much don't care as a suitable >> type would be used instead, that "char" just happens to be the >> most common type of expected C-strings in any sys-call expecting >> a C-string or array of C-strings.) >> >> So, the idea is that called-functions need some unknown amount of >> memory, that basically they get from the caller-function, who in >> its stack & heap, may be responsible for itself and its >> called-functions, basically usually looking to put its locals on the >> stack while it's yet a reasonable account of how much stack-memory a >> long-lived thread, for example, may have, then that both stack & heap >> together are "storage" as far as the language cares, yet visible for >> scope & state in the process & thread as far as the runtime/host >> cares, then about CPU & RAM memory as far as the processor cares. >> >> "Close to the hardware", then, and "in the language", is to be making >> for both "not too close" (to the least addressible unit of memory) >> and "not too far" (from the account of proximity and distance in >> memory), of the combined scope & state of the CPU (it can see all >> the registers), combined scope & state of the RAM (it's one contiguous >> name-space of memory), and block- and function- scoped account of >> thread- and process- state, and vice-versa, process- and thread-scope, >> and function- and block-state. >> >> Then, "placement-new" is the account of C++ for the lifecycle of objects >> giving them a place to live, about this "carving" (allocating) >> and "imbedding" or "inlaying" (free'ing), where the idea is that >> there's a usual account where C++'s is not apropos and Rust's >> "borr-w-checking pointer-stealers" is not apropos, yet that can be in >> C and "in the language" and "strongly-typed", with a brief account >> of reference routines after abstracting away standard libraries >> with "glo-calls" then for "sys-calls", where an account of "state & >> scope" then means never having to ask for a buffer because the >> caller's responsible for providing one (or getting more). > Tell me, do you have a teaching assignment here ? No, this isn't "for research purposes" either. Basically this is just talk that speaks for itself then inviting accounts of management of state and dynamically, while "in the language" and "according to types", revisiting design decisions "ossified" I guess it's put, or "rigidified", in usual higher level concerns, when all that matters for the program is process & thread, CPU & RAM, scope & state, according to source & object, "in the language" and "according to types". Then, it's figured that whatever's "natural" that way, howsoever contrived up above, for example writing to it in C++ up above makes "systematic sympathy", here for example about "copy & carve" instead of "copy & move", with "placement-new". Thanks for writing. "Happy Holidays", it's the time of year.
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 20:08
Date: Thu, 26 Nov 2026 20:08
174 lines
10184 bytes
10184 bytes
Ross Finlayson pisze: > On 11/26/2026 08:09 AM, Bonita Montero wrote: >> Am 26.11.2026 um 16:02 schrieb Ross Finlayson: >> >> You’re jumping from one topic to another—going off on tangents. >> I’m pretty sure I can’t follow you. I mean, I can follow what >> you’re saying, but I’m wondering how it fits into the context >> you’re responding to. >> >>> One challenge I'm trying to figure out is basically >>> about strings and that strings are variable-length. >>> >>> So, with basic operations on strings including things >>> like "concatenate" and "truncate", then how to deal with >>> the buffers is being a thing, where for example languages >>> like C++ their standard implementations of basic_string >>> for std::string might stuff a "small" string into the object's >>> own representation on the stack, otherwise on the heap, >>> or for example the data-segment for "constant" strings, >>> and including ideas like "string atoms" a.k.a. "string internment". >>> >>> So, there's the stack and the heap, with regards to things >>> like "variable-length-arrays", basically for the strings and >>> mostly the algorithms on them like substitution/interpolation, >>> and formatting among all the various types, for basically an >>> "output" case and an "input" case to algorithms, then to >>> result that to all the standard routines it's a "char *", >>> so usually. >>> >>> >>> You might think of that as a natural algebraization about >>> the usual formal language's account since concatenation >>> and the empty string, what operator-overloading "+" makes >>> for string vis-a-vis whatever types and formatting them >>> to string, and what operator-overloading "-" makes for >>> truncation and whatever type is to indicate what/how/where >>> is to be truncated, about truncation & concatenation, >>> formatters & converters, and operations on strings (or >>> for example any other account of growing | shrinking "arrays"). >>> >>> >>> Of course C doesn't have "operator-overloading" in the language, >>> yet so that concatenate() and truncate() can be given >>> function-overloading via _Generic in C, then that it's sort of >>> "reverse-reverse >>> Polish notation" like as for a usual stack-notation >>> operand-operand-operator that it's function-operand-operand of the >>> operator, pair-wise. >>> >>> >>> Then, there's * and /, the arithmetic operators, and an idea about >>> whether that's to align quite directly with the notion of >>> pointer-indirection quite like "+" aligns with concatenation, here >>> though >>> basically to make for assignment-targets and the scope & state, >>> that what enters-scope and embodies-state in block-scope then >>> function-scope then globals by being reference-able, about what >>> "*" and "/" can mean, or for example "*=" and "/=", about basically >>> what makes for in-parameters and out-parameters, these kinds of >>> things, and not exactly like move semantics, instead basically >>> into-the-stack or offto-the-heap, as it were. >>> >>> >>> About then "natural" "algebraizations" about the syntax of the >>> language and its cousin(s), here is about concepts like "seating" >>> the references vis-a-vis "homing" the references, in a language >>> like C where there are only _pointers_, that it results for >>> type-safety that pointers are furthermore _typed_ as to result >>> then for either behaving like "seating" the references in C++, >>> or not, when for example the growing | shrinking of the textual >>> data, or other accounts of tuples or lists or otherwise "arrays", >>> has an entirely different approach that's yet on its own account, >>> "natural". >>> >>> >>> The concatenation and truncation, for example, one might aver >>> looks like >>> >>> s += 1 >>> >>> intuitively formats the integer, according to formatters & converters, >>> then for example where >>> >>> s -= 1 >>> // or >>> s -= -1 >>> >>> truncates from the right or left, intuitively then toward the >>> "natural" that's what intuitive about the scope & state and >>> left/right branching in the procedural language, is "natural" >>> in the up/down jumping on the program counter, scope & state >>> on the core/CPU, and giant uniform global memory, scope & state >>> the RAM, that "scope" and "state" make a stack in the procedural >>> definition, and two different things, yet an array and constant block as >>> "CPU" or "RAM", the contents, and one thing. >>> >>> >>> So, one may aver that accounts of "typing the pointers" can make >>> for example pretty much exactly like C++, or quite entirely different, >>> then to result a model of "natural operator overloading" that results >>> "plain syntax in what happens to be the arithmetic operators instead >>> of the reference operators", arithmetic on scope & state. >>> >>> >>> >> > > > Hello. It's not much speaking to "C and its present ancestors", > (not, "C and its peasant ancestors") except about the "natural" these > days I guess they're calling it "mechanical sympathy" or > "close-to-the-hardware", yet also that there's the process & thread > model and the heap & stack model, "systematic sympathy", if C was > "declarative flow-of-control, close to the hardware", that what's > involved about state & scope is also about the process & thread and > stack & heap. > > > So, the usual account of dynamic allocation of textual data or strings, > or bytes, here calling "unsigned char" byte_t and "signed char" char_t > since those are un-used and probably will be un-used forever in C and > C++ themselves, about the implicits according to _types_ in C and C++ > (or, "C/C++" when the same code is hidden inside "__cplusplus"), then > is about _types_ in C, and adding only a few types to the language, > that are fixed-size, yet quite large than a register word, and usually > accounts of multiples of cache-line size (LINE_SIZE, here when it's "64B > these days, 32B not so long ago, often in pairs of cache-lines 128B, yet > pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the > system's account of the memory page, mostly 4Kib), > then that char_t and byte_t are according to the least-addressible > memory location, line-size the least-granular cache-content, and > page-size the least-granular virtual memory page used for all purposes, > these then being natural "types" according to C. > > > So, any of these, is an integer multiple of the smaller ones, basically > making for "slab allocators" the usual enough account, with that about > 5% of the lines in the page are housekeeping, rest data, about 64B and > 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling > convention of the preserved and scratch registers and what the > convention says to do. > > It's figured that these types according to the processor's "RAM" > the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going > to be so, not change for a generation and a half, and otherwise > are parametric and parameters, i.e. constants. > > > > So, there's an idea to use "*=" and "/=", like "multiply" like "copy" > or "divide" like "carve", to make allocation first-class in terms > of what were called "glo-calls", globals to process & thread, vis-a-vis, > "sys-calls", like malloc & free, or here mostly about alloc_aligned & > free, figuring never to call malloc ever again, > except that user code can do what it wants since programmer's intent. > > > i asked chat gpt what youre talkin about (you see to be definitely my team here, needed artifical intelligence as a translator ) and it told me that you want to heve something like struight acces from code to cache lines, ram pages etc but imo it is probably "noob dream" same as using arithmetic for strings cache is overally overhyped probably i sometimes measure my loops/codes routines and in all cases i remember it was just all in cache..full speed..ths e chache systems just seem to work enough good maybe if they not giving such kind of commands to cpu would have some sense but i doubt if this is present need hovever some serious logical work on multithreading probably is to be done (im not sure hovever probably people did a doze of things here and i just dont know it)
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 20:16
Date: Thu, 26 Nov 2026 20:16
184 lines
10810 bytes
10810 bytes
fir pisze: > Ross Finlayson pisze: >> On 11/26/2026 08:09 AM, Bonita Montero wrote: >>> Am 26.11.2026 um 16:02 schrieb Ross Finlayson: >>> >>> You’re jumping from one topic to another—going off on tangents. >>> I’m pretty sure I can’t follow you. I mean, I can follow what >>> you’re saying, but I’m wondering how it fits into the context >>> you’re responding to. >>> >>>> One challenge I'm trying to figure out is basically >>>> about strings and that strings are variable-length. >>>> >>>> So, with basic operations on strings including things >>>> like "concatenate" and "truncate", then how to deal with >>>> the buffers is being a thing, where for example languages >>>> like C++ their standard implementations of basic_string >>>> for std::string might stuff a "small" string into the object's >>>> own representation on the stack, otherwise on the heap, >>>> or for example the data-segment for "constant" strings, >>>> and including ideas like "string atoms" a.k.a. "string internment". >>>> >>>> So, there's the stack and the heap, with regards to things >>>> like "variable-length-arrays", basically for the strings and >>>> mostly the algorithms on them like substitution/interpolation, >>>> and formatting among all the various types, for basically an >>>> "output" case and an "input" case to algorithms, then to >>>> result that to all the standard routines it's a "char *", >>>> so usually. >>>> >>>> >>>> You might think of that as a natural algebraization about >>>> the usual formal language's account since concatenation >>>> and the empty string, what operator-overloading "+" makes >>>> for string vis-a-vis whatever types and formatting them >>>> to string, and what operator-overloading "-" makes for >>>> truncation and whatever type is to indicate what/how/where >>>> is to be truncated, about truncation & concatenation, >>>> formatters & converters, and operations on strings (or >>>> for example any other account of growing | shrinking "arrays"). >>>> >>>> >>>> Of course C doesn't have "operator-overloading" in the language, >>>> yet so that concatenate() and truncate() can be given >>>> function-overloading via _Generic in C, then that it's sort of >>>> "reverse-reverse >>>> Polish notation" like as for a usual stack-notation >>>> operand-operand-operator that it's function-operand-operand of the >>>> operator, pair-wise. >>>> >>>> >>>> Then, there's * and /, the arithmetic operators, and an idea about >>>> whether that's to align quite directly with the notion of >>>> pointer-indirection quite like "+" aligns with concatenation, here >>>> though >>>> basically to make for assignment-targets and the scope & state, >>>> that what enters-scope and embodies-state in block-scope then >>>> function-scope then globals by being reference-able, about what >>>> "*" and "/" can mean, or for example "*=" and "/=", about basically >>>> what makes for in-parameters and out-parameters, these kinds of >>>> things, and not exactly like move semantics, instead basically >>>> into-the-stack or offto-the-heap, as it were. >>>> >>>> >>>> About then "natural" "algebraizations" about the syntax of the >>>> language and its cousin(s), here is about concepts like "seating" >>>> the references vis-a-vis "homing" the references, in a language >>>> like C where there are only _pointers_, that it results for >>>> type-safety that pointers are furthermore _typed_ as to result >>>> then for either behaving like "seating" the references in C++, >>>> or not, when for example the growing | shrinking of the textual >>>> data, or other accounts of tuples or lists or otherwise "arrays", >>>> has an entirely different approach that's yet on its own account, >>>> "natural". >>>> >>>> >>>> The concatenation and truncation, for example, one might aver >>>> looks like >>>> >>>> s += 1 >>>> >>>> intuitively formats the integer, according to formatters & converters, >>>> then for example where >>>> >>>> s -= 1 >>>> // or >>>> s -= -1 >>>> >>>> truncates from the right or left, intuitively then toward the >>>> "natural" that's what intuitive about the scope & state and >>>> left/right branching in the procedural language, is "natural" >>>> in the up/down jumping on the program counter, scope & state >>>> on the core/CPU, and giant uniform global memory, scope & state >>>> the RAM, that "scope" and "state" make a stack in the procedural >>>> definition, and two different things, yet an array and constant >>>> block as >>>> "CPU" or "RAM", the contents, and one thing. >>>> >>>> >>>> So, one may aver that accounts of "typing the pointers" can make >>>> for example pretty much exactly like C++, or quite entirely different, >>>> then to result a model of "natural operator overloading" that results >>>> "plain syntax in what happens to be the arithmetic operators instead >>>> of the reference operators", arithmetic on scope & state. >>>> >>>> >>>> >>> >> >> >> Hello. It's not much speaking to "C and its present ancestors", >> (not, "C and its peasant ancestors") except about the "natural" these >> days I guess they're calling it "mechanical sympathy" or >> "close-to-the-hardware", yet also that there's the process & thread >> model and the heap & stack model, "systematic sympathy", if C was >> "declarative flow-of-control, close to the hardware", that what's >> involved about state & scope is also about the process & thread and >> stack & heap. >> >> >> So, the usual account of dynamic allocation of textual data or strings, >> or bytes, here calling "unsigned char" byte_t and "signed char" char_t >> since those are un-used and probably will be un-used forever in C and >> C++ themselves, about the implicits according to _types_ in C and C++ >> (or, "C/C++" when the same code is hidden inside "__cplusplus"), then >> is about _types_ in C, and adding only a few types to the language, >> that are fixed-size, yet quite large than a register word, and usually >> accounts of multiples of cache-line size (LINE_SIZE, here when it's "64B >> these days, 32B not so long ago, often in pairs of cache-lines 128B, yet >> pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the >> system's account of the memory page, mostly 4Kib), >> then that char_t and byte_t are according to the least-addressible >> memory location, line-size the least-granular cache-content, and >> page-size the least-granular virtual memory page used for all purposes, >> these then being natural "types" according to C. >> >> >> So, any of these, is an integer multiple of the smaller ones, basically >> making for "slab allocators" the usual enough account, with that about >> 5% of the lines in the page are housekeeping, rest data, about 64B and >> 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling >> convention of the preserved and scratch registers and what the >> convention says to do. >> >> It's figured that these types according to the processor's "RAM" >> the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going >> to be so, not change for a generation and a half, and otherwise >> are parametric and parameters, i.e. constants. >> >> >> >> So, there's an idea to use "*=" and "/=", like "multiply" like "copy" >> or "divide" like "carve", to make allocation first-class in terms >> of what were called "glo-calls", globals to process & thread, vis-a-vis, >> "sys-calls", like malloc & free, or here mostly about alloc_aligned & >> free, figuring never to call malloc ever again, >> except that user code can do what it wants since programmer's intent. >> >> >> > i asked chat gpt what youre talkin about (you see to be definitely my > team here, needed artifical intelligence as a translator ) and it told me > that you want to heve something like struight acces from code to cache > lines, ram pages etc but imo it is probably "noob dream" same as > using arithmetic for strings > > cache is overally overhyped probably i sometimes measure my loops/codes > routines and in all cases i remember it was just all in cache..full > speed..ths e chache systems just seem to work enough good > > maybe if they not giving such kind of commands to cpu would have some > sense but i doubt if this is present need > > hovever some serious logical work on multithreading probably is to be > done (im not sure hovever probably people did a doze of things here and > i just dont know it) i could eventually do some researchg on multithreading just for funny reason i needed faster home computers, and estaplishing some good coding patterns here could probbaly make overal systems faster ;c but working on this multithreading hac a lack of beauty c has for me (if beauty is good word, as i dont very like this word, but c has something 'airy' in it what multithreading probably has not)
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Thu, 26 Nov 2026 21:27
Date: Thu, 26 Nov 2026 21:27
217 lines
12151 bytes
12151 bytes
On 11/26/2026 12:08 PM, fir wrote: > Ross Finlayson pisze: >> On 11/26/2026 08:09 AM, Bonita Montero wrote: >>> Am 26.11.2026 um 16:02 schrieb Ross Finlayson: >>> >>> You’re jumping from one topic to another—going off on tangents. >>> I’m pretty sure I can’t follow you. I mean, I can follow what >>> you’re saying, but I’m wondering how it fits into the context >>> you’re responding to. >>> >>>> One challenge I'm trying to figure out is basically >>>> about strings and that strings are variable-length. >>>> >>>> So, with basic operations on strings including things >>>> like "concatenate" and "truncate", then how to deal with >>>> the buffers is being a thing, where for example languages >>>> like C++ their standard implementations of basic_string >>>> for std::string might stuff a "small" string into the object's >>>> own representation on the stack, otherwise on the heap, >>>> or for example the data-segment for "constant" strings, >>>> and including ideas like "string atoms" a.k.a. "string internment". >>>> >>>> So, there's the stack and the heap, with regards to things >>>> like "variable-length-arrays", basically for the strings and >>>> mostly the algorithms on them like substitution/interpolation, >>>> and formatting among all the various types, for basically an >>>> "output" case and an "input" case to algorithms, then to >>>> result that to all the standard routines it's a "char *", >>>> so usually. >>>> >>>> >>>> You might think of that as a natural algebraization about >>>> the usual formal language's account since concatenation >>>> and the empty string, what operator-overloading "+" makes >>>> for string vis-a-vis whatever types and formatting them >>>> to string, and what operator-overloading "-" makes for >>>> truncation and whatever type is to indicate what/how/where >>>> is to be truncated, about truncation & concatenation, >>>> formatters & converters, and operations on strings (or >>>> for example any other account of growing | shrinking "arrays"). >>>> >>>> >>>> Of course C doesn't have "operator-overloading" in the language, >>>> yet so that concatenate() and truncate() can be given >>>> function-overloading via _Generic in C, then that it's sort of >>>> "reverse-reverse >>>> Polish notation" like as for a usual stack-notation >>>> operand-operand-operator that it's function-operand-operand of the >>>> operator, pair-wise. >>>> >>>> >>>> Then, there's * and /, the arithmetic operators, and an idea about >>>> whether that's to align quite directly with the notion of >>>> pointer-indirection quite like "+" aligns with concatenation, here >>>> though >>>> basically to make for assignment-targets and the scope & state, >>>> that what enters-scope and embodies-state in block-scope then >>>> function-scope then globals by being reference-able, about what >>>> "*" and "/" can mean, or for example "*=" and "/=", about basically >>>> what makes for in-parameters and out-parameters, these kinds of >>>> things, and not exactly like move semantics, instead basically >>>> into-the-stack or offto-the-heap, as it were. >>>> >>>> >>>> About then "natural" "algebraizations" about the syntax of the >>>> language and its cousin(s), here is about concepts like "seating" >>>> the references vis-a-vis "homing" the references, in a language >>>> like C where there are only _pointers_, that it results for >>>> type-safety that pointers are furthermore _typed_ as to result >>>> then for either behaving like "seating" the references in C++, >>>> or not, when for example the growing | shrinking of the textual >>>> data, or other accounts of tuples or lists or otherwise "arrays", >>>> has an entirely different approach that's yet on its own account, >>>> "natural". >>>> >>>> >>>> The concatenation and truncation, for example, one might aver >>>> looks like >>>> >>>> s += 1 >>>> >>>> intuitively formats the integer, according to formatters & converters, >>>> then for example where >>>> >>>> s -= 1 >>>> // or >>>> s -= -1 >>>> >>>> truncates from the right or left, intuitively then toward the >>>> "natural" that's what intuitive about the scope & state and >>>> left/right branching in the procedural language, is "natural" >>>> in the up/down jumping on the program counter, scope & state >>>> on the core/CPU, and giant uniform global memory, scope & state >>>> the RAM, that "scope" and "state" make a stack in the procedural >>>> definition, and two different things, yet an array and constant >>>> block as >>>> "CPU" or "RAM", the contents, and one thing. >>>> >>>> >>>> So, one may aver that accounts of "typing the pointers" can make >>>> for example pretty much exactly like C++, or quite entirely different, >>>> then to result a model of "natural operator overloading" that results >>>> "plain syntax in what happens to be the arithmetic operators instead >>>> of the reference operators", arithmetic on scope & state. >>>> >>>> >>>> >>> >> >> >> Hello. It's not much speaking to "C and its present ancestors", >> (not, "C and its peasant ancestors") except about the "natural" these >> days I guess they're calling it "mechanical sympathy" or >> "close-to-the-hardware", yet also that there's the process & thread >> model and the heap & stack model, "systematic sympathy", if C was >> "declarative flow-of-control, close to the hardware", that what's >> involved about state & scope is also about the process & thread and >> stack & heap. >> >> >> So, the usual account of dynamic allocation of textual data or strings, >> or bytes, here calling "unsigned char" byte_t and "signed char" char_t >> since those are un-used and probably will be un-used forever in C and >> C++ themselves, about the implicits according to _types_ in C and C++ >> (or, "C/C++" when the same code is hidden inside "__cplusplus"), then >> is about _types_ in C, and adding only a few types to the language, >> that are fixed-size, yet quite large than a register word, and usually >> accounts of multiples of cache-line size (LINE_SIZE, here when it's "64B >> these days, 32B not so long ago, often in pairs of cache-lines 128B, yet >> pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the >> system's account of the memory page, mostly 4Kib), >> then that char_t and byte_t are according to the least-addressible >> memory location, line-size the least-granular cache-content, and >> page-size the least-granular virtual memory page used for all purposes, >> these then being natural "types" according to C. >> >> >> So, any of these, is an integer multiple of the smaller ones, basically >> making for "slab allocators" the usual enough account, with that about >> 5% of the lines in the page are housekeeping, rest data, about 64B and >> 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling >> convention of the preserved and scratch registers and what the >> convention says to do. >> >> It's figured that these types according to the processor's "RAM" >> the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going >> to be so, not change for a generation and a half, and otherwise >> are parametric and parameters, i.e. constants. >> >> >> >> So, there's an idea to use "*=" and "/=", like "multiply" like "copy" >> or "divide" like "carve", to make allocation first-class in terms >> of what were called "glo-calls", globals to process & thread, vis-a-vis, >> "sys-calls", like malloc & free, or here mostly about alloc_aligned & >> free, figuring never to call malloc ever again, >> except that user code can do what it wants since programmer's intent. >> >> >> > i asked chat gpt what youre talkin about (you see to be definitely my > team here, needed artifical intelligence as a translator ) and it told me > that you want to heve something like struight acces from code to cache > lines, ram pages etc but imo it is probably "noob dream" same as > using arithmetic for strings > > cache is overally overhyped probably i sometimes measure my loops/codes > routines and in all cases i remember it was just all in cache..full > speed..ths e chache systems just seem to work enough good > > maybe if they not giving such kind of commands to cpu would have some > sense but i doubt if this is present need > > hovever some serious logical work on multithreading probably is to be > done (im not sure hovever probably people did a doze of things here and > i just dont know it) Tell it "material-implication is un-sound, and prohibited, holistically". Accounts of "proximity" and "affinity" about "coherency" has that there's a difference between "undefined behavior" and "unspecified behavior", that the processor environment very well does "specify" how it works by what it is. So, when last year I was talking about proximity & affinity & coherency, it's totally usual and any self-respecting computer-engineer knows all about it. After "alloc_aligned" has that obviously the operating-system with memory-protection makes no such notion of "touching the cache-lines" possible, it's a matter of fact though that pretty much the operating-system doesn't go vending pages of virtual (as it were) addressed memory at odd offsets (given the granularity of PAGE_SIZE mostly, and about HUGE_SIZE simply enough). I'm still quite unsatisfied with "return value optimization" in C++, then that the alias -> stall -> branch -> call -> fault -less, is a natural about "systematic sympathy" and "close to the hardware". Then called-code with dynamic-allocation doesn't much care where the food comes from, as long as it's at least at large as what's requested, which is small, and non-zero, which means none left. Then usual accounts of populating containers can simply make for a caller-fulfilled slab. It's allocators and for placement new in C++, then pretty simply about the process & thread the scope & state the sys-calls and glo-calls. The glo-calls: kind of like glow-plugs, that's though for components. Glow-plugs: so your diesel isn't jelly.
Re: C and its pesent 'ancestos'
Author: fir
Date: Thu, 26 Nov 2026 21:46
Date: Thu, 26 Nov 2026 21:46
223 lines
12748 bytes
12748 bytes
Ross Finlayson pisze: > On 11/26/2026 12:08 PM, fir wrote: >> Ross Finlayson pisze: >>> On 11/26/2026 08:09 AM, Bonita Montero wrote: >>>> Am 26.11.2026 um 16:02 schrieb Ross Finlayson: >>>> >>>> You’re jumping from one topic to another—going off on tangents. >>>> I’m pretty sure I can’t follow you. I mean, I can follow what >>>> you’re saying, but I’m wondering how it fits into the context >>>> you’re responding to. >>>> >>>>> One challenge I'm trying to figure out is basically >>>>> about strings and that strings are variable-length. >>>>> >>>>> So, with basic operations on strings including things >>>>> like "concatenate" and "truncate", then how to deal with >>>>> the buffers is being a thing, where for example languages >>>>> like C++ their standard implementations of basic_string >>>>> for std::string might stuff a "small" string into the object's >>>>> own representation on the stack, otherwise on the heap, >>>>> or for example the data-segment for "constant" strings, >>>>> and including ideas like "string atoms" a.k.a. "string internment". >>>>> >>>>> So, there's the stack and the heap, with regards to things >>>>> like "variable-length-arrays", basically for the strings and >>>>> mostly the algorithms on them like substitution/interpolation, >>>>> and formatting among all the various types, for basically an >>>>> "output" case and an "input" case to algorithms, then to >>>>> result that to all the standard routines it's a "char *", >>>>> so usually. >>>>> >>>>> >>>>> You might think of that as a natural algebraization about >>>>> the usual formal language's account since concatenation >>>>> and the empty string, what operator-overloading "+" makes >>>>> for string vis-a-vis whatever types and formatting them >>>>> to string, and what operator-overloading "-" makes for >>>>> truncation and whatever type is to indicate what/how/where >>>>> is to be truncated, about truncation & concatenation, >>>>> formatters & converters, and operations on strings (or >>>>> for example any other account of growing | shrinking "arrays"). >>>>> >>>>> >>>>> Of course C doesn't have "operator-overloading" in the language, >>>>> yet so that concatenate() and truncate() can be given >>>>> function-overloading via _Generic in C, then that it's sort of >>>>> "reverse-reverse >>>>> Polish notation" like as for a usual stack-notation >>>>> operand-operand-operator that it's function-operand-operand of the >>>>> operator, pair-wise. >>>>> >>>>> >>>>> Then, there's * and /, the arithmetic operators, and an idea about >>>>> whether that's to align quite directly with the notion of >>>>> pointer-indirection quite like "+" aligns with concatenation, here >>>>> though >>>>> basically to make for assignment-targets and the scope & state, >>>>> that what enters-scope and embodies-state in block-scope then >>>>> function-scope then globals by being reference-able, about what >>>>> "*" and "/" can mean, or for example "*=" and "/=", about basically >>>>> what makes for in-parameters and out-parameters, these kinds of >>>>> things, and not exactly like move semantics, instead basically >>>>> into-the-stack or offto-the-heap, as it were. >>>>> >>>>> >>>>> About then "natural" "algebraizations" about the syntax of the >>>>> language and its cousin(s), here is about concepts like "seating" >>>>> the references vis-a-vis "homing" the references, in a language >>>>> like C where there are only _pointers_, that it results for >>>>> type-safety that pointers are furthermore _typed_ as to result >>>>> then for either behaving like "seating" the references in C++, >>>>> or not, when for example the growing | shrinking of the textual >>>>> data, or other accounts of tuples or lists or otherwise "arrays", >>>>> has an entirely different approach that's yet on its own account, >>>>> "natural". >>>>> >>>>> >>>>> The concatenation and truncation, for example, one might aver >>>>> looks like >>>>> >>>>> s += 1 >>>>> >>>>> intuitively formats the integer, according to formatters & converters, >>>>> then for example where >>>>> >>>>> s -= 1 >>>>> // or >>>>> s -= -1 >>>>> >>>>> truncates from the right or left, intuitively then toward the >>>>> "natural" that's what intuitive about the scope & state and >>>>> left/right branching in the procedural language, is "natural" >>>>> in the up/down jumping on the program counter, scope & state >>>>> on the core/CPU, and giant uniform global memory, scope & state >>>>> the RAM, that "scope" and "state" make a stack in the procedural >>>>> definition, and two different things, yet an array and constant >>>>> block as >>>>> "CPU" or "RAM", the contents, and one thing. >>>>> >>>>> >>>>> So, one may aver that accounts of "typing the pointers" can make >>>>> for example pretty much exactly like C++, or quite entirely different, >>>>> then to result a model of "natural operator overloading" that results >>>>> "plain syntax in what happens to be the arithmetic operators instead >>>>> of the reference operators", arithmetic on scope & state. >>>>> >>>>> >>>>> >>>> >>> >>> >>> Hello. It's not much speaking to "C and its present ancestors", >>> (not, "C and its peasant ancestors") except about the "natural" these >>> days I guess they're calling it "mechanical sympathy" or >>> "close-to-the-hardware", yet also that there's the process & thread >>> model and the heap & stack model, "systematic sympathy", if C was >>> "declarative flow-of-control, close to the hardware", that what's >>> involved about state & scope is also about the process & thread and >>> stack & heap. >>> >>> >>> So, the usual account of dynamic allocation of textual data or strings, >>> or bytes, here calling "unsigned char" byte_t and "signed char" char_t >>> since those are un-used and probably will be un-used forever in C and >>> C++ themselves, about the implicits according to _types_ in C and C++ >>> (or, "C/C++" when the same code is hidden inside "__cplusplus"), then >>> is about _types_ in C, and adding only a few types to the language, >>> that are fixed-size, yet quite large than a register word, and usually >>> accounts of multiples of cache-line size (LINE_SIZE, here when it's "64B >>> these days, 32B not so long ago, often in pairs of cache-lines 128B, yet >>> pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the >>> system's account of the memory page, mostly 4Kib), >>> then that char_t and byte_t are according to the least-addressible >>> memory location, line-size the least-granular cache-content, and >>> page-size the least-granular virtual memory page used for all purposes, >>> these then being natural "types" according to C. >>> >>> >>> So, any of these, is an integer multiple of the smaller ones, basically >>> making for "slab allocators" the usual enough account, with that about >>> 5% of the lines in the page are housekeeping, rest data, about 64B and >>> 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling >>> convention of the preserved and scratch registers and what the >>> convention says to do. >>> >>> It's figured that these types according to the processor's "RAM" >>> the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going >>> to be so, not change for a generation and a half, and otherwise >>> are parametric and parameters, i.e. constants. >>> >>> >>> >>> So, there's an idea to use "*=" and "/=", like "multiply" like "copy" >>> or "divide" like "carve", to make allocation first-class in terms >>> of what were called "glo-calls", globals to process & thread, vis-a-vis, >>> "sys-calls", like malloc & free, or here mostly about alloc_aligned & >>> free, figuring never to call malloc ever again, >>> except that user code can do what it wants since programmer's intent. >>> >>> >>> >> i asked chat gpt what youre talkin about (you see to be definitely my >> team here, needed artifical intelligence as a translator ) and it told me >> that you want to heve something like struight acces from code to cache >> lines, ram pages etc but imo it is probably "noob dream" same as >> using arithmetic for strings >> >> cache is overally overhyped probably i sometimes measure my loops/codes >> routines and in all cases i remember it was just all in cache..full >> speed..ths e chache systems just seem to work enough good >> >> maybe if they not giving such kind of commands to cpu would have some >> sense but i doubt if this is present need >> >> hovever some serious logical work on multithreading probably is to be >> done (im not sure hovever probably people did a doze of things here and >> i just dont know it) > > > Tell it "material-implication is un-sound, and prohibited, holistically". > > Accounts of "proximity" and "affinity" about "coherency" > has that there's a difference between "undefined behavior" > and "unspecified behavior", that the processor environment > very well does "specify" how it works by what it is. > > So, when last year I was talking about proximity & affinity & coherency, > it's totally usual and any self-respecting computer-engineer knows all > about it. > > After "alloc_aligned" has that obviously the operating-system with > memory-protection makes no such notion of "touching the cache-lines" > possible, it's a matter of fact though that pretty much the > operating-system doesn't go vending pages of virtual (as it were) > addressed memory at odd offsets (given the granularity of PAGE_SIZE mostly, > and about HUGE_SIZE simply enough). > > > I'm still quite unsatisfied with "return value optimization" in C++, > then that the alias -> stall -> branch -> call -> fault -less, > is a natural about "systematic sympathy" and "close to the hardware". > > > Then called-code with dynamic-allocation doesn't much care where the > food comes from, as long as it's at least at large as what's requested, > which is small, and non-zero, which means none left. Then usual accounts > of populating containers can simply make for a caller-fulfilled slab. > > It's allocators and for placement new in C++, then pretty simply > about the process & thread the scope & state the sys-calls and glo-calls. > > The glo-calls: kind of like glow-plugs, that's though for components. > > Glow-plugs: so your diesel isn't jelly. > > your stories sadly have not much potential to be answered... normally you state some things to adress or answer some problem etc..there is a variety of writing styles but the one you use rather makes some mental dissotiation... i find it rather ositive though not everybody would like it i guess ;c weak potential on answet weak potential for conclusions (yawn)
Re: C and its pesent 'ancestos'
Author: Ross Finlayson
Date: Fri, 27 Nov 2026 14:57
Date: Fri, 27 Nov 2026 14:57
358 lines
19143 bytes
19143 bytes
On 11/26/2026 01:46 PM, fir wrote:
> Ross Finlayson pisze:
>> On 11/26/2026 12:08 PM, fir wrote:
>>> Ross Finlayson pisze:
>>>> On 11/26/2026 08:09 AM, Bonita Montero wrote:
>>>>> Am 26.11.2026 um 16:02 schrieb Ross Finlayson:
>>>>>
>>>>> You’re jumping from one topic to another—going off on tangents.
>>>>> I’m pretty sure I can’t follow you. I mean, I can follow what
>>>>> you’re saying, but I’m wondering how it fits into the context
>>>>> you’re responding to.
>>>>>
>>>>>> One challenge I'm trying to figure out is basically
>>>>>> about strings and that strings are variable-length.
>>>>>>
>>>>>> So, with basic operations on strings including things
>>>>>> like "concatenate" and "truncate", then how to deal with
>>>>>> the buffers is being a thing, where for example languages
>>>>>> like C++ their standard implementations of basic_string
>>>>>> for std::string might stuff a "small" string into the object's
>>>>>> own representation on the stack, otherwise on the heap,
>>>>>> or for example the data-segment for "constant" strings,
>>>>>> and including ideas like "string atoms" a.k.a. "string internment".
>>>>>>
>>>>>> So, there's the stack and the heap, with regards to things
>>>>>> like "variable-length-arrays", basically for the strings and
>>>>>> mostly the algorithms on them like substitution/interpolation,
>>>>>> and formatting among all the various types, for basically an
>>>>>> "output" case and an "input" case to algorithms, then to
>>>>>> result that to all the standard routines it's a "char *",
>>>>>> so usually.
>>>>>>
>>>>>>
>>>>>> You might think of that as a natural algebraization about
>>>>>> the usual formal language's account since concatenation
>>>>>> and the empty string, what operator-overloading "+" makes
>>>>>> for string vis-a-vis whatever types and formatting them
>>>>>> to string, and what operator-overloading "-" makes for
>>>>>> truncation and whatever type is to indicate what/how/where
>>>>>> is to be truncated, about truncation & concatenation,
>>>>>> formatters & converters, and operations on strings (or
>>>>>> for example any other account of growing | shrinking "arrays").
>>>>>>
>>>>>>
>>>>>> Of course C doesn't have "operator-overloading" in the language,
>>>>>> yet so that concatenate() and truncate() can be given
>>>>>> function-overloading via _Generic in C, then that it's sort of
>>>>>> "reverse-reverse
>>>>>> Polish notation" like as for a usual stack-notation
>>>>>> operand-operand-operator that it's function-operand-operand of the
>>>>>> operator, pair-wise.
>>>>>>
>>>>>>
>>>>>> Then, there's * and /, the arithmetic operators, and an idea about
>>>>>> whether that's to align quite directly with the notion of
>>>>>> pointer-indirection quite like "+" aligns with concatenation, here
>>>>>> though
>>>>>> basically to make for assignment-targets and the scope & state,
>>>>>> that what enters-scope and embodies-state in block-scope then
>>>>>> function-scope then globals by being reference-able, about what
>>>>>> "*" and "/" can mean, or for example "*=" and "/=", about basically
>>>>>> what makes for in-parameters and out-parameters, these kinds of
>>>>>> things, and not exactly like move semantics, instead basically
>>>>>> into-the-stack or offto-the-heap, as it were.
>>>>>>
>>>>>>
>>>>>> About then "natural" "algebraizations" about the syntax of the
>>>>>> language and its cousin(s), here is about concepts like "seating"
>>>>>> the references vis-a-vis "homing" the references, in a language
>>>>>> like C where there are only _pointers_, that it results for
>>>>>> type-safety that pointers are furthermore _typed_ as to result
>>>>>> then for either behaving like "seating" the references in C++,
>>>>>> or not, when for example the growing | shrinking of the textual
>>>>>> data, or other accounts of tuples or lists or otherwise "arrays",
>>>>>> has an entirely different approach that's yet on its own account,
>>>>>> "natural".
>>>>>>
>>>>>>
>>>>>> The concatenation and truncation, for example, one might aver
>>>>>> looks like
>>>>>>
>>>>>> s += 1
>>>>>>
>>>>>> intuitively formats the integer, according to formatters &
>>>>>> converters,
>>>>>> then for example where
>>>>>>
>>>>>> s -= 1
>>>>>> // or
>>>>>> s -= -1
>>>>>>
>>>>>> truncates from the right or left, intuitively then toward the
>>>>>> "natural" that's what intuitive about the scope & state and
>>>>>> left/right branching in the procedural language, is "natural"
>>>>>> in the up/down jumping on the program counter, scope & state
>>>>>> on the core/CPU, and giant uniform global memory, scope & state
>>>>>> the RAM, that "scope" and "state" make a stack in the procedural
>>>>>> definition, and two different things, yet an array and constant
>>>>>> block as
>>>>>> "CPU" or "RAM", the contents, and one thing.
>>>>>>
>>>>>>
>>>>>> So, one may aver that accounts of "typing the pointers" can make
>>>>>> for example pretty much exactly like C++, or quite entirely
>>>>>> different,
>>>>>> then to result a model of "natural operator overloading" that results
>>>>>> "plain syntax in what happens to be the arithmetic operators instead
>>>>>> of the reference operators", arithmetic on scope & state.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> Hello. It's not much speaking to "C and its present ancestors",
>>>> (not, "C and its peasant ancestors") except about the "natural" these
>>>> days I guess they're calling it "mechanical sympathy" or
>>>> "close-to-the-hardware", yet also that there's the process & thread
>>>> model and the heap & stack model, "systematic sympathy", if C was
>>>> "declarative flow-of-control, close to the hardware", that what's
>>>> involved about state & scope is also about the process & thread and
>>>> stack & heap.
>>>>
>>>>
>>>> So, the usual account of dynamic allocation of textual data or strings,
>>>> or bytes, here calling "unsigned char" byte_t and "signed char" char_t
>>>> since those are un-used and probably will be un-used forever in C and
>>>> C++ themselves, about the implicits according to _types_ in C and C++
>>>> (or, "C/C++" when the same code is hidden inside "__cplusplus"), then
>>>> is about _types_ in C, and adding only a few types to the language,
>>>> that are fixed-size, yet quite large than a register word, and usually
>>>> accounts of multiples of cache-line size (LINE_SIZE, here when it's
>>>> "64B
>>>> these days, 32B not so long ago, often in pairs of cache-lines 128B,
>>>> yet
>>>> pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the
>>>> system's account of the memory page, mostly 4Kib),
>>>> then that char_t and byte_t are according to the least-addressible
>>>> memory location, line-size the least-granular cache-content, and
>>>> page-size the least-granular virtual memory page used for all purposes,
>>>> these then being natural "types" according to C.
>>>>
>>>>
>>>> So, any of these, is an integer multiple of the smaller ones, basically
>>>> making for "slab allocators" the usual enough account, with that about
>>>> 5% of the lines in the page are housekeeping, rest data, about 64B and
>>>> 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling
>>>> convention of the preserved and scratch registers and what the
>>>> convention says to do.
>>>>
>>>> It's figured that these types according to the processor's "RAM"
>>>> the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going
>>>> to be so, not change for a generation and a half, and otherwise
>>>> are parametric and parameters, i.e. constants.
>>>>
>>>>
>>>>
>>>> So, there's an idea to use "*=" and "/=", like "multiply" like "copy"
>>>> or "divide" like "carve", to make allocation first-class in terms
>>>> of what were called "glo-calls", globals to process & thread,
>>>> vis-a-vis,
>>>> "sys-calls", like malloc & free, or here mostly about alloc_aligned &
>>>> free, figuring never to call malloc ever again,
>>>> except that user code can do what it wants since programmer's intent.
>>>>
>>>>
>>>>
>>> i asked chat gpt what youre talkin about (you see to be definitely my
>>> team here, needed artifical intelligence as a translator ) and it
>>> told me
>>> that you want to heve something like struight acces from code to cache
>>> lines, ram pages etc but imo it is probably "noob dream" same as
>>> using arithmetic for strings
>>>
>>> cache is overally overhyped probably i sometimes measure my loops/codes
>>> routines and in all cases i remember it was just all in cache..full
>>> speed..ths e chache systems just seem to work enough good
>>>
>>> maybe if they not giving such kind of commands to cpu would have some
>>> sense but i doubt if this is present need
>>>
>>> hovever some serious logical work on multithreading probably is to be
>>> done (im not sure hovever probably people did a doze of things here and
>>> i just dont know it)
>>
>>
>> Tell it "material-implication is un-sound, and prohibited, holistically".
>>
>> Accounts of "proximity" and "affinity" about "coherency"
>> has that there's a difference between "undefined behavior"
>> and "unspecified behavior", that the processor environment
>> very well does "specify" how it works by what it is.
>>
>> So, when last year I was talking about proximity & affinity & coherency,
>> it's totally usual and any self-respecting computer-engineer knows all
>> about it.
>>
>> After "alloc_aligned" has that obviously the operating-system with
>> memory-protection makes no such notion of "touching the cache-lines"
>> possible, it's a matter of fact though that pretty much the
>> operating-system doesn't go vending pages of virtual (as it were)
>> addressed memory at odd offsets (given the granularity of PAGE_SIZE
>> mostly,
>> and about HUGE_SIZE simply enough).
>>
>>
>> I'm still quite unsatisfied with "return value optimization" in C++,
>> then that the alias -> stall -> branch -> call -> fault -less,
>> is a natural about "systematic sympathy" and "close to the hardware".
>>
>>
>> Then called-code with dynamic-allocation doesn't much care where the
>> food comes from, as long as it's at least at large as what's requested,
>> which is small, and non-zero, which means none left. Then usual accounts
>> of populating containers can simply make for a caller-fulfilled slab.
>>
>> It's allocators and for placement new in C++, then pretty simply
>> about the process & thread the scope & state the sys-calls and glo-calls.
>>
>> The glo-calls: kind of like glow-plugs, that's though for components.
>>
>> Glow-plugs: so your diesel isn't jelly.
>>
>>
> your stories sadly have not much potential to be answered... normally
> you state some things to adress or answer some problem etc..there is a
> variety of
> writing styles but the one you use rather makes some mental
> dissotiation... i find it rather ositive though not everybody would like
> it i guess ;c weak potential on answet weak potential for conclusions
> (yawn)
>
I watched a decent video the other day, James Faure's on "Rust ...",
it helps describe some of these ideas talked about here,
like "with-function, region-allocators, and fractional-ownership".
It's at once calm in demeanor yet plain in opinion, and informed
in relevance. Stroustrup had a good video the other day on
"Profiles...", I enjoy that guy.
One might consider there are two kinds of processes | threads,
alike long-lived | short-lived, then about that long-lived processes
basically can manage memory for short-lived processes, and the
functions and even with the blocks that they have, about the stack,
LIFO, last-in-first-out, of the execution, FIFO, first-in-first-out. So,
these are basically "inversions", yet the same world, that LIFO is
the way functions are entered and exited, while the entries and
exits are alike FIFO in their encounter.
So, when a function figures that the functions it calls will need
some memory, particularly for long-running processes or the
body of the inner routines, when there's room on the stack-segment
of RAM as it would be, it makes some sense to allocate a large-ish
buffer for smaller-ish buffers. Then, carving that out, managing
the "fragmentation", has a simple way to simplify that: only doling
out one-at-a-time, then that it's upon the users to make that their
algorithms don't get contiguous buffers.
Here for example mostly about text algorithms, then the idea of
introducing bounds is pretty simple, about "to_string" for built-in
types, they basically have a common ceiling, then that in the accounts
of text algorithms of the simple variety, that callee's can carve out
and re-use a buffer for sequential uses of a buffer, or, carve out and
return a buffer, by a pointer to it that the caller already allocated.
To keep functions that require buffers from allocating buffers
themselves, the idea is that the thread|process has a "global call",
when the first idea is to just reserve some space on the stack,
like with alloca or just plain fixed-length or variable-length arrays,
yet being able to fallback to the heap itself or up the stack, about
basically that a process pages in a "huge" page ("large" sometimes,
called "huge" here, 2MiB), then for example a called routine can
carve itself a "page" of that, about 4KiB most places, then about
basically "short-strings" and "long-strings", or "names | descs" for
names or descriptions, with the idea that to_string never allocates
anything itself, then that what it returns, gets replaced in the larger
slab that it was from, after it's consumed, for example when it's used
to format log lines or metrics lines, or otherwise concatenating
strings, to where the buffers are discardable, then that when the
function returns that carved a buffer to be sub-carved into buffers, for
that to roll-up the stack, since any function that calls for an
allocate1 has allocate1 can simply check the address of the function on
the stack, and considered reclaim-able everything beneath it, beneath
the bar, as it were.
Then, about long-lived and short-lived objects, basically the idea
is that the short-lived objects should leave directly near the calling
function, then about long-lived objects, basically about the stack &
heap (and, you know, storage), is basically for a simple account of
formatters and converters what need buffers, and for example servers
that handle packets or for example flat-files with line-data the
records, that in accounts of serial routine, to hide all the
declarations of char buf[16384], and to separate the concerns, while
providing for the concerns.
Then, the "fractional-ownership" bit basically is whether a buffer is
consumed and passed down, i.e., discardable when the function
returns, or, preserved and passed up, i.e. returned, then that when
the calling function returns, about how to make it automatic, that
basically a "with-function" wraps that, so that all the allocations
actually drive memory-management-maintenance, then about then
when inevitably some user code will request too much, side-loading
that to the heap (again in "increments of allocate1"), then each those
defining ranges in the process' memory address space with with to
replace or reclaim the buffers.
So, this kind of thing, ..., it's a bit of a hybrid approach, between
caller-allocate and callee-allocate, with the idea that of course
it's to be re-entrant (thread-safe), then about various considerations
of that it's more appropriate when there are "fewer" threads or "dinos"
than "many" threads or "wasps", yet still kind of the same kind of
account, then that also it's sort of simple to make for locators and so
on, how to detect more-or-less automatically from when a function
returns that all its carvings were returned, besides that it doesn't
much care since it's all reclaimed, figuring that the passed buffers are
never passed to another thread in the same process space.
Then, with that being about these "glo-calls", like about allocation
and formatting and emitting logs and metrics, serialization &
deserialization, and usual things that happen in simple accounts of
"business logic", then making these things modular & testable has its
own benefits.
About the sizes, or the parameters and the parameters as it were,
then besides LINE | PAGE | HUGE, also gets into the calling convention
of functions themselves, about how big of a struct can be passed or
returned by value, for example IABI = 16 and OABI = 16, or as it varies,
where then the "buffers" are even fungible as "values". Mostly though
it's about building the sizes of arrays, and objects according to
sizeof, that are bigger than the built-ins, with their usual sizeof <= 8
on 64-bit, for example about uint`128_t, yet moreso for something like
fixed-point, about things like timespec and currency values.
These kinds of things, ....
Re: C and its present 'ancestors'
Author: Ross Finlayson
Date: Fri, 27 Nov 2026 15:55
Date: Fri, 27 Nov 2026 15:55
413 lines
21731 bytes
21731 bytes
On 11/27/2026 06:57 AM, Ross Finlayson wrote:
> On 11/26/2026 01:46 PM, fir wrote:
>> Ross Finlayson pisze:
>>> On 11/26/2026 12:08 PM, fir wrote:
>>>> Ross Finlayson pisze:
>>>>> On 11/26/2026 08:09 AM, Bonita Montero wrote:
>>>>>> Am 26.11.2026 um 16:02 schrieb Ross Finlayson:
>>>>>>
>>>>>> You’re jumping from one topic to another—going off on tangents.
>>>>>> I’m pretty sure I can’t follow you. I mean, I can follow what
>>>>>> you’re saying, but I’m wondering how it fits into the context
>>>>>> you’re responding to.
>>>>>>
>>>>>>> One challenge I'm trying to figure out is basically
>>>>>>> about strings and that strings are variable-length.
>>>>>>>
>>>>>>> So, with basic operations on strings including things
>>>>>>> like "concatenate" and "truncate", then how to deal with
>>>>>>> the buffers is being a thing, where for example languages
>>>>>>> like C++ their standard implementations of basic_string
>>>>>>> for std::string might stuff a "small" string into the object's
>>>>>>> own representation on the stack, otherwise on the heap,
>>>>>>> or for example the data-segment for "constant" strings,
>>>>>>> and including ideas like "string atoms" a.k.a. "string internment".
>>>>>>>
>>>>>>> So, there's the stack and the heap, with regards to things
>>>>>>> like "variable-length-arrays", basically for the strings and
>>>>>>> mostly the algorithms on them like substitution/interpolation,
>>>>>>> and formatting among all the various types, for basically an
>>>>>>> "output" case and an "input" case to algorithms, then to
>>>>>>> result that to all the standard routines it's a "char *",
>>>>>>> so usually.
>>>>>>>
>>>>>>>
>>>>>>> You might think of that as a natural algebraization about
>>>>>>> the usual formal language's account since concatenation
>>>>>>> and the empty string, what operator-overloading "+" makes
>>>>>>> for string vis-a-vis whatever types and formatting them
>>>>>>> to string, and what operator-overloading "-" makes for
>>>>>>> truncation and whatever type is to indicate what/how/where
>>>>>>> is to be truncated, about truncation & concatenation,
>>>>>>> formatters & converters, and operations on strings (or
>>>>>>> for example any other account of growing | shrinking "arrays").
>>>>>>>
>>>>>>>
>>>>>>> Of course C doesn't have "operator-overloading" in the language,
>>>>>>> yet so that concatenate() and truncate() can be given
>>>>>>> function-overloading via _Generic in C, then that it's sort of
>>>>>>> "reverse-reverse
>>>>>>> Polish notation" like as for a usual stack-notation
>>>>>>> operand-operand-operator that it's function-operand-operand of the
>>>>>>> operator, pair-wise.
>>>>>>>
>>>>>>>
>>>>>>> Then, there's * and /, the arithmetic operators, and an idea about
>>>>>>> whether that's to align quite directly with the notion of
>>>>>>> pointer-indirection quite like "+" aligns with concatenation, here
>>>>>>> though
>>>>>>> basically to make for assignment-targets and the scope & state,
>>>>>>> that what enters-scope and embodies-state in block-scope then
>>>>>>> function-scope then globals by being reference-able, about what
>>>>>>> "*" and "/" can mean, or for example "*=" and "/=", about basically
>>>>>>> what makes for in-parameters and out-parameters, these kinds of
>>>>>>> things, and not exactly like move semantics, instead basically
>>>>>>> into-the-stack or offto-the-heap, as it were.
>>>>>>>
>>>>>>>
>>>>>>> About then "natural" "algebraizations" about the syntax of the
>>>>>>> language and its cousin(s), here is about concepts like "seating"
>>>>>>> the references vis-a-vis "homing" the references, in a language
>>>>>>> like C where there are only _pointers_, that it results for
>>>>>>> type-safety that pointers are furthermore _typed_ as to result
>>>>>>> then for either behaving like "seating" the references in C++,
>>>>>>> or not, when for example the growing | shrinking of the textual
>>>>>>> data, or other accounts of tuples or lists or otherwise "arrays",
>>>>>>> has an entirely different approach that's yet on its own account,
>>>>>>> "natural".
>>>>>>>
>>>>>>>
>>>>>>> The concatenation and truncation, for example, one might aver
>>>>>>> looks like
>>>>>>>
>>>>>>> s += 1
>>>>>>>
>>>>>>> intuitively formats the integer, according to formatters &
>>>>>>> converters,
>>>>>>> then for example where
>>>>>>>
>>>>>>> s -= 1
>>>>>>> // or
>>>>>>> s -= -1
>>>>>>>
>>>>>>> truncates from the right or left, intuitively then toward the
>>>>>>> "natural" that's what intuitive about the scope & state and
>>>>>>> left/right branching in the procedural language, is "natural"
>>>>>>> in the up/down jumping on the program counter, scope & state
>>>>>>> on the core/CPU, and giant uniform global memory, scope & state
>>>>>>> the RAM, that "scope" and "state" make a stack in the procedural
>>>>>>> definition, and two different things, yet an array and constant
>>>>>>> block as
>>>>>>> "CPU" or "RAM", the contents, and one thing.
>>>>>>>
>>>>>>>
>>>>>>> So, one may aver that accounts of "typing the pointers" can make
>>>>>>> for example pretty much exactly like C++, or quite entirely
>>>>>>> different,
>>>>>>> then to result a model of "natural operator overloading" that
>>>>>>> results
>>>>>>> "plain syntax in what happens to be the arithmetic operators instead
>>>>>>> of the reference operators", arithmetic on scope & state.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Hello. It's not much speaking to "C and its present ancestors",
>>>>> (not, "C and its peasant ancestors") except about the "natural" these
>>>>> days I guess they're calling it "mechanical sympathy" or
>>>>> "close-to-the-hardware", yet also that there's the process & thread
>>>>> model and the heap & stack model, "systematic sympathy", if C was
>>>>> "declarative flow-of-control, close to the hardware", that what's
>>>>> involved about state & scope is also about the process & thread and
>>>>> stack & heap.
>>>>>
>>>>>
>>>>> So, the usual account of dynamic allocation of textual data or
>>>>> strings,
>>>>> or bytes, here calling "unsigned char" byte_t and "signed char" char_t
>>>>> since those are un-used and probably will be un-used forever in C and
>>>>> C++ themselves, about the implicits according to _types_ in C and C++
>>>>> (or, "C/C++" when the same code is hidden inside "__cplusplus"), then
>>>>> is about _types_ in C, and adding only a few types to the language,
>>>>> that are fixed-size, yet quite large than a register word, and usually
>>>>> accounts of multiples of cache-line size (LINE_SIZE, here when it's
>>>>> "64B
>>>>> these days, 32B not so long ago, often in pairs of cache-lines 128B,
>>>>> yet
>>>>> pretty much about 64B), for cache-coherency, page size (PAGE_SIZE, the
>>>>> system's account of the memory page, mostly 4Kib),
>>>>> then that char_t and byte_t are according to the least-addressible
>>>>> memory location, line-size the least-granular cache-content, and
>>>>> page-size the least-granular virtual memory page used for all
>>>>> purposes,
>>>>> these then being natural "types" according to C.
>>>>>
>>>>>
>>>>> So, any of these, is an integer multiple of the smaller ones,
>>>>> basically
>>>>> making for "slab allocators" the usual enough account, with that about
>>>>> 5% of the lines in the page are housekeeping, rest data, about 64B and
>>>>> 4KiB or 4096B, vis-a-vis, 8B the 64b register-word, and the calling
>>>>> convention of the preserved and scratch registers and what the
>>>>> convention says to do.
>>>>>
>>>>> It's figured that these types according to the processor's "RAM"
>>>>> the LINE_SIZE and system's "RAM" the PAGE_SIZE, are always going
>>>>> to be so, not change for a generation and a half, and otherwise
>>>>> are parametric and parameters, i.e. constants.
>>>>>
>>>>>
>>>>>
>>>>> So, there's an idea to use "*=" and "/=", like "multiply" like "copy"
>>>>> or "divide" like "carve", to make allocation first-class in terms
>>>>> of what were called "glo-calls", globals to process & thread,
>>>>> vis-a-vis,
>>>>> "sys-calls", like malloc & free, or here mostly about alloc_aligned &
>>>>> free, figuring never to call malloc ever again,
>>>>> except that user code can do what it wants since programmer's intent.
>>>>>
>>>>>
>>>>>
>>>> i asked chat gpt what youre talkin about (you see to be definitely my
>>>> team here, needed artifical intelligence as a translator ) and it
>>>> told me
>>>> that you want to heve something like struight acces from code to cache
>>>> lines, ram pages etc but imo it is probably "noob dream" same as
>>>> using arithmetic for strings
>>>>
>>>> cache is overally overhyped probably i sometimes measure my loops/codes
>>>> routines and in all cases i remember it was just all in cache..full
>>>> speed..ths e chache systems just seem to work enough good
>>>>
>>>> maybe if they not giving such kind of commands to cpu would have some
>>>> sense but i doubt if this is present need
>>>>
>>>> hovever some serious logical work on multithreading probably is to be
>>>> done (im not sure hovever probably people did a doze of things here and
>>>> i just dont know it)
>>>
>>>
>>> Tell it "material-implication is un-sound, and prohibited,
>>> holistically".
>>>
>>> Accounts of "proximity" and "affinity" about "coherency"
>>> has that there's a difference between "undefined behavior"
>>> and "unspecified behavior", that the processor environment
>>> very well does "specify" how it works by what it is.
>>>
>>> So, when last year I was talking about proximity & affinity & coherency,
>>> it's totally usual and any self-respecting computer-engineer knows all
>>> about it.
>>>
>>> After "alloc_aligned" has that obviously the operating-system with
>>> memory-protection makes no such notion of "touching the cache-lines"
>>> possible, it's a matter of fact though that pretty much the
>>> operating-system doesn't go vending pages of virtual (as it were)
>>> addressed memory at odd offsets (given the granularity of PAGE_SIZE
>>> mostly,
>>> and about HUGE_SIZE simply enough).
>>>
>>>
>>> I'm still quite unsatisfied with "return value optimization" in C++,
>>> then that the alias -> stall -> branch -> call -> fault -less,
>>> is a natural about "systematic sympathy" and "close to the hardware".
>>>
>>>
>>> Then called-code with dynamic-allocation doesn't much care where the
>>> food comes from, as long as it's at least at large as what's requested,
>>> which is small, and non-zero, which means none left. Then usual accounts
>>> of populating containers can simply make for a caller-fulfilled slab.
>>>
>>> It's allocators and for placement new in C++, then pretty simply
>>> about the process & thread the scope & state the sys-calls and
>>> glo-calls.
>>>
>>> The glo-calls: kind of like glow-plugs, that's though for components.
>>>
>>> Glow-plugs: so your diesel isn't jelly.
>>>
>>>
>> your stories sadly have not much potential to be answered... normally
>> you state some things to adress or answer some problem etc..there is a
>> variety of
>> writing styles but the one you use rather makes some mental
>> dissotiation... i find it rather ositive though not everybody would like
>> it i guess ;c weak potential on answet weak potential for conclusions
>> (yawn)
>>
>
>
>
>
>
>
> I watched a decent video the other day, James Faure's on "Rust ...",
> it helps describe some of these ideas talked about here,
> like "with-function, region-allocators, and fractional-ownership".
> It's at once calm in demeanor yet plain in opinion, and informed
> in relevance. Stroustrup had a good video the other day on
> "Profiles...", I enjoy that guy.
>
>
> One might consider there are two kinds of processes | threads,
> alike long-lived | short-lived, then about that long-lived processes
> basically can manage memory for short-lived processes, and the
> functions and even with the blocks that they have, about the stack,
> LIFO, last-in-first-out, of the execution, FIFO, first-in-first-out. So,
> these are basically "inversions", yet the same world, that LIFO is
> the way functions are entered and exited, while the entries and
> exits are alike FIFO in their encounter.
>
> So, when a function figures that the functions it calls will need
> some memory, particularly for long-running processes or the
> body of the inner routines, when there's room on the stack-segment
> of RAM as it would be, it makes some sense to allocate a large-ish
> buffer for smaller-ish buffers. Then, carving that out, managing
> the "fragmentation", has a simple way to simplify that: only doling
> out one-at-a-time, then that it's upon the users to make that their
> algorithms don't get contiguous buffers.
>
> Here for example mostly about text algorithms, then the idea of
> introducing bounds is pretty simple, about "to_string" for built-in
> types, they basically have a common ceiling, then that in the accounts
> of text algorithms of the simple variety, that callee's can carve out
> and re-use a buffer for sequential uses of a buffer, or, carve out and
> return a buffer, by a pointer to it that the caller already allocated.
>
> To keep functions that require buffers from allocating buffers
> themselves, the idea is that the thread|process has a "global call",
> when the first idea is to just reserve some space on the stack,
> like with alloca or just plain fixed-length or variable-length arrays,
> yet being able to fallback to the heap itself or up the stack, about
> basically that a process pages in a "huge" page ("large" sometimes,
> called "huge" here, 2MiB), then for example a called routine can
> carve itself a "page" of that, about 4KiB most places, then about
> basically "short-strings" and "long-strings", or "names | descs" for
> names or descriptions, with the idea that to_string never allocates
> anything itself, then that what it returns, gets replaced in the larger
> slab that it was from, after it's consumed, for example when it's used
> to format log lines or metrics lines, or otherwise concatenating
> strings, to where the buffers are discardable, then that when the
> function returns that carved a buffer to be sub-carved into buffers, for
> that to roll-up the stack, since any function that calls for an
> allocate1 has allocate1 can simply check the address of the function on
> the stack, and considered reclaim-able everything beneath it, beneath
> the bar, as it were.
>
>
> Then, about long-lived and short-lived objects, basically the idea
> is that the short-lived objects should leave directly near the calling
> function, then about long-lived objects, basically about the stack &
> heap (and, you know, storage), is basically for a simple account of
> formatters and converters what need buffers, and for example servers
> that handle packets or for example flat-files with line-data the
> records, that in accounts of serial routine, to hide all the
> declarations of char buf[16384], and to separate the concerns, while
> providing for the concerns.
>
>
> Then, the "fractional-ownership" bit basically is whether a buffer is
> consumed and passed down, i.e., discardable when the function
> returns, or, preserved and passed up, i.e. returned, then that when
> the calling function returns, about how to make it automatic, that
> basically a "with-function" wraps that, so that all the allocations
> actually drive memory-management-maintenance, then about then
> when inevitably some user code will request too much, side-loading
> that to the heap (again in "increments of allocate1"), then each those
> defining ranges in the process' memory address space with with to
> replace or reclaim the buffers.
>
>
>
> So, this kind of thing, ..., it's a bit of a hybrid approach, between
> caller-allocate and callee-allocate, with the idea that of course
> it's to be re-entrant (thread-safe), then about various considerations
> of that it's more appropriate when there are "fewer" threads or "dinos"
> than "many" threads or "wasps", yet still kind of the same kind of
> account, then that also it's sort of simple to make for locators and so
> on, how to detect more-or-less automatically from when a function
> returns that all its carvings were returned, besides that it doesn't
> much care since it's all reclaimed, figuring that the passed buffers are
> never passed to another thread in the same process space.
>
>
> Then, with that being about these "glo-calls", like about allocation
> and formatting and emitting logs and metrics, serialization &
> deserialization, and usual things that happen in simple accounts of
> "business logic", then making these things modular & testable has its
> own benefits.
>
>
> About the sizes, or the parameters and the parameters as it were,
> then besides LINE | PAGE | HUGE, also gets into the calling convention
> of functions themselves, about how big of a struct can be passed or
> returned by value, for example IABI = 16 and OABI = 16, or as it varies,
> where then the "buffers" are even fungible as "values". Mostly though
> it's about building the sizes of arrays, and objects according to
> sizeof, that are bigger than the built-ins, with their usual sizeof <= 8
> on 64-bit, for example about uint`128_t, yet moreso for something like
> fixed-point, about things like timespec and currency values.
>
>
>
>
>
>
>
>
> These kinds of things, ....
>
>
>
>
>
Of course anything text involved in a wide world of many languages,
has a usual account in one with:
character-sets, system
character-sets, wire
character-set-encodings, system
character-set-encodings, wire
locales and formatting and precision and scale
date formats, quite varied
that leading zero in front of hexadecimal literals
units and markers
char and wchar and int and the system interfaces
"iconv and lconv and ICU and the Unicode Database"
then that accounts like "printf" and "I/O streams and friends" basically
make for "varargs is to be avoided in a safer profile of C" and "the
data type and formatting should live in type-safety with formatters",
then basically with an idea like that string-formatting occurs in sorts
layers instead of the glom, then about whether those are branch-y and
buffer-y, that yet both the code and data gets hot in the cache, and
according to "types" usual languages can erase branches.
This is just for text, for things like "varchar(64)" vis-a-vis
"varchar(2000)" or "clob", euh, then that buffers usually and the most
common use-case in the world of compression and encryption involves RAM
& CPU for compression and CPU and some moving parts for encryption.
It's rather obvious counter-claims to these sorts, for example,
"that's using a bunch more of wasted buffers, and all the formatting
should happen in one function instead of building in layers then
that those functions get involved swapping their buffers",
and it's like, yeah, they do, which are then immediately discarded.
Then, with the idea of always-layered functions for formatting
or "to_string" and then separately "from_string", and about
swapping buffers, is the idea then about when there's the carving
of the buffers, and a few are left over, exchanging the buffers,
so that the larger block is exchanged for a few specific extra buffers
and some copies, releasing the responsibility of the larger block.
Re: C and its peasant 'ancestors'
Author: Lawrence D’Oliveiro
Date: Fri, 27 Nov 2026 21:26
Date: Fri, 27 Nov 2026 21:26
7 lines
1744 bytes
1744 bytes
On Thu, 26 Nov 2026 10:44:37 +0100, Bonita Montero wrote: > I'm not into C++ but also into Rust and some other languages. > Both mentioned languages are superior to C by magnitudes. > You need only a fifth of the code and the code is more readable. I’m sure Python beats them all, on that score.
Re: C and its peasant 'ancestors'
Author: Lawrence D’Oliveiro
Date: Fri, 27 Nov 2026 21:36
Date: Fri, 27 Nov 2026 21:36
28 lines
2919 bytes
2919 bytes
On Thu, 26 Nov 2026 12:48:26 +0100, Bonita Montero wrote:
> Am 26.11.2026 um 12:36 schrieb fir:
>
>> 1. the bloat of terrible c++ syntax (oop and those generix and
>> those all other non sane additions)
>
> It’s only "bloat" if you aren’t up to the task of handling it. I
> actually find C to be much more bloated, because the things you end
> up having to do alongside C++ often require a significant amount of
> real work.
Would you like to take the Linus Torvalds challenge? He famously hates
C++, and won’t allow it into the Linux kernel.
I won’t ask you to rewrite the Linux kernel in C++ to prove him wrong,
but how about looking at the Monotone version-control system
<https://en.wikipedia.org/wiki/Monotone_(software)>, of which he has
said:
If you want a VCS that is written in C++, go play with Monotone.
Really. They use a "real database". They use "nice object-oriented
libraries". They use "nice C++ abstractions". And quite frankly,
as a result of all these design decisions that sound so appealing
to some CS people, the end result is a horrible and unmaintainable
mess.
Would you like to prove him wrong?
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 04:54
Date: Sat, 28 Nov 2026 04:54
5 lines
2108 bytes
2108 bytes
Am 27.11.2026 um 22:36 schrieb Lawrence D’Oliveiro: > ... the end result is a horrible and unmaintainable mess. The abstractions of C++ make C++ more readable and maintaineable as C.
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 05:30
Date: Sat, 28 Nov 2026 05:30
12 lines
2074 bytes
2074 bytes
Am 27.11.2026 um 22:26 schrieb Lawrence D’Oliveiro: > On Thu, 26 Nov 2026 10:44:37 +0100, Bonita Montero wrote: >> I'm not into C++ but also into Rust and some other languages. >> Both mentioned languages are superior to C by magnitudes. >> You need only a fifth of the code and the code is more readable. > I’m sure Python beats them all, on that score. An not strongly typed and interpreted language ?
Re: C and its peasant 'ancestors'
Author: Lawrence D’Oliveiro
Date: Sat, 28 Nov 2026 05:50
Date: Sat, 28 Nov 2026 05:50
12 lines
2256 bytes
2256 bytes
On Sat, 28 Nov 2026 05:54:16 +0100, Bonita Montero wrote: > Am 27.11.2026 um 22:36 schrieb Lawrence D’Oliveiro: > >> ... the end result is a horrible and unmaintainable mess. >> > The abstractions of C++ make C++ more readable and maintaineable as C. And yet C-based Git seems to be more actively maintained and improved than C++-based Monotone. And of course it can cope with much larger projects more efficiently.
Re: C and its peasant 'ancestors'
Author: Lawrence D’Oliveiro
Date: Sat, 28 Nov 2026 05:50
Date: Sat, 28 Nov 2026 05:50
15 lines
2066 bytes
2066 bytes
On Sat, 28 Nov 2026 06:30:02 +0100, Bonita Montero wrote: > Am 27.11.2026 um 22:26 schrieb Lawrence D’Oliveiro: > >> On Thu, 26 Nov 2026 10:44:37 +0100, Bonita Montero wrote: > >>> I'm not into C++ but also into Rust and some other languages. Both >>> mentioned languages are superior to C by magnitudes. You need only >>> a fifth of the code and the code is more readable. > >> I’m sure Python beats them all, on that score. > > An not strongly typed and interpreted language ? It *is* strongly-typed, and compiled.
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 06:26
Date: Sat, 28 Nov 2026 06:26
19 lines
2851 bytes
2851 bytes
Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: > And yet C-based Git seems to be more actively maintained and improved > than C++-based Monotone. All modern compilers are implemented in C++. The same goes for all web browsers. Both are certainly one or two orders of magnitude more complex than Git. > And of course it can cope with much larger projects more efficiently. No, C++ is more efficient because C makes it very difficult to handle more complex and efficient data structures. Take `map<>` or `unordered_map`, for example. Or look at what I showed recently: the performance of `sort()` compared to `qsort()`—a factor of six. I could go on indefinitely with examples like this—things that are handled effortlessly in C++, but which would take days to implement with the same level of efficiency in C.
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 06:27
Date: Sat, 28 Nov 2026 06:27
6 lines
1887 bytes
1887 bytes
Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: > It *is* strongly-typed, and compiled. Python is weakly typed. Type annotations aren't enforced by the compiler.
Re: C and its peasant 'ancestors'
Author: Lawrence D’Oliveiro
Date: Sat, 28 Nov 2026 07:04
Date: Sat, 28 Nov 2026 07:04
13 lines
2420 bytes
2420 bytes
On Sat, 28 Nov 2026 07:26:07 +0100, Bonita Montero wrote: > Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: > >> And yet C-based Git seems to be more actively maintained and improved >> than C++-based Monotone. > >> And of course it can cope with much larger projects more efficiently. > > No, C++ is more efficient because C makes it very difficult to > handle more complex and efficient data structures. But it’s true. C-based Git has better performance than C++-based Monotone.
Re: C and its peasant 'ancestors'
Author: Lawrence D’Oliveiro
Date: Sat, 28 Nov 2026 07:05
Date: Sat, 28 Nov 2026 07:05
18 lines
2209 bytes
2209 bytes
On Sat, 28 Nov 2026 07:27:38 +0100, Bonita Montero wrote:
> Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro:
>
>> It *is* strongly-typed, and compiled.
>
> Python is weakly typed.
ldo@theon:~> python3
Python 3.14.10 (main, Oct 26 2026, 15:12:11) [GCC 16.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 + "1"
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
1 + "1"
~~^~~~~
TypeError: unsupported operand type(s) for +: 'int' and 'str'
>>>
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 07:57
Date: Sat, 28 Nov 2026 07:57
8 lines
2422 bytes
2422 bytes
Am 28.11.2026 um 08:04 schrieb Lawrence D’Oliveiro: > But it’s true. C-based Git has better performance than C++-based Monotone. What a sick statement ... That's a matter of the implementation, not the language. And C++ has the potential to do it faster and more maintaineable because of the things I mentioned.
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 07:58
Date: Sat, 28 Nov 2026 07:58
15 lines
2309 bytes
2309 bytes
Am 28.11.2026 um 08:05 schrieb Lawrence D’Oliveiro: > ldo@theon:~> python3 > Python 3.14.10 (main, Oct 26 2026, 15:12:11) [GCC 16.2.0] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> 1 + "1" > Traceback (most recent call last): > File "<python-input-0>", line 1, in <module> > 1 + "1" > ~~^~~~~ > TypeError: unsupported operand type(s) for +: 'int' and 'str' > >>> That's runtime error.
Re: C and its peasant 'ancestors'
Author: fir
Date: Sat, 28 Nov 2026 08:01
Date: Sat, 28 Nov 2026 08:01
26 lines
3299 bytes
3299 bytes
Lawrence D’Oliveiro pisze: > On Sat, 28 Nov 2026 07:26:07 +0100, Bonita Montero wrote: > >> Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: >> >>> And yet C-based Git seems to be more actively maintained and improved >>> than C++-based Monotone. >> >>> And of course it can cope with much larger projects more efficiently. >> >> No, C++ is more efficient because C makes it very difficult to >> handle more complex and efficient data structures. > > But it’s true. C-based Git has better performance than C++-based Monotone. > bonita degrades any such kind talk to animal level of repeating her animal belifs so id someone dislike this (and i guess in fact anyone destastes it its better not give her oportunities to spread her trash bigotry..she is far far belov the standard of this group imo...thats how religious maniacs act - not interested in truth, unable to take it, interested in talking preposterously simple lies for the c++ church) (when even this church getting smaller and smaller, as as far as i heard the reputation of c++ even among the most common programming peasants got quite low - even his own 'maker' like imo holds/acknowledges this bad reputation of his sinfull deed)
Re: C and its peasant 'ancestors'
Author: fir
Date: Sat, 28 Nov 2026 08:11
Date: Sat, 28 Nov 2026 08:11
32 lines
3537 bytes
3537 bytes
fir pisze: > Lawrence D’Oliveiro pisze: >> On Sat, 28 Nov 2026 07:26:07 +0100, Bonita Montero wrote: >> >>> Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: >>> >>>> And yet C-based Git seems to be more actively maintained and improved >>>> than C++-based Monotone. >>> >>>> And of course it can cope with much larger projects more efficiently. >>> >>> No, C++ is more efficient because C makes it very difficult to >>> handle more complex and efficient data structures. >> >> But it’s true. C-based Git has better performance than C++-based >> Monotone. >> > bonita degrades any such kind talk to animal level of repeating her > animal belifs so id someone dislike this (and i guess in fact anyone > destastes it its better not give her oportunities to spread her trash > bigotry..she is far far belov the standard of this group imo...thats how > religious maniacs act - not interested in truth, unable to take it, > interested in talking preposterously simple lies for the c++ church) > > (when even this church getting smaller and smaller, as as far as i heard > the reputation of c++ even among the most common programming peasants > got quite low - even his own 'maker' like imo holds/acknowledges this > bad reputation of his sinfull deed) but for now c++ is probably "legacy language", c++ same as java and c# (slitt probbaly its ok to use c++ as compiler of c + addition of references)
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 08:14
Date: Sat, 28 Nov 2026 08:14
16 lines
2804 bytes
2804 bytes
Am 28.11.2026 um 09:01 schrieb fir: > bonita degrades any such kind talk to animal level of repeating her > animal belifs ... I've given you an example of C++'s superiority: C's qsort() (C) vs. C's sort() - factor 6. And I extended this example to a structure which is 64 bytes. With AVX-512 optimitations of my compiler I get factor 11. I did the whole benchmark in less than one hour. In C you need that time to implement sth. comparable than C++'s sort() in C. Any questions ? And I asked you to give an expample of a comparable algoritm in C and you failed because you used radix sort, which performs good only under certain circumstances. You suck !
Re: C and its peasant 'ancestors'
Author: fir
Date: Sat, 28 Nov 2026 08:16
Date: Sat, 28 Nov 2026 08:16
45 lines
4098 bytes
4098 bytes
fir pisze: > fir pisze: >> Lawrence D’Oliveiro pisze: >>> On Sat, 28 Nov 2026 07:26:07 +0100, Bonita Montero wrote: >>> >>>> Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: >>>> >>>>> And yet C-based Git seems to be more actively maintained and improved >>>>> than C++-based Monotone. >>>> >>>>> And of course it can cope with much larger projects more efficiently. >>>> >>>> No, C++ is more efficient because C makes it very difficult to >>>> handle more complex and efficient data structures. >>> >>> But it’s true. C-based Git has better performance than C++-based >>> Monotone. >>> >> bonita degrades any such kind talk to animal level of repeating her >> animal belifs so id someone dislike this (and i guess in fact anyone >> destastes it its better not give her oportunities to spread her trash >> bigotry..she is far far belov the standard of this group imo...thats >> how religious maniacs act - not interested in truth, unable to take >> it, interested in talking preposterously simple lies for the c++ church) >> >> (when even this church getting smaller and smaller, as as far as i heard >> the reputation of c++ even among the most common programming peasants >> got quite low - even his own 'maker' like imo holds/acknowledges this >> bad reputation of his sinfull deed) > > but for now c++ is probably "legacy language", c++ same as java and c# > > (slitt probbaly its ok to use c++ as compiler of c + addition of > references) note im praising those references though i never used it more than few hours - so i would probbaly make at least one project with c + references to talk more authoratitevely..but as far as i see it now references could help a bit in c.. also im not sure but c++ compiler probably changes some linker errors in c in compile errors which is also ok still the c needs what i said - mainly this visibility down (its real horor to manage this onlu up visibility)
Re: C and its peasant 'ancestors'
Author: Janis Papanagnou
Date: Sat, 28 Nov 2026 10:13
Date: Sat, 28 Nov 2026 10:13
43 lines
4096 bytes
4096 bytes
On 2026-11-28 07:26, Bonita Montero wrote: > Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: > >> And yet C-based Git seems to be more actively maintained and improved >> than C++-based Monotone. > > All modern compilers are implemented in C++. The same goes for all web > browsers. Both are certainly one or two orders of magnitude more complex > than Git. > >> And of course it can cope with much larger projects more efficiently. > > No, C++ is more efficient because C makes it very difficult to > handle more complex and efficient data structures. Take `map<>` > or `unordered_map`, for example. Or look at what I showed recently: > the performance of `sort()` compared to `qsort()`—a factor of six. > I could go on indefinitely with examples like this—things that are > handled effortlessly in C++, but which would take days to implement > with the same level of efficiency in C. Bonita, you slog away with that unnecessarily. LDO obviously misses the difference of good and bad designs of specific implementations (comparing apples with oranges), and Fir's communication is anyway beyond all hope. It's obviously difficult (in a "C" newsgroup) to explain the advantages of modelling software using OO-abstractions and high-level (yet efficient) libraries to people that, both, lack that experience and missing the skills to recognize that. You will do yourself (and the audience here) a favor to stop that lost cause. (A better place would be the C++ newsgroups; there you don't need to do all those - here fruitless - missionary efforts.) Concerning the point of C++'s ugly syntax; that's specifically funny because the base was inherited by "C". C++ extensions were done in a consistent way based on that. Only the newer standards' inventions I consider to be adding their own syntactic ugliness. But all that is anyway no real argument if you compare that to "C" which is lacking all the modelling capabilities of C++. The languages' application areas seem to be different. But if all we have is a (C-)hammer... ;-) Janis
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 12:23
Date: Sat, 28 Nov 2026 12:23
25 lines
3358 bytes
3358 bytes
Am 28.11.2026 um 11:13 schrieb Janis Papanagnou: > Bonita, you slog away with that unnecessarily. LDO obviously misses > the difference of good and bad designs of specific implementations > (comparing apples with oranges), and Fir's communication is anyway > beyond all hope. It's obviously difficult (in a "C" newsgroup) to > explain the advantages of modelling software using OO-abstractions > and high-level (yet efficient) libraries to people that, both, lack > that experience and missing the skills to recognize that. You will > do yourself (and the audience here) a favor to stop that lost cause. > (A better place would be the C++ newsgroups; there you don't need to > do all those - here fruitless - missionary efforts.) I don't suffer with that. > Concerning the point of C++'s ugly syntax; that's specifically funny > because the base was inherited by "C". C++ extensions were done in a > consistent way based on that. Only the newer standards' inventions I > consider to be adding their own syntactic ugliness. But all that is > anyway no real argument if you compare that to "C" which is lacking > all the modelling capabilities of C++. I don't understand these aesthetic objections; for me C++ is o.k. in that sense.
Re: C and its peasant 'ancestors'
Author: Dan Cross
Date: Sat, 28 Nov 2026 12:26
Date: Sat, 28 Nov 2026 12:26
14 lines
1363 bytes
1363 bytes
In article <11eds8o$2ahsb$2@raubtier-asyl.eternal-september.org>, Bonita Montero <Bonita.Montero@gmail.com> wrote: >Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: > >> It *is* strongly-typed, and compiled. > >Python is weakly typed. >Type annotations aren't enforced by the compiler. Lawrence is an idiot, but he's right about this. Python is _strongly_ typed, but it is not _statically_ typed. - Dan C.
Re: C and its prescient 'ancestors'
Author: Ross Finlayson
Date: Sat, 28 Nov 2026 13:48
Date: Sat, 28 Nov 2026 13:48
60 lines
3764 bytes
3764 bytes
On 11/28/2026 04:26 AM, Dan Cross wrote: > In article <11eds8o$2ahsb$2@raubtier-asyl.eternal-september.org>, > Bonita Montero <Bonita.Montero@gmail.com> wrote: >> Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: >> >>> It *is* strongly-typed, and compiled. >> >> Python is weakly typed. >> Type annotations aren't enforced by the compiler. > > Lawrence is an idiot, but he's right about this. Python > is _strongly_ typed, but it is not _statically_ typed. > > - Dan C. > Strings are all one type. From his demonstrated reasoning, I'd rather dispute his or any other's here "idiocy", then as with regards to things like Python's "kwargs", those are quite "variant" for being of a "type". Having a strong model of type, for something like "Roberto di Cosmi's _Isomorphisms of Types_", vis-a-vis for example Pierce's "... Type Theory", has that the primitives of Python are much as for its "shell-like" account of having "the associative array" or "a map with slots" as "the type", basically is about "values & types", then that most Python programmers are often ignorant "type", then for example about "abstract-base-class abc" in Python, or "dataclass" in Python, about "classes & types". Type is the first sort of description what gives things "shape", then as with regards that whatever fits can sit, then about things like giving each usage of a string its own type, or, "structs versus maps", for example, quite different accounts of types, yet than in reflection they're fungible the same, that "concretely" it varies. Then, "shapes", "models", "duck-typing" it's usually called, pervade many accounts of Python (or JavaScript, or the shell, or natural language, "poly-" and "pan-typed", or other what are called "loosely-typed" languages, in effect, in practice, often and mostly about matching keys of associative arrays). Python is a bit the rather "loosely-typed", though with discipline & framework may _emulate_ "the more strongly-typed". Then, there's sort of a range of "loose" and "strong" the types, in any sort of account of any language, though some attain to the "pure", vis-a-vis, for example "0's and 1's".
Re: C and its prescient 'ancestors'
Author: Ross Finlayson
Date: Sat, 28 Nov 2026 14:19
Date: Sat, 28 Nov 2026 14:19
65 lines
3962 bytes
3962 bytes
On 11/28/2026 05:48 AM, Ross Finlayson wrote: > On 11/28/2026 04:26 AM, Dan Cross wrote: >> In article <11eds8o$2ahsb$2@raubtier-asyl.eternal-september.org>, >> Bonita Montero <Bonita.Montero@gmail.com> wrote: >>> Am 28.11.2026 um 06:50 schrieb Lawrence D’Oliveiro: >>> >>>> It *is* strongly-typed, and compiled. >>> >>> Python is weakly typed. >>> Type annotations aren't enforced by the compiler. >> >> Lawrence is an idiot, but he's right about this. Python >> is _strongly_ typed, but it is not _statically_ typed. >> >> - Dan C. >> > > Strings are all one type. > > > From his demonstrated reasoning, I'd rather dispute his or any > other's here "idiocy", then as with regards to things like > Python's "kwargs", those are quite "variant" for being of a "type". > > > Having a strong model of type, for something like "Roberto di Cosmi's > _Isomorphisms of Types_", vis-a-vis for example Pierce's "... Type > Theory", has that the primitives of Python are much as for its > "shell-like" account of having "the associative array" or > "a map with slots" as "the type", basically is about "values & types", > then that most Python programmers are often ignorant "type", > then for example about "abstract-base-class abc" in Python, > or "dataclass" in Python, about "classes & types". > > > Type is the first sort of description what gives things "shape", > then as with regards that whatever fits can sit, then about > things like giving each usage of a string its own type, > or, "structs versus maps", for example, quite different > accounts of types, yet than in reflection they're fungible > the same, that "concretely" it varies. > > > Then, "shapes", "models", "duck-typing" it's usually called, > pervade many accounts of Python (or JavaScript, or the shell, > or natural language, "poly-" and "pan-typed", or other what > are called "loosely-typed" languages, in effect, in practice, > often and mostly about matching keys of associative arrays). > > > Python is a bit the rather "loosely-typed", though with > discipline & framework may _emulate_ "the more strongly-typed". > > Then, there's sort of a range of "loose" and "strong" the > types, in any sort of account of any language, though > some attain to the "pure", vis-a-vis, for example "0's and 1's". > > > > > "Strictly" typed.
Re: C and its peasant 'ancestors'
Author: bartc
Date: Sat, 28 Nov 2026 15:28
Date: Sat, 28 Nov 2026 15:28
204 lines
7471 bytes
7471 bytes
On 28/11/2026 04:54, Bonita Montero wrote:
> Am 27.11.2026 um 22:36 schrieb Lawrence D’Oliveiro:
>
>> ... the end result is a horrible and unmaintainable mess.
> The abstractions of C++ make C++ more readable and maintaineable as C.
>
Yet every example of C++ you've ever posted is always an unreadable,
ugly mess of syntax.
Not all that is the fault of the language - you seem to delight in using
every obscure feature possible and have nested functions everywhere.
Below is a recent post of yours about sorting in C++. It took me a while
to realise it was actually testing two kinds of sort!
It is frankly diabolical. It seems designed to obfuscate as much as
possible.
Below yours, is a version in my language, just to show the contrast.
This one only tests a qsort approach, but everything about it is
straightforward.
And below that, is a C port. Not quite as clean, but considerably less
scary-looking than your C++.
As for timings, then for 10000 sorts of 4096 random integers in the i32
range, they were:
C++/g++-O3 qsrt 3.5 seconds
C++/g++-O3 stdsort 1.5 seconds
My lang 2.5 seconds
C/gcc-O2 2.5 seconds
C/bcc 2.5 seconds
But I don't know what's going on in your qsrt, and I don't know what
stdsort does; these will be algorithmic differences.
However, this is what happens when optimisation is turned off in all
cases (in my tools, that just means locals stay in memory):
C++/g++-O0 qsrt 7.0 seconds
C++/g++-O0 stdsort 16.8 seconds
My lang -no 3.7 seconds
C/gcc-O0 4.0 seconds
C/bcc -no 4.0 seconds
Now C++'s stdsort is more than twice as slow as your qsrt! And 4 times
as slow as that 'isort' in C.
There is a more than 10:1 difference between optimised/unoptimised for
this C++ standard sort. Here is one more timing:
QQ 15.0 seconds
This is my dynamic scripting language on the same task. The sort routine
(same as isort) is implemented /in the language/, it is not called as an
internal function written in native code.
So unoptimised C++ is slower than a scripting language!
-----------------------------------------
#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;
}
-----------------------------------------
proc main =
const nn = 4096
[nn]int data, sdata # int is i64
for i to nn do
data[i] := mrandomrange(i32.min, i32.max)
end
to 10'000 do
sdata := data
isort(sdata, 1, sdata.len)
end
for i to nn when i not in 10..nn-10 do
println i, sdata[i]
end
end
proc isort([]int &data, int ll, rr)=
int pivot, i := ll, j := rr
pivot:=data[(ll+rr)/2]
repeat
while pivot > data[i] and i<rr do ++i end
while pivot < data[j] and j>ll do --j end
if i<=j then
swap(data[i], data[j])
++i
--j
end
until i>j
if ll<j then isort(data, ll, j) end
if i<rr then isort(data, i, rr) end
end
--------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void isort(int* data, int ll, int rr) {
int pivot, i = ll, j = rr, t;
pivot = data[(ll+rr)/2];
do {
while (pivot > data[i] && i<rr) ++i;
while (pivot < data[j] && j>ll) --j;
if (i<=j) {
t=data[i]; data[i]=data[j]; data[j]=t;
++i;
--j;
}
} while (!(i>j));
if (ll<j) isort(data, ll, j);
if (i<rr) isort(data, i, rr);
}
int main(void) {
enum {N=4096};
int data[N], sdata[N], i;
for (i=0; i<N; ++i) data[i] = (rand()<<15) | rand();
for (i=0; i<10000; ++i) {
memcpy(sdata, data, sizeof(data));
isort(sdata, 0, N-1);
}
for (i=0; i<N; ++i) if (i<10 || i>(N-10)) printf("%4d %d\n", i,
sdata[i]);
}
Re: C and its peasant 'ancestors'
Author: Bonita Montero
Date: Sat, 28 Nov 2026 16:31
Date: Sat, 28 Nov 2026 16:31
44 lines
3731 bytes
3731 bytes
Am 28.11.2026 um 16:28 schrieb bartc: > Yet every example of C++ you've ever posted is always an unreadable, > ugly mess of syntax. A very disordered opinion. > Not all that is the fault of the language - you seem to delight in using > every obscure feature possible and have nested functions everywhere. C++-developers understand my code since they're more skilled like you. > Below is a recent post of yours about sorting in C++. It took me a while > to realise it was actually testing two kinds of sort! I don't know why this should be hard to understand. Maybe it's beyond your capabilities. > As for timings, then for 10000 sorts of 4096 random integers in the i32 > range, they were: > >  C++/g++-O3 qsrt     3.5 seconds >  C++/g++-O3 stdsort  1.5 seconds >  My lang             2.5 seconds >  C/gcc-O2            2.5 seconds >  C/bcc               2.5 seconds As I said you can be on par with std::sort(), but it makes a lot of work since you've to implement the quicksort yourself; including all optimi- zations beyond the "homework-solution". > However, this is what happens when optimisation is turned off in all > cases (in my tools, that just means locals stay in memory): > >  C++/g++-O0 qsrt     7.0 seconds >  C++/g++-O0 stdsort 16.8 seconds >  My lang -no         3.7 seconds >  C/gcc-O0            4.0 seconds >  C/bcc -no           4.0 seconds > Now C++'s stdsort is more than twice as slow as your qsrt! And 4 times > as slow as that 'isort' in C. > So unoptimised C++ is slower than a scripting language! Where's the problem ?
Re: C and its peasant 'ancestors'
Author: bartc
Date: Sat, 28 Nov 2026 18:12
Date: Sat, 28 Nov 2026 18:12
94 lines
5274 bytes
5274 bytes
On 28/11/2026 16:31, Bonita Montero wrote:
> Am 28.11.2026 um 16:28 schrieb bartc:
>
>> Yet every example of C++ you've ever posted is always an unreadable,
>> ugly mess of syntax.
>
> A very disordered opinion.
>
>> Not all that is the fault of the language - you seem to delight in
>> using every obscure feature possible and have nested functions
>> everywhere.
>
> C++-developers understand my code since they're more skilled like you.
It's not a skills issue. The language as used like this is several times
more complex than is needed.
>> Below is a recent post of yours about sorting in C++. It took me a
>> while to realise it was actually testing two kinds of sort!
>
> I don't know why this should be hard to understand.
> Maybe it's beyond your capabilities.
Because it's a ******* mess. Here's a function you created simply for
copying one array to another:
auto cpy = [&] { copy( origin.begin(), origin.end(), srt.begin() );
dummy += srt[0]; };
37 tokens. Here is what I used:
sdata := data
3 tokens, and no functions. Even C needs only 12 tokens:
memcpy(sdata, data, sizeof(data));
It's also ironic in that you go on about having to implement stuff in C
that is provided in C++, yet you have to write your own vector copy?
Would 'src = origin' work, and if so why not just use it?
You just want to use as many toys as possible for no reason.
>> As for timings, then for 10000 sorts of 4096 random integers in the
>> i32 range, they were:
>>
>>   C++/g++-O3 qsrt     3.5 seconds
>>   C++/g++-O3 stdsort  1.5 seconds
>>   My lang             2.5 seconds
>> Â Â C/gcc-O2Â Â Â Â Â Â Â Â Â Â Â Â 2.5 seconds
>>   C/bcc               2.5 seconds
>
> As I said you can be on par with std::sort(),
Why is your qsrt 40% slower than the most basic version in C?
> but it makes a lot of work> since you've to implement the quicksort
yourself; including all optimi-
> zations beyond the "homework-solution".
I'm sure somebody has already written an optimised sort routine in C,
you just have to find it. Google-AI gave me a fast version of quicksort,
and that has timing of 1.8 seconds the for the above task.
That's 20% slower than your stdsort. But if I tweak the task, so I sort
64K numbers 1000 times, then optimised C is 14% faster then optimised
C++/stdsort.
>> However, this is what happens when optimisation is turned off in all
>> cases (in my tools, that just means locals stay in memory):
>>
>>   C++/g++-O0 qsrt     7.0 seconds
>>   C++/g++-O0 stdsort 16.8 seconds
>>   My lang -no         3.7 seconds
>> Â Â C/gcc-O0Â Â Â Â Â Â Â Â Â Â Â Â 4.0 seconds
>>   C/bcc -no           4.0 seconds
>> Now C++'s stdsort is more than twice as slow as your qsrt! And 4 times
>> as slow as that 'isort' in C.
>> So unoptimised C++ is slower than a scripting language!
> Where's the problem ?
One problem is that compiling this 60-line C++ program took 2.6 seconds,
but compiling the now-90-line C version took 0.025 seconds (100 times
faster).
This is with my non-optimising compiler, but it was still slightly
faster than C++ sort for N=64K (4.7s vs 4.8s).
Page 2 of 4 • 177 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