
CoreCLR is now open source - xyziemba
http://blogs.msdn.com/b/dotnet/archive/2015/02/03/coreclr-is-now-open-source.aspx
======
fsloth
De-Ballmerization and Microsoft is oozing delicious developer love. What the
hell happened. It's like Skeletor became He-Mans best buddy all of a sudden
and started helping everyone.

I'm thrilled. The MS tooling _is_ really, really good and the only thing
stopping me from committing to the stack fully has been it's lack of open
sourceness (vendor lock in is still feasible but getting less of an issue).

Edit: Pardon the fanboyism but I've tried a set of feasible Non-MS language
options for my particular domain and F# in Visual Studio beats _for me, my
particular use case and coding style_ Scala, Clojure, Ruby, Python, Haskell,
"browser technologies"...

~~~
doodpants
> De-Ballmerization and Microsoft is oozing delicious developer love.

Kind of ironic, what with Ballmer's "Developers developers developers..."
spiel.

~~~
rdtsc
When it comes to propaganda from large and powerful entities, usually it help
to reverse the meaning to really understand the message.

"Developers,developers,developer" = Fuck developers,need more profits next
quarter.

"We brought peace and democracy to country <X>" = We seriously fucked it up
for years to come, and installed a brutal puppet dictator.

"We are not evil like those other mean companies. We will do good in the
world" = The main products are the users, who's information it sells it its
real users. Have colaborated and been in bed with corrupt governments all
across the world.

The list goes on. It is a rather fun heuristic. And once you know about,
you'll start seeing it more often.

~~~
stingraycharles
It's not only from organizations and powerful entities, I like to apply this
logic in normal day-to-day communications with people too.

If someone has a very strong opinion about something and tries to "convert"
everyone to it (say, vegetarianism, meditation, emacs, or whatever), it is
usually because someone is very insecure about him/herself this trait, and
made it part of their identity. It usually has no point discussing this with a
person like that.

~~~
SixSigma
It called "cognitive load". People are pre occupied with the thing that takes
them the most mental effort.

New mothers, people giving up smoking, people changing diet, people trying to
hide things about themselves.

"The lady doth protest too much"

[http://en.wikipedia.org/wiki/The_lady_doth_protest_too_much,...](http://en.wikipedia.org/wiki/The_lady_doth_protest_too_much,_methinks)

------
Nelkins
I would be curious to see the effects of completely open-sourcing Windows.
Businesses would continue to use it, because it's Microsoft and they want
enterprise support. I think it would get even more love than it already does
from the development community. Piracy of Windows is already rampant, so
they're not really in a worse position from that (plus I think that most
people who can pay for Windows do so already). Foreign governments who are
concerned about NSA backdoors would have their fears allayed. Is there any way
it could seriously damage their business model?

~~~
WorldWideWayne
I don't see why everything needs to be open source. People who simply don't
like Microsoft will not use it just because it's open. Quite the opposite I
think - they'd probably immediately fork it and provide an alternate download
in order to hurt Microsoft.

Are foreign governments a big market that Microsoft has lost a lot of
customers from? I don't think so. The vast majority of the potential market
for Windows is already running Windows, so I don't see what they'd really have
to gain. The small but loud minority of open-source zealots won't be happy
until every single Microsoft product is open.

~~~
mahyarm
When your debugging code, being able to see all of the code in the stack trace
is valuable alone.

~~~
brudgers
Good debugging tools that filter out the irrelevant are perhaps better. Odds
are that any time you break out the debugger the fix is in your code not
Windows, Linux, the JVM etc. That's not to say those things don't have bugs,
only that they are orders if magnitude more debugged than most code under
development.

~~~
scrollaway
You are so completely wrong. Follow the Wine project for a few weeks/months to
get familiar with just how buggy, inconsistent and inconceivably obscure all
of Windows' APIs are.

If Windows was good and near-bug-free, Wine would have long been completed.
Windows is not just its kernel.

~~~
brudgers
Wine has to duplicate all of the duct tape and bailing wire Microsoft has used
to provide backwards compatibility for their customers' existing applications.
Just as Wine is an important kludge serving as a compatibility layer [It's Not
an Emulator], all those undocumented API's are the same sort of kludge as
compatibility layer.

