← Back to context

Comment by menaerus

21 days ago

You are underestimating the complexity of the task so do other people on the thread. It's not trivial to implement a working C compiler very much so to implement the one that proves its worth by successfully compiling one of the largest open-source code repositories ever, which btw is not even a plain ISO C dialect.

I didn’t say it was trivial. Just that I thought my course mates would be able to do it.

  • You thought your course mates would be able to write a C compiler that builds the Linux?

    Huh. Interesting. Like the other guy pointed out, compiler classes often get students to write toy C compilers. I think a lot of students don't understand the meaning of the word "toy". I think this thread is FULL of people like that.

    • I took a compilers course 30 years ago. I have near zero confidence anyone (including myself) could do it. The final project was some sort of toy language for programming robots with an API we were given. Lots of yacc, bison, etc.

      Lots of segfaults, too.

    • If it helps, I did a PhD in computer science and went to plenty of seminars on languages, fuzz testing compilers, reviewed for conferences like PLDI. I’m not an expert but I think I know enough to say - this is conceptually within reach if a PITA.

    • Hey! I built a Lego technic car once 20 years ago. I am fully confident that I can build an actual road worthy electric vehicle. It's just a couple of edge cases and a bit bigger right? /s

      3 replies →

They did bot compile the whole linux, mind you, just an absolute minimal kernel.

Doing a real compiler to be used by humans is difficult. Doing a compiler that “gets the thing done” is a different thing.

  • Nowhere did I imply it is production-ready. I said "working compiler" and by definition Claude built one since they booted up the kernel.