3 ms·
To me this a huge signal that a regex was not the correct approach and that AI just steered you directly into (or passed) Kernighan's Law.
by spamizbad 3y ago
To me this a huge signal that a regex was not the correct approach and that AI just steered you directly into (or passed) Kernighan's Law.
- dools 3y agoNo, it’s a very specific regex for parsing a very finicky file format. It’s definitely the best tool for the job, although funnily enough ChatGPT couldn’t get it right in a single regex but Claude could. ChatGPT chickened out and kept giving me functions that looped through applying various filters and regexes.
- daymanstep 3y agoHow do you know that the AI got it right?
- dools 3y agoThe the code parses the files correctly.