Slashdot Mirror


Mono's MCS Compiles Itself On Linux

thing12 writes "On Thursday Paolo Molaro announced that he had managed to build the MCS C# compiler using MCS. This is a big step forward for Mono, as it means that Mono is almost a self hosting environment."

12 of 215 comments (clear)

  1. Almost but not quite... by Linux+Freak · · Score: 5, Informative

    The release does mention that MCS could be compiled, but that the resultant executable immediately crashes. Close, but still more work is needed before this is really an exciting milestone.

    Kudos to the Mono team for the work they've done so far, however.

  2. Re:Self compiling and newbie Slashdot readers by Anonymous Coward · · Score: 4, Informative

    The basic idea for mono is that you don't need windows anymore. Right now (before it compiles itself correctly) you need the ms .NET-tools. To get this thing hosted 100% on linux you need it to be able to compile itself.

  3. Re:Self compiling and newbie Slashdot readers by anpe · · Score: 5, Informative

    It's a kind of proof that the compiler actually works
    Its also necessay step if you're creating your language from scratch. For more precisions try : comp.compilers

    For your abbreviation problem dry your tears and try http://www.everything2.com

  4. Re:Sound good, until... by ultraw · · Score: 4, Informative
    All you guys have really a short memory. :) The previous post on slashdot on this subject (Mono) mentioned that the mono compiler could compile itself. As the example stated in the mail (original post):


    Microsoft C# compiler generates mcs.exe
    mcs.exe compiles itself and genreates mcs2.exe
    mcs2.exe compiles itself and generates mcs3.exe


    As announced 04/07/2002, the compiler compiles on the Linux platform.

    Looks like two very, very different things to me... And a big step forward for the Mono project. Kuddos to the team.

  5. Re:One step at the time by Jabes · · Score: 5, Informative

    For those that don't understand the difference. Two months ago, the mcs was able to compile itself on Windows, using the Microsoft implementation of the framework (ie the core .net libraries).

    Now MCS is able to compile itself using the mono runtime.

    Hope this helps

  6. Re:Chicken or the egg by Anonymous Coward · · Score: 1, Informative

    On that mentality, Linux is being as bad as MS in re-ripping off an idea from Sun

    Two things:
    -The ximian project is not "linux, the community" (proven by the amount of mis-communication between the leaders of the linux kernel project the gnu projects and the ximian project in the past) so when you say "linux ripping of microsoft....

    Two and most immportandly, comparing the way mono implements an open standard (thats what the .net framework is supposed to be, acording to microsoft) to the way microsoft "re-implements" many of the java ideas is just silly. Especially when you take in acount that sun was very helpfull getting java on other platforms compared to microsoft who ports .net stuff to freebsd but won`t touch the linux gpl world with a ten foot pole(gpl is "viral", and microsoft distrust anything potantially "infectious" (say attached executables in mail and stuff) ;-)). Could you explain that something called "the viral nature of a licence" is good for open standards to your phb?

  7. They did it on *Linux* by vojtech · · Score: 4, Informative

    The slashdot headline misses the important part
    of the story, the fact that they compiled C# using MCS on *Linux*, using the Linux runtime, as opposed to doing this on Windows, which was done
    about two months ago.

  8. Re:Self compiling and newbie Slashdot readers by Fnord · · Score: 4, Informative

    Speaking as a software tester that's done compiler work, one of the first tests for any compiler is to compile itself, and then use the newly compiled compiler to compile itself again. Then you look at the two binaries. If they're exactly the same the compiler passes the test.

  9. Re:RMS wont be too happy by sydb · · Score: 3, Informative

    RMS was fighting for it in order to counter the Mono threat

    Are you sure? My link (4th paragraph, "With DotGNU and Mono...") says Stallman thinks its a good idea. Where's your link?

    --
    Yours Sincerely, Michael.
  10. Re:Clue me in... by mikeee · · Score: 3, Informative

    You write a really lousy but functional C compiler in assembler. Then you write a decent C complier in C. Compile it with the first compiler; now that you have an executable, recompile it with itself to get an executable that isn't awful. Possibly the first compiler doesn't handle anything but a subset of your language and you have to make multiple iterations of this.

    I wonder when the last time anybody wrote a compiler in assembler was...?

  11. Re:Great News by Jhan · · Score: 3, Informative

    Of course they modeled it on Java.

    Unfortunately, they did more than this. They fixed a number of things that Java developers have screamed at Sun since day one, but which cannot be introduced into Java at this late day.

    Example 1: Boxing

    int i=17;
    String s=i.toString();
    i=String.valueOf(s);

    OR

    ArrayList al=new ArrayList();
    int i=4711;
    al.add(i);

    Example 2: Simple(r) component creation.

    Can't think of any more right now, but boxing in and of itself is good enough :-)

    Oh yeah, C++ style type/class conversions.

    --

    I choose to remain celibate, like my father and his father before him.

  12. by hand, by subset, or by another lang by GCP · · Score: 3, Informative

    Sometimes what you do is you write your compiler in your new language, then literally walk down your code and hand convert it into assembly. You know how to compile by hand if you know how to write a compiler. (Think about it.)

    You can do this by writing just a subset of your compiler, then hand compiling, then using the result to compile a fancier version, which can then be used to compile a fancier version, etc.

    Another way is to take another compiler for a similar language (say a Java compiler written in C), then hack it until it is a barely functional compiler for your new language. Then you compile your simple compiler code, and then use that result to compile a fancier one, etc.

    It's called "bootstrapping".

    --
    "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."