Earlier quoted context omitted.
The entirety of https://github.com/dotnet/dotnet (which is a VMR for full-source build of Roslyn, runtime and everything else that goes into runtime-only and SDK packages) is MIT, which is as permissive as it gets, save for CC0 or Unlicense. Quick search shows that SDK and runtime packages are available in the official feeds for Archlinux: https://archlinux.org/packages/?sort=&q=dotnet Fedora: https://packages.fedora…
> I always wondered what is the motivation This is the motivation ↓ apt install dotnet-sdk-8.0 Error: Unable to locate package dotnet-sdk-8.0 Error: Couldn't find any package by glob 'dotnet-sdk-8.0'
Official proposal for Type Unions in C#
291–300 of 315 posts
Re: Official proposal for Type Unions in C#
#292Huh, I did F# for years with discriminated unions, and I guess I just assumed C# would have had them by now. I know not everyone likes them, but for typed languages I find it extremely hard to go back to languages without ADTs of some kind. I do Java for my current job, and Java is generally fine enough, but it's a little annoying when I have to do whacky workarounds with wrapper classes to get something that would b…
Re: Official proposal for Type Unions in C#
#293Earlier quoted context omitted.
Typescript is pretty competitive with C# on those factors in my experience. What do you find yourself missing there?
The types are more expressive but it’s a weak type system under the hood (JS). The ecosystem is full of dependency hell and bloat. You’re also even further removed from the metal than what C# provides for.
Re: Official proposal for Type Unions in C#
#294Earlier quoted context omitted.
A very common modern setup is PostgreSQL, C#/.NET, Linux & using JetBrains Rider for the IDE. You don't have to go all in Microsoft to use C#, F# or .NET. Also .NET has been about "run everywhere on any platform" as their tagline for quite a few years now. They have had plenty of community fumbles without question. I can't speak to those though. I've seen lots of vocal high up Microsoft employees try to win those fig…
A very common modern setup is PostgreSQL, C#/.NET, Linux & using JetBrains Rider for the IDE You just described the startup I'm at. All devs are on Arm64 MacBooks and we deploy to Arm64 AWS T4g Linux instances. I'm all VS Code, others are primarily Rider. .NET is a highly underrated platform for backend; it always puzzles me when teams think about moving from TypeScript to Rust or Go instead of C# because it seems a…
Re: Official proposal for Type Unions in C#
#295Earlier quoted context omitted.
> I always wondered what is the motivation This is the motivation ↓ apt install dotnet-sdk-8.0 Error: Unable to locate package dotnet-sdk-8.0 Error: Couldn't find any package by glob 'dotnet-sdk-8.0'
A lot of otherwise excellent software is not present in, for example, official Debian feeds. As a sibling comment pointed out, that’s no reason to throw a tantrum and is a trivially solvable issue.
Re: Official proposal for Type Unions in C#
#296Every time the question of preferred programming languages comes up, I'm usually in the extreme minority with my preferences being Rust (for small/fast) and C# (for productive and easy, where GC is acceptable), a combination that doesn't seem to appeal to too many people. But for the projects that fall right about in the middle where it could go either way and I could see either language working, I almost always pick…
I've been writing C, C++, C# and some js/sql/ts/python for money. Lua for lulz. And *nothing* gets even fucking close in terms of productivity to C#. Great language, mature and robust ecosystem with sane compilation times and great tooling: package manager, test runner, strong debugger, one CLI with almost all tools needed. I wish C++ was half as enjoyable as C# is.
Most of those products have the words "Visual" and "Studio" in the name.
Atmel Studio can come too.
Re: Official proposal for Type Unions in C#
#297Earlier quoted context omitted.
I feel the same about Scala. I use Scala3 daily and almost every other language is such a step back. I have looked at F# and it looks like one of the only other languages I would enjoy as much as Scala. Haskell is nice too, but the ecosystem is just not quite there. F# being able to tap into the rich C# ecosystem and Scala being able to tap into the Java ecosystem is such a win and makes them feel a lot less niche wh…
When I have to use Scala, I am always confused by the amount of magic that is happening behind the scenes. It's so much magic that even the best IDEs become confused with me. C# is smarter in that regard: 99% of useful syntax is method calls, and typing the dot doesn't drown you in overly generic suggestions. From what I've seen, Scala3 is better in this regard (at least the magic part), but I since Spark doesn't sup…
Thing is the community doesn't reach that often to them.
Re: Official proposal for Type Unions in C#
#298Earlier quoted context omitted.
A lot of otherwise excellent software is not present in, for example, official Debian feeds. As a sibling comment pointed out, that’s no reason to throw a tantrum and is a trivially solvable issue.
Lol trivially… unless you want to distribute your software that is.
JIT: dotnet publish -p:PublishSingleFile=true -p:PublishTrimmed=true
AOT: dotnet publish -p:PublishAot=true -p:OptimizationPreference=Speed*
Use -o to specify destination.
By default targets the host's OS RID, but can be overriden with e.g. `-r linux-musl-arm64`. Cross-architecture compilation is supported within OS, and there is a nuget package that switches the publish to Zig toolchain to allow publishing for Linux under Windows without relying on WSL2: https://www.nuget.org/packages/PublishAotCross This only concerns AOT as .NET uses the same linker to produce the final binary as your regular C/C++ code. It is a true native executable through and through that is understood by all standard tooling like native code profilers. For JIT binaries, anything that .NET supports can be published for under any other OS and ISA.
* my recommendation as the size impact is negligible but codegen quality in edge cases improves quite a bit. Other flags that may be useful are -p:IlcInstructionSet=x86-x64-v3 (AVX2 and friends) and -p:IlcFoldIdenticalMethodBodies=true (it's disabled by default because it can mess up stack traces, naturally, in .NET 9, disabling stack trace information enables it as well).
Re: Official proposal for Type Unions in C#
#299Earlier quoted context omitted.
Lol trivially… unless you want to distribute your software that is.
You can make a single file executable that does not require any dependencies with just the following. No runtime is required on the host, which I assume you allude to as lacking necessary package in the official feed might cause issues if it's required (and given it's present in everything that is not Debian, it is a Debian issue and something Debian must address). JIT: dotnet publish -p:PublishSingleFile=true -p:Pub…
Which is not distribution friendly. Thanks for finally understanding you were wrong all along.
Re: Official proposal for Type Unions in C#
#300Earlier quoted context omitted.
All this means is Pop OS doesn’t have it published. You don’t have to throw a piss because MS doesn’t publish it for Pop https://github.com/dotnet/core/blob/main/linux.md#packages
I use regular proper debian. The fact that it's not there (and it can't be there) was exactly my point. I use toilets normally. I don't throw excrements.
literally first link under "dotnet debian" is:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-...
__________
wget https://packages.microsoft.com/config/debian/12/packages-mic... -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update && sudo apt-get install -y dotnet-sdk-8.0