News for hackers. Stuff that matters.
Re:How I write software with LLMs by petcat on Monday March 16, 2026 @08:56AM (#47398386)
> A compiler uses rigorous modeling and testing to ensure that generated code is semantically equivalent.

Here are the reported miscompilation bugs in GCC so far in 2026. The ones labeled "wrong-code".

https://gcc.gnu.org/bugzilla/buglist.cgi?chfield=%5BBug%20cr...

I count 121 of them.

Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @09:01AM (#47398443)
If you can’t understand the difference between a bug that will rarely cause a compiler encountering an edge case to generate a wrong instruction and an LLM that will generate 2 completely different programs with zero overlap because you added a single word to your prompt, then I don’t know what to tell you.
Re:How I write software with LLMs by petcat on Monday March 16, 2026 @09:17AM (#47398618)
The point is that expert humans (the GCC developers) writing code (C++) that generates code (ASM) does not appear to be as deterministic as you seem to think it is.
Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @09:23AM (#47398696)
I’m very aware of that, but I’m also aware that it’s rare enough that the compiler doesn’t emit semantically equivalent code that most people can ignore it. That’s not the case with LLMs.

I’m also not particularly concerned with non-determinism but with chaos. Determinism in LLMs is likely solvable, prompt instability is not.

Re:How I write software with LLMs by jplusequalt on Monday March 16, 2026 @10:39AM (#47399672)
Classic HN-ism. To focus on the semantics of a statement while ignoring the greater point in order to argue why someone is wrong.
Re:How I write software with LLMs by anthonyrstevens on Monday March 16, 2026 @11:30AM (#47400341)
I think it's a perfectly fine point. The OP said (my interpretation) that LLMs are messy, non-deterministic, and can produce bad code. The same is true of many humans, even those whose "job" is to produce clean, predictable, good code. The OP would like the argument to be narrowly about LLMs, but the bigger point even is "who generates the final code, and why and how much do we trust them?"
Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @03:52PM (#47403946)
As of right now agents have almost no ability to reason about the impact of code changes on existing functionality.

A human can produce a 100k LOC program with absolute no external guardrails at all. An agent Can't do that. To produce a 100k LOC program they require external feedback forcing them from spiraling off into building something completely different.

This may change. Agents may get better.

Re:How I write software with LLMs by petcat on Monday March 16, 2026 @10:52AM (#47399831)
I argued the greater point? Software code-generation is not deterministic, whether it's done by expert humans or by LLMs.
Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @10:56AM (#47399887)
It has nothing to do with determinism. It's the difference between nearly perfectly but not quite perfectly translating between rigorously specified formal languages and translating an ambiguous natural language specification into a formal one.

The first is a purely mechanical process, the second is not and requires thousands of decisions that can go either way.

Re:How I write software with LLMs by raw_anon_1111 on Monday March 16, 2026 @11:02AM (#47399965)
And that’s no different than human developers
Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @12:01PM (#47400785)
The difference is that a human is that a human can reason about their code changes to a much higher degree than an AI can. If you don't think this is true and you think we're working with AGI, why would you bother architecting anything all or building in any guard rails. Why not just feed the AI the text of the contract your working from and let it rip.
Re:How I write software with LLMs by raw_anon_1111 on Monday March 16, 2026 @01:01PM (#47401630)
You give way too much credit to the average mid level ticket taker. And again, why do I care how the code does it as long as it meets the functional and none functional requirements?
Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @03:43PM (#47403815)
Because in a real application with real users all of the functional and non-functional requirements aren't documented anywhere but in the code.
Re:How I write software with LLMs by raw_anon_1111 on Tuesday March 17, 2026 @01:16PM (#47415555)
If only a coding agent had access to your code…
Re:How I write software with LLMs by sarchertech on Tuesday March 17, 2026 @07:10PM (#47419600)
You realize that coding agents aren’t AGI right? They aren’t capable of reasoning about a code changes impact on anything other than their immediate goal to anywhere near the level even a terrible human programmer is. That why we have the agentic workflow in the first place. They absolutely require guardrails.

Claude will absolutely change anything that’s not bolted to the floor. If you’ve used it on legacy software with users or if you reviewed the output you’d see this.

Re:How I write software with LLMs by jcranmer on Monday March 16, 2026 @10:24AM (#47399488)
Compilers are some of the largest, most complex pieces of software out there. It should be no surprise that they come with bugs as all other large, complex pieces of software do.
Re:How I write software with LLMs by Kye on Monday March 16, 2026 @10:48AM (#47399796)
This seems to apply easily to LLMs as language coprocessors that can output code. How long was it before people trusted compilers?
Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @10:52AM (#47399840)
If you don't understand the difference between something that rigorously translates one formal language to another one and something that will spit out a completely different piece of software with 0 lines of overlap based on a one word prompt change, I don't know what to tell you.
Re:How I write software with LLMs by anthonyrstevens on Monday March 16, 2026 @11:32AM (#47400356)
"rigorously" is doing a lot of heavy lifting here.
Re:How I write software with LLMs by sarchertech on Monday March 16, 2026 @11:58AM (#47400739)
Let's substitute rigorously with "in an extremely thorough, careful, and methodical way."