Live data from Hacker News

.NET 8 Standalone 50% Smaller On Linux

learn.microsoft.com

151–160 of 179 posts

Re: .NET 8 Standalone 50% Smaller On Linux

#151

Earlier quoted context omitted.

There is no async coloring in Go. In the example you cited above, service.GetData can be a plain synchronous function in Go. You don't need to distinguish between sync/async as this is defined by the caller and not by the callee. Any function can be made asynchronous without changing its signature. That's one of the critical advantages of having first-class concurrency. There is no "function coloring". The simplicity…

Deferring to function coloring terms usually indicates a skill issue of not understanding that types are meant to represent what the code actually does. Task-returning method indicates an asynchronously produced (deferred/delayed) result, a promise. If a language hides this fact (that the returned value needs to be awaited), it is grossly misdesigned - at most it can offer not blocking a thread, completely missing th…

> Task-returning method indicates an asynchronously produced (deferred/delayed) result, a promise. If a language hides this fact (that the returned value needs to be awaited), it is grossly misdesigned ..

Very hard disagree. This depends on your computing philosophy. Go was designed based on the principles of CSP in mind and that code is produced by humans for humans first. The CSP architecture has proven to work and fit well for high-concurrent middleware. Not just for Go either.

You are not forced to block until goroutines finish as you claim. You can do other work or yield to the go scheduler. All the necessary busy work is taken care of by the runtime - which is terrific for folks who don't want to fiddle with low level details.

> On top of that, you always pay for concurrency in Go, even when you don't use it, it is by definition always "colored" which further contributes to the overhead.

And that is a completely fair compromise. Supporting easy concurrency natively in the runtime was an excellent design tradeoff since the computing world is moving to more and more cores. There are fewer and fewer uses for non-concurrent software.

> Also, in my example, the tasks will run in parallel. They won't in Go.

You appear to be confusing Go with NodeJS. If you have more than one core and GOMAXPROCS > 1, the tasks can indeed run in parallel.

Re: .NET 8 Standalone 50% Smaller On Linux

#152
post #147
post #143

Earlier quoted context omitted.

I regularly program in both Scala/Java and F#/C#. Interoperability in both is excellent. But I would not call it “trivial” in the Scala/Java case. Calling Scala code from Java is occasionally a pain (the converse is easy); however I don’t think I’ve ever had an issue calling F# code from C#. I think most of the friction wrt Scala lies in the fact that Scala reinvented the wheel in several places (eg collections; “ope…

Of course. But that isn’t the fault of the JVM or Oracle. That’s the language designers that made Scala. Look at Kotlins interop. It is rather seamless.

It kind of is because .NET CLI includes more stuff to facilitate the interop (eg. operator overloading, reified generics, value types). It limits your choices when implementing languages on top but it then makes it usable from different languages.

Re: .NET 8 Standalone 50% Smaller On Linux

#153

Earlier quoted context omitted.

Deferring to function coloring terms usually indicates a skill issue of not understanding that types are meant to represent what the code actually does. Task-returning method indicates an asynchronously produced (deferred/delayed) result, a promise. If a language hides this fact (that the returned value needs to be awaited), it is grossly misdesigned - at most it can offer not blocking a thread, completely missing th…

> Task-returning method indicates an asynchronously produced (deferred/delayed) result, a promise. If a language hides this fact (that the returned value needs to be awaited), it is grossly misdesigned .. Very hard disagree. This depends on your computing philosophy. Go was designed based on the principles of CSP in mind and that code is produced by humans for humans first. The CSP architecture has proven to work and…

> You appear to be confusing Go with NodeJS. If you have more than one core and GOMAXPROCS > 1, the tasks can indeed run in parallel.

What would the Go code look like that achieves identical behavior to the example above (tasks are dispatched concurrently and executed in parallel)?

Re: .NET 8 Standalone 50% Smaller On Linux

#154
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…

I believe they view the file order as a feature. It forces a certain style/thought process in how you design your project.

It's also part of the ocaml legacy (I believe file order matters in ocaml as well).

Re: .NET 8 Standalone 50% Smaller On Linux

#155
Everything 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 windows/mac/mobile app with official dotnet, am using Linux for development , I cannot create a GUI app. Hey dotnet folks! -- let me put a god damn button on the screen! Sincerely A Linux dev [Don't get at me with Avalonia/Uno etc. I am talking about "official" GUI. A graphical user interface is not a specialized domain, or some niche to be left for others to fill. It is a core element of a user facing app. ]

Re: .NET 8 Standalone 50% Smaller On Linux

#156

Everything 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…

If it’s any consolation, MAUI is often terrible in Windows and widely rejected.

Re: .NET 8 Standalone 50% Smaller On Linux

#157

Everything 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 internals of CoreLib or adjacent packages living in dotnet/runtime.

In fact, having multiple libraries solving a particular task is a sign of healthy ecosystem, too much centralization more often than not tends to be harmful.

Re: .NET 8 Standalone 50% Smaller On Linux

#158

Earlier quoted context omitted.

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…

Your example is not concurrency though, it’s parallelism. You’re consuming two different services at the same time and waiting for the result. What you would want to showcase is how you handle two different consumers calling a single service. The difference is rather important once you have many consumers calling a lot of services and your computation needs to be done on the right state.

As a side note I really don’t think C# does parallelism better than Java.

Re: .NET 8 Standalone 50% Smaller On Linux

#159

Earlier quoted context omitted.

I suppose it depends what you mean by linux, but if aws lambda on linux counts, then i work at a top 250 UK company who uses dotnet heavily for lambda workloads, especially async workloads. Its been great for us, no complaints. We likely would use it for our sync apis too if dotnet supported apollo federation v2, but sadly it does not.

Have you seen this? https://www.apollographql.com/blog/announcement/backend/anno...

I had not, this is great, thanks

Re: .NET 8 Standalone 50% Smaller On Linux

#160

Earlier quoted context omitted.

I have good and bad experience as well. I do have a prototype project, and while it allowed to get going quickly, I found the remote debugging story useless, as Visual Studio 2022 SSH support is a steaming pile of garbage. (Doesn't use the windows systemwise ssh install, but some crappy library that only supports password auth, or some wonkny certificate format, and outdated ciphers, which is understandably disabled,…

A decent setup of logging and metrics from UAT and prod environments seems to me a superior alternative to remote debugging.

Bit snarky PTSD induced rant: Thanks for the unsolicited advice on the situation you have nigh no context on.

A bit of context: I could put decent logging and metrics inside the buggy System.Data.SQLite library, to know why it fails to do its job in remote Linux machines... which would be quite and effort (Comparable to forking and fixing it, which might be the goal, but getting the info for the problem is rather an interactive problem. Even opening the database didn't work). Also Logging from inside libraries is... a bit divisive topic.

At our shop logging and metrics are not always the best answers, when *developing*, they are mostly useful for *operating* a solution.

Post reply on HN