Live data from Hacker News

Microsoft Open Sources C# Compiler

roslyn.codeplex.com

141–150 of 459 posts

Re: Microsoft Open Sources C# Compiler

#141
post #111

Earlier quoted context omitted.

No WPF is still there. XAML is still the basis for windows store apps, and windows phone apps.

XAML != WPF. XAML is a language for object instantiation, thats it. Similar to XIBs in the Apple world. There are no less than 3 similar but different and incompatible UI libraries that can be instantiated by XAML: WPF, Silverlight (WPF/e), and Windows store/phone (WinRT). WPF is dead like WinForms but the only solution for normal windows apps unless somethings changed with WinRT to make non full screen apps with. If…

Windows 8.1.1 allows non-fullscreen WinRT apps.

So yeah, when I said WPF, I meant XAML/WinRT. My main desktop use is supporting WinForms legacy apps so I don't keep up with the new GUI frameworks.

Re: Microsoft Open Sources C# Compiler

#142
post #83

Earlier quoted context omitted.

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.

You honestly don't get it? I really like microsoft products and I use them every day, however the business model is too lock people in to their ecosystem so that you have to purchase licenses for their products. Mono clearly undermines that b/c it allows you to "easily" jump ship to a free platform. Unless I'm somehow completely misunderstanding their business model - killing Mono just makes business sense.

No, not really. It's clear to me we are moving to a devices and services model. More people writing C# means a broad reach on everything from netduinos to iphones to desktops to the cloud.

* I work for MSFT, on the Cloud.

Re: Microsoft Open Sources C# Compiler

#143

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

Well, here we are then. This now officially the standard play for formerly-dominating computer-platform firms who have fallen on hard times: having before been proudly hard-nosed and proprietary, publicly see the light and present a new image as a new, kinder, gentler company which totally gets it about openness. Former famous examples: IBM under Lou Gerstner (we love Linux and open platforms!), Apple after the NeXT acquisition but before the iPhone (look how expandable our new PowerMacs are; on the software side, we're now an open-systems-loving Unix vendor, and we'll even open-source our kernel!), poor old SGI (we love Linux now! Or, wait ... actually WinNT, whatever.). Sun of course used to go back and forth between being chill dudes who totally get it and more nakedly hard-nosed. As always in these cases, the questions are how far the bright new era of glasnost actually goes in substance (IBM legal's patent monster quietly thrived through all the kinder-gentler period) and how long it lasts (these eras tend to end with the company either dwindling into irrelevance, or finding renewed success and going back to its bad old ways).

Re: Microsoft Open Sources C# Compiler

#144
post #134
post #121

Earlier quoted context omitted.

signs of the new Satya Nadella era?

All this started long ago. Roslyn has been in development for a few years and that was still under Ballmer's leadership. Also many of the other things they're unveiling and open-sourcing now started way before Nadella took over as CEO. But my guess would be that Ballmer stepping down was sort of symbolic in this regard. With a new CEO it looks more like a "new Microsoft" doing all these things.

[deleted]

Re: Microsoft Open Sources C# Compiler

#145
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?

TLDR: You can't write the first compiler for a language in the language. However, you can write the second compiler in the language and use the first compiler to compile it.

If you already have a compiler in the language you're compiling, you can update the compiler with new features by the following process, called "bootstrapping". This process is used in gcc for example:

1. Use the old binary version to compile the new source version.

2. Use the binary produced in step 1 to compile the new source version.

3. Use the binary provided in step 2 to compile the new source version.

The results of stages 2 and 3 should be the same (assuming the old and new compilers assign the same semantics to the compiler source code and don't have non-determinism, e.g. using wall-clock time to determine when to stop searching for optimizations).

The bootstrap process can't be used on the first compiler for a brand-new language, because there is no "old compiler" that can be used in stage 1. The only way around this is to write the first compiler in a different language that already exists.

Of course, if a self-hosted compiler is your goal, you can afford letting the very first compiler (the one written in another language) be limited, "dirty," or "hacky". You don't have to implement the entire language in the first compiler; the first compiler just has to support enough of the new language to allow you to write the second compiler.

Anyway, once you have the first compiler, you write the first version of the second compiler in whatever subset of the language the first compiler supports. Once the first compiler builds the first version of the second compiler, the first compiler is no longer needed; you can add all new features to the second compiler only.

New versions of the second compiler (perhaps supporting more language features) can now be produced by bootstrapping. Of course, you can also use the second compiler to compile a totally different compiler implementation written in the new language (this would be the third compiler for the new language).

Re: Microsoft Open Sources C# Compiler

#146
post #47

Released under the Apache 2 license. http://roslyn.codeplex.com/SourceControl/latest#License.txt

Which is really good. It put a final say in the question about patents.

Not to mention it's GPL (and BSD) compatible, which makes it so much more useful than the various Corporate Public Licences that have been wrapped around similar projects in the past (Sun/Oracle and MS).

Re: Microsoft Open Sources C# Compiler

#147
post #57

No more ".Net magic" now that the curtain's dropped. I think this will help .Net devs make smarter decisions about their code now that they can see what's happening in the background.

I'm not sure whether there ever was a time when .NET devs had to seriously consider "what was happening in the background". .NET Framework documentation has always been pretty good. Not too many dark corners there.

Additionally, they released the reference source code for .NET[0] a while back, so there is always that to dig through as well.

[0]: http://referencesource.microsoft.com/

Re: Microsoft Open Sources C# Compiler

#148
post #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.

RMS is not part of the open source commuinty. He doesn't advocate for open source. He advocates for free software.

Edit: why the downvotes? If I started a social movement and everyone associated me with a watered-down alternative that tries to silence my views, I would be a little miffed.

Re: Microsoft Open Sources C# Compiler

#149
post #20
post #15

Earlier quoted context omitted.

Who would have imagined it five months ago?

They open-sourced a lot of things related to .NET in the recent years. That Roslyn was to join those things doesn't exactly come as a surprise. It's still welcome, though.

When they first started talking about Roslyn a couple of years ago, the plan was always to open-source it, when they felt good about the quality.

Re: Microsoft Open Sources C# Compiler

#150

Earlier quoted context omitted.

WPF just got some love a few minutes ago - they've got plans for a new release of it by the sound of things.

I have a few WPF 4 bugs that were marked "fix in next version" 3-4 years ago, and then it was announced that there is no next version - i'm in the process of moving off WPF and this newfound love is not going to change anything.

Yes. Good luck to Microsoft trying to be relevant in HTML5 space.
Post reply on HN