I heard good things about .NET 6 and decided to give it another try

I heard good things about .NET 6 and decided to give it another try
Picrel is the result, it's a simple helloworld console application

>self-contained helloworld in go
elegant single 2MB portable file

>self-contained helloworld in dotnet
over 60MB directory with 228 files

what the actual fuck
it's literally just printing shit on the screen
Microsoft.VisualBasic.Core.dll?
System.Dynamic.Runtime.dll?
System.Net.WebSockets.dll?
Why are they bundling this shit by default?

Attached: fman_2022-08-17_14.23.59.png (848x977, 88.65K)

Other urls found in this thread:

docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained
github.com/dotnet/runtimelab/blob/feature/NativeAOT/samples/HelloWorld/README.md
github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/optimizing.md
twitter.com/SFWRedditImages

your using the world's oldest framework that has also been maintained by jeets for at least a decade. what else would you want expect? more abstraction equals more bloat.

.

Does go have any frontend library

OK, I found out there is a secret special option you have to enable to avoid bundling every fucking dll out there
docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained
now after publishing it's only 71 files to a total of 16MB, which still is ridiculous

how is that relevant

Attached: firefox_2022-08-17_15.11.37.png (920x707, 38.37K)

Everything made by m*crosoft is pure bloat

is this your idea of what makes a framework good? why don't you try using it for a real project

regardless, if you use nativeaot and turn on some more flags for it, your hello world becomes ~1MB.
github.com/dotnet/runtimelab/blob/feature/NativeAOT/samples/HelloWorld/README.md
github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/optimizing.md

ok
I can install 100k of those programs on my computer, doesn't seem like a huge deal to me

>is this your idea of what makes a framework good?
Ability to produce self-contained, portable, simple, compact binaries without bundling random unused dlls is one of the things that make a framework good, yes.
Especially in constantly changing framework like .net ability to produce a single binary that just works on its own forever without risk of dll hell.
I really want to like .NET because C# is probably the comfiest language out there but they still do some stuff like it's 2004.

Thanks for the links, looks promising but why it has to be so convoluted

Oh no! the default publish settings don't create a trimmed self contained binary!! Just create a trimmed native binary if you want to create CLI tools. Read the docs.

Did you turn off telemetry in dotnet compiler?

I've finally managed to make to single 12 MB binary with this config
Still not sure why it's not a default though

Attached: VSCodium_2022-08-17_17.11.53.png (512x273, 15.63K)

>Still not sure why it's not a default though
because you can accidentally trim some assembly that's required for your code to work, happens if you use reflection to get types and invoke methods dynamically in, trimmer won't know what assemblies are going to be loaded in that case

filtering threads by how many question marks would reduce spam threads like this from appearing. A threshold of greater than 2 would be a good starting point I think.

LMFAO this is hilarious. Just a few threads ago some C# faggot was bitching about some GC setting not being default in the JVM.

use .net4 and you will not have this problem

Actually you will.

N

they removed it and made it shit? last time i used c# it was just a single exe that weas really small

It's not a self contained .exe. You will need to install .NET on your target system.

true, so that mess of crap would be a "portable" runtime then

This is just a tradeoff for abstraction, nothing new here. Your comparison is not very relevant though

> echo 'int main(){printf("hello world\n");}' > c
> cc c -Os -o hw && strip hw
> elegant single 15K file

All of a sudden no one cares about your factor of 30 between go and dotnet

this 'bloat' is not a real cost for most people using dotnet.

Java doesn't have this problem

Attached: 1645739309605.png (1428x1459, 161.87K)

>Requires JVM to run
Bro

No it does not. It's a native image.

PUBLIC STATIC VOID MAIN(STRING[] ARGS) {SYSTEM.OUT.PRINTLN("HELLO WORLD!");}

Attached: shouting_indian.jpg (590x332, 13.41K)