Is it possible for a compiler to be written in a language other that what it is used to compile or does it even have to...

is it possible for a compiler to be written in a language other that what it is used to compile or does it even have to be a language at all? like if i didn't want to use rust could you just have it export the machine code and run it in a separate process

Attached: d8n7brm-27454ca0-163e-4efa-973d-64f1075ef227.gif (338x450, 185.26K)

it literally doesn't matter in which lang the compiler is written

Yeah, that's how it used to be, the history of the rust compiler is a good case study.
Rust was invented, but it needed a compiler, so a C compiler was written, which could compile rust code, so a written in rust rust compiler was written, which was initially compiled in the C compiler to make the first binary that could then be used to compile rust written rust compliers in a complier that was written in rust for the first time

>is it possible for a compiler to be written in a language other that what it is used to compile
A compiler is a piece of software which accepts some input and returns some output.
From the outside you can not tell the language the compiler is written in.

The first rust compiler was written mostly in OCaml, but same idea

i would have sex with her if you know what i mean

A compiler is just a type of translator that takes a higher level language and produces machine code. A compiler written in the language that it compiles is called "self-hosting."

>produces machine code
No. It just produces code in a different language.

You would always initially need to write it in another language, because there wouldn't be any other way to compile it.

No. Those are "translators." Otherwise, the C preprocessor would be a compiler when used standalone since it takes C macros and outputs C code.

Yeah first you write your compiler in an existing language. When you have a working compiler, you can then rewrite your compiler in your new language. They call it self hosting

Attached: 1607873351199.jpg (575x620, 210.59K)

A compiler is basically just a function with source code as input and machine code as output. You can write that in whatever language you want.

Attached: DA3B5AF3-FA0F-49EE-9101-C13E1851F9A6.jpg (750x999, 627.39K)

What a funny little pink character, could you post a folder full of these with names like
coffee-image-dogecoin-bitcoin-pink-screaming-crying-elon-musk-nasa-cia-nsa-biden.png?

Attached: 9D7C7B82-4268-48CA-A77C-B90F02962571.jpg (750x565, 304.12K)

Attached: D5ZMNb3XkAELizF.jpg (544x725, 75.71K)

Attached: D828E066-B18D-45B2-856E-3C9E70404E38.jpg (750x926, 460.53K)

Attached: FH-eVOIXsAA8uBL.jpg (1152x2048, 409.58K)

>those thighs
HNNNNNNGGGGG

Compile by hand?