.NET Runtime
sdk
.NET Runtime | sdk | |
---|---|---|
659 | 117 | |
15,219 | 2,713 | |
1.4% | 1.3% | |
10.0 | 10.0 | |
6 days ago | about 1 hour ago | |
C# | C# | |
MIT License | 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...
sdk
-
Ask HN: Why is .NET never talked about as an option for solo/small team dev?
It's not about being "cool"
It's about the motives
"it's open source"
"it now works on linux"
it all doesn't matter if they'll go after your ass if you dare build tooling with their debugger (jetbrains)
of when they want to remove a feature overnight to make it exclusive to visual studio windows
https://github.com/dotnet/sdk/issues/22247
it's this kind of things that makes it hard to recommend to people, and Microsoft can't be trusted
-
Microsoft donates the Mono Project to the Wine team
I hate to defend telemetry of all things but in this particular case the criticism is unfounded and lacks context:
https://dotnet.microsoft.com/en-us/platform/telemetry
https://learn.microsoft.com/en-us/dotnet/core/tools/telemetr...
https://github.com/dotnet/sdk/tree/main/src/Cli/dotnet/Telem...
In any case, Debian would use https://github.com/dotnet/source-build and dotnet/dotnet, and could easily include the argument or a patch for this. It’s unlikely to be an issue. My bet it was not in Debian because there was no one to take initiative or there was but that person has faced a backlash by people in Debian who are similar to vocal minority here that posts FUD because of their little personal crusade.
-
Go 1.23 Released
FWIW telemetry can be easily opted-out, which the SDK explicitly tells you about, and there is a page that has full list of the kind of data that is collected (usage metrics and tooling crash stack traces). You can also review the metrics yourself.
About: https://learn.microsoft.com/en-us/dotnet/core/tools/telemetr...
Collected statistics: https://dotnet.microsoft.com/en-us/platform/telemetry
Source code: https://github.com/dotnet/sdk/tree/main/src/Cli/dotnet/Telem...
In either case, many CIs simply have 'DOTNET_CLI_TELEMETRY_OPTOUT=' and call it a day.
-
Microsoft blocks Windows 11 workaround that enabled local accounts
They used to gather all command line arguments until they later decided that (oops!) it's "not acceptable per our privacy policies"[0] and they really shouldn't have been doing that. They have also had issues with anonymization not being implemented properly, the opt-out mechanism not working in some edge cases, forgetting to even tell users about the need to opt out, and who knows what else.
Also, monetary value is not the only reason you might want to keep information private.
[0] https://github.com/dotnet/sdk/issues/6145#issuecomment-22010...
-
Programmatically elevate a .NET application on any platform
[DllImport("libc")] private static extern uint geteuid(); public bool IsCurrentProcessElevated() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // https://github.com/dotnet/sdk/blob/v6.0.100/src/Cli/dotnet/Installer/Windows/WindowsUtils.cs#L38 using var identity = WindowsIdentity.GetCurrent(); var principal = new WindowsPrincipal(identity); return principal.IsInRole(WindowsBuiltInRole.Administrator); } // https://github.com/dotnet/maintenance-packages/blob/62823150914410d43a3fd9de246d882f2a21d5ef/src/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs#L58 // 0 is the ID of the root user return geteuid() == 0; }
-
Swift was always going to be part of the OS
> There's definitely things they tried to improve on that... weren't really improvements. The way "assemblies" are matched in .NET is much more sophisticated- the goal there was to try to kill DLL hell. It evolved into the Global Assembly Cache, which is sort of the Windows Registry of DLLs. Not a huge fan of those bits.
The Global Assembly Cache did not make the jump to the modern .NET (Core). There was the thing called `dotnet store`, but it’s broken since .NET 6: https://github.com/dotnet/sdk/issues/24752
The assembly redirection hell has also been greatly reduced there.
-
.NET Blazor
I do the same.
I have a small write-up here: https://chrlschn.dev/blog/2023/10/end-to-end-type-safety-wit...
You get end-to-end type safety (even better once you connect it to EF Core since you get it all ways to your DB).
With this setup with hot-reload (currently broken in .NET 8 [0]), productivity is really, really good. Like tRPC but with one of the most powerful ORMs out there right now.
[0] https://github.com/dotnet/sdk/issues/36918
-
Why does dotnet cli not support updating sdk's?
Noticed an open issue just now.
-
.NET 8 – .NET Blog
You're thinking of https://github.com/dotnet/sdk/issues/22247
-
LÖVE: a framework to make 2D games in Lua
That's a twisted and wrong narrative
Unity like refers to a Editor driven approach
Unity became popular with its moonscript language (javascript like), they then ditched it to focus on C#, but what propelled unity to what it is today is the Editor driven approach, not c#, not DOTS
They are forced to transpile C# to C++ via IL2CPP as a result to target consoles/mobiles
C# is a disease when it comes to console/mobile support
It's a substantial dependency, quite heavy
And you are not free of unity like fuck ups, it's a microsoft language after all:
https://github.com/dotnet/sdk/issues/22247
And let's not forget when they changed the license of their debugger overnight to prevent people from using it in their products (jetbrains for example)
And them deprecating open source tooling to a proprietary/closed one for vscode (c# devkit)
Let's be careful when we recommend evil as an alternative to evil ;)
What are some alternatives?
Ryujinx - Experimental Nintendo Switch Emulator written in C#
kdmapper - KDMapper is a simple tool that exploits iqvw64e.sys Intel driver to manually map non-signed drivers in memory
ASP.NET Core - ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
MQTTnet - MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
CoreCLR - CoreCLR is the runtime for .NET Core. It includes the garbage collector, JIT compiler, primitive data types and low-level classes.
vscodium - binary releases of VS Code without MS branding/telemetry/licensing
WASI - WebAssembly System Interface
vgpu_unlock - Unlock vGPU functionality for consumer grade GPUs.
blockfrost-dotnet - .NET, C# and PowerShell SDK for Blockfrost.io API