.NET Runtime
CoreCLR
.NET Runtime | CoreCLR | |
---|---|---|
659 | 22 | |
15,253 | 12,786 | |
1.6% | - | |
10.0 | 0.0 | |
6 days ago | almost 2 years ago | |
C# | ||
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
.NET Runtime
- Ask HN: Has Anyone Tried Single File Development with IDE Code Collapse?
-
A comparison of Rust's borrow checker to the one in C#
"Vanilla" .NET runs on
Operating Systems: Linux, macOS, Windows, FreeBSD, iOS, Android, Browser
Architectures: x86, x86_64, ARMv6, ARMv7, ARMv8/ARM64, s390x, WASM
Notes:
Mono as referred here means https://github.com/dotnet/runtime/tree/main/src/mono which is an actively maintained runtime flavor, alongside CoreCLR.
- application development targets on iOS and Android use Mono (the one that lives in dotnet/runtime). Android can be targeted as linux-bionic with regular CoreCLR, but it's pretty niche. iOS has experimental NativeAOT support but nothing set in stone yet, there are similar plans for Android too.
- ARMv6 requires building runtime with Mono target. Bulding runtime is actually quite easy compared to other projects of similar size. There are community-published docker images for .NET 7 but I haven't seen any for .NET 8.
- WASM also uses Mono for the time being. There is a NativeAOT-LLVM experiment which promises significant bundle size and performance improvements
- For all the FreeBSD slander, .NET does a decent job in supporting it - it is listed in all sorts of OS enums, dotnet/runtime actively accepts patches to improve its support and there are contributions and considerations to ensure it does not break. It is present in https://www.freshports.org/lang/dotnet
At the end of the day, I can run .NET on my router with OpenWRT or Raspberry Pi4 and all the laptops and desktops. This is already quite a good level given it's completely self-contained platform. It takes a lot of engineering effort to support everything.
-
Should JavaScript be split into two languages? Google proposal divides opinion
Garbage collection is solved to the extent that host garbage collection is now available via WasmGC:
https://developer.chrome.com/blog/wasmgc/
https://v8.dev/blog/wasm-gc-porting
But languages like C# want more features in WasmGC:
https://github.com/dotnet/runtime/issues/94420
No direct DOM access yet. You still have to use JavaScript glue code to get at the DOM.
-
A review after using Rust on embedded in production for over a year
This was recently discussed: https://news.ycombinator.com/item?id=41801124
While it is true that Rust is a strictly superior option for highly concurrent systems code, it still leaves areas where you can make a mistake regarding lock management and other advanced forms of synchronization.
In addition to that, .NET as platform is fairly tolerant to misuse and calling the code that is not thread-safe from multiple threads concurrently usually leads to logic bugs or "stop modifying this collection concurrently, please" exceptions but not to catastrophic memory safety issues like it happens in C/C++.
You can read more on its low-level memory model here: https://github.com/dotnet/runtime/blob/main/docs/design/spec...
> The same is true for async, which in C# is also a problem.
Now, this one is strictly not true. Async primitives are thread-safe. In Rust, you must synchronize because at the very least you must deterministically deallocate memory used by shared state between the tasks. In C#, this complexity is handled for you by a GC (ironically, you get negative sentiment towards async from people having experienced Python's async or Rust's async complexity, assuming the same applies to C#). In some scenarios, it is also a throughput optimization since it reduces memory contention and cacheline sharing between the cores, lending itself into better performance on many-core systems - the memory is modified/reclaimed when it's no longer in use, while the actively shared data is placed elsewhere.
-
My negative views on Rust (2023)
> RISC-V
The work is underway: https://github.com/dotnet/runtime/pulls?q=label%3Aarch-riscv
> PTX
https://ilgpu.net/ and even https://github.com/m4rs-mt/ILGPU/blob/c3af8f368445d8e6443f36...
While not PTX, there's also this project: https://github.com/Sergio0694/ComputeSharp which partially overlaps with what ILGPU offers
Arguably, even C++ itself - you are not using "full" C++ but a special subset that works on top of specific abstraction to compile to GPUs, and I was told that CUDA C++ is considered legacy.
The original context of discussion is performance and perceived issue of "having runtime", which is what my reply is targeted at. In that context, C# provides you the tools and a solution other languages in the class of Java, Go, TS and anything else interpreted just don't have. So you could reasonably replace a project written in C++ with C#, and possibly re-apply all the freed-up developer productivity into further optimizations, but you wouldn't be able to do so with the same degree of confidence with most other originally high-level languages. Another upcoming contender is Swift.
-
What's New in Ruby on Rails 8
Ruby does nail the minimalism in this code golfing example, but it does not offers uniquely high productivity to the end user, which is a frequently brought up point in defense of interpreted languages whenever their shortcomings are mentioned. Lacking static typing, Ruby users have to resort on e.g. Sorbet, which is a worse experience and numerous comments on HN seem to provide negative feedback on it.
I do actually hate to mention performance every time, but it's difficult to not do so when apples-to-apples comparison can be made. Compiled statically typed languages with GC offer similar or better (because the code is verified by compiler, not Sorbet) productivity without any of the drawbacks that come with Ruby.
This is to illustrate the point about the languages that do come with rich standard library, that also happen to go to great lengths at ensuring that shortest way to express something is also the fastest whenever possible.
[0]: https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...
-
Ruby-SAML pwned by XML signature wrapping attacks
GetElementId makes sure its a NCName and makes sure its unique regardless, you can view the source here: https://github.com/dotnet/runtime/blob/c4d7f7c6f2e2f34f07e64...
- Swift 6
- Ergo: Erlang-inspired event driven actor framework in Go
-
Sisk – Lightweight .NET Web Framework
It appears to use Socket and SslStream. Can't say much about HttpListener itself, but the first two are used by Kestrel (and everything else). There is Http.sys integration for Windows though.
https://github.com/dotnet/runtime/blob/ac663e44b907618c631ed...
CoreCLR
-
The Performance Impact of C++'s `final` Keyword
Yes, that is true. I'm not sure about JVM implementation details but the reason the comment says "virtual and interface" calls is to outline the difference. Virtual calls in .NET are sufficiently close[0] to virtual calls in C++. Interface calls, however, are coded differently[1].
Also you are correct - virtual calls are not terribly expensive, but they encroach on ever limited* CPU resources like indirect jump and load predictors and, as noted in parent comments, block inlining, which is highly undesirable for small and frequently called methods, particularly when they are in a loop.
* through great effort of our industry to take back whatever performance wins each generation brings with even more abstractions that fail to improve our productivity
[0] https://github.com/dotnet/coreclr/blob/4895a06c/src/vm/amd64...
[1] https://github.com/dotnet/runtime/blob/main/docs/design/core... (mind you, the text was initially written 18 ago, wow)
- How are stack machines optimized?
-
Best .net/c# resources for senior engineer
Sort of, some topic are not relevant anymore, consider this - https://github.com/dotnet/coreclr/tree/master/Documentation/botr
-
Is there a C# under the hood tutorial?
Fairly advanced stuff but the Book Of The Runtime (BOTR) it's a invaluable resource
-
In depth learning of C#?
After that you can check out the The Book of the Runtime, which is the CoreCLR version of the previous book.
-
.NET 6 is now in Ubuntu 22.04
Technically the restrictions already exist, just as a part of the development experience.
- .NET Hot Reload is only implemented on Windows. It requires support in the .NET runtime, which is technically possible to implement, but the team has not gotten around to implementing it for years. This doesn't have to do with the issue around MS removing the "dotnet watch" command, it's for the "Edit and Continue" feature in IDEs.[1][2]
- MS was considering deprecating Omnisharp, the open-source language server that implements C# support for VS Code, and replacing it with a closed-source version. Since the announcement, commits to omnisharp-vscode have dropped off significantly. The lack of Omnisharp would mean there would be no real open-source C# development environment for Linux anymore, since MonoDevelop was abandoned a few years ago. [3]
[1] https://youtrack.jetbrains.com/issue/RIDER-31366/EditContinu...
[2] https://github.com/dotnet/coreclr/issues/23685
[3] https://github.com/omnisharp/omnisharp-vscode/issues/5276
-
what a .NET specialist should know
The next step is to realize everything you think you know about .NET is just an abstraction. Next step is to learn about what is going on behind all that syntax sugar and facades. 1st step might be https://github.com/dotnet/coreclr/tree/master/Documentation/botr then go down the rabbit hole and have fun
- Trouble with random numbers
-
Is CLR via C# still good?
Book of the Runtime
-
Understanding dotnet
As for the books, back in the days I really enjoyed reading “CLR via C#" by Jeffrey Richter which helped a lot to understand what is under the hood. Other from that, try The Book of the Runtime
What are some alternatives?
Ryujinx - Experimental Nintendo Switch Emulator written in C#
sdk - Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
ASP.NET Core - ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
Introducing .NET Multi-platform App UI (MAUI) - .NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
WPF - WPF is a .NET Core UI framework for building Windows desktop applications.
WASI - WebAssembly System Interface
referencesource - Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework
vgpu_unlock - Unlock vGPU functionality for consumer grade GPUs.
AspNetCore-Developer-Roadmap - Roadmap to becoming an ASP.NET Core developer in 2024
runtimelab - This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
NumberSearch - Line of business tooling for VOIP services.