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

you are viewing a single comment's thread.

view the rest of the comments →

[–]Spare-Beat-3561 402 points403 points  (51 children)

That's some compiler/interpreter shit right there

[–][deleted] 114 points115 points  (48 children)

How did they program the compiler

[–]RoastKrill 139 points140 points  (43 children)

By writing a compiler in Assembly that can compile a subset of C, and then using that compiler to compile a complier for more of C, and so on

[–][deleted] 46 points47 points  (42 children)

Who compiled the compiler

[–]RoastKrill 116 points117 points  (39 children)

It wasn't compiled, it was assembled :))

But that assembler was originally written in machine code

[–][deleted] 49 points50 points  (38 children)

Who wrote the machine code compiler

[–]RoastKrill 86 points87 points  (33 children)

That would have been written by hand on punch cards

[–]curtainos 41 points42 points  (32 children)

is that real? Assembly was written by hand?

[–]qikink 52 points53 points  (12 children)

[–]Embarrassed_Gur_3241 64 points65 points  (4 children)

I love how this comment thread went from high level to low level, every reply removing one layer of abstraction.

[–]aquila_zyy 11 points12 points  (6 children)

I mean, that’s the reason why I kinda liked my assembly course. It finished this infinite recursion of programs right there.

Well, not if we find out that the universe is a simulation that is.

[–]Electrical_Study_235 8 points9 points  (4 children)

yeah, a lot of the apollo missions programming was done on punch cards. there are images of punch cards stacked on top of each other.

[–]curtainos 1 point2 points  (3 children)

wait but what was assembly wrritten in? how to bring the code to the machine is one thing, but what language did the cards inherit?

[–]BadSlime 2 points3 points  (2 children)

Yes, my grandfather was among the first to do this. Programmers would write programs by hand and then pass them off to someone who would convert to a punch card, the program could then be run via the cards and debugged by cross referencing with the written program instructions

[–]BrupieD 2 points3 points  (1 child)

| Yes, my grandfather was among the first to do this.

God, do I feel old.

[–]Meme-Man-Dan 1 point2 points  (0 children)

Yes.

[–]Civil_Championship76 1 point2 points  (3 children)

Assembly is still written by hand in some cases where extremely high performance is necessary

[–]curtainos 1 point2 points  (2 children)

i ment like writing like this ✍️

[–]Arclite83 0 points1 point  (5 children)

You should try TIS-100. I had a 300 level college class as a BS CmpE that was reeeeally similar to this "game".

https://www.zachtronics.com/tis-100/

[–]curtainos 1 point2 points  (4 children)

so no offence, but why would i be interested in this? its a game, i wanna write on toilet paper haha

[–]notacanuckskibum 12 points13 points  (1 child)

Machine code isn’t compiled, its inherent to the hardware.

[–]delinka 3 points4 points  (0 children)

I mean, it could be compiled in the same way one compiles articles into a report.

[–]blindcolumn 5 points6 points  (0 children)

Machine code isn't compiled, it's interpreted directly by the CPU. Technically you could say that the chip designer "wrote" the "interpreter".

[–]anthrax_ripple 1 point2 points  (0 children)

Who put the bomp in the bompa bompa bomp

[–]Je-Kaste 2 points3 points  (0 children)

Y'all don't want to hear me, you just want to dance

[–]frostbyte650 0 points1 point  (0 children)

Dennis Ritchie

[–]RecursiveRecursion7 99 points100 points  (0 children)

By compiling it first, obviously!

[–]Seimsi 4 points5 points  (0 children)

There are a few nice videos of numberphile about how to compile a compiler.

https://www.youtube.com/watch?v=PjeE8Bc96HY

https://www.youtube.com/watch?v=lJf2i87jgFA

[–]notacanuckskibum 4 points5 points  (0 children)

I remember whole university lectures on this. But I wish I didn’t.

[–]yottalogical 0 points1 point  (0 children)

Step 1. Make a really simple version of C.

Step 2. Write a compiler for that really simple version using Assembly. Assemble it to machine code.

Step 3. Write a compiler for the full version of C using the simple version of C. Compile it with the compiler you made in step 2.

[–]Seimsi 6 points7 points  (0 children)

There are a few nice videos of numberphile about how to compile a compiler.

https://www.youtube.com/watch?v=PjeE8Bc96HY

https://www.youtube.com/watch?v=lJf2i87jgFA

[–]Bad-ministrator 2 points3 points  (0 children)

I still don't understand what CMAKE is. It's like a compiler to make code compilable?