norden.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Moin! Dies ist die Mastodon-Instanz für Nordlichter, Schnacker und alles dazwischen. Folge dem Leuchtturm.

Administered by:

Server stats:

3.5K
active users

#csharp

14 posts14 participants1 post today

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.

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:
zirias.github.io/poser/api/lat

zirias.github.ioposer: PSC_AsyncTask Class Reference

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.

github.com/bitbonk/spacetime-q

The #csharp community often feels like it can just wait till any #fsharp goodness gets bolted on to some exterior surface of the urban sprawl that is C#... Meanwhile.. (normally just happy to link and use but the code in this case needs serious refactoring)

Only because I couldn't find one that worked the way I wanted it to, I wrote Yet Another Note Making App. Entirely CLI. It may work for you too.
github.com/tezoatlipoca/hamnt

(I'm sure emacs might do everything this does - it does everything else - but I don't use emacs)

#FOSS #note #app #software #notetaking #csharp #dotnet

#win and #linux only for now (all I can test); would love feedback even if that feedback is "Don't quit your dayjob, your code is terrible." #dqydj

Hyper aggressively minimal note taking CLI app. Contribute to tezoatlipoca/hamnt development by creating an account on GitHub.
GitHubGitHub - tezoatlipoca/hamnt: Hyper aggressively minimal note taking CLI app.Hyper aggressively minimal note taking CLI app. Contribute to tezoatlipoca/hamnt development by creating an account on GitHub.