Closed manofstick closed 3 years ago
@manofstick Sorry that I took so long to catch up with this. I took some time away from OSS. The partial class is a great idea. I may extend it to the other libraries. I hope to merge this soon and then publish the results.
I merged it. I then tried to upgrade to the latest version but I can't figure out what changed.
@aalmada
I dropped everything other than .net 5 support to make it easier to manage, so that is probably the issue.
Hmmm. But yeah, I'm not sure if I'm planning on continuing with ValueLinq; I've tried getting a number of people interested in it in some way, but to no avail (actually you were one of those people, which I guess this has slightly changed the equation, but...).
@manofstick
I noticed you dropped all platforms other than .NET 5.0 but that's not the issue. Did you drop support for IInFunc<>
?
I've been working on NetFabric for two years with lots of package downloads but no help. Not even a single comment on how to improve something...
@aalmada
OK; made a pull request where I removed those items.
I've been working on NetFabric for two years with lots of package downloads but no help. Not even a single comment on how to improve something...
Ha; I don't think I got any real package downloads - I'm pretty sure they were all just automated package analysers for me! Then again I didn't spend much time spruiking it, but there were a few people to whom I thought would be at least somewhat interested by my novel architectural design... Meh, c'est la vie.
Anyway, maybe I'll become inspired again. But as I'm doing it in my "spare" time, it's a bit hard. I possibly have some ideas about integrating it indirectly into a mini dynamic language I have at work, so that might see me become work on it again!!
Hopefully it might provide some inspiration to you...
I have put these into a partial class, as easier to control given that this is meant as as "replacement" for System.Linq (i.e. you would drag one or the other namespace via a using, rather than both).
Also, as Cistern.ValueLinq is fully composable I have given a number of different methods for how to do each problem, which ends up as a bit of a combinatorial explosion, but also another reason why doing it in the partial class makes sense.
The "standard" version (i.e.
ToList()
/ToArray()
with no arguments) are supposed to mirror System.Linq as much as possible, i.e. they won't using pooling, but you can specify some arguments which nudges them in various directions (but the logic is a bit convoluted, as they try to be "smart"). There areTo(Array|List)(ViaPool|ViaStack)
to force a particular style.Another axis of freedom is standard delegates (
Func<,>
) or value basedIFunc<,>
. Both of these have value-type and reference-type arguments.And yet another axis of freedom, where List is the source, is if you want to access it via Index or via it's
List<>.Enumerator
. By default it once again follows System.Linq in that it uses the Enumerator, but you can force it by usingOfListByIndex
. Once again there are some "smarts" in place here, because although System.Linq does it by Enumerator, it also has some optimizations on ToArray/ToList which doesn't. Which makes it a bit hard to fully replicate it's functionality, but if the source is originally anIEnumerable<>
rather than aList
then if it's iterator inforeach
it uses theEnumerator
but if it passes through to an Aggregation function then it uses the index version (basically).Which is the final degree of freedom which is offered in the array pool version where you can act either in pull mode (ie, through similar mechanism to IEnumerator) or a push mode (where the actions are inverted).
Anyway, it means that you have lots of choices to choose from, but I have tried to make the simplist (i.e. the one where your code looks exactly the same as System.Linqs) a reasonable default choice.
In the broader context, I think I'm fairly happy with overall architecture now of Cistern.ValueLinq, so now I just have to fill in all the details! Next step is to pull over the SIMD Vector stuff that I'd done in Cistern.Linq :-) And hopefully get around to filling in the rest of the System.Linq API sooner rather than later. But think I'm pretty close to burnout after this initial sprint to this junction!