News for hackers. Stuff that matters.
Re:Open Source .NET three years later by librexpr on Sunday December 24, 2017 @06:20AM (#15999062)
I'd like to switch away from Java in future applications, and C# seems like the top contender, but there are questions I'd really like answered before I make the switch.

I see a lot of people talking about Microsoft open-sourcing .NET Core. But as someone who's never used it, what is .NET Core? And if .NET Core was open-sourced, what about the rest of it? Am I likely to run into major parts of the ecosystem that are still proprietary?

Also, can I develop and use C# applications on Linux without feeling like a second-class citizen? The ability to easily develop on Linux using free software and then run on my clients' Windows computers is one major reason I use Java at all, and I definitely won't switch to a language that doesn't support Linux properly.

And finally, how likely is Microsoft to fuck free software developers over with proprietary extensions in the future? This is Microsoft we're talking about, after all.

Re:Open Source .NET three years later by jsingleton on Sunday December 24, 2017 @06:56AM (#15999171)
I've written[0] and spoken[1] a lot about .NET Core, so I understand that it can be confusing. The similar naming certainly doesn't help. To summarize (and oversimplify) there are three main varieties of .NET: .NET Core, .NET Framework and Xamarin.

The new open source and cross-platform one is .NET Core and it is currently suited to writing server-side web apps (e.g. ASP.NET Core) and command line applications. It is a reimplementation of .NET and more use cases are coming (UWP, CoreRT, native tool-chain etc.).

The Windows only one is .NET Framework and it is better for graphical desktop apps on Windows. WPF and Windows Forms are not open and are Windows only, so are not in .NET Core.

Finally, Xamarin is also open now and lets you build native mobile and desktop apps on Android, iOS and macOS. Full details of all these are on the official docs site[2] if you want to read more, or you could buy my book on ASP.NET Core 2 :).

[0]: https://unop.uk/book/

[1]: https://unop.uk/talks/

[2]: https://docs.microsoft.com/en-gb/dotnet/

Re:Open Source .NET three years later by supergreg on Sunday December 24, 2017 @08:02AM (#15999349)
Where does Mono fit in all this?
Re:Open Source .NET three years later by akoeplinger on Sunday December 24, 2017 @08:19AM (#15999399)
Xamarin is built on top of Mono. The same applies to Unity3D.

We're sharing more and more code with .NET Core now so there's convergence happening but there are still pieces that are unique to us.

Disclaimer: I'm working on Mono for Xamarin/Microsoft.

Re:Open Source .NET three years later by paavohtl on Sunday December 24, 2017 @08:35AM (#15999441)
Mono is a reimplementation of .NET Framework. It supports most APIs and modules from the full framework, with one notable exception being WPF, the UI toolkit. They've been integrating code from .NET Core for better compatibility, but ever reaching 100% feature parity with the full framework is rather unlikely.

Mono used to have it's own C# compiler in addition to the runtime, but since the official C# compiler is open source, well-engineered and cross-platform compatible, it now uses the same compiler as other runtimes.

Xamarin is based on mono, and Unity ships Mono as their .NET runtime. Mono supports the most platforms out of all .NET implementations, including all current and previous generation gaming consoles.

Re:Open Source .NET three years later by vadimberman on Sunday December 24, 2017 @09:10AM (#15999585)
Thank you for tuning in here.

I imagine that WCF was one of the first parts to be converted. How mature is the Core .NET WCF now?

Re:Open Source .NET three years later by jsingleton on Sunday December 24, 2017 @12:52PM (#16000460)
This is a bit complex, but for what most people think of as WCF (enterprise SOAP APIs) then it is not supported on .NET Core. The W stands for Windows after all.

However, the ASP.NET Core MVC framework supports Web API and this was originally part of the WCF REST services. Of course, you can still interact with SOAP endpoints (served by various frameworks) as a client, as pointed out elsewhere here.

Re:Open Source .NET three years later by vadimberman on Sunday December 24, 2017 @07:53PM (#16002091)
For me, WCF is the ability to run web services that can be configured on the fly for different protocols, security requirements, etc.

It's sad that it won't be available. Honestly, it puts a bit of damper on my development plans.

Re:Open Source .NET three years later by barake on Sunday December 24, 2017 @10:04AM (#15999805)
.NET Core does not have an implementation of WCF, and I can’t imagine to ever will.

.NET Core has a pretty good MVC framework you can build REST services on, GraphQL, or gRPC etc.

Most of the framework baggage was left behind.

Re:Open Source .NET three years later by akoeplinger on Sunday December 24, 2017 @11:58AM (#16000249)
There's https://github.com/dotnet/wcf which are the _client_ libraries of WCF for .NET Core.

For the server side of WCF you're right those are only available on .NET Framework right now.

Re:Open Source .NET three years later by maxxxxx on Sunday December 24, 2017 @11:04AM (#16000027)
I hope they won't port WCF. wCF makes simple things complicated.
Re:Open Source .NET three years later by vadimberman on Sunday December 24, 2017 @07:50PM (#16002079)
For me personally, WCF made complicated things trivial. My startup was able to get into Fortune 100 enterprises with all their insane compliance requirements, letting their IT departments configure things the way they see fit.

Once you get the hang of it, WCF is one of the best frameworks EVER written.

Re:Open Source .NET three years later by blunte on Sunday December 24, 2017 @07:00AM (#15999188)
> And finally, how likely is Microsoft to fuck free software developers over with proprietary extensions in the future? This is Microsoft we're talking about, after all.

There's a radical change in public behavior of Microsoft since Satya Nadella became CEO. While at first I was skeptical, it's now been three years we have had to observe whether Microsoft's actions match their promises.

So far, I'm impressed. I think their new vision and approach to doing business is much improved from that of their previous two CEOs - it's better for consumers and developers, and frankly it was necessary for the long term survival of MS.

I don't expect to see nasty behavior from them like we have seen in the past.

Re:Open Source .NET three years later by rainbowmverse on Sunday December 24, 2017 @10:30AM (#15999910)
It seems like the floodgates opened after VS Code when Microsoft realized people actually like what Microsoft produces when they make it easy to use (no confusing, expensive licensing), so there's no need to lock people in. Everything people ever hated about Microsoft was a result of it trying to protect its monopoly rather than coexist.

They're still a little confused about Windows (why do I need to spend $50 on Pro to encrypt my drive?), but you can get Office on anything now. Even Edge has an Android port (beta).

Re:Open Source .NET three years later by nofilter on Sunday December 24, 2017 @12:07PM (#16000286)
Nasty behaviour is still there. Windows is a joke in terms of how bloated and clunky it still is, how it snoops on you, doesn't let you turn off updates without doing some shady things with the register and whatnot (which, a regular person, will never be able to do) and it has ads in the OS.
Re:Open Source .NET three years later by jupiter90000 on Sunday December 24, 2017 @01:41PM (#16000685)
What about when the CEO changes?
Re:Open Source .NET three years later by oblio on Sunday December 24, 2017 @01:49PM (#16000721)
Well, they could commit suicide and get a Ballmer clone.

They lost control of the client (it's web + Android/iOS now), steering away from the current course and back to the old one is a sure way to irrelevance.

Re:Open Source .NET three years later by eddiezane on Sunday December 24, 2017 @08:43AM (#15999466)
I recently wrote about working with .NET Core on macOS and Linux [0].

The TLDR is the dotnet install script works great. Use Jetbrains Rider if you want the best experience (though not free). VSCode is just ok.

Overall I've really enjoyed my dive into this world I never thought I'd be a part of (let alone exist).

0: https://doesnotscale.com/developing-with-net-core-on-macos/

Re:Open Source .NET three years later by oblio on Sunday December 24, 2017 @06:32AM (#15999096)
dotnet core = new, entirely cross platform runtime + core libs meant to serve as the new core of dotnet. In the future everything dotnet will be based on it, for now this isn't the case cause of legacy code. Basically you'd have dotnet core + Windows stuff for the Windows framework, dotnet core + various bits for Mono, etc.

Regarding the ecosystem, even Java has proprietary libs on top. For dotnet, Windows stuff is still proprietary, but even that is changing. You won't care about it anyway.

Just make sure you stay within dotnet standard (i.e. cross platform API standard for dotnet) and either use Open Source Microsoft extras or just use community-developed stuff.

For Linux C# dev, Jetbrains Rider or Visual Studio Code + C# plugin.

Regarding extensions, the battle has shifted. Microsoft is fighting Azure and GCE these days. The proprietary bits are in the services. The clients are Open Source to get mindshare, so no worries there.

Re:Open Source .NET three years later by oaiey on Sunday December 24, 2017 @04:06PM (#16001297)
Very accurate and precise.

Just one thing: MS is fighting AWS and GCE :) not Azure :). Well on the other hand, who does not remember the old org chart. Who knows.

Re:Open Source .NET three years later by oblio on Sunday December 24, 2017 @04:16PM (#16001325)
Freudian slip. I'd say Microsoft is fighting Windows, these days :))
Re:Open Source .NET three years later by marcosdumay on Sunday December 24, 2017 @11:33AM (#16000142)
You can technically do everything with an all open-source stack. But you will have to create most of your workflow and integrate your tools by yourself. The all integrated official environment is closed-source only.

On Linux you'll be a second-class target for libraries. The language itself is well supported, but only it.

About future Microsoft behavior, your guess is as good as mine.

Re:Open Source .NET three years later by oaiey on Sunday December 24, 2017 @04:02PM (#16001285)
I am a decade long VisualStudio user but since .NET Core I switched to VS Code. I cannot understand your complaints at all. Tooling is nice and sweet under VS Code and from the command line. VisualStudio has so much irrelevant bloat that they rewrote even their VS installer to simplify it. For .NET Core the whole experience is very similar.

The second class target is also not accurate. Azure (the future of MS) runs 60% Linux (afair) which makes .NET Core on Linux their primary target.

Give Microsoft and the .NET community a break. They achieved a lot in three years. The vendors other than the .NET team (including the rest of MS) just need some time to adopt their libraries (I am looking at you Amazon).

Re:Open Source .NET three years later by JamesBarney on Sunday December 24, 2017 @03:51PM (#16001254)
Most libraries are being moved over to .net standard which is fully compatible with .net core.
Re:Open Source .NET three years later by Sylos on Sunday December 24, 2017 @09:04AM (#15999556)
> Also, can I develop and use C# applications on Linux without feeling like a second-class citizen?

I don't have much experience with C# development and basically none with .NET, but so far my experience has been a clear No.

The elephant in the room is the IDE. Visual Studio is the C# IDE and doesn't exist on Linux. There's MonoDevelop, which is now also owned by Microsoft and seems to share some components with Visual Studio, but it's still not nearly as powerful of an IDE. It feels more like a clunky text editor with a button that will make your program run.

Next thing is that I don't think, you can really develop GUIs on Linux. There seems to be some integration with GTK in MonoDevelop, but I sort of doubt that this works well, and my experience in Visual Studio has been that you practically cannot develop GUIs in C# without using Visual Studio, as so much of the design process is directly integrated into that. Also, developing a GUI application on Linux that will run on Windows, I don't think is possible at all, though I haven't spent much time researching that.

Last point that I have is sort of just a dumb bug, but it felt the most like I'm a second-class citizen. MonoDevelop does not currently support executing console applications on an external console on Linux when you install it via Flatpak (which is their primary distribution method).

But that by itself is not even the problem, it works fine with the internal console and I can live with that. The problem is that there's a checkbox to enable running on an external console and that checkbox is enabled by default. You cannot run console applications on MonoDevelop out of the box, solely because of this.

And console applications seem to be the main-thing that MonoDevelop is good for, so you'd think they would test that and ensure that it works, but apparently not. And really, just disabling this checkbox by default would fix the issue.

What makes this issue worse:

1. The error message is entirely cryptic, it says "Debugger operation failed - Cannot start process because a file name has not been provided.". Thankfully, the internet coughs something up quickly when you copy-paste that into a search engine, but at least I personally first thought I had forgot to give it a file name somewhere and tried to find that.

2. This isn't just one flag in the global settings that you have to flip once and you're done. Instead it's a per project setting, so you have to flip it every time that you start a new project and it's not particularly easy to find either.

3. This has been a known issue for a while (or at least, I hope that they know about it).

Re:Open Source .NET three years later by Const-me on Sunday December 24, 2017 @09:41AM (#15999713)
> the IDE

https://code.visualstudio.com/Download

> I don't think, you can really develop GUIs on Linux.

I can. E.g. recently I’ve picked GLES + NanoVG for the lower level of the stack, and implemented the upper levels (controls, touch input, transitions, etc.) in C#.

There’re higher-level approaches, including a couple of cross-platform ones (Gtk#, Avalonia, electron-based), I’ve picked lower-level stack because I needed to replace the whole Debian desktop including its desktop manager.

Re:Open Source .NET three years later by ChristianGeek on Sunday December 24, 2017 @10:36AM (#15999926)
Or, if you’re willing to pay for something closer to VS:

https://www.jetbrains.com/rider/

Re:Open Source .NET three years later by rcarmo on Sunday December 24, 2017 @11:20AM (#16000091)
That's interesting. Is the code/result public in any way?
Re:Open Source .NET three years later by Const-me on Sunday December 24, 2017 @12:22PM (#16000340)
The project’s proprietary, but it was straightforward.

I’ve created a C++ *.so library that uses DRM/KMS to initialize GLES on top of hardware GPU, and exposes NanoVG’s C API. Then in C# [DllImport], and actual GUI implementation. For touch input I just read /dev/input/event0 using FileStream API.

I’ve spent about a week implementing that thing, so it’s not that hard to do.

The main downside is the lack of ClearType. On the lower level FreeType library supports that, but NanoVG doesn’t.

Re:Open Source .NET three years later by severino on Sunday December 24, 2017 @11:29AM (#16000124)
Why would you want to do that? What do you find missing in 2017's Java and JVM comparing to other solutions?
Re:Open Source .NET three years later by hacker_9 on Sunday December 24, 2017 @08:31AM (#15999430)
.Net, C# and a version of Visual Studio have always been free since their release 17 years ago...
Re:Open Source .NET three years later by Sylos on Sunday December 24, 2017 @09:18AM (#15999617)
He means free as in freedom, so it has to respect the freedom of the end-user to inspect the code, modify the code to their needs and to redistribute their modified version as well as the unmodified version.

Basically open-source, but with the strong philosophical difference that the goal is for the users to have their freedom, not for a company to apply the same software development strategies that made Linux and Firefox so successful. (Also, someone will now murder me in my sleep, because I've said that it's basically open-source.)

Re:Open Source .NET three years later by draw_down on Sunday December 24, 2017 @06:49AM (#15999152)
Heck, I spent years earlier in my career as a .NET dev and I also don’t understand their naming. I wasn’t totally clear on what .NET core is. It’s not the biggest problem but the way they name things is quite confusing.
Re:Open Source .NET three years later by ZenoArrow on Sunday December 24, 2017 @02:38PM (#16000953)
You know when movie franchises go through a reboot? That's very similar what Microsoft is doing with .NET Core. The 'Core' part of the name is hinting at a redesign based on a new runtime. They could've called it .NET Framework 6, but that doesn't give you any hints about the rewrite. I appreciate it's still not the best name in the world, but hopefully the analogy helped.

To add some additional information, whilst there has been a redesign, work has been carried out to allow a certain level of backward compatibility. This work is referred to by the name .NET Standard. Can think of this as re-implementing a selection of commonly used libraries from older .NET versions on the new .NET platform to make porting easier. The most up to date .NET Standard version is version 2.0.

https://github.com/dotnet/standard/blob/master/docs/versions...

Re:Open Source .NET three years later by dominotw on Sunday December 24, 2017 @09:11AM (#15999589)
> C# seems like the top contender

> can I develop and use C# applications on Linux

> I definitely won't switch to a language that doesn't support Linux properly.

I find this comment really strange. What makes C# top contender for you ? You seem to be asking really basic questions about it.

Re:Open Source .NET three years later by librexpr on Sunday December 24, 2017 @01:32PM (#16000626)
In truth, C# was the "top contender" because it was the only contender. Sorry for the misleading way I phrased it.

My main reason for using Java is for the easy cross-platform development. Most of what I code are basic GUI apps that do conversions between spreadsheets and various file formats. Java's "compile once, run everywhere", with its GUI support and many libraries, is exactly what I'm looking for.

When I heard that .NET was open-sourced and getting support for all platforms, I thought that meant it could be an actual competitor to Java for my use-case. As I've learned from the responses here, it's actually not, and my fears of running into major parts of the ecosystem that are still proprietary were well-founded. I don't need to worry about "future" proprietary extensions: they're already here!