Today

Links and Notes for May 10th, 2024

Published by marco on in Notes

Below are links to articles, highlighted passages[1], and occasional annotations[2] for the week ending on the date in the title, enriching the raw data from Instapaper Likes and Twitter. They are intentionally succinct, else they’d be articles and probably end up in the gigantic backlog of unpublished drafts. YMMV.

[1] Emphases are added, unless otherwise noted.
[2] Annotations are only lightly edited and are largely contemporaneous.

Table of Contents

Building RegEx from scratch with Stephen Toub

Published by marco on in Programming

This is another excellent 1-hour tour of another complex corner of .NET. Toub describes and shows how the source-generated RegEx engine works.

Deep Dive into RegEx with Stephen Toub by dotnet / Scott Hanselmann (YouTube)

  • The generated source is human-readable and debuggable.
  • It is well-commented.
  • It updates in real-time as you change the expression.
  • It includes XML documentation that describes the regular expression in plain English.
  • They rewrote the compiler in .NET 7 to not only better support source generators, but also to be able to emit not only IL, but source... [More]

Building async/await from scratch with Stephen Toub

Published by marco on in Programming

This is another video from Stephen Toub that is just chock/full of useful information.

Writing async/await from scratch in C# with Stephen Toub by dotnet (YouTube)

At 27:30, they start to discuss about the nomenclature of Task and how it differs from an Action. It’s funny that neither of them mentioned that tasks in .NET are called promises pretty much everywhere else (JavaScript, Java, etc.). Some libraries also use the word future. For more information, see Futures and promises (Wikipedia).

As he’s building everything, it is really astonishing to note that Hanselmann has to... [More]

Building LINQ from scratch with Stephen Toub

Published by marco on in Programming

This is a great interview with the master of performance-optimization in .NET Stephen Toub. If you’re relatively well-versed in C#, .NET, and Linq, then you can just jump to the second video (linked below). I actually watched the second one first. I didn’t feel like I’d missed anything.

Deep Dive on LINQ with Stephen Toub by dotnet (YouTube)

Stephen Toub’s the guy who writes the 100+-page release notes on performance. See the following links.