Eirik George Tsarpalis's Avatar

Eirik George Tsarpalis

@eiriktsarpalis

Software Engineer, .NET Libraries at Microsoft

794
Followers
301
Following
20
Posts
29.11.2023
Joined
Posts Following

Latest posts by Eirik George Tsarpalis @eiriktsarpalis

The first Taco Bell opened in Athens a few weeks back and I couldn't believe the queues being formed. Clearly novelty beats reputation.

14.10.2025 04:30 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

All copilot. My only inputs were assigning the issue to it and giving review feedback.

21.05.2025 12:08 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I experimented with the idea, but it turns out compile-time validation isn't easy to prove. Even if you have the shape for a particular service type, you can't tell if all its dependencies are registered.

It might be possible with different APIs, here I'm just copying Microsoft.Extensions.DI.

06.02.2025 22:03 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Building a simple DI library in just under 500 LoC using PolyType:

github.com/eiriktsarpal...

06.02.2025 20:35 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

You're very welcome πŸ˜‚

01.01.2025 06:47 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

To be perfectly fair this was mostly the work of Krzysztof W. (whom I can't locate on bsky)

09.12.2024 09:32 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Could it be achieved purely through interpretation rather than injecting the relevant machine code? The BF deserializer is probably Turing-complete, so it might be possible to embed a language into the format.

04.12.2024 21:36 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Importantly, rather than starting doom.exe as a new process can it be implemented directly using BF features?

04.12.2024 19:27 πŸ‘ 3 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

From the MSFT documentation on BinaryFormatter:

"As a simpler analogy, assume that calling BinaryFormatter.Deserialize over a payload is the equivalent of interpreting that payload as a standalone executable and launching it."

Can it run Doom though?

04.12.2024 19:25 πŸ‘ 8 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0
Preview
OpenAPI document generation in .NET 9 - .NET Blog Introducing the New OpenAPI Document Generation Feature in .NET 9. Let's take a look at what it is, how to use it, and how it streamlines API development in .NET.

Hi folks! Please check out my new post in the .NET blog on the .NET 9 support for generating OpenAPI documents for ASP.NET Core web applications.

devblogs.microsoft.com/dotnet/dotne...

And there's lots more information on this in the docs on MS Learn:

learn.microsoft.com/en-us/aspnet...

26.11.2024 17:59 πŸ‘ 52 πŸ” 6 πŸ’¬ 0 πŸ“Œ 0

Good thing it's not a sudoku cube.

28.11.2024 08:47 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Proposal: Expression blocks Β· Issue #3086 Β· dotnet/csharplang Proposal Allow a block of statements with a trailing expression as an expression. Syntax expression : non_assignment_expression | assignment ; non_assignment_expression : conditional_expression | l...

That's one way to work around it, but it's a bummer still. Can't wait for github.com/dotnet/cshar...

27.11.2024 07:57 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

As much as I like switch expressions, the fact you can't use blocks (like you can in lambdas) is an important barrier to their adoption.

27.11.2024 07:53 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

You can still achieve it using a custom converter but I wouldn't recommend it.

19.11.2024 21:26 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Correct. This is for two reasons: unconstrained polymorphism is a vector for remote code execution and it is required by the source generator/AOT applications.

19.11.2024 21:25 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
How to serialize properties of derived classes with System.Text.Json - .NET Learn how to serialize polymorphic objects while serializing to and deserializing from JSON in .NET.

learn.microsoft.com/en-us/dotnet...

19.11.2024 20:58 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
How to serialize properties of derived classes with System.Text.Json - .NET Learn how to serialize polymorphic objects while serializing to and deserializing from JSON in .NET.

STJ supports polymorphism but you need to configure this explicitly:

learn.microsoft.com/en-us/dotnet...

19.11.2024 20:57 πŸ‘ 2 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

All in London - come join Edgar and myself at F# Londoners tomorrow, 5:30pm, Old Street, hosting a talk from Stephen Channell

#fsharp

bsky.app/profile/fsha...

18.11.2024 22:36 πŸ‘ 18 πŸ” 8 πŸ’¬ 2 πŸ“Œ 0
Preview
Source Generators for free! If you’re a seasoned .NET library author, there is a good chance that you’ve had to write some component that is acting on arbitrary user-defined types. This includes serializers, struc…

I realize I haven't shared this on Bluesky yet, so here's my article on the library:

eiriktsarpalis.wordpress.com/2024/10/22/s...

18.11.2024 20:19 πŸ‘ 11 πŸ” 4 πŸ’¬ 0 πŸ“Œ 0

typeshape-csharp has been renamed to PolyType!
The new name is a reference to polytypic programming and was made to avoid confusion with the F# TypeShape library.

Visit the repo to learn more: github.com/eiriktsarpal...

18.11.2024 20:18 πŸ‘ 7 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0

Love my M1 air even though there are some workloads where it would really benefit from active cooling.

14.11.2024 00:30 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Hi everyone πŸ‘‹

13.11.2024 21:56 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0