News for hackers. Stuff that matters.
Re:A Student's Guide to Writing with ChatGPT by SunlitCat on Wednesday November 13, 2024 @02:56PM (#42129299)
Well, I got chatgpt (gpt4o) to write me a very basic json parser once (and a gltf parser). Although it was very basic and lacking any error checking, it did what i asked it (although not in one go, i had to refine my questions multiple times).
Re:A Student's Guide to Writing with ChatGPT by 85392_school on Wednesday November 13, 2024 @03:28PM (#42129620)
In my experience 4o/Claude are really good at one shotting complicated but isolated components (eg streaming JSON parsers).
Re:A Student's Guide to Writing with ChatGPT by mattmanser on Wednesday November 13, 2024 @06:38PM (#42131450)
It does spectacular job with well trodden paths. Asked it to give me a map react control with points plotted and got something working in a jiffy.

I was trying to get it write robot framework code earlier and it was remarkably terrible. I would point out an obvious problem, it would replace the code with something even more spectacularly wrong.

When I pointed out the new error, it just gave me the exact same old code.

This happened again and again.

It was almost entirely useless.

Really showed how the sausage is made, this generation of AI is just regurgitation of patterns it stole from other people.

Re:A Student's Guide to Writing with ChatGPT by ssl-3 on Wednesday November 13, 2024 @07:23PM (#42131771)
In my experience 4o is really good at ignoring user-provided corrections and insanely regurgitating the same code (and/or the same problems) over and over again.

ChatGPT 4 does much better with corrections, as does Claude. 4o is a pox.

Re:A Student's Guide to Writing with ChatGPT by com2kid on Thursday November 14, 2024 @02:43AM (#42133922)
That 4o is often times worse that GPT 4 has been widely ignored. :/
Re:A Student's Guide to Writing with ChatGPT by amelius on Wednesday November 13, 2024 @03:26PM (#42129595)
Chatgpt is great for writing regular expressions by the way.
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.
Re:A Student's Guide to Writing with ChatGPT by pkaye on Wednesday November 13, 2024 @05:35PM (#42130956)
I've been using it to debug issues with config files and stuff. I just provide all the config files and error log to Chatgpt and it give a few possibilities which I fix or confirm is not an issue. If it still fails, I send the updated config files and error logs and get a new reply and repeat.