Live data from Hacker News

Microsoft Open Sources C# Compiler

roslyn.codeplex.com

81–90 of 459 posts

Re: Microsoft Open Sources C# Compiler

#81

Earlier quoted context omitted.

as someone who doesn't know a whole lot about the .net ecosystem - does this open the possibility for writing server side c#.net web applications that run on linux, with full parity with the windows environment? with or without mono?

The C# compiler is written in C#, so you can use it anywhere with a .NET runtime. Microsoft doesn't ship a .NET runtime for Linux, so you'll have to use Mono, but if your app is compatible with Mono, you're good to go!

How does something like this happen? How can you write a compiler in the language that it is supposed to be compiling?

Re: Microsoft Open Sources C# Compiler

#83

They also announced as part of this that they are putting a large swatch of their .NET Source code under Apache 2 and accepting pull requests. Folks, this is a very big deal for Microsoft. Who would have imagined this 10 years ago? Here is an image that shows what they are putting into the community https://pbs.twimg.com/media/BkT9oBcCQAAHIAV.jpg:large

Once again the whole KILL MONO FUD was the actions of the Open Source Community in the last 5 years. I never understood how in the world they got this is a trap from everything that was happening.

I don't agree with RMS many times but in this one way he was 100% wrong when he targeted mono.

Re: Microsoft Open Sources C# Compiler

#84
post #23

They also announced as part of this that they are putting a large swatch of their .NET Source code under Apache 2 and accepting pull requests. Folks, this is a very big deal for Microsoft. Who would have imagined this 10 years ago? Here is an image that shows what they are putting into the community https://pbs.twimg.com/media/BkT9oBcCQAAHIAV.jpg:large

... as awesome as this is, I'm gonna be That Guy: No WPF?

I thought WPF was killed during the whole mess of killing Silverlight, etc. a few years back?

Re: Microsoft Open Sources C# Compiler

#87
post #81

Earlier quoted context omitted.

The C# compiler is written in C#, so you can use it anywhere with a .NET runtime. Microsoft doesn't ship a .NET runtime for Linux, so you'll have to use Mono, but if your app is compatible with Mono, you're good to go!

How does something like this happen? How can you write a compiler in the language that it is supposed to be compiling?

They wrote the original C# compiler in a different language (probably C++) first.

Then they wrote the second C# compiler in C#, and used the first compiler to compile the second compiler. Voila!

Re: Microsoft Open Sources C# Compiler

#88
post #15

Earlier quoted context omitted.

Who would have imagined it 5 years ago?

Who would have imagined it five months ago?

ASP.NET went open source 2 years and a few days ago. Since at least that long ago, things have pretty steadily been heading in this direction. Only reason we haven't seen things more along any more quickly is that companies this size just don't move that fast.

Re: Microsoft Open Sources C# Compiler

#89
post #75

Earlier quoted context omitted.

The C# compiler is written in C#, so you can use it anywhere with a .NET runtime. Microsoft doesn't ship a .NET runtime for Linux, so you'll have to use Mono, but if your app is compatible with Mono, you're good to go!

Is Mono able to compile Roslyn?

I assume you mean the Mono C# compiler (the one that the Mono team develops).

Interestingly, no -- but neither can the native C# compiler (that's what we call the old C# compiler that everyone's using in VS right now)!

Why? The C# compiler is bootstrapped, so we actually compile the compiler with the compiler. It just so happens that a while ago we felt we needed a feature so badly for the C# compiler that we introduced it into the C# language (exception filters) and started using it in the compiler immediately. So in order to compile the compiler, you need a C# compiler that supports exception filters, which right now is just the Roslyn C# compiler. Honestly, the feature (and some other small changes we've made) aren't that complicated, so they could be backported to other compilers, but I don't know why you would want to do that.

Post reply on HN