That time when you give your project such a cute name, cleverly changing just one letter for uniqueness (Args → Arqs), that you can't remember & find it some 6 years later when you really need it. 🙄 But then remembered an old post! Right, time to raise the dead.
1/5 So here's strong-typed CLI parsing with help (example "git commit") succinctly expressed in LINQ as an applicative computation: https://t.co/E3do71nZ51 Don't it just read pretty? Or as Belloq would've exclaimed, “It's beautiful!” just before…🤯
3/3 The implementation is based on MSBuild. It could've been done as a C# source generator, but here's the rub: the output of one C# source generator cannot be used as the input for another also expecting a constant; case in point: https://t.co/dRmn7DmVcM
2/3 You get the basic ones like AssemblyName, Version, Product, Copyright, etc., by default, but you can also define your own; including reading their content from a file:
Just for fun & kicks, published an Interact Monad gist in C#, derived from https://t.co/UMrFuLGp4b in F# by
@tomaspetricek and demonstrating an interactive computation that asks the user questions:
https://t.co/NCuPsOAZzu
5/5 Finally, in case it wasn't already obvious, Finq turns any `Func<,>` into a reader functor, monad, etc.
For more, see: https://t.co/g1LrFn6Q3r
1/5 Here's a (peculiar) idea…writing & combining C# functions (`Func<,>`) entirely with LINQ, as if you didn't have `=>` in the language. Introducing Finq: https://t.co/g1LrFn6Q3r or F(unq) + (L)inq
The fact that it fixes one crucial bug in (async) Merge that you're bound to encounter in simple use cases & yet no one reported it says a lot about how many people are using it. https://t.co/snsbdZy9CM Okay, it was marked experimental so perhaps no one wants to go near it.
@RickStrahl Use Thread with TaskCompletionSource for signaling + Task? Seems to be cleanest & simplest way I can think of right now. As a Gist for prosperity: https://t.co/BqHcI5woRq
@dwhiteindetroit@OnurGumusDev Right, no conspiracy here. The intro https://t.co/tmkVvXKM99 says too “…authors of this guide were themselves C#/.NET developers who were completely new to Rust. This guide is the compilation of the knowledge acquired…writing Rust code over the course of several months.”
@CsAdvent “…great demo, thanks for taking the time to put it together…some of the more esoteric MoreLINQ operators (had never really considered…, but seeing how they're used here makes me realise they fit some scenarios I've seen before)…” & this made my day. https://t.co/gw8hqpb0n4
@KarenPayneMVP@marcgravell And yet you get this often https://t.co/NCDmcEPDkx perhaps because the .NET team sweats over this stuff & talks about all the ways they got the perf improvements, everyone feels now they need to sweat it to too.