When You Grossly Oversimplify Compiler Theory
Description
A two-panel anime-style meme format. In the top panel, a young man with brown hair lies in bed under the covers, looking smugly pleased with himself as he has a thought. The thought bubble reads, 'compilers are technically just functions that take source code as its argument and returns a program the computer can run'. In the bottom panel, the same young man maintains his smug expression while four other people in the same bed react with collective horror, physically trying to stop him. A large, spiky speech bubble from the group emphatically says 'STOP'. The humor stems from the character's oversimplification of a deeply complex computer science topic. While his statement is technically true at the highest level of abstraction, it completely ignores the intricate stages of compilation (lexing, parsing, semantic analysis, optimization, code generation), making it a maddeningly reductive take for anyone with actual knowledge of the subject
Comments
28Comment deleted
Saying a compiler is 'just a function' is like saying a distributed database is 'just a key-value store'. Both are true, and both will get you kicked out of the architecture review meeting
House rule after midnight: no side-effects - and apparently a 20-minute monologue about gcc being a pure function from .cpp to ELF still counts as observable behavior
Sure, compilers are 'just functions' - in the same way that operating systems are 'just while loops' and distributed systems are 'just network calls'. After 20 years of watching junior devs discover what happens when their elegant recursive descent parser meets left recursion in production, I've learned that anyone who says 'just' about compilers has never debugged a register allocator at 3 AM
Sure, compilers are 'just functions' - in the same way that a Boeing 787 is 'just a metal tube that moves people.' Both statements are technically correct, and both will get you immediately ejected from any serious engineering discussion. The real compiler is the 47 optimization passes, three intermediate representations, and existential crisis about register allocation we made along the way
Compilers as total functions? Sure - until that pedantic explanation hits a social segfault
Compilers are functions: source in, program out - pure only if you also pass the toolchain version, target triple, linker, env vars, and the build farm’s clock skew
Sure, a compiler is a function - one that quietly closes over PATH, the target triple, the linker, and the timestamp; that’s why our “reproducible” build sometimes reproduces a new hash
He's not wrong, tho. That's basically it Comment deleted
not sure where the joke is Comment deleted
The joke is that six coders sleeping in one bed. Comment deleted
the joke is that coders sleep with anyone Comment deleted
the joke is that coders sleep Comment deleted
Coders is a joke Comment deleted
no… Comment deleted
people are a joke Comment deleted
So they have money only for one bed? Comment deleted
I have observed that comments semantically reduce to simple sentences Comment deleted
I wonder if such reduction mechanism can be done in Prolog Comment deleted
|: The joke is that coders sleep with anyone |: The joke is that coders sleep |: The joke is that coders are a joke |: The joke is that people are a joke Comment deleted
|: The joke is a joke Comment deleted
Yeah, what if a model takes as input a general predicate (in our terms, some joke) and produces much stronger jokes using reduction and generalization Comment deleted
its outupt will always be . Comment deleted
Technically the condition is redundant. Instead of comparing a joke to the joke you can refer to the joke as boolean Comment deleted
And out of possible outputs, one is decided to be the funniest by group of people Comment deleted
Joke about it Comment deleted
But what it compiler could tell if programm completes or goes into infinite loop by program's source code. And then let's feed this compiler it's own source code hehehe😈 Comment deleted
Undecidable bruh moment Comment deleted
Incomplete bruh moment! Comment deleted