Skip to content
DevMeme
3573 of 7590
Compilers Post #3910 · source on Telegram

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

28
Anonymous ★ Top Pick 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
  1. Anonymous ★ Top Pick

    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

  2. Anonymous

    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

  3. Anonymous

    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

  4. Anonymous

    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

  5. Anonymous

    Compilers as total functions? Sure - until that pedantic explanation hits a social segfault

  6. Anonymous

    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

  7. Anonymous

    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

  8. @karim_mahyari 4y

    He's not wrong, tho. That's basically it

  9. @RiedleroD 4y

    not sure where the joke is

    1. @loves_frogjs 4y

      The joke is that six coders sleeping in one bed.

      1. @RiedleroD 4y

        the joke is that coders sleep with anyone

        1. @RiedleroD 4y

          the joke is that coders sleep

          1. @LionElJonson 4y

            Coders is a joke

            1. @RiedleroD 4y

              no…

            2. @RiedleroD 4y

              people are a joke

      2. @QutePoet 4y

        So they have money only for one bed?

  10. @saidov 4y

    I have observed that comments semantically reduce to simple sentences

  11. @saidov 4y

    I wonder if such reduction mechanism can be done in Prolog

  12. @saidov 4y

    |: 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

    1. @sylfn 4y

      |: The joke is a joke

      1. @saidov 4y

        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

        1. @sylfn 4y

          its outupt will always be .

      2. @kitbot256 4y

        Technically the condition is redundant. Instead of comparing a joke to the joke you can refer to the joke as boolean

  13. @saidov 4y

    And out of possible outputs, one is decided to be the funniest by group of people

  14. @theFoel 4y

    Joke about it

  15. @Agent1378 4y

    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😈

    1. @karim_mahyari 4y

      Undecidable bruh moment

      1. @Agent1378 4y

        Incomplete bruh moment!

Use J and K for navigation