4 ms·
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 wha
by SunlitCat 2y ago
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).
- amelius 2y agoChatgpt is great for writing regular expressions by the way.
- WalterBright 2y agoJust 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.
- amelius 2y agoYou 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.
- zikduruqe 2y agoClaude/ChatGPT has become my man pages.
- ojosilva 2y agoYeah, in line with the old RE adage: I had a problem. I used AI. Now I have two problems.
- antod 2y agoRhetorical question: Can you ever fully be sure you have the regex you wanted?
- rjh29 2y agoWriting 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.
- antod 2y agoMy 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.
- pkaye 2y agoI'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.
- 85392_school 2y agoIn my experience 4o/Claude are really good at one shotting complicated but isolated components (eg streaming JSON parsers).
- mattmanser 2y agoIt 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.
- ssl-3 2y agoIn 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.
- com2kid 2y agoThat 4o is often times worse that GPT 4 has been widely ignored. :/