upvote
What happened with the wrong pixel layout is that the specification was wrong (the problem is that sub agents spawned recently by Claude Code are Haiuku session, their weakest model -- you can see the broken specification under spectrum-specs), it entered the code, caused a bug that Claude later fixed, without updating the comment. This actually somewhat shows that even under adversarial documentation it can fix the problem.

IMHO zx_pixel_addr() is not bad, makes sense in this case. I'm a lot more unhappy with the actual implementation of the screen -> RGB conversion that uses such function, which is not as fast as it could be. For instance my own zx2040 emulator video RAM to ST77xx display conversion (written by hand, also on GitHub) is more optimized in this case. But the fact to provide the absolute address in the video memory is ok, instead of the offset. Just design.

> This and the other inline function next to it for attributes are only ever used once.

I agree with that but honestly 90% of the developers work in this way. And LLMs have such style for this reason. I stile I dislike as well...

About the lookup table, the code that it uses in the end was a hint I provided to it, in zx_contend_delay(). The old code was correct but extremely memory wasteful (there are emulators really taking this path of the huge lookup table, maybe to avoid the division for maximum speed), and there was the full comment about the T-states, but after the code was changed this half-comment is bad and totally useless indeed. In the Spectrum emulator I provided a few hints. In the Z80, no hint at all.

If you check the code in general, the Z80 implementation for instance, it is solid work on average. Normally after using automatic programming in this way, I would ask the agent (and likely Codex as well) to check that the comments match the documentation. Here, since it is an experiment, I did zero refinements, to show what is the actual raw output you get. And it is not bad, I believe.

P.S. I see your comment greyed out, I didn't downvote you.

reply
> It reminds me of the way children play with Duplo blocks.

WTF? I appreciate your technical expertise but you can't be aggressive like this on HN, and we've had to ask you this before: https://news.ycombinator.com/item?id=45663563.

If you'd please review https://news.ycombinator.com/newsguidelines.html and stick to the rules when posting here, we'd appreciate it.

reply
> you can't be aggressive

I disagree that this is "aggressive." It's certainly opinionated. I think the AI does a bad job here and I'm attempting to express that in a humorous and qualified way.

> WTF?

You don't consider this to be "aggressive?"

> stick to the rules when posting here

Do you genuinely think I'm trying to be disruptive?

reply
Ah - I interpreted the putdown as being about what antirez did, not what Claude did. It sounds like I misread that, and I apologize.
reply
Even though I understand your sentiment, and think it is sincere, I think this is intellectually dishonest. Even though I have been programming since I was 16 (20 years), I still program like a child playing with Duplo blocks, when using a novel or otherwise unfamiliar technology. I bet that you do too. I also think that every programmer should play with their computers once in a while. Explore. Discover. Even if it means allowing yourself to be alienated from your means of production.
reply