News for hackers. Stuff that matters.
Re:IT Runs on Java 8 by btilly on Friday May 10, 2019 @05:13PM (#19882282)
.NET is tied to Microsoft, so I'd avoid it 100% of the time.

Yes, yes. I know that Microsoft theoretically open sourced and ported it. However the way that this always works is that there is a base that can be written in, but anything non-trivial will have pulled in something that, surprise surprise, is Windows only.

Otherwise I agree that it is a better Java.

Re:IT Runs on Java 8 by GordonS on Saturday May 11, 2019 @04:55AM (#19885287)
They didn't "theoretically" open source it - they actually open sourced it.

I get why people used to shit on Microsoft, but Microsoft has demonstrated over a number of years that its changed under Satya.

> However the way that this always works is that there is a base that can be written in, but anything non-trivial will have pulled in something that, surprise surprise, is Windows only.

Outside of desktop GUIs, this is simply not true. I'm writing complex, cross-platform systems that work just fine on Windows and Linux (and would on MacOS if I chose to target it).

Hell, even a lot of the tooling is now cross-platform: Visual Studio Code, Azure Data Studio, even Visual Studio and Xamarin run on MacOS!

Re:IT Runs on Java 8 by jhasse on Saturday May 11, 2019 @07:01AM (#19885594)
No, Visual Studio does notrun on macOS. Visual Studio for macOS is a fork of MonoDevelop.
Re:IT Runs on Java 8 by scarface74 on Saturday May 11, 2019 @06:16PM (#19888719)
So because it’s not the same code base but it is produced by the same company with the same purpose? It’s not “Visusl Studio Code”? Was Photoshop not Photoshop on Windows when the assembly language optimizations were different between PPC and x86?
Re:IT Runs on Java 8 by wilsonnb3 on Friday May 10, 2019 @05:32PM (#19882448)
I don’t think is true anymore.

The .net 5 announcement was very clear that .net core is the future and its been a while since you’ve had needed things that are windows only to build a non-trivial .net core application.

Re:IT Runs on Java 8 by btilly on Friday May 10, 2019 @05:44PM (#19882534)
Please double check my wording.

Yes, you can write a non-trivial .NET application on Linux. But if you take a non-trivial .NET application that runs on Windows, the odds are low that it can easily be ported to Linux. And there are almost no non-trivial .NET applications that weren't originally written for Windows.

The result is that if you work with .NET, you're going to be pushed towards Windows.

Re:IT Runs on Java 8 by kiriakasis on Friday May 10, 2019 @07:23PM (#19883209)
It the wording of the announcement (taking them in good faith) that applies to applications using .NET Framework. .NET Core should be 100% portable to Linux/Mac/wasm.

.NET 5 should supersede both Core and Framework IIRC

Re:IT Runs on Java 8 by btilly on Friday May 10, 2019 @07:45PM (#19883340)
I have been hearing announcements about how Microsoft was working to make .NET code portable ever since Mono was first started in 2001.

In the years since, I've encountered many stories that attempted to make use of that portability. All failed.

I've seen the promise of portability with other software stacks, and know how hard it is. I also know that taking software that was not written to be portable, and then making it portable, is massively harder than writing it to be portable from scratch.

So, based on both the history of .NET and general knowledge, I won't believe that .NET will actually wind up being portable until I hear stories in the wild of people porting non-trivial projects to Linux with success. And I will discount all announcements that suggest the contrary.

Re:IT Runs on Java 8 by scarface74 on Saturday May 11, 2019 @12:27AM (#19884556)
I have been hearing announcements about how Microsoft was working to make .NET code portable ever since Mono was first started in 2001.

Microsoft didn’t have anything to do with Mono until 2016.

If you start from scratch with a greenfield .Net Core project there aren’t really any issues getting it to work cross platform.

Re:IT Runs on Java 8 by scarface74 on Saturday May 11, 2019 @06:22PM (#19888741)
You are no more “pushed toward Windows” with new code you do with .Net Core than you are if you use any other cross platform language.

While I’ll agree that anything that uses any of the advanced features of Entity Framework and MVC is not trivially ported.

Re:IT Runs on Java 8 by btilly on Sunday May 12, 2019 @08:57PM (#19895669)
When you're trying to write new code, you run into a problem and look for a library that solves it. But all of the libraries that you find are Windows First, and it is not until after you're committed to them that you sometimes discover how they are Windows Only.

So yes, even in a new project, there will be a pull back to Windows. Because virtually nothing is truly written from scratch.

Re:IT Runs on Java 8 by scarface74 on Sunday May 12, 2019 @09:38PM (#19895832)
It’s no more of a problem with .Net Core than it is with Python modules that have native dependencies, or Node modules with native dependencies.

You’re not going to mistakenly add a non .Net Core Nuget package to a .Net Core project. It won’t even compile.

Of course you can find Windows only nuget packages for Windows only functionality like TopShelf - a package to make creating a Windows Service easy. But even then, I’ve taken the same solution and deployed it to both a Windows server and an AWS Linux based lambda just by configuring the lambda to use a different entry point (lambda handler) than the Windows server.

You can even cross compile a standalone Windows application on Linux and vice versa.

I use a Linux Docker container to build both packages via AWS CodeBuild.

Would you also criticize Python for not being cross platform because there are some Windows only modules?

https://sourceforge.net/projects/pywin32/

Re:IT Runs on Java 8 by spjt on Saturday May 11, 2019 @08:43AM (#19885866)
Looking at the announcement it seems they're basically folding all of the Windows-specific stuff back into .net core. Isn't that just going back to a compatibility minefield?