Live data from Hacker News

.NET 8 Standalone 50% Smaller On Linux

learn.microsoft.com

111–120 of 179 posts

Re: .NET 8 Standalone 50% Smaller On Linux

#111

Earlier quoted context omitted.

I agree that many of MS’s “open source” libraries (eg EF, OData) are half-assed, badly run projects. I’m also still mad at them for competing against amazing stuff like ServiceStack (a real OSS project from the community, and the best way to run REST APIs I’ve ever seen) with “official” but worse stuff like ASP.NET Web API. They do this a lot, some OSS gets popular but instead of embracing it, they make a half-assed…

I think .NET-s unique strength comes from its batteries-included approach, very useful in enterprise environments where every piece of software needs to be audited. That means Microsoft strives to provide a first-party library for every business case. That said, you can still use ServiceStack and Newtonsoft.JSON if you wish to.

This is a great point actually. It's amazing how far you can get in a .NET project these days without a single third-party (Nuget) dependency.

Compared to my projects that (begrudgingly) use Node.js...

Re: .NET 8 Standalone 50% Smaller On Linux

#112

Who is using .NET on Linux? I'm interested to hear success stories. Sounds like a a great way to build and deploy applications.

I am. I've been developing with .NET since the start and my current workflow is really the smoothest and most productive (and most enjoyable!) I've ever had: I develop solely on Mac (JetBrains Rider), compiling/debugging Mac binaries locally - no containers - unless I need any external dependencies like eg. Postgres. On M1 MacBook Pro the experience is blazing fast - and Rider can be pretty heavy but Apple Silicon ea…

Same workflow here on Mac. Working with a few windows devs and don’t have any issues. We deploy into Microsoft .NET containers currently.

Side note, great website! It’s so rare to see such an aesthetically pleasing site on here! Do you happen to have any open source repos where you implement a lot of what you talk about? I’m interested to look under the hood at your code and your versioning system (I’m sure more, too, but I only spent 15 mins on your site so far)

Re: .NET 8 Standalone 50% Smaller On Linux

#113
post #75

Earlier quoted context omitted.

ngen had a lot of problems though. It was very easy to accidentally invalidate it. There was no easy reliable way to "ship" an ngen output. There was no easy way to even check if its even loading. your best option was to run ngen on the target machine, which is fine for services as a deployment step. But it's not like you could build and publish an AOT .NET cli for example.

I think not shipping ngen output was desired. There was an NGen Optimization Service that would reoptimize code when net framework was updated and possibly with new profiling data.

It is still there for those of us that have to deal with .NET Framework.

Re: .NET 8 Standalone 50% Smaller On Linux

#114
post #65
post #47

Earlier quoted context omitted.

> Because it’s a great language with amazing tooling. It’s fast, robust, easy to debug, easy to refactor, and so on. I agree but I also think the main issue with this is that you could've said it in reference to most programming languages in 2023. I'm sure people can have a lot of debate on that, but aside from the fast bit, most programming languages are frankly in excellent places today, and fast is sort of irrelev…

I was helping some friends with F# homework, and being a Rust programmer, I had to ask: your project file is XML, and the order you list the project files matter, and it won’t tell you that you listed them wrong? Compile errors are super long lines and don’t show an excerpt of the code with underline under what went wrong with suggestions on how to fix it? I know I’m asking a lot here, but that level is available wit…

You are touching upon some of the reasons why C# is unproductive for us. Because aside from when its "included batteries" decide to in-fight, there is also the parts where the "magic" breaks. This is more anecdotal, however, since it's going to depend a lot on who you and your team are. The guy I was discussing with made a point about C# being very easy to on-board new developers in, which is probably true for them. It has been the opposite experience for us. But I say this as someone who comes from a team where we have very good results on-boarding new developers into our Typescript environment, and I doubt you'll find many people saying that this is a common feat of the JavaScript language.

I didn't particularly mind the new way project files are made up in .NET. It used to be a lot worse too. But at the same time, it can be cumbersome as you point out here and for whatever reason, it's these small annoyances that so rarely get fixed by Microsoft allowing them to pile up. I mean, I just said it used to be worse, and it really did, but then when they made it better they didn't make it great. Which is something I'll just never understand, especially because they did it recently, so it's not like they couldn't have taken inspiration from other languages and done it right.

Re: .NET 8 Standalone 50% Smaller On Linux

#115
post #65

Earlier quoted context omitted.

