News for hackers. Stuff that matters.
Re:Microsoft takes .NET open source and cross-platform by Someone1234 on Wednesday November 12, 2014 @10:49AM (#8596016)
It will be interesting to see how this will work in practice.

C# will port over just fine. But the .Net libraries? System.Windows has little to nothing in it, and right now using things like System.IO.* on Linux and Mac is just asking for trouble.

What are they going to do, hack in System.IO.* Linux support after the fact? Or just add Linux.IO.* which is even more of a hack. In either case you're going to get very messy very fast.

The .Net libraries absolutely could have been designed with cross platform in mind, for example if they put the IO libraries in System.Windows.* and several of the other Windows-specific APIs.

As it stands the .Net framework/libraries are very Windows locked. So much so you'd almost have to scrap them and start over to make it more platform agnostic.

Re:Microsoft takes .NET open source and cross-platform by billyhoffman on Wednesday November 12, 2014 @11:26AM (#8596325)
"What are they going to do, hack in System.IO"

System.IO works very well on Linux/Mac right now. It was one of the first things implemented by the Mono team.

Having ported numerous .NET applications, all of which do fair heavily file I/O (the most common use case for System.IO), the main sticking point has been code that deals with filenames and paths. As in "/home/billy" vs "c:\Users\Billy". A hour or so of cleaning up your code and making use of Path.DirectorySeparatorChar and IsRooted is all I've needed to do.

"As it stands the .Net framework/libraries are very Windows locked"

This shows a lack of understanding of the .Net framework. Yes, if you used crazy Microsoft specific WCF libraries for networking protocols instead of industry standard stuff, or used WPF for graphics, that going to be a problem. But there are literally thousands of classes providing a fairly comprehensive set of data structures, network protocols, etc that are completely untied to Windows or Microsoft. If you are using something in System.whatever you are pretty OK.

P.s., Sockets aren't in System.IO, they are in System.Net

[deleted]
Re:Microsoft takes .NET open source and cross-platform by bwy on Wednesday November 12, 2014 @12:38PM (#8596859)
I wouldn't call that an insult, much less a passive-aggressive one. Maybe it's time to get a bit of fresh air; the world's not out to get you.
Re:Microsoft takes .NET open source and cross-platform by beauzero on Wednesday November 12, 2014 @01:58PM (#8597426)
...or maybe it is...just not billyhoffman.
Re:Microsoft takes .NET open source and cross-platform by bad_user on Wednesday November 12, 2014 @11:15AM (#8596234)
Mono has been doing just fine. Yes, you can't rely on WinForms, even though a port exists. You can't do COM, that's for sure. But that doesn't mean that Mono is not valuable for what it is right now.

Microsoft doesn't need to provide compatibility for the Windows specific bits, as those bits are not part of the Core. And a platform like .NET has enough value in open-sourcing just the Core (i.e. whatever goes in the ECMA standard). For example it's a perfectly acceptable strategy to use GTK# on Linux, WinForms on Windows, MonoMac on OS X and Xamarin.Whatever on iOS / Android.

On System.IO, indeed there are differences between Winsock and Linux's epoll or BSD's kqueue (i.e. notify on completion versus notify on ready). There are differences between the 2 models, but I don't see that as a problem for System.IO and if you think it is a problem I'd like to read an explanation as to why.

Personally I'm very excited about this announcement. I avoided .NET for years and preferred to settle for the JVM because I do not like building on top of proprietary things. If they are really open-sourcing the .NET runtime, whilst uniting their efforts with Xamarin, that's really good news. Now hopefully the ecosystem around .NET will follow, as .NET needs an open-source oriented ecosystem and needs one badly.

Re:Microsoft takes .NET open source and cross-platform by migueldeicaza on Wednesday November 12, 2014 @11:12AM (#8596207)
Microsoft's focus on this release is the server.

Mono plans on contributing to the effort our cross platform changes to Mono, to make .NET work great on Unix.

Details here: http://tirania.org/blog/archive/2014/Nov-12.html

Re:Microsoft takes .NET open source and cross-platform by jorgecastillo on Wednesday November 12, 2014 @10:13PM (#8599706)
After reading most comments here, the linked announcement, your blog post & some other websites, I only have one question left. If Microsoft releases their code under the MIT license, will mono follow suit and stop using the GPL?
Re:Microsoft takes .NET open source and cross-platform by andzt on Wednesday November 12, 2014 @11:07AM (#8596169)
From Hanselman's post:

"ASP.NET 5 will include a web server for Mac and Linux called kestrel built on libuv."

Re:Microsoft takes .NET open source and cross-platform by pionar on Wednesday November 12, 2014 @12:04PM (#8596628)
I've been playing around with kestrel/asp.net vNext (Which I guess is now 5) on Mac, and while it's still rough, it's a good dev server.
Re:Microsoft takes .NET open source and cross-platform by megaman821 on Wednesday November 12, 2014 @11:13AM (#8596220)
I don't think they are open sourcing the client libraries like WPF and Win Forms. Like you are alluding to, what good would it do if they did since it is 99% Windows only functions in there.

They are open-sourcing the server side code. I think this means your ASP.Net apps can run on Windows, Linux, Mac OSX all from the same open source code base. No worry about Mono incompatibilities and bugs.

Re:Microsoft takes .NET open source and cross-platform by Someone1234 on Wednesday November 12, 2014 @11:20AM (#8596275)
> I don't think they are open sourcing the client libraries like WPF and Win Forms.

I didn't allude to that.

Re:Microsoft takes .NET open source and cross-platform by shadowmint on Wednesday November 12, 2014 @11:04AM (#8596143)
To be fair thats pretty much exactly what xamarin have done for ios, android and mac.
Re:Microsoft takes .NET open source and cross-platform by bigdubs on Wednesday November 12, 2014 @11:08AM (#8596178)
Yep, and check out System.Console for some horrors in the mono runtime.
Re:Microsoft takes .NET open source and cross-platform by rikkus on Wednesday November 12, 2014 @11:20AM (#8596278)
System.Console isn't something that most apps rely on. It's handy for printing something out in a tiny one-file test app, but generally not relied upon for bigger apps.
Re:Microsoft takes .NET open source and cross-platform by bigdubs on Wednesday November 12, 2014 @01:29PM (#8597232)
Are servers / daemons not a common usecase? Most, if not all, of the apps I write on a daily basis do not have GUI.
Re:Microsoft takes .NET open source and cross-platform by rikkus on Friday November 21, 2014 @06:11PM (#8643942)
Is this on a UNIX? If so, yes, it's common to write to stdout/stderr there. Not in Windows, though - anything which is long-running tends to be a Windows Service and there's no point writing to System.Console from there because no-one will see it!

I haven't done much .NET on UNIX but if I was doing so, I'd probably want something a bit more UNIX-friendly than System.Console, though I know it does have the ability to deal with different streams.

Re:Microsoft takes .NET open source and cross-platform by JetSpiegel on Wednesday November 12, 2014 @11:45AM (#8596472)
Are you saying core .NET libraries are worthless?

Because in that case what's the point? Why not just use Java.

Re:Microsoft takes .NET open source and cross-platform by eropple on Wednesday November 12, 2014 @11:53AM (#8596547)
I'm sorry, but I have literally no idea how this post follows from the one you replied to?
Re:Microsoft takes .NET open source and cross-platform by BinaryIdiot on Wednesday November 12, 2014 @01:53PM (#8597399)
> I'm sorry, but I have literally no idea how this post follows from the one you replied to?

Literally? Well it is visually displayed under it and to the right :P

Re:Microsoft takes .NET open source and cross-platform by BinaryIdiot on Thursday November 13, 2014 @09:23AM (#8601606)
Damn, I liked my joke...
Re:Microsoft takes .NET open source and cross-platform by katbyte on Wednesday November 12, 2014 @04:47PM (#8598434)
Links to some examples?
Re:Microsoft takes .NET open source and cross-platform by noselasd on Wednesday November 12, 2014 @12:30PM (#8596808)
Ofcourse someone will have to write the linux/osx implementations, but I don't see much in System.IO that would be asking for trouble.

The CreationTime on DirectoryInfo would have to be faked, and it's not entierly clear if FileSecurity would map cleanly to posix acls, but nothing sticks out as being fundamentally incompatible with linux at least.

Re:Microsoft takes .NET open source and cross-platform by egor598 on Wednesday November 12, 2014 @11:42AM (#8596446)
As far as I understood, they are really slimming down the core .NET CLR (runtime). Most of current BCL .NET libraries will be exposed as separate nuget packages, which makes it really convenient.
Re:Microsoft takes .NET open source and cross-platform by thescrewdriver on Wednesday November 12, 2014 @11:08AM (#8596174)
Somehow reminds me of the Microsoft/Novell agreement, will wait to see how it turns out...