Slashdot Mirror


Mono C# Compiler Compiles Itself

Bob Smith writes: "Miguel just commited the last patch nessisary to get Mono's C# compiler to compile itself. After 7 odd months, MCS is now self hosting." jbarn adds: "Mono-list email is here."

13 of 339 comments (clear)

  1. More developers to mono by famazza · · Score: 5, Insightful

    I think it'll bring more developers to mono, and also more accurate code. Many developers couldn't code with quality due to the lack of a linux compiler, to develop the mono framework developers should go to windows and compile at .net compiler.

    It's a big step forward. Congratulations

    --

    -=-=-=-=
    I know life isn't fair, but why can't it ever be un-fair in MY favor!?
  2. Mono Roadmap by Shanes · · Score: 5, Informative
  3. Re:a dumb question by pthisis · · Score: 5, Informative

    If the compiler can build itself, then people can work on improving the compiler without needing to have a different compiler to build it with.

    In this case, until now you needed to have Windows and a C# compiler for Windows in order to work on the C# compiler for Linux--that would shut someone like me (who has no Windows) out from being able to do compiler work. Not that I want to work on C# anyway, but you get the point.

    Imagine if all the gcc developers had to buy a C compiler to work on developing the free one!

    Sumner

    --
    rage, rage against the dying of the light
  4. Samba anyone ? by MosesJones · · Score: 5, Insightful


    Isn't it wonderful having C# and .NET on Linux, after all they won't have the problems that Samba boys have trying to keep up with MS deliberately changing things to stop them, and it won't be miles worse.

    Mono is a nice idea, but unfortunately .NET isn't a revolution, its a way to build poor quality mainframes, lots of boxes, poor IO. In terms of distribution there is none. Full credit to the guys for doing this but it does remind me of a Larson cartoon, you know the one with the Sheep Bar and the line

    "What do you know, I'm a follower too"

    --
    An Eye for an Eye will make the whole world blind - Gandhi
  5. Compile itself by Hougaard · · Score: 5, Funny

    Ahhh the old chicken and egg problem. (Compiler version)

    The first Pascal compilers (and many other compilers) where actually written in their own language. Niklaus Wirth (and his staff) simply "executed" the program by hand/on paper and in that way they compiled the first compiler written in the language itself.

    After that it becomes easier, you just need to make sure that you can compile the new version of compiler with the old one.

    1. Re:Compile itself by CatherineCornelius · · Score: 5, Informative
      Pascal was actually designed to be compiled in a single pass. Although literally executing a Pascal compiler by hand would take _ages_, you can use a high level language as a guide to hand-produce an equivalent assembler routine from prefabricated sections (ie macros).

      But this isn't what Wirth did. First he had a student code a compiler in Fortran, but this proved unsatisfactory. He then worked for several years on implementations before finally coming up with what we now call p-code--a simple virtual stack machine that could be implemented easily in any assembler language then available. The bootstrap compiler generated p-code, and thus porting the language was reduced to writing a few simple low level i/o routines and a p-code interpreter.

      I believe one or two younger readers may recognise this concept from a very popular modern programming language. :)

  6. Re:I haven't heard good things about C# by Crimplene+Prakman · · Score: 5, Insightful
    Hence Mono.

    And and the controversy over the last while over whether our buddy Miguel et al are aiding and abetting the Redmond Ragtags, or opening the use of C#, quite likely one of the best all-round OOP RAD-able languages available, to the rest of the world outside those who don't mind being "locked in", as you say.

    If nothing else, it will be yet another choice, and let's face it: if Linux allows for nothing else, it's choice. Choice in WMs, xterms, Desktop Environments, GUI toolkits, distros, package managers, and now choice in top-end populist OOP languages.

  7. Re:I haven't heard good things about C# by Crimplene+Prakman · · Score: 5, Insightful
    If you think C# is at nearly the same level as C, you're very mistaken. It has much in common with Java, which is only related to C about as much as mice are to elephants.

    C# and C share a letter and an ancestry, but have a completely different raison d'être, philosophy and implementation.

  8. Re:a dumb question by cperciva · · Score: 5, Insightful

    what is so good about a compiler being able to compile itself?

    Once the compiler can compile itself, you can stick a trojan into it and have a good chance of nobody noticing.

  9. Mono is does not depend on .NET by Carnage4Life · · Score: 5, Informative
    Isn't it wonderful having C# and .NET on Linux, after all they won't have the problems that Samba boys have trying to keep up with MS deliberately changing things to stop them, and it won't be miles worse.

    Mono is not a clone of .NET on Linux but an implementation of the ECMA standard on Linux. You do know that C# and the CLI are ECMA standards, right?

    Secondly as miguel said in my interview with him which originally ran on Slashdot and then on MSDN

    Dare Obasanjo: Similarly what happens if Dan Kusnetzky's prediction comes true and Microsoft changes the .NET APIs in the future? Will the Mono project play catchup or will it become an incompatible implementation of .NET on UNIX platforms?

    Miguel de Icaza: Microsoft is remarkably good at keeping their APIs backwards compatible (and this is one of the reasons I think they have had so much success as a platform vendor). So I think that this would not be a problem.

    Now, even if this was a problem, it is always possible to have multiple implementations of the same APIs and use the correct one by choosing at runtime the proper "assembly". Assemblies are a new way of dealing with software bundles and the files that are part of an assembly can be cryptographically checksummed and their APIs programmatically tested for compatibility. [Dare -- Description of Assemblies from MSDN gloassary]

    So even if they deviate from the initial release, it would be possible to provide assemblies that are backwards compatible (we can both do that: Microsoft and ourselves)

    .NET isn't a revolution, its a way to build poor quality mainframes, lots of boxes, poor IO. I

    No .NET isn't a revolution, it's simply a slight improvement on an old idea of how things can be done. The same way Linux, Apache, BSD, Perl, Java, XML, P2P, the world wide web, etc. aren't revolutions but simply new spins on decades old concepts.

    However, does this somehow preclude their usefulness or the fact that they are all innovative in their own way?
  10. Re:This might make it a bit more intriguing by image · · Score: 5, Informative

    You wrote:

    The cost of using soap means the XML has to use DOM and it has to validate the required nodes.

    and:

    Anyone working with XML knows that validating DOM structure can be very costly for complex tree structures.

    SOAP does not use the DOM. The SOAP DTD can be validated without it. As can any XML DTD.

    Yes, the DOM is heavyweight, but it is also totally orthogonal to this problem. Where did you get the idea that SOAP required a DOM, anyway? The spec you reference certainly doesn't say that, and they really don't have anything to do with each other.

  11. Re:Microsoft and "standards" by rabtech · · Score: 5, Informative

    Is that why some 15 year old HP-UX boxen running some ancient version of samba can still talk to my Windows 2000 server?

    I find it hilarious that you would accuse Microsoft of changing the API; SMB hasn't changed at all on NT/2K except for a few upgrades to the password scheme to make it more secure and a few other small patches to fix bugs.

    What Microsoft did do is come up with a new and improved filesharing protocol, CIFS, and implemented it as a >separate library running on different ports. If you honestly believe they are going to totally change the way their server OS works and lock out Win9x/NT4 clients, you are sadly mistaken.

    Similarly, the Win32 API hasn't ever been CHANGED... it has only had things added to it. And with NTVDM/WOW, I can still run my ancient DOS and Win3.1 programs (for the most part) under Windows 2000; tell me where they've changed the API here?

    *ALMOST EVERY* Time Microsoft wants to make a change that would break something, they just implement it in a separate standard or New API rather than b0rking the old one, which is the way it should be done.

    If anyone is spouting FUD and nonsense here, it is you.

    --
    Natural != (nontoxic || beneficial)
  12. Re:Microsoft and "standards" by SerpentMage · · Score: 5, Insightful

    You are right on all of your points. But I ask the following. Can your HP-UX station use authentication that allows it to hook into Active Directory with all bells and whistles? Probably not.

    It is not that Microsoft changes the basics. That is pretty easy to catch up to. What is more problematic is keeping up.

    Let me explain. Lets say that I build an application using the Windows API (actually am). Everything works fine until the user starts using it on Windows XP or Windows 2000. You may ask why? Well according to the new security rules the application must only save content under the "My Documents" folder and not the folder installed to or something else. So now you are wondering how do I get access to the "My Documents" folder? The answer is a brand new API that is only available in a modern Platform SDK because when Visual C++ was released the API did not exist.

    Do you see the issue? It is not that they break backward compatibility. It is that they introduce new rules which require you force upgrade your code. And that will happen with .NET. That is also why Miguel is dreaming about doing .NET on LINUX.

    --

    "You can't make a race horse of a pig"
    "No," said Samuel, "but you can make very fast pig"