I was helping some friends with F# homework, and being a Rust programmer, I had to ask: your project file is XML, and the order you list the project files matter, and it won’t tell you that you listed them wrong? Compile errors are super long lines and don’t show an excerpt of the code with underline under what went wrong with suggestions on how to fix it? I know I’m asking a lot here, but that level is available wit…

You do have some tooling support for ordering files in VS and VSCode using Ionide. It is also not always the case that there is a right way to order the files and checking all permutations would get expensive fast. Basically, in F# that is part of the design process and helps you a lot later since you can just read the code in a linear way the same way the compiler does and not miss anything. You do get the same info…

I’m not impressed by this design choice.

When order of declaration matters, it ceases to be declarative. “Let there be a function” is instead “make me a function”.

It’s entirely unnecessary, and even JavaScript can let you run a function that gets declared later.

The advantage when order does not matter inside the module is that you can list big things at the top of the file and the smaller things it’s made of below, rather than opposite.

The advantage when order does not matter outside the module system is that you can have mutually recursive modules.

Re: .NET 8 Standalone 50% Smaller On Linux

#116

Earlier quoted context omitted.

I wouldn't be surprised if reflection usage starts diminishing, with source generators solving a number of use-cases while maintaining AOT.

I think that is likely, though the current source generators are often a bit cumbersome to use. Though that is why they're adding interceptors, which while it is a bit of a controversial feature is kinda necessary to implement source generators without having an annoying API.

I looked into making a source generator over using reflection and quickly gave up on it. I swear it's easier to directly generate function implementations at runtime by emitting IL than to process the syntax tree.

Re: .NET 8 Standalone 50% Smaller On Linux

#117
post #114
post #65

Earlier quoted context omitted.

I was helping some friends with F# homework, and being a Rust programmer, I had to ask: your project file is XML, and the order you list the project files matter, and it won’t tell you that you listed them wrong? Compile errors are super long lines and don’t show an excerpt of the code with underline under what went wrong with suggestions on how to fix it? I know I’m asking a lot here, but that level is available wit…

You are touching upon some of the reasons why C# is unproductive for us. Because aside from when its "included batteries" decide to in-fight, there is also the parts where the "magic" breaks. This is more anecdotal, however, since it's going to depend a lot on who you and your team are. The guy I was discussing with made a point about C# being very easy to on-board new developers in, which is probably true for them.…

> it's not like they couldn't have taken inspiration from other languages and done it right

That’s literally it: they couldn’t.

It’s hard to duplicate good effort and make it profitable. So many people make either valuable or well-made things.

Re: .NET 8 Standalone 50% Smaller On Linux

#118

Earlier quoted context omitted.

I think .NET-s unique strength comes from its batteries-included approach, very useful in enterprise environments where every piece of software needs to be audited. That means Microsoft strives to provide a first-party library for every business case. That said, you can still use ServiceStack and Newtonsoft.JSON if you wish to.

This is a great point actually. It's amazing how far you can get in a .NET project these days without a single third-party (Nuget) dependency. Compared to my projects that (begrudgingly) use Node.js...

If you have done any Gov work, it is God given stack because audits are so much simpler.

Re: .NET 8 Standalone 50% Smaller On Linux

#119

Earlier quoted context omitted.

What does Go offer that C# does not? Both have actors, channels, threads, etc.

Do C# channels offer lightweight concurrency ? The defining feature of Go is only matched by Erlang/Elixir and now Java. AFAIK C# has nothing like it.

C# approach to concurrency has always been better since its introduction. It does have Channels which offer more focused pattern for SPSC, MPMC, etc. scenarios but neither Java nor Go offer a comparable level of ease of use as C#’s hot-started tasks:

    // The tasks will run in parallel
    var data = service.GetData(id);
    var user = service.GetUser(name);

    Handle(await data, await user);
Re: the above comment on switching to Go for concurrency - probably one of the most ill-informed things I have read in the last few days. Doing this borders on incompetence due to the lack of analysis of the utilized technology - Go's GC offers far worse throughput and its concurrency story at best is "on par" with C#.

Re: .NET 8 Standalone 50% Smaller On Linux

#120

Who is using .NET on Linux? I'm interested to hear success stories. Sounds like a a great way to build and deploy applications.

I've been deploying .NET web apps for years

The only problem I faced 5 years ago was that I didnt have some fonts installed for pdf generation.

Post reply on HN