2MB for a standalone “Hello World” binary in C# is a similar size to one in Go. Do both languages produce similar-sized binaries for larger projects as well? If so, would C# be a good choice for writing cross-platform command-line applications? It seems that C# can produce easily-distributable binaries, while also hitting a sweet-spot in language design - not super complex like C++ or Rust, and also not overly simpli…
Aside from syntax preferences, why and when would one choose Go over C#?
.NET 8 Standalone 50% Smaller On Linux
171–179 of 179 posts
Re: .NET 8 Standalone 50% Smaller On Linux
#172Earlier quoted context omitted.
Jellyfin is great for movies & shows. As an anecdote, it's not so good for music if you're a collector. I personally use Navidrome for that[0]. Anyway, Sonarr[1] makes use of .NET, too. Very reliable software, in my experience. [0]: https://github.com/navidrome/navidrome [1]: https://github.com/Sonarr/Sonarr
I am a music collector and I don't see a problem with Jelly, apart from android app pausing after first song. It recognized my Musicbrainz filled library immediately without any problem, it was 0 effort to have it fully available on the web with multiple accounts.
Re: .NET 8 Standalone 50% Smaller On Linux
#173Earlier quoted context omitted.
Calling ServiceStack OSS is disingenuous since it comes with quite a heavy price tag for commercial use.
Not back in the day. IIRC it was mostly FOSS and the author gradually shifted to a more commercial model when MS waltzed all over it with ASP.NET Web API. I’m quite impressed he made it through actually, and I can’t fault someone for going full commercial when a giant moloch whose ecosystem you’re supporting pulls the rug under you like that.
That said, ServiceStack has transitioned to payware a long, long time ago and I'm pretty sure that is what's caused its demise, not ASP.NET Web API. As a single anecdotal data point, it's definitely the reason I'm not using it.
Re: .NET 8 Standalone 50% Smaller On Linux
#174Earlier quoted context omitted.
From my experience golang uses less memory than a .net app. I haven’t done a recent comparison so if someone had tested this lately and has different results I’d love to see it.
When C# is AOT compiled, the memory footprint is roughly the same.
I'm very curious to see how they managed to pull this off since from my knowledge of the development patterns, .net has historically been much more allocation-heavy (not that it isn't very efficient with allocated data).
Re: .NET 8 Standalone 50% Smaller On Linux
#175Earlier quoted context omitted.
From my experience golang uses less memory than a .net app. I haven’t done a recent comparison so if someone had tested this lately and has different results I’d love to see it.
When C# is AOT compiled, the memory footprint is roughly the same.
I was looking for similar benchmarks but couldn't find anything conclusive. I found the benchmark game [1] but only had .net 7 AoT (not .net 8) benchmarks and memory consumption seems too high.
I'd ditch golang on a pinch as soon as I can use a decent type system, and C# seems like a great alternative.
Crystal would be my ideal but its compiler is still too slow, sadly.
[1] https://programming-language-benchmarks.vercel.app/csharp-vs...
Re: .NET 8 Standalone 50% Smaller On Linux
#176They also added a TimeProvider to help with testing time objects. Maybe one day we will also get an FileSystemProvider.. TimeProviderFake: https://learn.microsoft.com/en-us/dotnet/api/microsoft.exten... ReleaseNotes: https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotn...
> Maybe one day we will also get an FileSystemProvider. Until then you can use System.IO.Abstraction[1] if you aren't already :) [1] https://github.com/TestableIO/System.IO.Abstractions
Re: .NET 8 Standalone 50% Smaller On Linux
#177Everything dotnet is doing for cross-platform is great and better than alternatives --- except one HUGE issue: There is no official GUI on Linux. Linux's exclusion from MAUI (while 25% of world's developers' primary dev machine is a Linux system according to Stack overflow survery) creates a huge hurdle for those developing on Linux to build any cross platform GUI app with dotnet. If I , as a developer developing a w…
There's no "official GUI" (w/e that means) on Linux for anything though, so it makes sense. Avalonia exists, and from the looks of it is better than all the crap MS has put out over the years (even on Windows, don't get me started on WPF shutters ) so not using it because its not "official" is silly.
Re: .NET 8 Standalone 50% Smaller On Linux
#178Everything dotnet is doing for cross-platform is great and better than alternatives --- except one HUGE issue: There is no official GUI on Linux. Linux's exclusion from MAUI (while 25% of world's developers' primary dev machine is a Linux system according to Stack overflow survery) creates a huge hurdle for those developing on Linux to build any cross platform GUI app with dotnet. If I , as a developer developing a w…
One way to look at it is MAUI isn't more official than Avalonia or Uno, it just happens to be primarily driven by dedicated team from Microsoft. However, it does not mean that Avalonia or Uno are inferior due to just this fact. EF Core in that regard is very similar - you can easily use Dapper instead because it builds on the same primitives from System.Data. Neither MAUI nor other UI frameworks have access to intern…
Re: .NET 8 Standalone 50% Smaller On Linux
#179Earlier quoted context omitted.
One way to look at it is MAUI isn't more official than Avalonia or Uno, it just happens to be primarily driven by dedicated team from Microsoft. However, it does not mean that Avalonia or Uno are inferior due to just this fact. EF Core in that regard is very similar - you can easily use Dapper instead because it builds on the same primitives from System.Data. Neither MAUI nor other UI frameworks have access to intern…
The issue is not the quality of Avalonia/Uno. They are wonderful. The issue is not availability of third-party toolkits -- they are there. The core issue is being psychologically assured that the first party is interested in supporting my platform with its programming languages and libraries. If MS can support Mac, ios, and Android -- what exactly prevented it from supporting Linux ?? This conspicuous lack of support…
The reason why Avalonia and Uno have support for Linux but not MAUI is purely technical one - Avalonia and Uno draw their controls by themselves, like with Skia(sharp). MAUI tries to be a successor to Xamarin and uses native controls drawn by the host instead. Naturally, this has always been a problem on Linux and supporting it is non trivial (what do you choose? Attempt to make it work with Qt, GTK, something else entirely? what about X.Org vs Wayland?). Realistically, supporting mobile platforms first alongside Windows and macOS is much more important and is a far better investment of effort (how many users are there with desktops/laptops on Linux vs macOS/Windows) and there are only so many people working on this. It is perfectly fine for GUI frameworks to take different approaches and pursue different goals, where Linux systems are much better served by Avalonia.