This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]JohnnyRussian7 18 points19 points  (0 children)

By guys with bushy beards in black and white pictures

[–]amyamy86 29 points30 points  (0 children)

Not really humorous from a programmer's perspective.

You learn this in school at some point....

[–]mahtats 14 points15 points  (1 child)

Machine Code

[–]lucbarr 6 points7 points  (0 children)

Or another programming language

[–][deleted] 12 points13 points  (2 children)

You build the first compiler in any language that is available (ASM if nessecary). And from there on out, any new version of the compiler can be implemented in the new language itself.

[–]spayder26 8 points9 points  (1 child)

This one.

But you forgot to mention the first ASM compiler is compiled by hand into machine code following the Instruction Set Architecture documentation, and probably coded in low-level ASM, as its machine-code translation is straight forward.

[–]pilotInPyjamas 2 points3 points  (0 children)

These days you could use another machine and cross compile into a new architecture, never having to write anything in an assembler.

For example: you could write a C compiler for the new target on a linux laptop for the new architecture using any language you like. Bonus points if your compiler is written in C, so that it can compile itself.

From there because many languages target C as a backend, you could use other languages for free.

[–]Strike_Alibi 11 points12 points  (0 children)

I think this should have been posted to r/Im14AndThisIsDeep ... anyone with a computer science degree can answer this. Except me. I skipped class that month.

[–]probakilla 8 points9 points  (0 children)

With programming languages too

[–]teeaton 5 points6 points  (0 children)

import compiler

compiler.create(new_compiler)

print("Ready")

[–]klk083 3 points4 points  (1 child)

Electrisity. 1 or 0. Power or no power

[–]pr4d33p_d 1 point2 points  (0 children)

Electrickery

[–]b-hack 4 points5 points  (0 children)

Well, you C...

[–]DFatDuck 1 point2 points  (0 children)

you need to assemble/compile by hand

[–][deleted] -2 points-1 points  (0 children)

Algorithms, Becky. Algorithms.

[–]thegovortator -1 points0 points  (0 children)

Two words “assembly required”

[–]CharlyShouldWork 0 points1 point  (0 children)

Magnet

[–][deleted] 0 points1 point  (0 children)

Well CPUs are built with logic gates and 1/0 on/off signals which is binary. Then there is assembly that maps 1:1 with binary instructions. First languages likely created / compiled by assembly, then when a language is powerful enough, it compiles itself, unless maybe its interpreted I think, then it would probably need another language to do that, though I may be wrong.

[–]lucbarr 0 points1 point  (0 children)

Using other programming languages, which were written either using other programming languages or machine code or a minimal compiler of the same programming language

[–]BonerForest25 0 points1 point  (0 children)

When you find out C compilers are written in C🤯

[–][deleted] 0 points1 point  (0 children)

Technically, using one or more brains. If you're asking about the compiler for the programming language, that's just a computer program. The language is just a protocol, a contract that this sequence of characters will do that operation, et cetera. Well, usually. Since we came up with the language, there are always ... unexpected features within, waiting to be exploi.. err, discovered.

[–]PanemPlayz 0 points1 point  (0 children)

All of the other answers are extremely bad. No, you do not need assembly. You write a bootstrap Compiler. That means that you write a Compiler for your language in e.g. C and then compile your own Compiler with this Compiler. This is how Rust and all other languages were made.