.NET Testing : pushing the Limits et Roslyn: compiler-as-a-Service
12 mai 2025, 19:00:00 CEST - GMT+2 - La Cantine by La Mêlée, Toulouse
https://mobilizon.mtg-france.org/events/00862bef-84fc-4800-8e9a-7dd0a7bfa282
.NET Testing : pushing the Limits et Roslyn: compiler-as-a-Service
12 mai 2025, 19:00:00 CEST - GMT+2 - La Cantine by La Mêlée, Toulouse
https://mobilizon.mtg-france.org/events/00862bef-84fc-4800-8e9a-7dd0a7bfa282
I find C#'s features to always somehow be incomplete. For example, I can declare a class without a constructor, like below, and use new HandInfo{... to create with names. However, it doesn't work nullable: enable, thus I have to revert back to manually creating a constructor.
Played a few hours of Palworld with Child.0.
Also worked on my C# CLI parsing library. Mostly I worked out some ideas and patterns to make sure they fit. One implementation I'm doing is based on C#'s XElement pattern:
var root = new ComponentCliCommand(
new ValueCliOption<string>("option"),
new ValueCliOption<int>('n', "number"),
new SwitchCliOption("help"),
new CliHandler(_ => Console.WriteLine("I ran a command!"));
Since the entire purpose is to make this DI-friendly and also Autofac-module friendly, all of the classes and subclasses can be extended and then added into the service provider.
public RootCommand(IEnumerable<IMyLocalVerbs> verbList, CurrentDateOption currentDateOption)
: base(currentDateOption)
{
this.AddRange(verbList);
}
So far, the pattern seems "reasonable"?
I can also easily convert a reflection-based version of the command and convert them into components, which would let me do a CommandLineParser-style command object. And the handler (CliHandler
) doesn't have to be in the same class (though I prefer it does).
Today, I implemented the #async / #await pattern (as known from #csharp and meanwhile quite some other languages) ...
... in good old #C!
Well, at least sort of.
* It requires some standard library support, namely #POSIX user context switching with #getcontext and friends, which was deprecated in POSIX-1.2008. But it's still available on many systems, including #FreeBSD, #NetBSD, #Linux (with #glibc). It's NOT available e.g. on #OpenBSD, or Linux with some alternative libc.
* I can't do anything about the basic language syntax, so some boilerplate comes with using it.
* It has some overhead (room for extra stacks, even extra syscalls as getcontext unfortunately also always saves/restores the signal mask)
But then ... async/await in C!
Here are the docs:
https://zirias.github.io/poser/api/latest/class_p_s_c___async_task.html
Week 1 of learning Rust as a C# dev:
Fewer keywords. Stricter rules. More thinking.
Rust’s minimalism doesn’t just simplify, it reshapes how you code.
Here are my takeaways from the first 7 days:
https://woodruff.dev/reflections-on-week-1-rusts-minimalism-hits-different/
I'm learning Rust from a C# developer's perspective—one day at a time for 42 days.
I have 36 days left.
If you're curious how Rust stacks up against .NET, follow along here:
https://woodruff.dev/from-c-to-rust-a-42-day-developer-challenge/
SpacetimeDB is an interesting new type of relational database that I haven't quite wrapped my head around yet.
It is designed for real time massive multiplayer games and uses some sort event sourcing (CRDTs?) but has many more potential use cases than just games.
It works particularly well with .NET and C#. So I have cleaned up and simplified the C# quickstart sample.
️ ReSharper 2025.1 Adds C# 14 Support and New Tools
Day 6 of learning Rust as a C# dev:
No classes. No objects. Just tuples, arrays, and a compiler that keeps you honest.
Rust’s types feel simple until they don’t.
Here’s what I learned:
https://woodruff.dev/rust-scalar-and-compound-types-where-are-my-c-classes/
️ Microsoft Build 2025 Highlights .NET and C#
via @dotnet : Join the .NET & C# Teams at Microsoft Build 2025
https://ift.tt/6DiP2Hj
#MicrosoftBuild2025 #dotNET #CSharp #Developers #AI #Cloud #AppDevelopment #WebDevelopment #ASPNetCore #Blazor #MAUI #GitHubCopilot #AIApps #Networking #HandsOnLabs #TechCommun…
Why MAUI Blazor Hybrid | by Rocky Lhotka.
buff.ly/gzN4Oyl
#dotnetmaui #blazor #blazorhybrid #mobiledev #dotnet #csharp
Why MAUI Blazor Hybrid
Calling MCP Servers in C# with Microsoft.Extensions dot AI.
buff.ly/CW7YEG1
#dotnet #ai #csharp #mcp #aimodels
Calling MCP Servers in C# with...
Calling MCP Servers in C# with Microsoft.Extensions dot AI.
https://markheath.net/post/2025/4/14/calling-mcp-server-microsoft-extensions-ai
Day 5 of learning Rust as a C# dev:
Functions look familiar... until they don’t.
No return keyword, types after names, and the last line does the returning?
It’s weird. It’s clean. I kind of love it.
https://woodruff.dev/functions-in-rust-familiar-yet-different/
3 Reasons .NET Developers Still Struggle with Unit Testing (And How to Fix It).
buff.ly/Cjn1j6m
#dotnet #csharp #unittesting
3 Reasons .NET Developers Stil...