
Microsoft Launches Its .NET Distribution for Linux and Mac - Errorcod3
http://techcrunch.com/2015/04/29/microsoft-launches-its-net-distribution-for-linux-and-mac/
======
nutate
F# is a real breath of fresh air in comparison to something like Scala. It's
direct ML heritage really shows, also just diving in with an IDE (like
Xamarin, or I suppose Visual Studio) is super easy.

I see it as the future of pop-functional programming. For example look at the
way it handles type inference w/ JSON parsing. Compare that to what you have
to do to parse JSON in Scala. It's subtle, but a major usability win.

~~~
narrator
Scala is getting really interesting lately though with projects like Spark and
SparkSQL. Spark takes a Scala AST tree and computes a plan on it in order to
distribute it to a cluster of possibly thousands of nodes and then uses
transformations on that plan, similar to how an SQL query optimizer works, to
make the plan more efficient. The cluster compute benchmarks on it are crazy
good.

The only problem I have with Scala is that it has so many features that it
tends to have a steeper learning curve than most languages. However, this is
mitigated somewhat in that it lets one switch between object and functional
depending on what's more convenient or performant, thus making it easier for
programmers who are not highly skilled in functional programming to pick up.

~~~
iskander
>Spark takes a Scala AST tree and computes a plan on it in order to distribute
it to a cluster of possibly thousands of nodes

Unless Spark has changed dramatically in the year since I used it, that's not
really how it works. You lazily construct an expression graph of RDD operators
but the actual Scala code (the functional payload of e.g. flatMap) doesn't get
analyzed. Are you talking specifically about Spark SQL's code generator?

>The cluster compute benchmarks on it are crazy good.

...and also carefully chosen to show off the niche cases where Spark shines.
More commonly, you'll encounter crippling garbage collector stalls leading to
mysterious and undebuggable job failures.

Spark has a very clean API but the implementation (at least for Spark versions
0.8-1.0) is still prototype quality.

~~~
devonkim
So basically you're talking about the design and limitations of
[https://databricks.com/blog/2015/04/13/deep-dive-into-
spark-...](https://databricks.com/blog/2015/04/13/deep-dive-into-spark-sqls-
catalyst-optimizer.html) I take it?

The implication of this work I thought is that it could be further expanded to
other languages and DSLs. However, Spark's SQL generator still being very JVM-
dependent and this optimizer generating bytecode kind of makes it pretty
specific to JVM-supporting languages only. This would probably leave out
Haskell and Erlang / Elixir in the short term, which is probably where I'd
expect to see a different perspective on the whole data analytics front. We
have Datomic, sure, (and I guess Clojure is enough for a lot of folks) but
it'd be nice to have something other than "we want to make Hadoop... BUT
BETTER" as a lot of the motivations.

------
bjt
My first question was "So how do I build "Hello World"?

For anyone else wondering that, go to
[https://github.com/dotnet/coreclr/blob/master/Documentation/...](https://github.com/dotnet/coreclr/blob/master/Documentation/linux-
instructions.md).

~~~
tomjen3
For those of you who want to save the click: you need to build half the stuff
on a windows machine and the copy it over - and you need mono to fetch the
dependencies(!).

