Live data from Hacker News

.NET 6 is now in Ubuntu 22.04

devblogs.microsoft.com

211–220 of 351 posts

Re: .NET 6 is now in Ubuntu 22.04

#211
post #155

Earlier quoted context omitted.

C# is such a cozy language, anyone familiar with C++ or Java can instantly bang out half-decent code, and there's a ton of great features to gradually learn and use. And the performance is about as good as it gets for a language with garbage collection. Big fan.

And ASP.Net Core is an insanely fast web framework. It beats every other major framework written in a managed language by a mile. There's no way your backend will outgrow it if your workload isn't RAM-limited.

> And ASP.Net Core is an insanely fast web framework. It beats every other major framework written in a managed language by a mile*

* In synthetic benchmarks

Re: .NET 6 is now in Ubuntu 22.04

#213
post #89

Earlier quoted context omitted.

I knew there'd be at least one of you guys in this thread.

There always is. 1) Don't trust Go because of Google 2) Don't trust C#,F# because M$ (yes with dollar sign) 3) Don't trust Java because Oracle 4) You gotta use XXX tech, which has no jobs in your area Yada Yada... yet is probably using VSCode or GitHub. Just ignore it.

5) You gotta use unstable alpha because decades-in-production tools are obviously oldschool and thus slow

Re: .NET 6 is now in Ubuntu 22.04

#214
post #93

Earlier quoted context omitted.

Any interest in doing a short comparison? As in, why are you in no rush to switch back to rails? Any features you miss from rails? (edit: register beat me to it. I'll leave my post as a +1)

For the most part, I think there is a lot of feature parity between the .NET and Ruby on Rails frameworks when it comes to developer tooling. As I grow older I guess I am growing more fond of statically typed languages. It's easier for my decaying/distracted brain to reason about. There is less mental overhead I suppose [might be a good blog post?] They both have a good database migration system and various generator…

I would advise against Blazor Server. In contrast to standard frontend SPA frameworks, Blazor Server requires a peristent websocket connection to each client to execute the C# code you write on the client and maintain state. I found that connection is easily/fequently disrupted resulting in an app reset, lost state, and poor user experience, to say nothing of the scalability implications.

Though, for a purely back-office app with minimal state, that might be OK

Re: .NET 6 is now in Ubuntu 22.04

#215

I wonder if this opens the door for .NET applications to be included in Ubuntu? Neither this blog post nor Ubuntu’s [1] mention that as a possibility. Just thinking from a Ubuntu package level, where libraries live in packages separate from executables, it might be possible to create library packages using the result of ‘dotnet store’. Then executable packages could reference them when running ‘dotnet publish’. [2] T…

I don’t think it would be wise for apt to repackage or recreate Nuget functionality. The initial install of dotnet should be done by apt, the packages should be handled by Nuget.

If you want to package an application which depends on a library, you have to package the library, too. This is the (pretty much sole) reason that distros package libraries.

From a technical perspective it's pretty much a solved problem for any language ecosystem whose dependency management is reproducible, is uniform enough to support basic automation, and supports some measure of vendorization.

Re: .NET 6 is now in Ubuntu 22.04

#216
post #50

For reasons currently unclear to me, installing this seems to cause apt to remove Discord. The following packages have unmet dependencies. libc++1-14 : Depends: libunwind-14 (>= 1:14.0.0) but it is not installable libc++abi1-14 : Depends: libunwind-14 (>= 1:14.0.0) but it is not installable E: Unable to correct problems, you have held broken packages.

Ubuntu's .NET runtime relies on libunwind v13. Discord relies on libunwind v14. apt only allows one version of something to installed at once.

This is not generally the case: "apt only allows one version of something to installed at once" - apt and dpkg always supported having different major versions of a shared library installed concurrently.

See eg https://www.debian.org/doc//debian-policy/ch-sharedlibs.html which says

> The run-time shared library must be placed in a package whose name changes whenever the SONAME of the shared library changes. This allows several versions of the shared library to be installed at the same time, allowing installation of the new version of the shared library without immediately breaking binaries that depend on the old version.

In this libunwind case the situation is more complicated, the its different versions have conflicting subdependencies.

Re: .NET 6 is now in Ubuntu 22.04

#217

Earlier quoted context omitted.

Christ, the mess that are the docs. And the complexity. Just lost well over an hour trying to get a non-trivial regex working (that would have taken me 30 secs in emacs). Gave up and just used split() and it just worked. Never again, I swear.

What was the problem -- the regex pattern, or some API?

Capture pattern [edit: I meant capture brackets] extraction. Could get one of them (?!) or nothing at all, but... never again. MS doc examples = no success, not SO, not various blogs.

Re: .NET 6 is now in Ubuntu 22.04

#218

Earlier quoted context omitted.

Christ, the mess that are the docs. And the complexity. Just lost well over an hour trying to get a non-trivial regex working (that would have taken me 30 secs in emacs). Gave up and just used split() and it just worked. Never again, I swear.

Might want to check out RegexStorm [1]. It's a .NET regex tester in your browser. Yeah the docs are great but there's nothing like instant feedback to test your regex. [1] http://regexstorm.net/tester

Thanks but regexes I know pretty well, the regex object docs just were horrible.

Re: .NET 6 is now in Ubuntu 22.04

#219

A fully devoted Linux developer here that never touched Windows' ecosystem(.NET, Visual C++, win32 api, all those), any reason for me to jump on .NET? where does this runtime run(x86/windows, now linux, what about MacOS, and embedded systems), and what's the selling point(web framework in c++ like language? a better c++/java?) https://learnxinyminutes.com/docs/csharp/ it looks more like Java than c++ to me. On a diff…

I think C#/.NET has more performance-oriented affordances than Java:

- It supports structs, and unboxable structs called "ref structs". They let you to avoid GC/heap-alloc for small data structures with clear ownership semantics.

- It uses type reification for generics instead of type erasure. Combined with value-types, this can produce very optimized code. The downside is larger binary sizes.

- It allows unsafe programming with pointer arithmetic where performance is truly critical. This is where C# is closer to C/C++ than Java.

- Supports native compilation to a target architecture. This lets you avoid JIT overhead and lets you ship self-contained binaries (like Go).

- .NET supports source generators which can let you keep maintainable code and generate an optimized one.

Performance aside, C# is a very pleasant language to use, and .NET is a delightful runtime. I'd say give it a try and see it for yourself.

Re: .NET 6 is now in Ubuntu 22.04

#220

Earlier quoted context omitted.

> which is technically possible to implement, but the team has not gotten around to implementing it for years. My understanding is that they did in fact implement it, but then ripped that code out before the release.

I believe that issue was about "dotnet watch", which reruns the compilation when a file change is detected. EnC/Hot Reload sends new bytecode to a running process and updates classes/methods in memory. EnC has been missing from non-Windows platforms from the start. An IDE like Rider can't implement Hot Reload without support from the runtime.

Just skimming the diff it looks like it was proper hot reloading.

https://github.com/dotnet/sdk/pull/22262/files

Post reply on HN