4 ms·
I remember back in March, using ChatGPT to generate code, i was not impressed at all. I mean, the code was okey-ish, but nothing that revolutionary. Fast forwa
by emporas 3y ago
I remember back in March, using ChatGPT to generate code, i was not impressed at all. I mean, the code was okey-ish, but nothing that revolutionary.
Fast forward 3 months, i learned to use the tool, now i use it all the time to generate code. There are some ways to use it, and really shine as a tool.
1) It works well for CLI tools. It knows thousands of linux commands and can use them flawlessly most of the time. Any recombining of existing command line tools, is easy as a breeze.
2) Try to use it on a language with an as strict compiler as possible. Rust is the most obvious and modern candidate. Untyped or dynamically typed languages like Python and Angular are far from ideal and should be avoided. Typescript is one more obvious language of choice.
3) Jargon of programming, and knowledge about libraries in the programming language are very important. Being as specific as possible about libraries, maybe even modules and functions makes all the difference.
Unfortunately the third point rules out any amateur trying to use code generation effectively.
The following days, i want to use GPT to create a notification system for HN comments, like a daemon running in the background, which downloads my comment page, saves all comments on a database, and for every reply, it sends a notification, using notify-send with the user and the first 10 words of the reply. Maybe a subtle sound effect as well, like gmail, or facebook.
Does a tool like that exist? I have no doubt, GPT will excel at this, not that difficult but still not trivial task.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- fragmede 3y agoSoooo I wrote it. Took me 2 hours, and only looks at your first page of comments, but https://github.com/fragmede/hn_reply_notifier https://github.com/fragmede/hn_reply_notifier For not knowing rust, I'm pretty impressed!
- emporas 3y agoLol, awesome fragmede. The program has some defects though. The username, of which the comments it is looking for, is hardcoded into the code. The standard convention for CLI tools, is to create a .rc file, like .hn_reply_notifierrc and save some configuration in there. The way your program is configured, the next user will have to recompile the code with the new username. That's a big no-no! It is so much fun to use GPT that way, that i cannot resist but generate my own program, and i will share with you on github the resulting code, alongside with the GPT conversation.
- fragmede 3y agoOh yeah totally. Either from an RC file or as an argument on the command line. But for something I "wrote", in a language I'm totally unfamiliar with, in 2 hours or so, I'm floored. I'm a seasoned developer (in other languages) and how much I didn't have to dig into rust to get that far is mind blowing. I can't wait to see your attempt!