~~~
ghuntley
For now? Yes but not for long -
[https://github.com/dotnet/corefx/issues/1576](https://github.com/dotnet/corefx/issues/1576)

------
tdicola
This is interesting but is there any commitment to support it long term? I
remember when Silverlight was supposed to be the savior that brought .NET to
Mac and Linux, but that didn't last more than 5 years. Would be nice for MS to
say they guarantee support for 10, 15, etc. years.

~~~
apalmer
This is the thing with Microsoft is this is never in doubt. It is Google who
ends of life's things and stops support. Microsoft still has supports things
in Windows 8.1 that were BUGS in MS-DOS in order to allow programs from that
era to run.

Microsoft will support .NetCore for at least 20 years. Without doubt.

~~~
bbatchelder
They may still support it, but it can be a technological dead-end. Just like
Silverlight.

~~~
njloof
Or Internet Explorer (for Mac).

------
jcoffland
Never thought I'd say this but go Microsoft!

~~~
digitalzombie
I dunno about that.

They're still charging and threatening people for Android patents without
really telling anybody what patents they hold over Android.

I think they realize they can make money via open source now and they might do
this for future product. Threaten people via patents or some kind of trojan
horse.

While it's great we have another programming language and platform option but
their actions so far in the past and present isn't so great.

They also tried to make a Hadoop clone that failed miserably so now they team
up with Hortonworks.

Perhaps that opening sourcing their VM they can have big data projects like
Hadoop and such. Oracle have big sway over Java and JVM. Perhaps that's what
Microsoft wants. People might forget about Oracle and JVM but I still
remembered and it really sucks for Apache.

In general, I'm not taking this bet and I'll wait on it.

Also with my current skill set which is mainly open source, it is fine not
dealing with Microsoft. Unless they have a better market share and momentum in
some niche market like big data with Hadoop, spark or whatever I wouldn't even
think about touching their open source stuff.

------
lambda
So, what is actually new here?

They had already announced the various parts of this, and the only link I see
in here is a GitHub repo with links to other GitHub repos that we've already
seen. Is there anything new in this announcement?

------
hokkos
Check also [https://github.com/dotnet/llilc](https://github.com/dotnet/llilc)
compilation of MSIL byte code to LLVM supported platforms.

------
amelius
Does it include the source? And how liberal is the license?

~~~
scott00
[https://github.com/dotnet/coreclr](https://github.com/dotnet/coreclr)

MIT license

~~~
narrator
How about patent use grants, hmm?

If I remember correctly, Microsoft is making a lot of money off of Android by
licensing patents.

~~~
carussell
The MIT License arguably protects against patent litigation (in contrast to
BSD).

People who have an issue with the MIT License (on the patent issue) fall into
one of two categories:

a) People who've put it in the same category with BSD in their heads at some
point, associating with it the same shared caveat about patents, and

b) People who understand the distinction between the two but are unsatisfied
with how terse it is (especially in contrast to e.g., Apache 2.0). This isn't
helped by the fact that the MIT License doesn't actually _use_ the word
"patent", and the closest it gets to saying "irrevocable" is "without
restriction"/"without limitation".

In any case, Microsoft also included a custom patent grant at the time they
announced the CLR's availability on GitHub and its new, more agreeable license
terms. (Unfortunately it doesn't include the word "irrevocable", either.)

------
deafeningblow
Oh hey the CLR finally achieved platform independence. Which is great because
it is great.

~~~
ghuntley
Yes. FreeBSD and OSX support was done 100% by the open-source community w/
support from MSFT whom helped a little bit with domain knowledge (the CLR
product managers and developers can be found in the Gitter room)

See
[https://news.ycombinator.com/item?id=9431368](https://news.ycombinator.com/item?id=9431368)
w/ Microsoft .NET CoreCLR is now running on FreeBSD 10.1 (amd64)

------
bigdubs
how long until i can `brew install dotnet`?

~~~
igravious
Wow yes, apt-get install dotnet anyone?

Should Microsoft provide a few common platform install methods?

~~~
smacktoward
It would be hilarious if it became easier to install .NET on Linux than it is
to install Java.

~~~
jmcqk6
Or easier to install .NET on linux that it is on Windows for that matter...

~~~
darklajid
How? Recent version of Windows come with recent versions of .Net out of the
box. How would you 'win' here?

The core clr is supposed to be bundled as far as I understand, so it'll be
just another dependency of your application: You don't even NEED to install
.Net (on the system/system-wide) anymore.

~~~
bigdubs
Recent versions of windows come with whatever version of .net was stable at
the time, in order to upgrade you have to download from msdn. This vs. `sudo
apt-get install upgrade` etc.

The announcement of the windows package management features should help this
though.

~~~
darklajid
New versions often come via windows update (which you _could_ consider easier
than manually installing it -> apt).

Plus, this is a thread about the core clr and as I said: That won't be
required/necessary in a system wide installation anymore. So you now install
RandomApp and .Net is just part of it - just like you can apt-get install
random-app.

We're comparing now the package management, not the ease of installation of
.Net. There is no installation of .Net anymore (or - see above: It sooner or
later lands via windows update).

I'm a Linux guy, but that's [1] just a weird case to make here, both in
general and specifically in this context.

1: Easier .Net installation on Linux than on Windows

------
Lorento
There'll still be no Winforms or WPF on Linux, is that right? So no desktop
apps will be portable?

------
istvan__
Yes! Finally we can use .NET on on Linux a supported official way.

~~~
return0
What are the major projects that are built in Mono? I only know opensimulator.

~~~
jebblue
[http://www.mono-project.com/docs/about-
mono/showcase/compani...](http://www.mono-project.com/docs/about-
mono/showcase/companies-using-mono/)

As much as it pangs me to say it, I'm playing some great games on Linux now
because the Unity people built it on Mono.

------
markbnj
Was able to build it and run the HelloWorld.cs example. You need to build
coreclr and corefx on windows for the managed components, since only the core
cpp source can be built on linux at this time. You also need to install mono
and grab nuget and use it to fetch a few packages. But all in all it feels
fairly historic.

[http://i.imgur.com/XyCB3uA.png](http://i.imgur.com/XyCB3uA.png)

~~~
runfaster2000
.NET Core team member here.

I'm glad that you were able to make it all work with the instructions[1] we
provided. There are two major pieces that we're still working on, which you
call out:

\- Compiling managed source on OS X and Linux with Roslyn.

\- Running DNU (NuGet) on .NET Core to restore packages.

Most everything else functionaly works. Once those are solved (and we are
close to it), the experience will be great. In just a few commands, you'll be
able to acquire .NET Core, restore packages and run your app, independent of
which OS you are on.

For .NET developers, it is indeed historic. Community and corporate developers
alike are quite excited and see a lot of new opportunities going forward. You
might have noticed that the community is leading the OS X and FreeBSD .NET
ports, with support from Microsoft. We added official FreeBSD CI[2] only a
week ago, upon the request of the community.

[1]
[https://github.com/dotnet/coreclr/blob/master/Documentation/...](https://github.com/dotnet/coreclr/blob/master/Documentation/README.md#get-
net-core)

[2] [https://github.com/dotnet/coreclr#build-
status](https://github.com/dotnet/coreclr#build-status)

edit: formatting

~~~
markbnj
Thanks for chiming in. Really looking forward to further developments. As a 15
year+ Windows development veteran whose been doing python on Ubuntu for 3
years it's great to be playing with .NET again. As far as the HelloWorld
instructions go, they worked very well, so kudos on that. I think it's super
important for developers to be able to jump in and check it out. I also should
have mentioned that I used docker's ubuntu:14.04 image as a launch pad for
this exercise, and it worked great as well.

~~~
runfaster2000
Great. I'm the one (@richlander) who has been spending the most time on docs,
including publishing all of the "Book of the Runtime" docs[1]. It's a whole
lot easier for others to "follow along at home" if you show them how.

We (and me in particular) are going to continue investing in docs for this
reason. Feel free to file an issue if there is anything else you want
written/explained. We have operators waiting.

BTW: I highly recommend the "Introduction to the CLR" [2] doc. It has a great
fundamental view of the product that I suspect many .NET developers would
appreciate and will likely learn something from.

[1]
[https://github.com/dotnet/coreclr/blob/master/Documentation/...](https://github.com/dotnet/coreclr/blob/master/Documentation/README.md#book-
of-the-runtime)

[2]
[https://github.com/dotnet/coreclr/blob/master/Documentation/...](https://github.com/dotnet/coreclr/blob/master/Documentation/intro-
to-clr.md)

------
davidgerard
So is this open-source enough to get into Debian (free) and hence Ubuntu?

------
therealwill
C# just got a little sharper!

------
kichuku
So does this mean that we might have Microsoft Lync client coming up for
Linux?

When I tried to use Lync on browser, I remember seeing something about .NET.
Or is it silverlight?

------
jakejake
I'm curious, is there enough released yet to build server-side web apps? Would
there be an apache mod, or some other web server? Or is there something more
akin to a node app? I really enjoy C#, but everything that I did was either a
Windows-only desktop app or a web app served through IIS. Thanks for any
insight.

~~~
snarfy
Yes, you can do this now.

[https://github.com/aspnet/Home/tree/dev/samples/latest/Hello...](https://github.com/aspnet/Home/tree/dev/samples/latest/HelloMvc)

Follow instructions here:
[https://github.com/aspnet/home](https://github.com/aspnet/home)

This can also be done with mono, fastcgi, and nginx.

[http://www.mono-project.com/docs/web/fastcgi/nginx/](http://www.mono-
project.com/docs/web/fastcgi/nginx/)

~~~
jakejake
Excellent, thank you!

------
auvi
I see a pattern here. People were excited about JVM, then came along CLR. And
it is now getting attention as MS is porting it to Linux/OSX. Next cool thing
will be BEAM (Erlang's VM) based languages, i.e. Elixir, Lisp Flavored Erlang
etc. Reminds me of the hype cycle. So lets get hyped!

~~~
ghuntley
OSX (and FreeBSD) was done by the OSS community not by MSFT.

------
robmcm
So how come they build VS:Code in HTML/JS/CSS using Chromium?

------
hokkos
Funny thing I cloned their repo yesterday on Mac Os to check the advancement
of their project, I could run the hello world and the static Web site but not
the MVC one.

------
gbraad
Microsoft moved further into Java territory; "Write Once, Run Anywhere"...
literally, with an editor and the runtime.

------
return0
Does this mean we are going to see a .NET based desktop environment in Linux
anytime soon?

~~~
ghuntley
Immediately it means you'll see developers that use the Microsoft stack
developing and deploying into docker containers running on Linux.

------
anonbanker
In order to stay relevant, Microsoft attempts to supplant Xamarin's stakehold
in the Linux/iPhone market, by directly eating their lunch.

This is the same thing Microsoft did to IBM. Microsoft will do it to any
"partner" they feel they can cannibalize. The Halloween Documents are not only
relevant, but canon with this move.

~~~
ghuntley
Well technically Xamarin are eating Microsoft's lunch right about now -
[https://trello.com/b/vRPTMfdz/net-framework-integration-
into...](https://trello.com/b/vRPTMfdz/net-framework-integration-into-mono)

------
oldpond
I can just hear the chuckling in the Linux and Mac communities now.

------
PuercoPop
How long until I can develop with Unity game engine from Linux?

~~~
Intermernet
You can run Unity editor under Wine [1] and you can publish Unity games for
Linux [2] but I assume native Unity editor support on Linux would require the
use of a cross platform GUI library (Qt, GTK etc) as it probably relies on
WinForms [3] which is only supported by mono (and I think OSX) up to .NET 2.0
[4].

[1]:
[http://wiki.unity3d.com/index.php/Running_Unity_on_Linux_thr...](http://wiki.unity3d.com/index.php/Running_Unity_on_Linux_through_Wine)

[2]: [http://blogs.unity3d.com/2012/11/22/linux-publishing-in-
unit...](http://blogs.unity3d.com/2012/11/22/linux-publishing-in-unity-4-0/)

[3]:
[http://en.wikipedia.org/wiki/Windows_Forms](http://en.wikipedia.org/wiki/Windows_Forms)

[4]: [http://www.mono-project.com/docs/gui/winforms/](http://www.mono-
project.com/docs/gui/winforms/)

------
mmgutz
Where are the actual download links to play with it?

------
ahamino
It's a bit too late?

------
guard-of-terra
They mercifully waited until Java caught up a bit with version 8.

Seriously, they could have fair chance, C# was so much better, but today it's
still quite better but java is proven and has more libs.

~~~
coldtea
Java, with Oracle at the wheel, is not going anywhere. They've added closures
in 8, big deal.

C# is centuries ahead of Java 8, and with even more to come faster. And I'm
saying that as an old Java dev (for 8 years up until 2008 or so) who have only
dabbled in C#.

~~~
apalmer
Ehhh, When Sun was at the helm Java was stuck in quicksand even worse than
today. Its only a few years ago.

~~~
coldtea
Later day SUN yes.

But 1996-2005 SUN made Java the #1 name in the enterprise and education space
back in the day.

~~~
saiya-jin
yes but there was no serious matured & backed competition

------
mozumder
So, what exactly is .NET? As a non-corporate Mac user, I'd like to know.

~~~
joshuapants
Think of it as like the Java runtime environment, but not terrible.

You have two main pieces: the Common Language Runtime, which is the virtual
machine (like the JVM) that executes the code. Then you have the library it
comes with, which is fairly large compared to most languages.

edit: Added more context

~~~
usef-
> Think of it as like the Java runtime environment, but not terrible.

What's terrible about the JVM/JRE?

Many people complain about the language Java (conservative language,
programmer culture of complexity...), or the web browser plugin for the JVM
(security vulnerabilities, bad startup performance...), but I've generally
heard good things about the JVM itself.

~~~
ane
The JVM type system uses type erasure (which means that any generic type
Blah<T> becomes Blah at runtime), so you can't instantiate types based on
generics at runtime. In C# it is valid to do "T foo = new T();" and because of
reified generics, this works. You can't overload functions based on their
generic type ("Foo(List<int> ...) and Foo(List<string> ...)" on the JVM (the
<...> bit gets erased!). This was done to preserve binary backward
compatibility when generics were introduced in Java.

The CLR supports user-defined value types whereas the JVM doesn't, it relies
on a classical uniform data representation. Because value types are stack
allocated, in C#, you will have less stress on the GC (because you can define
stack-allocated value types), on the other hand, the JVM GC will be doing a
lot more work. This is why you see "the JVM is heavily optimized" statements.

Another downside of the JVM is that it has no _native_ support for tail call
optimization, this is not that major, but it is a bit silly for functional
languages running on the JVM (Clojure). The Scala compiler is intelligent
enough to do this by itself, but there's no native support on the VM itself,
unlike on the CLR.

Another point is that the CLR was designed as a true language-agnostic virtual
machine, so developing new languages on it is easy. It is not hard to do that
on the JVM, but more so than on the CLR.

~~~
Skinney
Technically, JVM doesn't have a type system, last I checked. Which is why Java
(the language) uses type erasure. CLR does have a type system, but this also
makes certain things harder to implement which is why, i think, Scala stopped
working on their CLR compiler.

The JVM was also designed as a language agnostic VM, which is why they
stabilized their bytecode specification early on. There are certain things you
can do in bytecode which cannot be done in Java for instance.

Your criticism on the lack of user-defined value-types is valid, which they
are working on for JVM 10. This is agreeably late, but better late than never.

------
_sunshine_
Too little too late.

~~~
pmontra
I don't think is too little but I'm sure they are late. Too late? Probably not
but imagine if they did this 10 years ago, the impact it would have had on
Java and many other ecosystems. I bet many of them would have been smaller and
MS larger.

------
ilaksh
Mono has been a thing for so many years, this is kind of a joke to me. Maybe
its just that my hatred for Microsoft runs so deep.

~~~
dguaraglia
The difference is the Microsoft implementation is probably going to be much
better quality and better documented. Also, you can't compare Microsoft of ten
years ago with the Microsoft of today.

------
lottin
I don't know who they're trying to fool. I don't run MS software in my
computers and I never will.

~~~
guardian5x
In case you use linux, i have bad news for you. there is by now many code
lines from MS.

~~~
dTal
Strictly speaking the statement is probably still true if lottin doesn't use
Hyper-V (and most people don't).

------
aroman
Am I the only one bothered that they didn't include the space between the "OS"
and the "X"?

More importantly, this is huge, but as a Linux developer/user I still have no
desire to use .NET on my platform. Maybe Mono has scarred my permanently.

~~~
noir_lord
Also linux developer/user and I'd crawl over broken glass to have a reliable
C# runtime on Linux, it's my absolute favorite language.

~~~
ibebrett
Just out of curiosity why? I personally can't imagine why someone would choose
it as a favorite. Not because I think it is bad, but because I feel its kind
of a kitchen sink language that doesn't really have any clear advantages or
features.

~~~
eropple
In short: because it doesn't make me think about _it_ , freeing me up to think
about the problem, and gets out of my way. You're right in that it's a
kitchen-sink language, but IMO it's a well-curated one, and I don't find
myself having to think about patterns or other crap as I do when using Java
(which I've used professionally) or wrestling with poor tooling and spooky-
action-at-a-distance language design in Scala (ditto--and I like Scala, but
for a lot of things it just _won 't get out of my way_).

Reasonable people can disagree, of course.

------
emilsedgh
For a moment I thought Microsoft is releasing a Linux distro with .NET sdk
pre-installed.

It would've been great if the author knew what 'distribution' means in this
context.

~~~
vezzy-fnord
_It would 've been great if the author knew what 'distribution' means in this
context._

"Distribution" is hardly specific to Linux distributions in technical circles.
I don't know how you got that impression. The term is synonymous with software
bundle, e.g. "Erlang/OTP distribution".

