189 points · by pgosar0514 · 3y ago · 54 comments
It allows you to explain in natural language what you want to do, and then automatically execute the relevant command. Optionally, you can ask ChatGPT to explain the command it just ran or even pass in any question for it to answer. Focus on what's important - figuring out that nasty bug instead of chasing down GDB commands at the tip of your tongue.
See it here: https://github.com/pgosar/ChatGDB
https://github.com/pgosar/ChatGDB/blob/ee9d64b441939df163dc5...
Something like https://github.com/nvbn/thefuck but with some intelligence instead of hard-coded rules.
That's somewhat problematic if you have secrets in there, but you could just not use it if you know you have sensitive things in your shell history. You still need to be aware of that without ChatGPT since most systems save your shell history to the file system where it could remain accessible for much longer than you'd think. IIRC they don't use things from the API for training, but I wouldn't depend on that being safe.
Nah, seriously don't use it, is just a small experiment, curious thing is that half of the code is the GPT prompts..
And ALSO the type of thing where I think you can work out if it's bullshitting you on your own; if it works, it's not bullshitting.
GDB... probably a slowly enough moving target, though. ;)
And even on the things I've seen it get wrong, even in higher-churn areas like front-end-Javascript, it's usually "usefully wrong" in that now I've tried one more thing and often end up aware of several more things to look up to try to figure out the right one.
“Use GPT to do this thing!”
“But GPT is notorious for confidently getting things wrong”
“That’s ok! Because you’ll know it’s wrong!”
Maybe I’m a little sore right now because I literally just finished trying to have GPT write code for me and it gave me code with all kinds of syntax errors and mistakes. Yes, I know not to trust it because the compiler flagged the problems, but what now? I go write the code myself I guess. Yay GPT?
What problem is GPT solving here then?
When I had to use a dissasembler the issue was not commands, because those become muscle memory after a few hours of use. (LLM solutions are anti muscle memory because for the same prompt you can get diff results)
The issue I had was wrapping my brain around what is actually going on, keeping track of pointers, addresses and so on.
Maybe this chat solution can help with some of that, but I often am not sure what I actually am looking for so I can’t ask for it. Until I gets to “fix the bug/ find the overflow” I just don’t see the extra value.
Same problem when coding shell scripts. It’s like they tried to invent the hardest to remember language. I often use python instead of bash just because I can remember it and read it.
My few hours of usage is 30 different 5 minute stints over the course of 6 months. I don't remember anything between usages. English debugger prompts will be amazing.
It also makes me wonder if the command line will return as the premiere PC interface. Why would I want to use your web page with all its lovely design and branding when I can just ask the command line to show me the information the way I want?
>One fun thing - after tracking down the code to the block of C++ code, ChatGPT-4 is what actually found the memory leak for me :)
although I can't imagine what the prompt was.
"Thinking step by step, what does this code do, is there a problem?"
I don't think the color scheme is Solarized Dark. Looks closer to Nord[2].
[1]: https://fonts.google.com/specimen/Fira+Code?preview.text=(gd...