• Flipper@feddit.org
    link
    fedilink
    arrow-up
    112
    ·
    edit-2
    2 days ago

    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.

    • sus@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 hours 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.

    • PlexSheep@infosec.pub
      link
      fedilink
      arrow-up
      25
      ·
      2 days 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.