And of course Wine is an outlier. Not only in that it contains its own 20
years of legacy code but in the fact that it is black box reverse engineering.
It can't use disassembly to suss out details. Wine's difficulties stem from
its requirements as much as anything else. These days VM's are the way to go
if the going is intended to get things done. A Windows box in the cloud is
pennies per hour.

~~~
otakucode
So far as I am aware, ALL usable operating systems are burdened with that sort
of thing. I'd really like to see someone at least attempt a clean-slate OS.
Make it 64-bit only from the start, vector fonts to support HighDPI displays
from the beginning, etc. It would likely accumulate such cruft over time, but
I would expect there to be substantial advantages to building from scratch
something that rolls in all of the research advances and assumes capable
modern hardware.

------
pmontra
I wonder how this strategy is going to affect the bottom line of Microsoft.
People writing with CLR languages are deploying web apps mainly (or only) to
Windows now. They're going to have an option to deploy to Linux soon. This
means less revenues from OS and DB licenses, so it looks bad. Do they expect a
large number of people leaving Java, Node, Python, Ruby and picking up C#
because of the Linux deploys? Those people would probably have to buy Windows
and VisualStudio licenses to code in C# in a VM or just ditch Macs for PCs.
More desktop licenses could make up for lost server ones but if I googled well
a server costs more than a desktop. Or maybe they're playing a longer game:
open source as much as they can, hope some network effect builds up, find out
how to profit from it. In the medium term they might be losing money tough. Am
I missing something obvious?

~~~
adrianlmm
> Those people would probably have to buy Windows and VisualStudio licenses to
> code in C# in a VM or just ditch Macs for PCs.

No, they can code in Linux using Vim if they want.

~~~
brz
They can also walk on broken glass with bare feet.

~~~
DigitalJack
I like vim and make extensive use of it daily, but I found your comment
hilarious. I'm going to have to steal that retort.

------
stevecalifornia
I am really interested to see what happens once ASP.Net is running on Linux.
C# and Visual Studio are fantastic, mature tools and I think a lot of
developers would enjoy using them whereas they might be hesitant at the moment
due to OS lock-in on the code they are writing.

~~~
Raphael
Could/Does Visual Studio run in Linux?

~~~
Delmania
I'm not sure they will migrate Visual Studio. First they'd need to move WPF,
which is implemented in DirectX. Second, Visual Studio and MSDN are still
profitable. Third, there's the Omnisharp project that;s working on providing
support for the more common IDEs on linux. In fact, there's nothing stopping
people from making Eclipse and IntelliJ plugins.

~~~
huragok
I wonder how long it will take a courageous developer to port WPF to OpenGL.

~~~
xanadohnt
This has been asked about for nearly as long as Mono and WPF have been in
coexistence. I would say there's very little chance this will happen. However,
a recent update in the WPF world is MS has actually been ramping their WPF
team back up after it looked like it would suffer the same fate as
Silverlight. So who knows?

------
felixrieseberg
This post is a few hours old, but I just want to put it out there: We're
hiring OPEN SOURCE ENGINEERS. I'm one and our job is awesome[1]. Please get in
touch with me if you're interested[2].

