Felix Palmen :freebsd: :c64: on Nostr: npub1t5n07…78v75 I never went as far as actually using AI-generated code. I thought ...
npub1t5n07fslsy2lpsd9jkjyzgtc87fe4ayemd08n0l5ur9egg4q5huq678v75 (npub1t5n…8v75) I never went as far as actually using AI-generated code. I thought it's fun to play around and see what I get, so quite a while ago, I showed GPT this interface (from my own code):
https://github.com/Zirias/dos2ansi/blob/master/src/bin/dos2ansi/stream.h
Then I asked it to implement me an example "StreamWriter" that just logs write operations. I immediately got some code that had undefined behavior (crashing). I gave it a gentle hint (this doesn't look quite right because ...), and it told me "thank you, you're right, here's the fixed code" 😅. Well ...
In a nutshell, 2/3 still sounds like a net gain, but be prepared for more debugging of bugs "better hidden" 😏
https://github.com/Zirias/dos2ansi/blob/master/src/bin/dos2ansi/stream.h
Then I asked it to implement me an example "StreamWriter" that just logs write operations. I immediately got some code that had undefined behavior (crashing). I gave it a gentle hint (this doesn't look quite right because ...), and it told me "thank you, you're right, here's the fixed code" 😅. Well ...
In a nutshell, 2/3 still sounds like a net gain, but be prepared for more debugging of bugs "better hidden" 😏