News for hackers. Stuff that matters.
Re:A Student's Guide to Writing with ChatGPT by WalterBright on Wednesday November 13, 2024 @03:30PM (#42129641)
Just because it spits out a RE doesn't mean the RE is what you wanted. For one thing, you'll need to be precise in your prompt.
Re:A Student's Guide to Writing with ChatGPT by amelius on Wednesday November 13, 2024 @04:43PM (#42130337)
You don't need to be precise. Just give it an example string and tell it what information you want to extract from it and it usually works. It is just way faster than doing it manually.
Re:A Student's Guide to Writing with ChatGPT by zikduruqe on Wednesday November 13, 2024 @06:02PM (#42131189)
Claude/ChatGPT has become my man pages.
Re:A Student's Guide to Writing with ChatGPT by ojosilva on Wednesday November 13, 2024 @06:51PM (#42131549)
Yeah, in line with the old RE adage: I had a problem. I used AI. Now I have two problems.
Re:A Student's Guide to Writing with ChatGPT by antod on Wednesday November 13, 2024 @08:00PM (#42132017)
Rhetorical question: Can you ever fully be sure you have the regex you wanted?
Re:A Student's Guide to Writing with ChatGPT by rjh29 on Wednesday November 13, 2024 @08:41PM (#42132275)
Writing regexes by hand is hard so there will always be some level of testing involved. But reading a regex and verifying it works is easier than writing one from scratch.
Re:A Student's Guide to Writing with ChatGPT by antod on Wednesday November 13, 2024 @09:04PM (#42132410)
My overly snide point about regexes was that most of the time "verifying it works" is more like finding and fixing a few more edge cases on the asymptotic journey towards no more brokenness.
Re:A Student's Guide to Writing with ChatGPT by rjh29 on Thursday November 14, 2024 @07:50AM (#42135712)
Yeah I agree with that! 100% test coverage seems impossible when every part of the regex is basically an if condition.