this post was submitted on 22 Feb 2026
856 points (99.1% liked)

Programmer Humor

30234 readers
481 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Flipper@feddit.org 121 points 1 week ago* (last edited 1 week ago) (3 children)

Has the same vibes as anthropic creating a C compiler which passes 99% of compiler tests.

That last percent is really important. At least that last percent are some really specific edge cases right?

Description:
When compiling the following code with CCC using -std=c23:

bool is_even(int number) {
   return number % 2 == 0;
}

the compiler fails to compile due to booltrue, and false being unrecognized. The same code compiles correctly with GCC and Clang in C23 mode.

Source

Well fuck.

[–] PlexSheep@infosec.pub 28 points 1 week ago

If this wasn't 100% vibe coded, it would be pretty cool.

A c compiler written in rust, with a lot of basics supported, an automated test suite that compiles well known c projects. Sounds like a fun project or academic work.

[–] into_highest_invite@lemmygrad.ml 7 points 1 week ago (2 children)

any llm must have several C compilers in its training data, so it would be a reasonably competent almost-clone of gcc/clang/msvc anyway, right?

is what i would have said if you didn't put that last part

[–] racketlauncher831@lemmy.ml 3 points 1 week ago (1 children)

This is so fucked up. The AI company has the perfect answer and yet it rolls the die to recreate the same thing by chance. What are they expecting, really?

[–] into_highest_invite@lemmygrad.ml 1 points 1 week ago* (last edited 1 week ago)

they don't care. they expect to be able to say "our AI agent made a C compiler that passed 99% of our tests"

[–] Cethin@lemmy.zip 2 points 1 week ago* (last edited 1 week ago) (1 children)

You're still correct. The thing about LLMs is that they're statistical models that output one of the most likely responses, from the list of most likely responses. It still has some randomness though. You can tune this, but no randomness is shit, and too much randomness sometimes generates stupid garbage. With a large enough output, you're statistically likely, with any randomness, to generate some garbage. A compiler is sufficiently large and complex that it's going to end up creating garbage somewhere, even if it's trained on these compilers specifically.

[–] into_highest_invite@lemmygrad.ml 2 points 1 week ago (1 children)

that's a great point but wouldn't the output for a solved problem like "make a working C compiler in rust" work better if the temperature/randomness were zero? or am i fundamentally misunderstanding?

[–] Cethin@lemmy.zip 2 points 1 week ago

Probably. At that point you might as well just copy/paste the existing compiler though. The temperature is basically the thing that makes it seem intelligent, because it gives different responses each time, so it seems like it's thinking. But yeah, having it just always give the most likely response would probably be better, but also probably wouldn't play well with copyright laws when you have the exact same code as an existing compiler.

[–] sus@programming.dev 4 points 1 week ago* (last edited 1 week ago)

The incredible thing is this is actually the result of an explicit design decision.

The compiler accepts most GCC flags. Unrecognized flags (e.g., architecture- specific -m flags, unknown -f flags) are silently ignored so ccc can serve as a drop-in GCC replacement in build systems.

They're so committed to vibing that they'd prefer if the compiler just does random shit to make it easier to shove it haphazardly into a build pipeline.