13
iArrow
1y

I was confused tbh lol 😂😂

Comments
  • 3
    Wait until you hear about rust....
  • 6
    Most compiled languages have their mainline compilers written in their very language.

    Beyond the initial compilation, bootstrapping is fairly the norm.
  • 1
    @sariel
    I'm scared to know..
  • 5
    Funny thing.

    GCC is built in 3 stages:

    Current system compiler compiles stage 1 compiler.

    Stage 1 compiler generates the Stage 2.

    Stage 2 generates Stage 3.

    Only if Stage 2 and stage 3 match, build is successful.

    https://gcc.gnu.org/install/...
  • 1
    @iArrow if I remember accurately, the original rust compiler was written in c or c++.

    After a few years they rewrote it in rust.

    So now your rust compiles from rust which is originally compiled with c.

    The rust man is compiled in rust. Is he rust or is he rust? He screams, for he does not know.
  • 1
    @IntrusionCM

    Staged bootstrapping is fairly standard, it's akin to unit tests.

    You ensure that known inputs give expected outputs both in the bootstrapped version and the originally compiled version.
  • 3
    @sariel

    In Ocaml actually, IIRC
  • 1
    @IntrusionCM

    that's even more confusing 😂😂
  • 1
    @iArrow nah not really.

    What @CoreFusionX said, though I dislike the wording.

    Bootstrapping is usually the first stage, not all stages.

    You compile 3 times. Bootstrapping aka the first stage generates a compiler that matches the current version, but the system compiler can be another version.

    So the first compiler is to have a consistent behaviour in stage 2 - the compiler generated matches the current version.

    Stage 2 and Stage 3 should produce the same results - after all, same version, same behaviour.

    That's why it's not unusual with "critical" stuff like compilers - you want to make sure that it's build correctly and deterministic, as everything else will be a huge problem.
  • 1
    @IntrusionCM

    Fantastic explanation for something I oversimplified 🙂
  • 1
    @CoreFusionX sorry, i know I'm a party pooper but I hate oversimplifications when it comes to workflows.

    XD

    It's like saying SSL instead of TLS... You can never be too sure that someone not actually means SSL aka "I've seen stuff none would believe".
  • 1
    @IntrusionCM

    All good, all good.

    Rigorousness is hard enough to find already.
Add Comment