Live data from Hacker News

Using ChatGPT to make Bash palatable

brev.dev

91–100 of 148 posts

Re: Using ChatGPT to make Bash palatable

#91

> But it fucking sucks. Like, it’s truly awful to write I feel like I'm the only person among my peers to think this and I don't understand why.

I had to try PowerShell for a project.

It is soooo much better that bash.

Passing typed objects instead of only text, Typed functions, and the ability to use C# types/functions inline !

Re: Using ChatGPT to make Bash palatable

#92
post #8

I don't understand how people can look at this and still claim that it's not doing any "actual reasoning".

Here is an example of where I think it is doing "no reasoning". I ask it for the XOR swap trick and I get: int a = 5; int b = 10; a = a ^ b; b = a ^ b; a = a ^ b; // After the swap, a = 10 and b = 5 I ask for the bitwise OR swap trick and I get: int x = 5; int y = 10; x = x | y; y = x | y; x = x | y; // After the swap, x = 10 and y = 5 When asked for something which is invalid, but close to something it knows, it ten…

Has anyone tried to make ChatGPT output first order logic statements about it's input problem, then make implications using a solver, then feed the solution back to ChatGPT for usage ?

Maybe this could solve the reasoning part.

ChatGPT should perform well in translating prompts to statement and vice versa, it's just text to text.

Re: Using ChatGPT to make Bash palatable

#93
post #8

I don't understand how people can look at this and still claim that it's not doing any "actual reasoning".

Has anyone tried to make ChatGPT output first order logic statements about it's input problem, then make implications using a solver, then feed the solution back to ChatGPT for usage ?

Maybe this could solve the reasoning part.

ChatGPT should perform well in translating prompts to statement and vice versa, it's just text to text.

Re: Using ChatGPT to make Bash palatable

#94

Can anyone recommend some more articles about this ? Specifically, using chatgpt to write code? The more in depth, the better.

Not ChatGPT, but this article[0] (which was on HN earlier this year[1]) goes through building a small game in JS using OpenAI Codex.

[0]: https://www.shawnmatthewcrawford.com/balloons-the-balloon-cl...

[1]: https://news.ycombinator.com/item?id=31211280

Re: Using ChatGPT to make Bash palatable

#96

> But it fucking sucks. Like, it’s truly awful to write I feel like I'm the only person among my peers to think this and I don't understand why.

I had to try PowerShell for a project. It is soooo much better that bash. Passing typed objects instead of only text, Typed functions, and the ability to use C# types/functions inline !

To me it's about half way there. The things I like about it the least are the ones that are like bash ("I'd just like to interject for a moment, what you're referring to as Bash is in fact called POSIX shell").

A common argument in defense of its weirdness is that "shell scripting isn't like serious software development", but I don't understand that either.

I use shell scripts a good amount because "it's right there" is a strong argument, but in a lot of cases things that seem like they would be trivial take forever, are horribly hacky and leave me wishing I just had written a Python script right away instead.

I really don't get why people like shell scripts.

Re: Using ChatGPT to make Bash palatable

#97

Just 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…

I guess the main concern with its use as a learning tool is what happens if it's wrong? It might be helpful for boilerplate when you already know what you want, but if you don't even know that it'll blow up in your face when it doesn't give you something workable. Still, seems like a viable assistant so long as you have an understanding of what you're working with.

what happened after AI introduce undefined behaviour...

Re: Using ChatGPT to make Bash palatable

#98
post #84
post #59

Am I the only who think this is incredible!? If you would've told me a year ago when we would have an ai that can code based on normal human language prompts, I would've said maybe in 2025 or 2026, but its 2022 and it already exists! Man, if this what we have now, imagine what we will have in 2025 or 2030! I just hope this doesn't end up killing search engines and personal blogs, since no one needs to search for anyt…

In the current state, everything the AI knows is stuff that people have written on the internet. It doesn’t seem to come up with new insights or judgements on its own. If people stop writing, AI won’t learn anything new (unless you turn it into AlphaZero for $DEVTOPIC). ChatGPT certainly saves time, but it becomes useless roughly at the same point where I would remain stuck after exhausting what Google Search turns u…

May be.

But like alpha go to zero, if there is certain rules it can learn itself and no more or large amount of writing by human is needed.

Also, one may worry not how intelligent they are but the noise vs info ratio that will kill a lot of web site. The problem is not lie but lie mix with truth or belief … then you do not know and shut off.

Re: Using ChatGPT to make Bash palatable

#99
post #8

I don't understand how people can look at this and still claim that it's not doing any "actual reasoning".

How does it "reason" though, I thought LLM just generated likely next words?

My understanding is the transformer layer in the LLM is basically doing something akin to message passing, it’s like a mini computer. In predicting the next word, it has to understand a lot about a lot of different kinds of topics

My understanding is kinda fuzzy because I haven’t coded it up myself, but this was the takeaway I got from this explanation (starts at 36:21)

https://youtu.be/cdiD-9MMpb0

Re: Using ChatGPT to make Bash palatable

#100
post #81
post #61

Earlier quoted context omitted.

Bash _itself_ (or any other shell) is very small. You're talking about the ecosystem (shell + other command line utilities). Commands like awk, find, grep, sed, cut and so many others are not strictly part of the language. They're external tools commonly provided by the operating system or distribution. That's why there are so many inconsistencies between their options. Here are the very few commands that actually ar…

> Bash _itself_ (or any other shell) is very small. You're talking about the ecosystem (shell + other command line utilities). I'm not so sure. They mentioned syntax, and the single biggest issue among my co-workers who don't like bash is that they think ' and " work like they do in python or javascript.

They mentioned "20 ways of doing things", I'm replying to that complaint.

Quoting is an issue if you don't understand the IFS and command expansion. It's an old fashioned style, but it is consistent and there's only one way of doing it (quoting every variable and subshell use).

Think of shell variables as non first-class citizens, they can only be used interpolated within a string, like "$var". The shellcheck tool enforces this perspective, which makes ' and " behave very much like python or JS.

Post reply on HN