looking for a D3 stl project

H. S. Teoh hsteoh at qfbox.info
Mon Jan 15 19:48:30 UTC 2024


On Mon, Jan 15, 2024 at 05:40:20PM +0000, monkyyy via Digitalmars-d wrote:
> I want to *help* with an stl-like data structures and algorithms
> project, I'm under no delusions I should be in charge of such a thing,
> but I am not seeing movement even with openD

Adam's pretty good about merging stuff that makes sense. If you make
something that works well, I'm pretty sure Adam will have no problems
about merging it.


> I take the following things as given:
[...]
> 2. with templates you can make your algorithms somewhat data structure
> agonistic

My personal goal is to make my algorithms *completely* data structure
agnostic.


[...]
> I have the following requirements for any such project:
> 
> 1. feature-based and not hierarchy-based.

This is a good idea. DbI FTW!!


> Filter will break length, map will break a ref front, if you declare
> length is higher on the hierarchy than ref front, or vice versa you're
> necessarily limiting your flexibility and users will find hacks like
> adding `.array` to move up back up the hierarchy

I'm confused. You just said "feature-based and not hierarchy-based" and
then you start talking about moving back up the hierarchy.  Which do you
mean?


> 2. one of those feature sets has indexing, so searching isn't so badly
> designed and named

Don't understand what exactly you mean here. What does has indexing have
to do with "searching isn't so badly designed"?

Also, a name is just an identifier; as long as it's not ridiculous I
don't really care how things are named.


> 3. permissive merging until it has enough code to be usable

Just create a project on github and invite contributors.


> 4. the goal is to be an std candidate or a first-party lib
> 5. "composite algorithms" where you reuse smaller pieces are
> encouraged and not blocked for "you made an extra allocation","to
> trivail" `auto sumWhere(alias F,R)(R
> r)=>r.filter!F.reduce((a,b)=>a+b)`

Why should there be an exponential number of functions when you could
just provide the log(n) number of primitives which the user could
compose himself to build an exponential variety of algorithms?


T

-- 
Без труда не выловишь и рыбку из пруда. 


More information about the Digitalmars-d mailing list