Live data from Hacker News

CompileBench: Can AI Compile 22-year-old Code?

quesma.com

41–50 of 69 posts

Re: CompileBench: Can AI Compile 22-year-old Code?

#41
post #19

Earlier quoted context omitted.

Here the tricky part is to make tests that it work correctly. I did this upgrade a few times, and works for simple stuff like charm (e.g. removing requirements.txt and adding proper pyproject.toml). Even in Claude Code, it takes some prompting and CLAUDE.md so that it consistently runs uv, rather sometimes `uv run python`, other times `python3 -m` being surprised that some dependency is not available.

I am doing this now. What are your instructions in CLAUDE.md? thx

Usually are long and project-dependent, so I won't share here.

But just a copy-paste of a piece of a project of mine

        ## Core Principles (IMPORTANT)
        - **NO FALLBACKS EVER** - Fail fast, fail hard. If something is missing, crash immediately
        - **NO SILENT DEFAULTS** - Never use default values when files/data is missing
        - **NO TRY/EXCEPT WRAPPING** - Let exceptions propagate for easier debugging
        - **PROPER TYPES ONLY** - Use Literal types for enums, Pydantic models for structures. No tuples for structured data
        - **NO JAVA-STYLE ABSTRACTIONS** - Don't create pointless constants like STATUS_OK = "OK". Just use literals or proper types
        - **PROPER PARSING** - No regex for structured formats, use real parsers
        - **CRASH EARLY** - Things should crash as soon and as hard as possible for easy debugging
        - **NO DEFENSIVE PROGRAMMING** - Don't worry about "backwards compatibility" during refactoring - just redesign things to be better.

        ## Development

        **IMPORTANT: Always use `uv run` for all Python commands. Never use plain `python` or `python3`.**

        ```bash
        # Format code
        uv run ruff format .

        # Check linting
        uv run ruff check .

        # Type checking
        uv run ty check

        # Run tests
        uv run pytest tests/
        ```

Re: CompileBench: Can AI Compile 22-year-old Code?

#42

Earlier quoted context omitted.

So essentially, you are redundant now and celebrate it.

It's like saying chisel made carpenter redundant. AI still needs an operator and then more people to actually make the output production ready.

You are the master of understatement. I just spent 5+ Hours getting an emulator to just work. back and forth with the AI required me to be cognizant of the direction I was going, very cognizant. After It finally worked... the clean up was huge. at least 15 broken images, 100s of scratch files.

Re: CompileBench: Can AI Compile 22-year-old Code?

#43

Earlier quoted context omitted.

So essentially, you are redundant now and celebrate it.

Naturally, the primary source of purpose in life: Making Chocolate Doom compile.

If only philosophers of the last 2500 years had known this...

Re: CompileBench: Can AI Compile 22-year-old Code?

#44

Earlier quoted context omitted.

It's like saying chisel made carpenter redundant. AI still needs an operator and then more people to actually make the output production ready.

People here are claiming that "AI" emits fully working products, so with that reading they are not just a tool. Also, you would own a chisel and the chisel does not spy on you. The "AI" factories are owned by oligopolies and you have to pay a steep monthly fee in order to continue receiving your warez that are derivative works of actually creative people's IP. Also, the "AI" factories know everything you do and ask a…

There are also people telling you the earth is flat, and 30 years of experience can be compressed into a 4 minute you tube video. Even if a chisel could spy on me, it becomes dull with use, where as AI may become sharper with use, it still cannot distinguish which idiot is operating it. AI is just for people to learn prompting, which is an art, like google searching. It still cannot fathom "taste." or a large host of other types of nuances, that again, only come with experience and enculturation.

Re: CompileBench: Can AI Compile 22-year-old Code?

#45
I might start to accept this LLM stuff when it can directly compile programs, i.e. not spit out a compiler command but take in source code and output linked object code in an executable format via token inference. And have it be correct.

Then, I'd start to trust in its ability to manage context and reliably work through complex tasks.

Re: CompileBench: Can AI Compile 22-year-old Code?

#46

I might start to accept this LLM stuff when it can directly compile programs, i.e. not spit out a compiler command but take in source code and output linked object code in an executable format via token inference. And have it be correct. Then, I'd start to trust in its ability to manage context and reliably work through complex tasks.

[deleted]

Re: CompileBench: Can AI Compile 22-year-old Code?

#49
post #38

Earlier quoted context omitted.

People here are claiming that "AI" emits fully working products, so with that reading they are not just a tool. Also, you would own a chisel and the chisel does not spy on you. The "AI" factories are owned by oligopolies and you have to pay a steep monthly fee in order to continue receiving your warez that are derivative works of actually creative people's IP. Also, the "AI" factories know everything you do and ask a…

You are correct and I agree with you. HN monoculture of AI fanbois won't understand this

Of all the forums I frequent, hackernews is probably the most dismissive of AI, which I would not have guessed.

Re: CompileBench: Can AI Compile 22-year-old Code?

#50

I recently downloaded the source code for Chocolate Doom [0], and even though a ton of human labor has been put into making it cross-platform and easy to build (and that work definitely deserves to be commended!), I still couldn't build it immediately on my M1 MacBook. Asking Claude Code to build it - literally prompting it "fix whatever needs to be fixed until you get the binary to run" - and waiting ~20 minutes was…

So essentially, you are redundant now and celebrate it.

I’ve always thought that most devs would be elated by the idea of automatio^n!
Post reply on HN