5 ms·
It's a fun comparison, but with the notable difference that that one can compile the Linux kernel and generate code for multiple different architectures, while
by vidarh 9mo ago
It's a fun comparison, but with the notable difference that that one can compile the Linux kernel and generate code for multiple different architectures, while this one can only compile a small proportion of valid C. It's a great project, but it's not so much a C compiler, as a compiler for a subset of C that allows all programs this compiler can compile to also be compiled by an actual C compiler, but not vice versa.
- d_silin 9mo agoBut can it compile "Hello, World" example from its own README.md? https://github.com/anthropics/claudes-c-compiler/issues/1 https://github.com/anthropics/claudes-c-compiler/issues/1
- Retr0id 9mo agoIt's fascinating how few people read past the issue title
- fooker 9mo agoAnd this is exactly why coding with AI is not-so-slowly taking over. Most people think they are more capable than they actually are.
- vidarh 9mo agoNoticed the part where all it requires is to actually have the headers in the right location?
- d_silin 9mo ago"The location of Standard C headers do not need to be supplied to a conformant compiler." From https://news.ycombinator.com/item?id=46920922 https://news.ycombinator.com/item?id=46920922 discussion.
- vidarh 9mo agoAnd it doesn't for the compiler in question either. As long as the headers exist in the places it looks for them. No compiler magically knows where the headers are if you haven't placed them in the right location
- Retr0id 9mo agostddef.h (et al) should be shipped by the compiler itself, and so it should know where it is. But they rely on gcc for it, hence it doesn't always know where to look. Seems totally fine for a prototype.
- vidarh 9mo agoEspecially given they're not shipping anything. The GCC binaries can't find misplaced or not installed headers either.
- josefx 9mo agoShipping GPL headers that explicitly state that they are part of GCC with a creative commons licensed compiler would probably make a lot of people rather unhappy, possibly even lawyers.
- d_silin 9mo agoWould you accept the same quality of implementation from a human team?
- HendrikHensen 9mo agoNoticed the part where the exact instructions from the Readme were followed and it didn't work?
- vidarh 9mo agoSo we're down to a missing or unclear description of a dependency in a README - note following the instructions worked for others -, from implications the compiler didn't work.
- mojuba 9mo agoWell I'm pretty sure the author can make a compliant C compiler in a few more sectors.
- vidarh 9mo agoI mean we know it can be done in little space, given the many tiny C compilers. I think what is most interesting about this one is exactly the creative shortcuts. It's an interesting design space for e.g. bootstrapping to impose extra restrictions.