this post was submitted on 13 Aug 2025
252 points (99.2% liked)

Programmer Humor

26332 readers
2139 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
[–] Brujones@lemmy.world 7 points 1 month ago

I got curious about x86 assembly, so I followed some tutorials to get the hang of it. Once I had some confidence, I wrote a prime number generator. I had a loop that I was sure could be more efficient, but couldn't figure it out.

I pasted the code to ChatGPT. It came back with an optimization that wouldn't work because it wasn't preserving critical register values. I pointed that out, and it responded, again and again, with the same code with the same problem. I was never able to get it out of this broken record mode.