Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Most compiled languages have their mainline compilers written in their very language.
Beyond the initial compilation, bootstrapping is fairly the norm. -
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/... -
sariel85342y@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. -
@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. -
@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. -
@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".
Related Rants
I was confused tbh lol 😂😂
joke/meme
cpp
c