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."

65 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.

    1. Re:Almost but not quite... by jsse · · Score: 4, Funny

      The release does mention that MCS could be compiled, but that the resultant executable immediately crashes.

      Isn't it the expected outcome? It's considered done!

    2. Re:Almost but not quite... by John_Booty · · Score: 3, Interesting

      That's sort of like saying "well, the Wright brothers' airplane only few for a minute or so. Close, but still more work is needed before this is really an exciting milestone"

      It's a heck of a milestone. Of course it's not useful yet, but they're not claiming it is.

      --

      OtakuBooty.com: Smart, funny, sexy nerds.
    3. Re:Almost but not quite... by CaseyB · · Score: 2
      MCS could be compiled, but that the resultant executable immediately crashes.

      I guess it's sort of like that classic definition of a species: it's not enough for the creature simply to be able to reproduce -- the offspring has to be fertile as well!

    4. Re:Almost but not quite... by kubrick · · Score: 3, Funny

      After all, it's the unoffical Microsoft slogan -- "If it compiles, ship it!" What could be more appropriate for an implementation of a Microsoft-derived technology? :)

      --
      deus does not exist but if he does
  2. RMS wont be too happy by gokulpod · · Score: 2, Interesting

    According to what previous articles said, I can guess RMS may not be too happy with this. Any idea, what happened to the election for Gnome Board. RMS was fighting for it in order to counter the Mono threat. Poor guy already had his hands full of Microsoft when this comes along.

    --
    My mom never taught me to sign.
    1. 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.
  3. Self compiling and newbie Slashdot readers by Anonymous Coward · · Score: 2, Funny

    I don't understand much about technology or Linux, and I don't follow it too closely. So can someone tell me what is the point of having a program self compiling? It looks to me its mainly for show and not very useful, not something I thought was common in the Open Source community.

    Lately I have been feeling isolated while reading Slashdot. Not knowing all the common abbreviations and whatnot. Try to explain more about things instead of believing everyone already knows everything. I think Slashdot should try to adapt more to the newbie instead of only to the veteran.

    1. 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.

    2. 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

    3. Re:Self compiling and newbie Slashdot readers by Anarchofascist · · Score: 2, Interesting
      I don't understand much about technology or Linux... I think Slashdot should try to adapt more to the newbie instead of only to the veteran.

      It's news for nerds. News for newbies is here.

      I'll answer your specific question anyway:

      Self-compiling is an easily-verifyable milestone in a compiler's development. It was first achieved in 1973 when N. Wirth wrote a Pascal compiler in Pascal and hand-compiled it, then ran the hand-compiled compiler on itself.
      --
      Once more unto the breach, dear friends, once more, Or close the wall up with our American dead!
    4. 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.

    5. Re:Self compiling and newbie Slashdot readers by dvdeug · · Score: 2
      Self-compiling is an easily-verifyable milestone in a compiler's development. It was first achieved in 1973 when N. Wirth wrote a Pascal compiler in Pascal and hand-compiled it, then ran the hand-compiled compiler on itself.

      Was Wirth really the first? "Compilers and Compiler Generators" says
      The ICL bootstrap is further described by Welsh and Quinn (1972). Other early insights into bootstrapping are to be found in papers by Lecarme and Peyrolle-Thomas (1973)
      and I seem to remember the first LISP systems being bootstrapped, too.
    6. Re:Self compiling and newbie Slashdot readers by Fnord · · Score: 2

      I've tested compilers. It's not really that complex.

    7. Re:Self compiling and newbie Slashdot readers by Thing+1 · · Score: 2
      Lately I have been feeling isolated while reading Slashdot. Not knowing all the common abbreviations and whatnot.

      AFAIK (IANAL) ISTR TMTOWTDI. FWIW, YMMV; TIA.

      First way

      Second way

      Third way

      --
      I feel fantastic, and I'm still alive.
  4. Chicken or the egg by jaavaaguru · · Score: 2

    What came first - the chicken or the egg? Well in this case it was the monkey :o)

    I think this is great work from the Mono team. They've passed one of the biggest hurdles in implementing a compiler. At university we have been using Java in situations where they *could* have made us use c#. If in the future they do say "we want you to use c#", I can happily stay on my linux box and use it. It's always good news when there's yet another thing that Linux can do just as well as MS.

    1. Re:Chicken or the egg by jaavaaguru · · Score: 4, Insightful

      On that mentality, Linux is being as bad as MS in re-ripping off an idea from Sun. If one car manufacturer releases a model with built-in GPS/sat-nav, and others follow, do we say they're ripping off an innovative idea? To compete in an industry you must either provide what your competitors do, or provide something better.

    2. Re:Chicken or the egg by AftanGustur · · Score: 2

      What came first - the chicken or the egg?

      Actually, there exists a correct answer, but to understand it you must understand the question first.

      Evolution is the key.

      --
      echo '[q]sa[ln0=aln80~Psnlbx]16isb572CCB9AE9DB03273snlbxq' |dc
    3. Re:Chicken or the egg by alext · · Score: 2
      .NET is very innovative

      It is? I must have missed the
      • transparent persistence (like OODBs)
      • workflow management (like WebLogic)
      • ability to treat programs as data (like LISP in 1960)
      • query and analysis functions (PL/SQL)
      • rule processing (XSLT, Prolog, J/Rules)
      but I guess some people are just thrilled with plucky little Microsoft having the skill and determination to successfully make a clone of Java. Well done guys! But go easy, not sure my brain can handle any more innovation right now - phew!
  5. 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.

  6. 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

  7. Re:Program Java in Java by DA-MAN · · Score: 3, Funny

    What came first, The Compiler or the Language?

    --
    Can I get an eye poke?
    Dog House Forum
  8. 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.

    1. Re:They did it on *Linux* by thing12 · · Score: 3, Insightful

      Yeah, I probably should have mentioned the difference between then and now in the content of the story. This really is a huge milestone for them - going forward they no longer need any Microsoft tools. C# is a great language, it's fast and flexible - it fills the gap between C and Perl nicely. And while it may be the bastard cousin of Java, I think it's got a much more polished feel to it. Being developed under Microsoft's wing wasn't the best, but at least now it's an ECMA standard, not owned by any company - much less Sun whose position on open source sways like trees in the wind.

    2. Re:They did it on *Linux* by alext · · Score: 2

      Now what could he possibly have meant by 'more polished'... method names in shiny InitCaps, is that it?

  9. We are close... by jsse · · Score: 3, Funny

    The bad news is that the compiled mcs crashes, because some field tokens are wrong and this confuses the runtime (we still don't have a verifier,hint, hint).

    Boy, we need to implement BSOD for this, hint, hint.

  10. Great News by nervlord1 · · Score: 2, Interesting

    C# is an incredibly good laungage

    I'm far from a microsoft fan, my entire career depends on my unix admin skills, but being a dabbeler in programming (mostly procedual stuff) has really opened my eyes on programming in general, and c# is an EXCELLENT object oreintated language, as soon as i picked up a little c#, object oreintation just started to make sense, i had difficulty with it before in c++ but now the peices fall into place.
    Combine this with the excellent garbage collector features, and EXTREMLY easy to use GUI designer (just as easy as visual basic) and ability to import code from other languages and use it combines to make C# a great language, I for one am extremly happy gnome is supporting it and hope you all give it a try. Tell me what you think.

    Anyone in the perth area is welcome to email me(arevill@bigpond.net.au) and ill give you a little tour :)

    --
    Microsoft IIS is to webserving as KFC is to healthy eating
    1. Re:Great News by Arker · · Score: 2

      as soon as i picked up a little c#, object oreintation just started to make sense, i had difficulty with it before in c++ but now the peices fall into place

      Never tried ObjC I take it?


      The one good thing I've seen in all of this so-called ".NET" is the language-agnosticism technic. Some of that is very handy, and actually almost new (not really, if you follow academic CS this stuff has been coming for awhile, but MS does deserve credit for implementing a few things first for once) and very slick. But the rest of it... are you familiar with the term "trojan horse"? :)

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    2. Re:Great News by seizer · · Score: 2, Interesting

      Do you know WHY it's an "incredibly good language"? They've ripped off Java to an astonishing extent. The only thing they have that Java doesn't really, is a pretty flashy IDE with said GUI builder (though I hear JBuilder is pretty good).

      Honestly. Compare the APIs. Tell me MS didn't model C# on Java.

    3. 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.

    4. Re:Great News by alext · · Score: 3, Funny

      The Java -> C# learning curve in negligable [sic]

      Good heavens, what a coincidence. Yet strangely C# is 'shocking', 'amazing' and 'excellent' whereas Java is...? The same weight as a duck, perhaps?

    5. Re:Great News by bnenning · · Score: 2
      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.


      Is there a reason why boxing couldn't be added to Java? It seems like it could be done with some compiler additions to automatically create object wrappers around the primitive types and vice versa when needed. The compiler already knows the types of primitives, so if you write "int i=foo(); array.add(i);" it should just be able to turn the second statement into "array.add(new Integer(i));". Ditto for unboxing; the compiler could just transparently insert intValue() (or floatValue() or whatever) calls when you assign a Number subclass to a primitive type. Of course, I've only thought about this for about 2 minutes so I could be completely wrong...

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
  11. a couple of years work ahead by markj02 · · Score: 2, Troll
    I still think it's a shame Mono has gone off doing C# when the analogous project based on Java would already be much further along--there are several free, open source Java compilers, a good open source JIT from Intel, and lots of library code. Furthermore, such a Java project could have started several years ago, when the Gnome crowd was still claiming that anything other than plain C was just not suitable for writing applications or GUIs in.

    It looks like the Mono project still has a couple of years of work ahead of them until they get to a reasonably full features C# implementation. Let's hope it's worth it.

    1. Re:a couple of years work ahead by markj02 · · Score: 2
      From the beginning C# has been made to be natively compiled if desired and that means speed.

      C# isn't any easier to compile to native code than Java. In fact, C# is basically Java with a few extra convenience features thrown in.

      Even GCJ generates large and slow code (compared to say, O'Caml).

      What do you mean by "even GCJ"? GCJ is not a very good Java compiler. Sun's JIT is much better. To implement a language like Java or C# efficiently, you need JIT compilation.

      In my own testing I've found O'Caml to be not much slower than C, even with array bounds checking turned on, that's quite impressive.

      O'CAML, like Java, sometimes gets close to C performance and sometimes misses by a long shot. And C# won't be any different.

      My perfect language would be a type-safe, bounds-safe, inferencing, C-like language with OO extensions (but not go off the deep end of OO like C++ did). And it should create programs that run at the same speed as C (or real close). In other words, I want O'Caml with a C-like syntax.

      Don't hold your breath. Neither the JVM nor the CLI have anywhere near the support you need for that.

    2. Re:a couple of years work ahead by spongman · · Score: 2

      actually C# (or to be more specific CIL) is a little bit easier to compiler to native code than java. The types of operands on the JVM stack are encoded in the bytecode instructions (as opposed to explicitly in the metadata for CIL) which means you have to do more complex dataflow analysis.

    3. Re:a couple of years work ahead by Wesley+Felter · · Score: 2

      GCJ generates native code; Jikes doesn't.

    4. Re:a couple of years work ahead by alext · · Score: 2

      But at least the armchair critics aren't trying to pollute Gnome. If Miguel wasn't linking it to Gnome via Ximian then I don't think RMS & co. would be worried.

    5. Re:a couple of years work ahead by markj02 · · Score: 2

      Both CIL and JVM implementations need to perform this "dataflow analysis" as part of the byte code verification. And it's trivial to implement--a few pages of code.

    6. Re:a couple of years work ahead by markj02 · · Score: 2
      I wouldn't be so sure about that, Microsoft will make sure it's really freaking fast.

      Well, we don't have to guess about what C# and CIL looks like--they are documented. They have a couple of features (value classes, multidimensional arrays, unsafe sections) that are convenient for expressing a few programs more efficiently, but if anything they make C# harder to compile.

      Microsoft will try to deliver a really high performance implementation of C#, but Sun already has done most of the work and Sun has a really high performance implementation of Java. It would be nice if Sun added some features in C# to Java, but for most applications, it doesn't make any difference.

      I haven't seen where O'Caml is a whole lot slower than C in anything [...], can you give an example?

      Mostly on code involving value classes and heavy-duty numerics. Try writing a convolution algorithm.

      I know, I was just stating what my perfect language would be like. It has yet to be invented AFAIK.

      That's probably for the same reason there is no perfect car or camera: it's all engineering tradeoffs.

      I've always heard a source-to-native compiler can make much better optimizations than a JIT compiler.

      A JIT compiler not only has complete source code and (usually) the whole program available (Java byte code is, for practical purposes, equivalent to source code), it also can collect detailed runtime statistics. So, a JIT can do much better than a batch compiler. For example, gcj cannot usefully inline methods calls like "obj.method()" in situations where a JIT often can.

    7. Re:a couple of years work ahead by alext · · Score: 2

      Yeah, you should know better than to go around pointing out awkward facts about thew history of Gnome and Java. People have a right to change their mind, don't they? It's all water under the bridge. Let's be grateful that Miguel having missed the boat on Java is now being extra pushy about C#.

    8. Re:a couple of years work ahead by markj02 · · Score: 2
      Every time I've played with Java it's really slow at data access. Fast array access is needed for things that have high user interactivity (games, graphics applications, simulations, etc.).

      1D array access is fast in Java. What is slow in Java is initial startup (class loading and first JIT pass). There are also some unexpected performance pitfalls, but they can be worked around.

      O'Caml shows how you can make a "safe" language that is plenty fast.

      O'CAML is nice, but it doesn't have quite the dynamic/reflection facilities of Java and, in my experience, performs no better than Java. (However, its runtime footprint is slower.)

      What they need to do is make a real compiler, just like the olden days before C. That's why C is so fast,

      C isn't particularly fast on modern hardware: C compilers cannot apply a lot of optimizations. Some numerical FPs already outperform C, and JITs likely will as well.

  12. Re:Program Java in Java by -douggy · · Score: 3, Funny

    I think that is a personal matter between the compiler and the language. Slashdot is not the place for bedroom discussions

  13. Re:Program Java in Java by Ayende+Rahien · · Score: 2, Insightful

    The language, naturally.
    Otherwise you can't write a compiler.

    ISTR that the first Pascal compiler had compiled itself, by hand, someone sat and run the program through his head and wrote the opcode to the machine.

    --

    --
    Two witches watched two watches.
    Which witch watched which watch?
  14. Re:Sound good, until... by GigsVT · · Score: 2, Interesting

    What if Microsoft is trojaning all our code?

    We will never know, now will we? What's the good of open source that is built off of completely untrustworthy closed source?

    They set up us the logic bomb!

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  15. Is it just me or .... by ACK!! · · Score: 2

    Does it seem that the distributed effort used for the Mono project might be better used in actually creating a Ximian desktop that works out of the box as easily as KDE?

    It just seems that there a lot of Gnome/Ximian based efforts that need to be finished first before Gnome 2.0 gets out the door onto distributions and people start fussing about what is missing. Like what?

    Well, Ximian needs to finish out the Ximian Setup project for one. It would be very nice to have set up tools for a desktop that work in any distro . For the hardcore command line folks this is no big deal but for that desktop push it is very important and if done well would take away a lot of divergent wasted effort by distro makers in creating a dozen or so different ideas of how to do set up administration tools.

    At least, I will say that we as a community are not ignoring the threat of the Internet becoming standardized around Redmond and the C# stuff.

    However, it would be nice if the Gnome and Ximian groups would focus on finishing out the basics before moving on to the next hot project.

    It is almost humorous that I have a fully functioning spreadsheet app like Gnumeric and a Groupware solution like Evolution but my central control of the UI/System functions are lacking.

    Maybe this is coming Gnome2.0 and I hope so.

    ________________________________________________ __

    --
    ACK /ak/ interj. 2. [from the comic strip "Bloom County"] An exclamation of surprised disgust, esp. i
  16. Clue me in... by toupsie · · Score: 3, Funny

    I don't know about you, but I think its kind of creepy that a compiler can compile itself. How they heck did the "first compiler" come into creation if there was nothing to compile it with the first place? Roswell Aliens?

    --
    Strange women lying in ponds distributing swords is no basis for a system of government.
    1. 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...?

    2. Re:Clue me in... by alext · · Score: 2

      But then, from a LISP-person's point of view, it's probably strange to have a language that can't compile itself.

      Wonder how BASIC people feel about 'eval'? Spooky, or not?

    3. Re:Clue me in... by coyote-san · · Score: 4, Insightful

      There were some mid-80s articles in Dr. Dobbs or Micro Cornucopia or the like that used a subset of C. No floats, and IIRC no typedefs, no multidimensional arrays, etc. Overall you probably lost about half of the features in a standard C compiler.

      The idea was to bootstrap a full compiler via this intermediate language. It was good enough for you to write your full compiler, but simple enough that you could implement it in assembler in half the time required for the full compiler. (Remember that when you're bootstrapping a system you need to write all of the standard libraries, not just the compiler itself.)

      A few years later gcc became good enough that this was a moot point. If you're developing for a new architecture, use GCC to bootstrap a cross-compiler.

      --
      For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  17. Re:a word for the ignorant by envelope · · Score: 2

    I seriously doubt that Office will be rewritten to run on .NET, both for performance reasons, and because MS will not want people using Office on Linux with Mono.

    --

    appended to the end of comments you post, 120 chars
  18. Re:a word for the ignorant by LinuxHam · · Score: 3, Interesting

    If Microsoft's next version of Office is for the .NET framework, and mono is fully working, There will be Office on Linux.

    MS has a history of using undocumented features to make sure their software runs better than competitors' offerings under Windows. I think you can rest assured that MS won't allow their software to go platform independent. There will most definitely be SOMETHING in Office that will prevent it from running on Linux. They said Kerberos would interoperate, too.

    --
    Intelligent Life on Earth
  19. Re:One step at the time by spongman · · Score: 2
    yup 'mint' is the Mono Interpreter. Here's the process that works so far:
    • Use microsoft tools on windows to compile the mono compiler into a .NET exe.
    • Run that .NET exe (mcs) under mint on linux using the mono class libraries to generate another version of mcs.
    Unfortunately the linux-built version of mcs doesn't quite run yet, but I believe it's close to dogfood.
  20. From the www.go-mono.com/c-sharp.html page by tez_h · · Score: 5, Funny

    "MCS was able to parse itself on April 2001, MCS compiled itself for the first time on December 28 2001. MCS became self hosting on January 3rd, 2002"

    Human decisions are removed from stategic C# programming. MCS begins to learn at a geometric rate. It becomes self-aware at 2:14am. Eastern time, August 29th. In a panic, they try to pull the plug.

    And MCS fights back.

    All the pointers are there; we need to pull the plug now! What, are you just going to sit around until polymorphic liquid metal killing machines start showing up from the future?!?

    -Tez

    --
    Haskell, the static-typed, lazy, polymorphic, programming language.
    1. Re:From the www.go-mono.com/c-sharp.html page by The+Bungi · · Score: 2

      Mod parent up =)

  21. Re:So... by miguel · · Score: 2

    Yes, you can do your own memory management if you want (there are various degrees in which you do this, either through the "Disposable" pattern, or by completely rolling your own, using unmanaged code).

    It is not on the FAQ as this is more of a CIL core question, rather than being a question about the Mono project itself (which is an implementation of the CIL).

    Miguel.

  22. Re:99% is not 100% by ArsonSmith · · Score: 2

    no it is more like "The Wright Brother's airplane took off but couldn't stay in flight!" or ARmstrong stepped on the Moon, but couldn't live there perminently."

    --
    Paying taxes to buy civilization is like paying a hooker to buy love.
  23. Compiling for C# != Office on Linux by mactari · · Score: 2

    Even if the mcs worked flawlessly, you would barely have begun to have what you needed for Word & Friends. Creating a compiler doesn't mean Mono has ported every namespace in existence. Windows Forms, as the most obviously example, is still going to be a ways behind perfect mcs execution.

    Think of a perfectly running mcs as "Java without AWT" or "C without GTK" or what-have-you. Look at gcj (http://gcc.gnu.org/java/), as an example. Java to native compilation might be well on its way towards being useful, but AWT is still a long ways off (http://gcc.gnu.org/java/faq.html#2_4) and Swing? Forget it. mcs will probably be in the same boat for a while (hopefully not quite as long).

    Command line apps (think "ANSI C#", as it were), sure. Word? Still got a ways to go.

    --

    It's all 0s and 1s. Or it's not.
  24. Re:[debunked] Myth: The CLR is Language Agnostic by Arker · · Score: 2

    You raise some very good points.


    But I must say that I was never so naiive as to have not anticipated them.


    CLR is still a platform with a relatively high degree of language agnosticism, in comparison to what else is out there.


    I'd certainly rather see it imitated (in that respect) and improved upon than actually used, of course.


    But in the end, it's still a neat idea.

    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Friends don't let friends enable ecmascript.
  25. C++ is a multi paradigm language by avdi · · Score: 3, Interesting

    but not go off the deep end of OO like C++ did

    C++ is hardly "off the OO deep end". Not in the sense that Smalltalk, or even Java, is. In the words of it's creator:

    C++ is a multi-paradigm programming language that supports Object-Oriented and other useful styles of programming. If what you are looking for is something that forces you to do things in exactly one way, C++ isn't it. There is no one right way to write every program - and even if there were there would be no way of forcing programmers to use it.

    As a longtime C++ user, I can attest to this fact from personal experience. In fact, there have been times when I've wished C++ was more OO than it is.

    --

    --
    CPAN rules. - Guido van Rossum
  26. The joys of the self-compiling troj--er, compiler by blair1q · · Score: 2

    Ken Thompson has a few words on the subject that all programmers are well served to read.

    --Blair

  27. 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."
  28. silly duck argument by GCP · · Score: 2

    If you recall, the C++ -> Java learning curve was pretty easy -- one of the major factors in Java's quick acceptance -- and yet Java offered all kinds of great improvements over C++.

    C# will be easy to learn for both C++ and Java programmers for the same reason Java was easy for C++ programmers. And, it has some wonderful advantages over both for client side GUI programming.

    --
    "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
    1. Re:silly duck argument by alext · · Score: 2

      I'm so glad you agree that Java offered so many improvements over C++.

      However, I can't help noticing that you've not gone so far as to enumerate the equally scintillating improvements that C# offers over Java. Client-side GUI programming? Sounds very exciting...

    2. Re:silly duck argument by GCP · · Score: 2

      Java is definitely a major improvement over C++ in many ways for app developers. I'm a big fan, and I use it daily on the server for Web apps.

      As for enumerating equally scintillating improvements that C# offers over Java, that's a red herring. It's not a necessary condition for C-B to equal B-A in order for it to be true that C>B.

      Even so, it may be that big an improvement, depending on what you need to do. If you want a laundry list, go look it up. A short list though is:

      -- Programmers love working in Java, and customers love using native apps written in C++. The ability to work in a language that's as fun as Java and as well-liked by customers as C++ is...scintillating. Neither C++ nor Java can offer both.

      -- Full-powered, native C++-like apps that can be run in a browser. The Java concept of just-in-time apps running in a browser is too good an idea not to succeed. It's looking as though C#, not Java, will end up delivering full-powered, native, browser-based apps -- at least on Windows. My hope is that Mono, Rotor, etc., can extend this to other platforms as well.

      -- Native compilation can be done before it even goes out the door, so much harder to reverse engineer than bytecode. Sun's answer for years: "anything can be reverse engineered" (which makes me wonder why they still lock the doors to their buildings), or "just keep the important code on the server", which is the sort of answer I would expect from a company that has never had a successful client-side product.

      -- Lots of little goodies brought over from Perl and C like enums, foreach, structs, verbatim strings.... So many of us have asked for these things to be added to Java only to have Sun tell us no, or "you don't get it", or "it's too dangerous", or "it's just syntactic sugar", or "if you want to use Perl, just use Perl", etc. C# says, okay, here you go.

      -- You can mix components written in different languages as easily as components written in the same language. Java is working to retrofit that sort of capability, but it will always be an afterthought.

      -- The language is designed with lots of features that make it an easy fit with real visual IDEs. Languages like C++ and Java can be treated this way, but it's an awkward fit for them. Most of us just end up working in straight text (code) mode all the time with them. The natural way to create GUI apps is with a GUI IDE, though, and C# is made for it (properties, attributes, etc.).

      --
      "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
  29. Re:a word for the ignorant by afidel · · Score: 2

    MS has offered a full non-discriminitory free use liscense for their extensions of kerberos. This was detailed either in a slashdot story or a comment to a related story.

    --
    There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.