I was just commenting to a friend how annoying it is that macOS aliases can't add flags to executables like you can easily do in Windows shortcuts since, what? Windows 95? If you want to launch Chrome with flags through your dock/UI you have to compile an AppleScript to an .app. It's crazy.
Using ChatGPT to make Bash palatable
41–50 of 148 posts
Re: Using ChatGPT to make Bash palatable
#42ChatGPT has been amazing for all kinds of programming-adjacent things, even in my line of work where I asked it for help modifying the config file for a selfhosted gitlab instance. > But [Bash] fucking sucks. Like, it’s truly awful to write [...] As an aside, considering how basic the shell script actually was, I think this is a great example of being so intimidated by something that you don't actually try and use it…
Re: Using ChatGPT to make Bash palatable
#43I find it interesting how much harder it is to grok bash/sh/zsh than other languages I’ve learned. Off the top of my head it may be tooling like the lack of linting, or maybe it’s just experience as I avoid complexity like the plague when writing bash which sounds like a self fulfilling feedback loop. Gpt does seem to unblock this mental burden a bit which has me excited for its potential when it comes to education/t…
Something about the quoting / unquoting can get really difficult to reason about. I'm rarely exactly sure how the language constructs work, even the for loop and the if statement. The syntax is complex compared to most other languages, and subtle differences can give totally different results. PICK = can you THE=tell the RIGHT=difference\ between WHAY="all of" TODO='these versions?'
Re: Using ChatGPT to make Bash palatable
#44ChatGPT has been amazing for all kinds of programming-adjacent things, even in my line of work where I asked it for help modifying the config file for a selfhosted gitlab instance. > But [Bash] fucking sucks. Like, it’s truly awful to write [...] As an aside, considering how basic the shell script actually was, I think this is a great example of being so intimidated by something that you don't actually try and use it…
Right, that’s why Bash sucks. A more extreme version of this is APL.
Bash isn’t APL bad. But it’s pretty bad!
Re: Using ChatGPT to make Bash palatable
#45Prompt: "Generate a tiny PID controller with only a Proportional factor written in C. That takes a rotational input from -360 to 360 degrees. The setpoint in degrees. And returns a motor speed in the range of -255 to 255."
=> Produced a compiling correct result.
Later I wanted to know how to communicate between my kernel module and user space program: Prompt: "How do I get a value via character device from my kernel module into my user space c programm?" gave a bunch of answers and digging deeper with Prompt: "Could you provide me with an example of the user space program" gave a compiling and correct answer again.
I could have written all of that myself while spending a good amount researching on google. But this way I felt less frustrated and was definitively a lot quicker.
Not the solution for everything but maybe for a C beginner where research can take a long time and often leads to more confusion than anything else. Now the question is if that confusion is critical in the learning process. And if so how critical and at what stages of the experience spectrum the most?
Re: Using ChatGPT to make Bash palatable
#46Earlier quoted context omitted.
Chat GPT is simply amazing, it feels like Google with super powers. I think it can boost productivity by a considerable amount. It makes a perfect peer programmer, giving you sample code with first class comments explaining the generated code, sometimes with minor errors to make it compile. You can even ask it to explain some specific part of the code. It's also like having a secretary or an assistant available 24/7…
You've… really got the right answers from it? I've only ever asked it a couple of really basic (non-trick! straightforward!) questions about how to accomplish tasks by programming, but it bullshitted me some very plausible nonsense. Once bitten, twice shy. If it were capable of saying "I can't answer that question" reliably (which I've spent some time trying and failing to make it do, in general), it might actually b…
Re: Using ChatGPT to make Bash palatable
#47I don't understand how people can look at this and still claim that it's not doing any "actual reasoning".
Re: Using ChatGPT to make Bash palatable
#48Just today I used ChatGPT to help me speed up writing somewhat trivial C Code for a project in an embedded systems class. Prompt: "Generate a tiny PID controller with only a Proportional factor written in C. That takes a rotational input from -360 to 360 degrees. The setpoint in degrees. And returns a motor speed in the range of -255 to 255." => Produced a compiling correct result. Later I wanted to know how to commu…
Still, seems like a viable assistant so long as you have an understanding of what you're working with.
Re: Using ChatGPT to make Bash palatable
#49I just bought a Streamdeck ( https://www.amazon.com/Elgato-Stream-Deck-Controller-customi... ) for Cybermonday and attached bash scripts similar to those mentioned by the author to buttons next to my keyboard. It is delightful.
powershell -WindowStyle Hidden -ExecutionPolicy Bypass -Command "& { // Command(s) }"
In particular I use it with this Powershell Script:
https://stackoverflow.com/questions/21355891/change-audio-le...
via e.g.:
"& { C:\[Path To Script]\SetVolume.ps1; [audio]::Volume = 0.4 }"
For 40% and so on.
Re: Using ChatGPT to make Bash palatable
#50I just bought a Streamdeck ( https://www.amazon.com/Elgato-Stream-Deck-Controller-customi... ) for Cybermonday and attached bash scripts similar to those mentioned by the author to buttons next to my keyboard. It is delightful.