Re:Irregular Expressions
by andrewfromx on Sunday April 09, 2023 @10:47AM
(#35503206)
GPT has completely changed my use and feeling about regex. I used to hate them, would rather write the logic myself in a language I understand. But now I just ask GPT for the regex I need and voila!
[ Parent
| on HN ]
Re:Irregular Expressions
by tomashubelbauer on Sunday April 09, 2023 @11:11AM
(#35503471)
That's interesting. I personally like regexes very much but I'm slow to create them so I figured I'd ask ChatGPT a few times and just double check its work and it got them all wrong.
Got them wrong for me as well. :/
I could point out the flaw and it would fix it, but introduce another.
However, I got enough out of it to rewrite it myself.
I recently asked it to produce a regex for me, and it responded that as a large language model, it wasn’t allowed to produce hate speech… Not making this up.
and next you will be asking gpt "how do i do multiplication"?
Re:Irregular Expressions
by MathMonkeyMan on Sunday April 09, 2023 @02:08PM
(#35505036)
There will be no need to ask.
Didn't people say this about calculators too probably?
they did, and they were right
Writing regexes is one of the most fun things that sometimes pop up at work. A little puzzle. Well-defined, clear that there must be a solution, somewhat easily checkable .. the easiest kind of task. I enjoy this just as much as some people enjoy crosswords or sudoku. Nobody would ask chatgpt to solve a sudoku for them (It would get them all wrong anyway.) No way I'm gonna let GPT take this away from me.
Re:Irregular Expressions
by andrewfromx on Sunday April 09, 2023 @01:57PM
(#35504957)
"No way I'm gonna let GPT take this away from me" surely you can see a photoshop expert from years ago saying this about pixel blurring?
What is "pixel blurring"?
Re:Irregular Expressions
by chrismorgan on Sunday April 09, 2023 @01:16PM
(#35504600)
Every regular expression I’ve seen produced by a large language model has either being broken, or done an unacceptably bad job due to being the wrong tool for the job (e.g. validating an email address with a fairly short regular expression, which I’ve seen people share the answers of at least three times).
Re:Irregular Expressions
by Turing_Machine on Sunday April 09, 2023 @03:05PM
(#35505477)
The regex GPT gave me the other day was pure shite. However, that was only a small part of the job, so GPT was still a big win overall.