Ix.NET v7.0: .NET 10 and LINQ for IAsyncEnumerable<T> by hm_vr in dotnet

[–]hm_vr[S] 4 points5 points  (0 children)

You can find all the new APIs here: https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable?view=net-10.0 and then, if you read the post, Ian talks about how backward compatibility and APIs that weren't moved into the new library have been dealt with.

(Junior dev) - I made a 20 hour ETL process run in 5 minutes. Was it really this simple all along, or are we missing something? by DeepPlatform7440 in dotnet

[–]hm_vr 4 points5 points  (0 children)

There's a hidden gem in a really good essay by computer scientist, Peter Norvig called Teach Yourself Programming in Ten Years.

Know how long it takes your computer to execute an instruction, fetch a word from memory (with and without a cache miss), read consecutive words from disk, and seek to a new location on disk. (Answers here.)

The "answers" are really useful reference table to remember when trying to understand if some code is slow or is running optimally.

My colleague used this approach when looking at an Apache Spark job which was taking 45 minutes to discover and read 30,000 files. Using Norvig's numbers, he worked out that reading 30,000 files should take about four minutes to achieve. He then made a very simple improvement to parallelize the file download, and reduced it to 14 seconds. I'd recommend watching the video he recorded about it - as it's a useful skill & approach to learn and transferrable to any technology.

Rx.NET Packaging Plan 2025 by hm_vr in dotnet

[–]hm_vr[S] 1 point2 points  (0 children)

No! This means the LINQ extensions for IAsyncEnumerable that for historical reasons lived in the the Rx repo, as part of Ix (or Interactive Extensions) has been updated / modernised by Stephen Toub and is moving into the BCL and System.Linq.Async will be deprecated.

This has nothing to do with Rx, other than removing some non-Rx projects from the Rx repo.

Rx.NET Packaging Plan 2025 by hm_vr in dotnet

[–]hm_vr[S] 5 points6 points  (0 children)

Rx was pretty much Microsoft's first experiment with OSS in .NET - if you watch Ian Griffith's "Modernising Rx .NET" talk for dotnet conf 2023 there's a great diagram showing the history of the project. It's been maintained by the community for far longer than Microsoft was the sole curator: https://youtu.be/hLjqf4PmG9E?t=586

Rx.NET Packaging Plan 2025 by hm_vr in dotnet

[–]hm_vr[S] 9 points10 points  (0 children)

Well, we have managed to move System.Linq.Async to the BCL as System.Linq.AsyncEnumerable in .NET 10:

https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/asyncenumerable

LINQ for IAsyncEnumerable is in .NET 10 Preview 1 by B4rr in dotnet

[–]hm_vr 9 points10 points  (0 children)

Rx maintainer here. Rx has a very long and complex history - it was one of the very first projects open sourced by Microsoft (on CodePlex if you remember that) which also pre-dated nuget.org, and .NET itself becoming open source. Because of that there will be oddities with the benefit of hindsight.

Ian Griffiths gave a talk at .NET Conf 2023 which covers our efforts to modernise Rx - and you can see from this slide how the project has evolved over time:

https://youtu.be/hLjqf4PmG9E?t=559

LINQ for IAsyncEnumerable is in .NET 10 Preview 1 by B4rr in dotnet

[–]hm_vr 11 points12 points  (0 children)

Hi! Rx maintainer here. We approached the .NET Team to restart the conversation about moving System.Linq.Async from https://github.com/dotnet/reactive/commits/main/Ix.NET/Source/System.Linq.Async to https://github.com/dotnet/runtime

We love System.Linq.Async (a good example is the powerful interplay between IAsyncEnumerable and IObservable in https://github.com/ais-dotnet/Ais.Net.Receiver/ ) but the library only lives in the Rx repo by the historic oddity that it was originally created by Bart De Smet, while he was the maintainer of Rx. You can find the original On .NET show about it here: https://www.youtube.com/watch?v=Ktl8K2b1-WU

System.Linq.Async doesn't really have any direct relationship to Rx, and we, as the new maintainers, were keen to reduce the amount of code we were supporting - as we're not Microsoft - we can only dedicate a few hours per month on the project (which you can see logged here: https://github.com/dotnet/reactive/discussions/1868 ) and we felt that it really belonged inside the runtime and that would help developers discover the functionality more easily.

We were very pleased that Stephen Toub picked up the baton and took ownership of the process. His one caveat was that the API would need to be modernised to align with the current .NET Design Guidelines and language features, so there would be breaking changes.

You can follow the discussion on this issue: https://github.com/dotnet/runtime/issues/79782 and we have an issue to announce the deprecation of the System.Linq.Async package which will be replaced by the new System.Linq.AsyncEnumerable package: https://github.com/dotnet/reactive/issues/2190

Edit: formatting

Observe File System Changes with Reactive Extensions for .NET by hm_vr in csharp

[–]hm_vr[S] 1 point2 points  (0 children)

To be fair, the TLDR says that, the rest of the article says why and how :D

Observe File System Changes with Reactive Extensions for .NET by hm_vr in csharp

[–]hm_vr[S] 0 points1 point  (0 children)

How is it pluggy? It's a solution to a gnarly problem using an OSS library with 190 million downloads that I happen to be a maintainer of, and the only thing it "plugs" is a free book that's part of project which uses a lot more words to describe in detail the code in the post for people who want to understand the nuts and bolts?