kogasa

joined 2 years ago
[–] [email protected] 2 points 9 months ago* (last edited 9 months ago)

It's a lot better with some notable exceptions. First, .NET Core is multiplatform by design, so it is by default quite portable. The .NET Core CLI is extremely powerful and means a CLI workflow is totally feasible (and also simplifies CI pipelines). The new "multiplatform" application framework, MAUI, runs on Windows, Mac, iOS, and Android, but not Linux/GTK/QT etc. You can maybe attribute this to the design philosophy of abstracting native controls, of which "Linux" itself has none, but either way it's useless on Linux. Third party frameworks like Avalonia do work very well on Linux.

[–] [email protected] 1 points 9 months ago

Despite .NET being relatively friendly with Open Source, Java will probably remain the first choice for FOSS devs for a while, if only due to history and traction. You could write a C# Lemmy alternative, but it wouldn't necessarily be faster or simpler or better in any particular way than a Java version. I'd certainly rather contribute in Java than start from scratch in C#.

[–] [email protected] 2 points 9 months ago

C# isn't really the go-to for high scale distributed systems. But it's extremely easy for a small team of developers to set up a really solid service really quickly. I don't have experience with Go so I can't really compare, but I find ASP.NET Core very pleasant to work with, and I also appreciate the suitability of C# and .NET libraries for both backend and frontend work.

[–] [email protected] 4 points 9 months ago

Nullable reference types are (a completely mandatory) bandaid fix in my opinion as a .net dev. You will encounter lots of edge cases where the compiler is unable to determine the nullability of an object, e.g. when using dependency injection to populate a field, or when using other unusual control flows like MediatR. You can suppress the warnings manually at the slight risk of lying to the analyzer. Objects supplied by external library code may or may not be annotated, and they may or may not be annotated correctly. The lack of compile-time null checking is occasionally an issue. But that said, NRT makes nullability a significantly smaller issue in C# than it used to be

[–] [email protected] 1 points 9 months ago (5 children)

You can also easily write your own option monad or use a tiny library that does.

[–] [email protected] 32 points 9 months ago* (last edited 9 months ago) (3 children)

No but you have 8 boobs like a cat, enjoy

[–] [email protected] 2 points 9 months ago* (last edited 9 months ago)

Yup, you'll notice the only thing distinguishing C from R^(2) is that multiplication. That one definition has extremely broad implications.

For fun, another definition is in terms of 2x2 matrices with real entries. The identity matrix

1 0
0 1

is identified with the real number 1, and the matrix

0 1
-1 0

is identified with i. Given this setup, the normal definitions of matrix addition and multiplication define the complex numbers.

[–] [email protected] 4 points 9 months ago (2 children)

One definition of the complex numbers is the set of tuples (x, y) in R^(2) with the operations of addition: (a,b) + (c,d) = (a+c, b+d) and multiplication: (a,b) * (c,d) = (ac - bd, ad + bc). Then defining i := (0,1) and identifying (x, 0) with the real number x, we can write (a,b) = a + bi.

[–] [email protected] 5 points 9 months ago (1 children)

Reminds me of 2048 making a slightly worse clone of Threes and then releasing it for free.

[–] [email protected] 1 points 10 months ago

Somehow this is DrakeNieR

[–] [email protected] 3 points 10 months ago (1 children)

I don't really query, but it's good enough at code generation to be occasionally useful. If it can spit out 100 lines of code that is generally reasonable, it's faster to adjust the generated code than to write it all from scratch. More generally, it's good for generating responses whose content and structure are easy to verify (like a question you already know the answer to), with the value being in the time saved rather than the content itself.

[–] [email protected] 2 points 10 months ago (1 children)

O notation has a precise definition. A function f : N -> R+ is said to be O(g(x)) (for some g : N -> R) if there exists a constant c so that f(n) <= cg(n) for all sufficiently large n. If f is bounded, then f is O(1).

view more: ‹ prev next ›