[1]: [http://instagram.com/p/yqQe0bK3Bq/](http://instagram.com/p/yqQe0bK3Bq/)
[2]: felix.rieseberg@microsoft.com

------
benreic
Quick link to what I think is the most interesting class in the CLR:

[https://github.com/dotnet/coreclr/blob/master/src/mscorlib/s...](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs)

~~~
simfoo
From their GetHashCode():

// We want to ensure we can change our hash function daily.

// This is perfectly fine as long as you don't persist the

// value from GetHashCode to disk or count on String A

// hashing before string B. Those are bugs in your code.

hash1 ^= ThisAssembly.DailyBuildNumber;

I'd love to hear the story behind this one :D

~~~
daeken
I don't know the story, but the logic behind it is simple: If you want to
guarantee no one depends on GetHashCode staying static between runs of an
application, change it all the time.

~~~
MichaelGG
Also is it not for hash collision protection, which can end up hurting the
runtime of many algorithms, causing a DoS?

~~~
plorkyeran
No, it has no effect on hash collisions. Two hashes that are equal before
being xored with the daily build number will still be equal afterwards.

------
sz4kerto
Interesting commit:

[https://github.com/dotnet/coreclr/commit/90ef39bc3c9886e7967...](https://github.com/dotnet/coreclr/commit/90ef39bc3c9886e796748a65b4e530253190aeff)

"This change fixes a potential problem in unwinding on Linux"

~~~
wtetzner
Interesting quote from README.md:

"You can 'watch' the repo to see Linux and Mac support being added over the
next few months."

~~~
johnduhart
They already seem to be compiling for Linux on Jenkins: [http://dotnet-
ci.cloudapp.net/view/dotnet_coreclr/](http://dotnet-
ci.cloudapp.net/view/dotnet_coreclr/)

------
dkarapetyan
I really like the new Microsoft. Ballmer was really trying to run the company
into the ground.

~~~
brudgers
Think about all the things that Wall Street has said Microsoft should do over
the past decade. None of them was "more open source."

All the groundwork was done by Ballmer. It had to be because now that he and
Gates have reduced their ownership stake and are no longer the two largest
shareholders, Wall Street's flavor of the month ideas cannot be ignored.

The 'new' Microsoft has been building at least since they hired Hanselman back
around 2008. He was talking then on his podcast about taking the job to
advocate open source. Even then Microsoft worked with the Mono team. They
moved Office to an open file format.

It takes a long time to change an aircraft carrier's course. This is Ballmer's
strategic vision. His passion for developers even made it onto Youtube.

~~~
ptx
> They moved Office to an open file format.

Or rather: When OpenDocument was standardized by ISO and threatened to create
demand for open, common, standardized interchange formats, they created a
similarly and confusingly named XML version of their existing format, with
insufficient documentation to allow complete third-party implementations, and
pushed it as a competing ISO standard, using tricks such as (accidentally, I
believe they said) encouraging partner companies to join standards bodies just
for the vote:
[http://en.wikipedia.org/wiki/Swedish_Standards_Institute#The...](http://en.wikipedia.org/wiki/Swedish_Standards_Institute#The_OOXML_affair)

~~~
thinkpad20
> insufficient documentation

That may have been true at the time, but the documentation for OpenXML is
actually very good. It's incredibly detailed -- I think the standard is
somewhere around 5000 pages, and fairly readable. Of course, I haven't ever
actually had to write my own implementation (thank god).

~~~
thinkpad20
Whoever downvoted this care to explain? :|

------
phkahler
It's actually Free Software, not just open source. MIT license.

~~~
adl
I'm familiar with the philosophical differences between Free Software and Open
Source.

But in this context you seem to imply that there are practical differences
i.e: Not all Open Source licences are considered Free Software in the
practical sense.

If that is the case, could you provide an example?

~~~
mackwic
The open-source academical licences are a good example. For example, part of
the Win32 kernel are open for academic and are heavily share between the
classes, but the limitations are here.

For instance, this licence:
[http://opensource.org/licenses/AFL-3.0](http://opensource.org/licenses/AFL-3.0)

It provide free usage, studying, display, publishing, but also explicitly says
that some of the part could be binaries (machine-readable), you can't sell
anything derivative, and the licence is personal with no right to give the
licence to anyone else.

So, you can consult and modify in the frame of your academical work, but no
more.

~~~
voyou
I'm not sure if you linked to the license you intended to - the license at
that link doesn't seem to include any of the limitations you mention. If it
_did_ include those limitations, I don't think if would qualify as an open
source license, either.

~~~
knocte
I guess he meant to link to the RPL, which is the only license that the OSI
has approved, but not the FSF.

------
josteink
Noteworthy from the source: Microsoft does NOT use (unmergable) SLN-files for
their projects, but instead scripts-msbuild invocations against specific
projects:

[https://github.com/dotnet/coreclr/blob/master/build.cmd#L140](https://github.com/dotnet/coreclr/blob/master/build.cmd#L140)

[https://github.com/dotnet/coreclr/blob/master/build.cmd#L159](https://github.com/dotnet/coreclr/blob/master/build.cmd#L159)

I guess this explains why they saw no need to fix the somewhat broken SLN
file-format in the first place, but actually did something about project-
files. They don't share their customers pain on this point.

~~~
pmelendez
As a wild guess I would say that using msbuild-scripts is the way to go if you
have automatic builds in place.

------
j_baker
This is on github. Does this mean that MS is abandoning CodePlex?

~~~
simcop2387
From other articles[1] it looks that way. Really makes you think how big
github has become.

[1]
[http://www.theregister.co.uk/2015/01/15/codeplex_repository_...](http://www.theregister.co.uk/2015/01/15/codeplex_repository_out_of_favour_as_microsoft_moves_major_projects_to_github/)

~~~
carussell
HN discussion:
[https://news.ycombinator.com/item?id=8869401](https://news.ycombinator.com/item?id=8869401)

------
Touche
And they have Issues and Pull Requests turned on.

~~~
4ad
Can you turn off pull requests?

~~~
calpaterson
No, you can only turn off issues

------
ixtli
Even more reason to port all of your C/C++ code to CMake. I'm excited to see
upstream contribution from MS.

~~~
stinos
Exactly, CMake getting more traction like this should be good. I know quite
some devs who're like _CMake? Why don 't you just use good old Makefiles?_ and
then struggle with it's syntax and/or fail to provide working Windows or even
Mac builds of their software simply because they stick with plain makefiles.
(don't get me wrong, they work fine, just not so much for cross-platform
projects)

~~~
stefantalpalaru
The alternative is not plain Makefiles, but Autotools:
[https://autotools.io/index.html](https://autotools.io/index.html)

~~~
mackwic
AH ! That was a nice joke, have my upvote. :)

For the curious:
[http://voices.canonical.com/jussi.pakkanen/2011/09/13/autoto...](http://voices.canonical.com/jussi.pakkanen/2011/09/13/autotools/)
(tldr: autotools won't work on windows, you need a shell emulator, like
cygwin, and gcc)

Premake is nice, also. But CMakes tend to work better for a big project.

~~~
stefantalpalaru
> a shell emulator, like cygwin

Your joke is much better. Have an upvote ;-)

------
saosebastiao
So I'm still a little fuzzy as to what this means. Is this basically the same
thing that Mono is trying to provide? Would it now be possible to have the F#
front end link to the CoreCLR backend on Linux?

~~~
tracker1
I'm pretty sure mono is intending to replace parts of itself with coreclr...

~~~
thinkpad20
My understanding was that Mono was the "open source CLR." What parts of Mono
would this not cover? Once this project gets ported, what barriers to running
.NET code on Linux/Mac/etc with performance and reliability comparable to
Windows would remain?

~~~
DigitalJack
Libraries and Frameworks that are MS Only at the moment. I haven't been
keeping track of what they have open sourced, so my point may be moot already.

------
yellowapple
MIT-licensed, even.

~~~
unknownian
I wonder why they would do this. In fact, I don't see the benefit of MIT over
Apache except for compatibility with GPLv2. But I'm definitely not an expert,
if someone would want to explain.

~~~
cwyers
Parts of Mono are GPLv2, maybe they want Mono (and thus Xamarin) to have the
freedom to use as much of this as possible.

~~~
laichzeit0
The irony that Microsoft would one day release code under the MIT license
which would make it possible for Mono to benefit (but not the other way around
because of GPL) is hilarious.

How the wheel of freedom has turned.

* disclaimer: yeah I know the Stallman crowd have their own particular definition of "freedom" that is vastly different and would disagree

------
NicoJuicy
This has all been set in motion during Ballmer.. Not from Ballmer himselve,
but from inside out ( a lot of good employees there).

Now one of the guys pushing it, is CEO of Microsoft and we are finally seeing
a (real) difference.. I joined the MS community a long time ago and this is
(again) a heart warming addition!

Good job Microsoft, you're a bit late to the party. But no doubt, the ROI will
show sooner or later! ;-)

------
josh2600
I made a snapshot of a CentOS 6 box with CoreCLR cloned if anyone wants to
play with it:
[https://www.terminal.com/snapshot/f34341a1b529a9141529cda006...](https://www.terminal.com/snapshot/f34341a1b529a9141529cda0067678770dbd1894a247a33854cbf0907247819a)

Note: You'll need a terminal account to boot it, but it only takes 10 seconds
to come online once you do that.

------
cm2187
Should we expect more zero days against .net as a short term effect of the
source code becoming available?

~~~
gtirloni
Very few people here are qualified to inspect the code in such short notice
and look for dangerous code. I think any answer to this question is going to
be pure speculation.

Since it's very easy to decompile .NET binaries and Windows has been a
traditional place for crackers and what not, I think that code base is very
well inspected already.

~~~
cm2187
But I don't think the CLR is in .Net.

------
Halienja
So I am not sure what this means to the end user but as another reader pointed
out, Google and other companies in future could use .Net/C# as part of their
mobile architecture. You could host .net sites on OSX or Linux, test them on a
Mac. What else?

------
giancarlostoro
I wonder how this would aid projects such as IronPython and IronRuby if at
all, just out of curiosity. My only dream is that they eventually have VS on
Linux.

~~~
ianlevesque
Probably the most immediate winner is Unity. They've been stuck on an ancient
version of Mono because they did not want to license tech from Xamarin. They
can now have MS derived runtimes free.

~~~
numo16
Unity has been developing their own runtime for a while now to get away from
the mono licensing costs of using a new version. I'll be interested to see how
they react to Microsoft open-sourcing a lot of stuff they might have been able
to use.

------
frik
Next step, WinForms

~~~
mwcampbell
I think it would be more interesting and useful to have the source for WPF,
given that WPF is an actual GUI toolkit implementing its own widgets, whereas
WinForms is basically just a wrapper around Win32.

~~~
jameshart
Unfortunately, I think a lot of the interesting parts of WPF are just wrappers
around DirectX APIs.

~~~
Aleman360
That's just for rendering. All the controls and data-binding mechanisms are
straight-up C#.

For example:
[http://referencesource.microsoft.com/#PresentationFramework/...](http://referencesource.microsoft.com/#PresentationFramework/Framework/System/Windows/Controls/Slider.cs,6532ecbe410bb4ae)

------
jader201
Direct link to repo:

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

------
lukasm
hmm github can't preview cpp files
[https://github.com/dotnet/coreclr/blob/master/src/gc/gc.cpp](https://github.com/dotnet/coreclr/blob/master/src/gc/gc.cpp)

~~~
ploxiln
github suppresses views of syntax-highlighted files that have too many lines
or too-long lines. They make browsers crawl or crash (too many elements...)
and they're not useful for humans to try to view on a web page anyway.

I guess it's no surprise that microsoft software has a human-edited source
file that's over 35000 lines...

~~~
larsberg
> I guess it's no surprise that microsoft software has a human-edited source
> file that's over 35000 lines...

IIRC, it was originally machine-generated... from LISP code written by David
Bacon, under contract from the then-GC owner Patrick Dussud.

~~~
kinghajj
Holy crap, do you have a link that explains that in more detail? That sounds
amazing.

~~~
carussell
Here go: [http://channel9.msdn.com/Shows/Going+Deep/Patrick-Dussud-
Gar...](http://channel9.msdn.com/Shows/Going+Deep/Patrick-Dussud-Garbage-
Collection-Past-Present-and-Future)

------
camkego
Mixed mode assemblies on Linux??

Has anyone heard or seen whether MSFT is planning to support this?

------
bJGVygG7MQVF8c
test

------
_random_
If they could add native C#(+HTML5) support to Spartan now that would be
amazing...

------
vinceyuan
Great, but it's too late. .NET will still be the Windows-only technology. (I
do know Mono) .NET becomes too big and too complex. I don't think it's easy to
make it cross-platform.

