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
-
Jifuna37417yAs far as I know they wrote it the first time in another language and later wrote it in rust and compiled it with the first compiler. Correct me if i'm wrong.
-
They wrote it in c then they wrote it in rust. It's called bootstrapping. Gcc does the same.
-
@D3add3d Yeah, I know c-languages are third generation, so swiches are first gen and assembler is 2nd gen I guess.
-
@D3add3d
Bellow assembly is machine language, which is implemented at the hardware level. -
Assembly is not even one language, it's a family of machine-specific languages. Assembler is not a language either, it's the code that translates an assembly flavor into machine code.
For a new language, you write specs which tell compiler devs how the compiler must behave. Then a compiler is written in any existing language which can fully satisfy those specs.
The first C compilers were written in B and assembly, and yeah, the further you go back the closer you get to punch cards and manual wire plugging.
GCC is also not just a C compiler, it's a compiler collection written mainly in C and C++, with some Ada, Fortran, and Go. -
@bittersweet
GCC is the GNU Compiler Collection and includes GCC, the GNU C Compiler, among others (shitty naming scheme, I know). All compilers are written in C and C++ and share common code. -
Gnonpi7907yDoes it means that the first implementation of C compiler depended on the machine they used somehow? Or is assembly the same on every hardware?
-
@Gnonpi
All compilers are machine dependant since a compiler converts code written in a language like C to machine language, and machine language differs from architecture to architecture (x86 machine language is different from ARM machine language, which is different from POWER machine language). And, since assembly is basically just a nicer way to write machine language, assembly varies as well. The first C compiler was written in B and assembly, and the first B compiler was probably written in assembly. -
Gnonpi7907y@tiberius1900 thanks for the explanation. It's a part of computer science I never really studied.
-
@bittersweet Thank you!
People confusing assembly and assember is one of those little technical things that annoys me.
Like people confusing static typing and strong typing, but I'm more forgiving on that one because I also forget which is which most of the time :|
I get that a lot of people here are learning and might not have known the difference, so for reference: An *assembler* converts *assembly/assembly language* into machine code.
I'm a Grammar Nazi... Sorry :|
Just read that Rusts compiler is written in Rust. How did they compile the first compiler?
rant