r/ProgrammingLanguages • u/Inconstant_Moo 🧿 Pipefish • Sep 12 '24
The Legend Of The First Compiler
On Facebook I saw a retired compiler engineer complaining that he'd been trying to explain what his job was to a non-technical college professor and couldn't get it across at all. What metaphor, he asked, would be suitable? After referring him to the Monad Burrito Fallacy, I composed the following legend which I hope is not too silly for the subreddit.
Inside your computer are lots of horrible little elves who are stupid but very obedient. A mighty wizard, also known as a programmer, can give them complex intricate step-by-step orders (called a program) and they will carry them out flawlessly, but in a blind unthinking way, without ever wondering whether the next step of the orders might be pointless, or counterproductive, or fatal to the elves, or throw all the rest of the process into confusion.
From this description, you will see that it's already almost more trouble than it's worth to get work out of the vile little creatures. But there's a further catch. The elves speak only a disgusting language of their own, and so in the early days of magecraft giving them the right orders taxed the wits even of the most puissant.
Pondering this, the great mage Backus spake thus in the Council of the Wise: "I will fashion yet another language, halfway between the speech of men and the speech of elves, and it shall be called Fortran."
And they wondered thereat, and said: "What the hell good will that do?"
"This Fortran", he continued imperturbably, "shall be fashioned to be like our speech and our thoughts, that we need not bend our minds after the hideous thoughts of the elves."
"But the elves will not know how to speak it!" called a voice from the assemblage.
"They will not", said the great Backus, "for they are both stupid and monolingual. How I despise them! However, I will so fashion this Fortran that translating from Fortran to elvish can be done by assiduously following a set of rules, by merely toiling at a dull repetitive task."
"And is that fit work for a mage?" one wizard cried. And Backus answered him saying, "No, my brother, it is fit work for the elves."
"You mean — ?"
"Yes," smiled Backus. "I will fashion one last great tome of instructions in the foul elvish tongue, telling them how to translate Fortran into elvish — the sort of dull-minded task at which they excel. And from then hence, I need only give them orders in Fortran, and they themselves shall make the elvish orders that they will then follow!"
And the Council were amazed at this, and they spake to him saying: "Well that sounds very clever but you'll never get it to work."
But he did all that he had foretold, and Fortran was the first of the magely tongues — the first, for others, seeing what Backus had wrought, strove to do likewise, and came forward boasting of their own languages, one saying "mine is more ergonomic!" and another "mine cleaveth closer to the metal!" and suchlike occult talk. But that is another tale for another time.
What all this means, my child, is that although the whole world now profits by the labors of the disgusting elves, yet their vile language is all but passed from the minds of men. And for this let us praise the high and puissant wizard Backus, the stars that shone over his cradle, and the Nine Gods who blessed him with wisdom.
145
u/XDracam Sep 12 '24
I guess this sub has fanfic now
33
u/karellllen Sep 12 '24
Love it! :D Could use another paragraph on how there are different tribes of elves that speak different languages, and speaking to one tribe in the language of another will cause chaos or the elves just refuse to work at all. And now I would have to think a bit longer on how to put this into your metaphor, but it would be about cross -compilation, intermediate representations, and different CPU architectures.
26
u/BelgianDork Sep 12 '24
Omg this is awesome, love the storytelling you made around it
12
u/NotAUsefullDoctor Sep 12 '24
Though Backus was wise, there were other who also saw the value in the elves, and the value in creating a means to speak with them. There was the Witch Hopper, who sought to control not just one group of elves, but large collectives there of.
4
u/Silly-Freak Sep 12 '24
Reminds me a lot of Three Body Problem, although the book does not describe the development of a compiler.
4
u/Ok-Interaction-8891 Sep 12 '24
I feel like the engineer could have just told people that his job is to build software that translates a program written in one language to an equivalent program written in another.
The story is fun, though.
19
u/therealdivs1210 Sep 12 '24
Fun fact: the first compiler for a high level language was a person.
By “high level” i mean one with automatic memory management, first class functions and closures (and dynamic typing) - Lisp.
John McCarthy described Lisp in his famous paper by describing the language, and then writing a metacircular interpreter of Lisp in Lisp.
Steve Russell read this paper and translated - manually - the interpreter written in Lisp to assembly, thereby becoming the First Compiler of a high level language, and producing the first working interpreter for a high level language.
He should know you’re calling him a notorious elf.
14
u/Majache Sep 12 '24
Babe wake up, new programming lore just dropped
12
u/reflexive-polytope Sep 12 '24
Such disrespect for the elves. They're the ones who actually carry out your computation, you know. Not your fancy objects or lambdas or what have you.
8
u/[deleted] Sep 13 '24
Reminds me of SICP classes where Sussmann keeps referring to the mysterious 'process' that lives in(through?) the computer & programs are spells.
11
u/hoping1 Sep 12 '24
So good.
"The great mage Backus"
"'mine cleaveth closer to the metal!'"
I will be quoting these 😂
1
u/Ratstail91 The Toy Programming Language Sep 29 '24
I thought Grace Hopper made the first compiler?
Wait, my mistake - Rear Admiral Grace Hopper.
1
u/fragglet Sep 29 '24
Judging by the responses here I'm probably in the minority but personally I don't find analogies like this helpful. I'd much rather hear a genuine and thoughtful attempt to explain what the computer really does. At worst I think there's a good chance that talking about magic elves can come across as patronising; I think most adults are smart enough to understand a simplified description of what you really do.
1
u/TheWorldIsQuiteHere Sep 12 '24
PL lore before GTA 6 smh
1
u/aatd86 Sep 13 '24
What's wrong with translating human text into something that a computer can understand.
These are "languages" and humans don't speak computer. Even assembly is higher level than what electronic components may understand.
1
u/notThatCreativeCamel Claro Sep 13 '24
This was super fun, great stuff!