[{"data":1,"prerenderedAt":186},["ShallowReactive",2],{"term-c\u002Fcompiler":3,"related-c\u002Fcompiler":169},{"id":4,"title":5,"acronym":6,"body":7,"category":150,"description":151,"difficulty":152,"extension":153,"letter":154,"meta":155,"navigation":80,"path":156,"related":157,"seo":163,"sitemap":164,"stem":167,"subcategory":6,"__hash__":168},"terms\u002Fterms\u002Fc\u002Fcompiler.md","Compiler",null,{"type":8,"value":9,"toc":144},"minimark",[10,15,19,23,26,30,133,137,140],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A compiler is like a translator that reads your entire code book, converts it all into a language the CPU understands, and hands you the finished translated book. This happens before you run the program. Languages like C, Go, and Rust use compilers.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"A compiler is a program that translates source code written in a high-level language into machine code (or an intermediate representation) before execution. The compilation process includes lexical analysis, parsing, semantic analysis, optimization, and code generation. Compiled programs generally run faster than interpreted ones because translation happens ahead of time.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Go compiler:\ngo build main.go        # produces .\u002Fmain binary\n.\u002Fmain                  # run it\n\n# TypeScript compiler:\ntsc index.ts            # produces index.js\n\n# C compiler:\ngcc hello.c -o hello && .\u002Fhello\n","bash","",[38,39,40,49,66,75,82,88,100,105,111],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","# Go compiler:\n",[41,50,52,56,60,63],{"class":43,"line":51},2,[41,53,55],{"class":54},"sBMFI","go",[41,57,59],{"class":58},"sfazB"," build",[41,61,62],{"class":58}," main.go",[41,64,65],{"class":47},"        # produces .\u002Fmain binary\n",[41,67,69,72],{"class":43,"line":68},3,[41,70,71],{"class":54},".\u002Fmain",[41,73,74],{"class":47},"                  # run it\n",[41,76,78],{"class":43,"line":77},4,[41,79,81],{"emptyLinePlaceholder":80},true,"\n",[41,83,85],{"class":43,"line":84},5,[41,86,87],{"class":47},"# TypeScript compiler:\n",[41,89,91,94,97],{"class":43,"line":90},6,[41,92,93],{"class":54},"tsc",[41,95,96],{"class":58}," index.ts",[41,98,99],{"class":47},"            # produces index.js\n",[41,101,103],{"class":43,"line":102},7,[41,104,81],{"emptyLinePlaceholder":80},[41,106,108],{"class":43,"line":107},8,[41,109,110],{"class":47},"# C compiler:\n",[41,112,114,117,120,123,126,130],{"class":43,"line":113},9,[41,115,116],{"class":54},"gcc",[41,118,119],{"class":58}," hello.c",[41,121,122],{"class":58}," -o",[41,124,125],{"class":58}," hello",[41,127,129],{"class":128},"sMK4o"," &&",[41,131,132],{"class":54}," .\u002Fhello\n",[11,134,136],{"id":135},"when-youll-hear-this","When You'll Hear This",[16,138,139],{},"\"The compiler caught a type error before I even ran it.\" \u002F \"Go's compiler is famously fast.\"",[141,142,143],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":145},[146,147,148,149],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":135,"depth":51,"text":136},"general","A compiler is like a translator that reads your entire code book, converts it all into a language the CPU understands, and hands you the finished translate...","intermediate","md","c",{},"\u002Fterms\u002Fc\u002Fcompiler",[158,159,160,161,162],"Interpreter","Binary","Runtime","Syntax Error","Static Typing",{"title":5,"description":151},{"changefreq":165,"priority":166},"weekly",0.7,"terms\u002Fc\u002Fcompiler","sK8cpM19nVlTPIWqucoEfIZJCb-UncM0yqtJ9cjHmws",[170,173,176,179,182],{"title":159,"path":171,"acronym":6,"category":150,"difficulty":152,"description":172},"\u002Fterms\u002Fb\u002Fbinary","A binary is a file your computer can run directly — it has already been translated from human-readable code into the 1s and 0s the CPU speaks.",{"title":158,"path":174,"acronym":6,"category":150,"difficulty":152,"description":175},"\u002Fterms\u002Fi\u002Finterpreter","An interpreter reads your code and runs it line by line in real time, like a live translator at a conference.",{"title":160,"path":177,"acronym":6,"category":150,"difficulty":152,"description":178},"\u002Fterms\u002Fr\u002Fruntime","Runtime is the environment where your code actually runs.",{"title":162,"path":180,"acronym":6,"category":150,"difficulty":152,"description":181},"\u002Fterms\u002Fs\u002Fstatic-typing","Static typing means you have to tell the computer what type each variable is when you write the code, and it checks everything is correct BEFORE running.",{"title":161,"path":183,"acronym":6,"category":150,"difficulty":184,"description":185},"\u002Fterms\u002Fs\u002Fsyntax-error","beginner","A syntax error is when you write code that the computer cannot even understand — like handing someone a sentence with no verbs.",1776518267960]