News for hackers. Stuff that matters.
Re:Announcing .NET Core 2.0 by jarjoura on Monday August 14, 2017 @01:54PM (#15010798)
The trend for multi-platform software is to build it on web technologies. There's nothing for the user to install and they can access the software from anywhere there's an internet connection.

If you need it to be offline and integrate into the operating system, then electron would be the next logical step in that direction.

If you want deep, and award winning support, you're going to have to write your product natively for each OS using native APIs. There's just no way around that requirement unfortunately.

Re:Announcing .NET Core 2.0 by sjmulder on Monday August 14, 2017 @03:48PM (#15012145)
With GTK, QT, Tk, etc we used to have a fairly good near-native cross platform story before mobile happened. Apple's reluctance to accept non-native code, Google's pick of Java for Android and early smartphone resource limits made native code a necessity. Meanwhile the web developed into a universally supported application platform which made it inevitable that JavaScript made its way to mobile as processing power increased.

The desktop became just another platform to target. Few cross platform apps can afford to not target the web with all of its benefits like instant, no install required delivery. A whole generation of developers is growing up on Webpack, Babel and React.

Who can fault Electron for existing?

As a user I mourn the cost at which this new wave of desktop apps come. If it were only memory I could buy more – up to a limit – but many of these apps put us back a good 10 years in responsiveness and even screen real estate. My workstation feels like a two year old phone. Who thought unchecking “Show window contents while dragging” would ever make sense again?

Luckily, to get to the original question, we are getting new options. I'm quite excited about Xamarin, which lets us provide a good experience on mobile, against the native toolkit if we like, but also a fast, familiar desktop app.

This isn't worth anything as long as we can't target the web and this is where I hope WebAssembly will bring us.

I remain hopeful. We must be able to do better than ship web browsers to our desktop users, but maybe we're not quite there yet.

Re:Announcing .NET Core 2.0 by TensorMetric on Monday August 14, 2017 @04:07PM (#15012335)
If only Microsoft would let us build native UWP apps in F# without having to jump through hoops with web frameworks

https://news.ycombinator.com/item?id=15007166

Re:Announcing .NET Core 2.0 by millstone on Monday August 14, 2017 @11:52PM (#15015298)
Wait what? That's totally astonishing - I thought the entire point of .NET and the CLR was to be a language-agnostic runtime. Why can't you build UWP apps with it? How do they even know?
Re:Announcing .NET Core 2.0 by pjmlp on Tuesday August 15, 2017 @01:29AM (#15015761)
There is no CLR on UWP, everything is AOT compiled to native code, excluding JavaScript.

VB and C# make use of .NET Native and C++/CX are just a few C++ extensions that look like C++/CLI but compile to native code as always. One can also use standard C++ with WRL or C++/WinRT libraries.

.NET Native shares the compiler backend with Visual C++.

The issue is that the .NET Native compiler team doesn't care about supporting the IL required by F#.

Re:Announcing .NET Core 2.0 by seanmcdirmid on Tuesday August 15, 2017 @05:24AM (#15016658)
I once had to really compile one of my UWP apps to get it working on a locked down Surface Hub (otherwise, I just ever ran them in the debugger). My freaking god, it took 45 minutes to compile a small app...no way...they threw out everything that was good about the CLR for AOT that allowed them to what...run on embedded devices?

It's really too bad, Win2D was quite nice.

Re:Announcing .NET Core 2.0 by pjmlp on Tuesday August 15, 2017 @07:44AM (#15017262)
Performance.

Windows 8 was also AOT compiled to native code, but using the old Bartok toolchain from Singularity(MDIL).

UWP is what Longhorn should have been in first place, if WinDev and DevTools actually worked together.

COM based OS ABI fully native, to the point only VB and C# are used in most Windows talks, even for the new UI composition engine.

C++ is still there for the kernel, device drivers, audio and graphical critical performance components like DirectX.

Everything else can enjoy the productivity of .NET languages and respective tooling.

Which meant that any of my WP 8.x and 10 devices run considerably faster than Android devices of similar price range, while having less overall memory requirements.

Re:Announcing .NET Core 2.0 by seanmcdirmid on Tuesday August 15, 2017 @11:06AM (#15018872)
I get it: a UWP app might be noticeably faster with AOT vs. the standard CLR JIT, but for a UI program that isn't crunching numbers, you are unlikely to tell the difference. Also, the CLR, like the JVM, is no slouch when it comes to running things. As such, there is always a huge asterisk attached to AOT claiming it might improve performance, but it could also degrade it, it is hardly an obvious win. The way it was explained to me was that AOT is necessary for UWP to support IoT and lower end hardware, that on full computers you probably won't notice.

Also, look at all we gave up for AOT. Dynamic compilation in the DLR was pretty nice...and it was reduced to an interpreter in UWP because....no JIT. Granted, I was probably the only person to notice because no one else probably thought to cross the two.

The problem with Microsoft is that as soon as they move to the next thing, they basically abondon the previous one without having the next thing truly replace the previous one. So here comes UWP, meant for "different" things, but it gets all the new stuff while WPF is basically dead. Ya, want to use those new APIs? Sorry, you'll need to use UWP even if you have no intention of running on low end android devices.

So much good stuff, but you have to make a Faustian bargain to use them.

Re:Announcing .NET Core 2.0 by pjmlp on Tuesday August 15, 2017 @11:42AM (#15019239)
Yeah F# is a good example.

Two years after UWP was introduced still no roadmap in sight for .NET Native support, Visual Studio 15.3 just shipped with the F# team telling people to use VS Code instead.

I bet it will be joining Silverlight in a couple of years.

However Microsoft is not alone in these kind of decisions. I can think of a few similar ones from Apple, Google, IBM, HP, Oracle, Sun,....

Re:Announcing .NET Core 2.0 by seanmcdirmid on Tuesday August 15, 2017 @01:13PM (#15020162)
Ya, I wouldn't single out MS as particularly bad here, but they used to be much better about this than the other companies. Now they are reaching down to parity, and developer support used to be their greatest strength.
Re:Announcing .NET Core 2.0 by bonoetmalo on Monday August 14, 2017 @11:58PM (#15015330)
I'm currently working through a CLR via C# book club at work, so I'm curious as well. I know you can make WPF apps in F#.
Re:Announcing .NET Core 2.0 by pjmlp on Tuesday August 15, 2017 @01:29AM (#15015763)