recursion

Discussion in 'OT Technology' started by P07r0457, Jun 13, 2006.

  1. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    So I'm re-compiling gcc, right now. Of course, I use gcc to do this, so gcc is basically compiling itself. That's how it works. You need a compiler to compile your compiler. So everytime I do this, I ask the stupid chicken/egg question.

    Wondering if anyone actually knew the answer? Where did the first compiler come from? Did some super-genious will it into existance directly into machine code? Basically writing a simple binary-first loaded from which future, and progressively more-advanced compilers could be built?
     
  2. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Now would be the time for duex to drop the textbook knowledge bomb on your ass and get sweet vengance for all your tormenting :)
     
  3. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
  4. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Would never happen... he lacks the knowledge to do such a thing.

    (hearing nothing but crickets chirping)

    That's okay, I have since found the answer ;)
     
  5. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    So post it.
     
  6. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    http://www.linuxquestions.org/questions/showthread.php?t=132911

    Basically a compiler is not one piece... it's several, including a linker, etc. And I remember this all from my CS classes.

    But to directly answer the question. The first compilers were written directly in machine language. This gave the basic framework neccessary to write more complex compilers and tools in higher-level languages, building off of what already existed. Which brings us to today :)
     
  7. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    And to think... he could have defeated you.
     
  8. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    I kinda already hypothesised the answer in my original post.
     
  9. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Yes, the first C compiler was written in machine code. Then the next version was compiled using the first version. Repeat.

    EDIT: Ah well; I'm afraid I had to review a proposal my boss wrote, instead of browsing OT the whole day. At least I can take comfort in the observation that Jolly only fucks with me when I don't have a perfectly cogent argument.
     

Share This Page