Microsoft Releases Source of .NET Base Classes 110
Disgruntled Fungus writes "A few months ago, we discussed Microsoft's intention to open source the .NET libraries. According to a developer's official blog, the source code is now available. The source to libraries such as System, IO, Windows.Forms, etc. can now be viewed and used for debugging purposes from within Visual Studio. Instructions for doing so have also been provided. The source code has been released with a read-only license and 'does not apply to users developing software for a non-Windows platform that has "the same or substantially the same features or functionality" as the .NET Framework.'"
you know what *that* sounds like.. (Score:5, Insightful)
(Think "oh, that implementation really looks like ours! you must have read it! here's a lawsuit for you")
Re:you know what *that* sounds like.. (Score:4, Informative)
(see also Lutz Roeder's popular
Re: (Score:2)
This just means that you can debug it easier now (you could save the source code in reflector and use that do debug in the past)
Re: (Score:2)
Re: (Score:1)
I have used reflector on in house software written in
Re:you know what *that* sounds like.. (Score:5, Interesting)
It is correct to say that .NET Reflector is a decompiler. It just happens that IL (the bytecode that .NET languages compile to) is quite high-level, so it's much easier to turn IL into readable C# code than it is to turn x86 machine code into C. .NET assemblies also carry a lot of metadata along with the code, allowing Reflector to find the namespaces, classes, properties and methods without needing the original source code. Reflector itself also does some other magic when possible. For example, it can read in the debug information that the C# compiler can optionally produce (the .pdb file) and use that to fill in the things that you can't find out from the assembly alone.
An interesting (for some values of "interesting") exercise is to take some VB.NET code, compile it and then use Reflector to view it in C#. Since the two compilers don't generate completely equivalent code, you can get some unexpected results. A good example to try is some VB.NET code using late binding of methods on variables of type "Object", which isn't a language feature in C#.
Re: (Score:1)
Re: (Score:2)
public class Foo
{
public Foo()
{
int a = 5;
Console.WriteLine("My name is Foo!");
}
}
Compiling in debug mode will leave all of that. Compile in Release mode, with optimizations - the compiler will see that you never use "a" and will make it go away. So if you then disassemble t
Re: (Score:3, Insightful)
Re: (Score:2)
Re:you know what *that* sounds like.. (Score:4, Insightful)
You have one person read the source, document it and put the documentation online somewhere.
You have second person read documentation and re-write functionality of code.
ReactOS does this exact same thing to re-implement the Win32 API, except that they have to 'break' the executable files. (My memory is shot, I can't remember the term for this, or the process as a whole...)
So long as the documentation does not contain source, merely what each function does, and so long as there is no obvious link between the two persons, there should be no problem.
Re: (Score:1)
-uso.
publishing source != open source. Look deeper... (Score:2)
Re: (Score:2)
Clean room reverse engineering? Or something along those lines right?
Re: (Score:2)
You're right, "clean room" technique is probably the more correct term. But the term "Chinese wall" sounds more exotic, so I'm going to bet that that's the one he was trying to think of.
Re: (Score:1)
Re: (Score:2)
Interfaces not copyrightable in USA (4 citations) (Score:1)
I seem to remember that interfaces could also come under copyright, so there's a potential problem wherever your using the same interface as the thing your trying to clone.
Under which country's law? In the United States, interfaces are methods, and methods are not subject to copyright. Lotus v. Borland and Sega v. Accolade. Interfaces aren't even subject to the paracopyright introduced by the Digital Millennium Copyright Act. Chamberlain v. Skylink and Lexmark v. Static Control.
Re:Interfaces not copyrightable in USA (4 citation (Score:2)
If's the only thing that means you can't use a GPL library in propritory software if your only using late binding, i.e. your not actually copying the GPL code only the interfaces to it.
Re: (Score:2)
Re: (Score:2)
> (My memory is shot, I can't remember the term for this,
Decompiling?
Re: (Score:2)
Comment removed (Score:4, Insightful)
Re: (Score:2)
Heh... sounds like just about every software shop in the history of everything. :D
Sometimes I wish the documentation at my current job came even *close* to the amount of detail provided by MSDN. Ok, scratch that. *EVERY DAY* I
Re: (Score:2)
Re: (Score:2)
Given the size of MSDN and my own anecdotal evidence using it, I'd say that "inaccurate" details in MSDN are fairly rare. They are there, yes, but on the whole I'd say the docs are pretty accurate. MSDN is frequently not detailed enough, I'll grant you, but as I said, it's heads and shoulders above the detail provided by far too many software shops and middle-ware library providers (open source or not) these days.
Re: (Score:2)
Well, yes, and the next time someone posts on a Slashdot discussion "Why don't they just build skyscrapers out of spoons", that'll be relevant. However, the question someone asked in this thread was (paraphrased) why don't people reverse-engineering .NET just use the MSDN documentation, so the answer that the MSDN documentation (however adequate its accuracy may be for
Re: (Score:2)
Well, yes, and the next time someone posts on a Slashdot discussion "Why don't they just build skyscrapers out of spoons", that'll be relevant. However, the question someone asked in this thread was (paraphrased) why don't people reverse-engineering .NET just use the MSDN documentation, so the answer that the MSDN documentation (however adequate its accuracy may be for other purposes) is not sufficiently accurate to support that is perfectly reasonable and appropriate, and your spoon-skyscraper comparison entirely misses the point of why the accuracy of MSDN was being discussed in the first place.
Ahh, I see the problem: You misinterpreted the original remark. Or I did, depending on how you look at it. The remark was this:
Re: (Score:2)
don't be overly dramatic (Score:3, Insightful)
However, don't be overly dramatic. This sort of thing isn't new and open source projects know how to cope with it. Microsoft would have a hard time making any claim actually stick, unless there was blatant infringement. Furthermore, the Mono project can now also simply have some independent third party regularly check their code against Microsoft's to make sure nothing sneaks in.
read the fine print (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
Re: (Score:3, Insightful)
I doubt it as the line I suspect you're referring to, "the same or substantially the same features or functionality" as the
Bob
I doesn't sound like that (Score:2)
Re: (Score:3, Interesting)
Microsoft is actively working with Mono to make the "Moonlight" Linux port of Silverlight a reality.
Scott Guthrie blog post about this [asp.net]
Re: (Score:1)
The catch. (Score:2)
So you can look at the source all you want, unless you're a mono developer.
NOT open source (Score:5, Insightful)
Yes, and as one of the first posters pointed out [slashdot.org], unlike Java [java.net] for instance, this is NOT being published under an open source licence, Microsoft even says so. So why do you keep using the term?
Re: (Score:1)
The source is being opened, not Open Sourced. Note the use of lower case which to me differentiates from previously closed source being opened to public scrutiny and made available under some licence, and previously closed source being made Open Source under the definition of Open Source [opensource.org].
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
Very obviously a "back off!" clause for Mono and dotgnu.
Previously, people referred to the source by using Reflector ; this of course, doesn't quite produce the same
Re: (Score:3, Funny)
Re:NOT open source (Score:5, Insightful)
Because "Open Source" is a stupid term (Score:3, Interesting)
Re: (Score:3, Insightful)
And thanks to you for rigid, dogmatic, inflexibile intransigence and refusal to recognize any deviation from your True Path in a world of absolutes as anything but schism and heresy. Hey look, two can play. I recognize your nick (I've was here originally with a 4-digit UID, with a name I've discarded). I always believed you were abov
Yay! (Score:5, Funny)
Can't wait to see the best bits of it on The Daily WTF! \o/
Re: (Score:1)
Thing is, by posting it on the Daily WTF, we are not allowed to write anything remotely similar to any of the screwed up code Microsoft has produced, so it is a catch 22. I want to see it, at the same time, I don't!
Re: (Score:1, Flamebait)
As CmdrTaco frequently reminds us, "You should have used preview"
It's in the source! (Score:5, Funny)
Re: (Score:2)
Reflector (Score:5, Informative)
Reflector is downloadable from http://www.aisto.com/roeder/dotnet/ [aisto.com]. And it's obfuscated, so it won't run usefully on itself
Re: (Score:2)
But the actual source code is way better because it provides comments, which is many times the most important part of the code. Who knows, maybe some of the "misdesigns" of which you speak are perfectly reasonable when seeing the comments.
Also, this allows stepping through the code in a debugger, which Reflector doesn't allow (to my knowledge).
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
Re: (Score:1)
Looks rather clunky (Score:5, Informative)
* Each source file you debug into is dynamically downloaded once for each session and not retained.
* Setting breakpoints in the source is a multi-step process, because the source is different from the corresponding symbol files because the copyright banners they insert change the CRC. You have to tell the IDE to ignore that.
* You have to manually tell it to load symbols for each file.
* The symbols are also served up from an MS server (but they are cached beyond a single session).
* Some of these symbol files are 10MB, so VS "may be unresponsive" while you download them.
* "Go to Definition" doesn't work.
This in contrast to the same support in Eclipse, where all you have to do is
* Download the source
* Tell the IDE where to find the source
No, you'll get an HTTP 400 (Bad Request) response.
Given that it all seems so inconvenient to use, I think I may be sticking to Reflector.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
Give them some credit here. You only have to tell VS to load files outside the current call stack.
That said, I agree that this sucks. Needing to purchase VS 2008 and debug my code to see theirs is annoying to say the least. I was hoping to download the source and analyze Windows.Forms.Controls, System.Data.DataViewManager, and various implementations of the IBindable interface... Things that plague my understanding of the ".Net Maze" to this day.
Re: (Score:1)
Re: (Score:2)
Hey, chief, it's not difficult to distribute the source "standalone". It's called a ZIP file. Attach a EULA on the download page, and off you go. Btw, I didn't see a reference to standalone downloads in TFA. Could I get a link, please?
Re: (Score:2)
Anyway, you could argue that this approach has some advantages since you don't HAVE to download the entire source, or worry about what version of the binaries you have.
Re: (Score:1)
This is Not a Big Deal - Limited Use. (Score:2, Insightful)
This is probably only useful from an *educational* point-of-view and when you think about it, there is so much publically available code out there already how much more will you learn from the
I thought one of the major benefits of OOP was code abstraction - in theory there should not be a need to see the implementatio
it's not open source (Score:5, Informative)
In fact, the real problem with this is that, in case of ambiguities, people will code increasingly to Microsoft's source code instead of the specification. Furthermore, after having released it, Microsoft may attempt to claim that the Mono project copied some of their source code in violation of the license.
One can't prevent Microsoft from doing this, but it's not a good thing.
Re: (Score:2, Interesting)
You have to be *careful* how you use this.
Mind you what if you *do* discover a bug in Microsoft's code, what can you do?
You can't modify the source code - 'it's read only', even if you were allowed to to modify it you'll 'break' standards.
You can tell Microsoft - we all know how well they listen to 'customers/developers' and how long will it take them to fix it.
If you also use mono you will not be able to contribute to the project because you have seen 'the code'.
I've been using
Re: (Score:3, Funny)
If you see a "bug" in Microsoft's code, can you write a fix for it, date stamp it and sell it to MS as your code with a restrictive license?
Re: (Score:1, Offtopic)
Re: (Score:3, Insightful)
In fact, the real problem with this is that, in case of ambiguities, people will code increasingly to Microsoft's source code instead of the specification.
Come now. One of the benefits of open source that we constantly hear is that if any question of the actual behavior of something comes up, the developer can go straight to the source. Now you are saying that this is a bad thing?
I agree with you that developers should code to the interface as documented, but if that is the case then most open source developers should not look at the source code for the underlying packages they use.
I think MS is doing this to make life simpler for their customers and
Re: (Score:1)
Re: (Score:2)
Yes, this is an advantage of open source software. Microsoft's software is not open source.
It's fine to look at the source of open source software and target it, it is a very different thing to look at the source of non-open source software and target it.
I agree with you that developers should code to the interface as documented, but if
Misread that title (Score:3, Funny)
Re: (Score:2)
Does anybody actually use mono anyway?
Re: (Score:2)
Not everything is about you (Score:4, Insightful)
Re: (Score:2)
Yours is the best post on this topic.
The Source for the Runtime is also out. (Score:5, Interesting)
Re: (Score:1)
Re: (Score:3, Funny)
Re: (Score:3, Informative)
And then there's this:
Features
The Shared Source CLI archive contains the following technologies in source code form:
So it only does C# and JScript? WTF, hello, VB? Also, what other platforms? Vista? I thought that a
Re: (Score:1)
Re: (Score:1)
If the compiler supports C#, it should compile VB.NET code as well. That's why I'm curious why it's not listed.
And you can't seriously expect me to believe that Mono won't have support for VB code but it will have support for C#. I mean, why not just use gcc for everything?
Re: (Score:2)
Re: (Score:1)
Perhaps, VS 2008 just needed a shot in the arm. (Score:1)
It will be downloadable in "near future" (Score:1)
Whats the runtime written in? (Score:1)
Re: (Score:2)
*cough*Delphi*cough (Score:1)