Live data from Hacker News

Using ChatGPT to make Bash palatable

brev.dev

81–90 of 148 posts

Re: Using ChatGPT to make Bash palatable

#81
post #61

Earlier quoted context omitted.

Bash isn't that bad... except there are 20 ways to do anything and 18 of them are wrong, but only 1% of online examples will use either of the two correct approaches and simply reading docs won't always clue you in about how the technique or syntax it's describing is actually subtly wrong and you should ~never use it.

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.

Re: Using ChatGPT to make Bash palatable

#82

I 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?'

  export YOU_FORGOT='this one'
(Hint: it's most similar to your second one)

Re: Using ChatGPT to make Bash palatable

#83
post #8

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

You can directly ask it whether it is capable of reasoning and it tells you it's not, and that it's just a language model that is not capable of reasoning or self improvement or something along those lines.

Another example, ask it for a list of programming languages that it has been trained on. If it was capable of reasoning it would be able to trivially answer this, but since its a language model, and it just predicts the most likely response based on the prompt, it has no concept of this at all, and tells you exactly that when asked.

Re: Using ChatGPT to make Bash palatable

#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 up. That is, knowledge or conceptual topics that are hard to find on the web. At least for technical topics, ChatGPT doesn’t expand the scope of what you can find out without it, it merely speeds up the process.

Re: Using ChatGPT to make Bash palatable

#85

Earlier quoted context omitted.

"actual reasoning" doesn't mean anything concrete, until you define what you are talking about it can't be the basis of a question you can meaningfully answer.

I think Deutsch in The Beginning of Infinity has a lot to say about this, but I find it really hard to reproduce and summarise. Chapter 7, "artificial creativity" addresses the subject at length, here's Deutsch's own summary of it: > The field of artificial (general) intelligence has made no progress because there is an unsolved philosophical problem at its heart: we do not understand how creativity works. Once that…

While it's true that we don't know how intelligence/creativity/reasoning "works" there's an even more basic problem: It's not a well formed notion.

"The result is that there is no hard problem… You can’t look for the answer to a problem unless you say here are the things I want to answer. If the things you want to answer have no formulation there is no problem.” (Chomsky, about the question of consciousness)."

“There is a great deal of often heated debate about these matters in the literature of the cognitive sciences, artificial intelligence, and philosophy of mind, but it is hard to see that any serious question has been posed. The question of whether a computer is playing chess, or doing long division, or translating Chinese, is like the question of whether robots can murder or airplanes can fly — or people; after all, the “flight” of the Olympic long jump champion is only an order of magnitude short of that of the chicken champion (so I’m told). These are questions of decision, not fact; decision as to whether to adopt a certain metaphoric extension of common usage.

"There is no answer to the question whether airplanes really fly (though perhaps not space shuttles). Fooling people into mistaking a submarine for a whale doesn’t show that submarines really swim; nor does it fail to establish the fact. There is no fact, no meaningful question to be answered, as all agree, in this case. The same is true of computer programs, as Turing took pains to make clear in the 1950 paper that is regularly invoked in these discussions. Here he pointed out that the question whether machines think “may be too meaningless to deserve discussion,” being a question of decision, not fact, though he speculated that in 50 years, usage may have “altered so much that one will be able to speak of machines thinking without expecting to be contradicted” — as in the case of airplanes flying (in English, at least), but not submarines swimming. Such alteration of usage amounts to the replacement of one lexical item by another one with somewhat different properties. There is no empirical question as to whether this is the right or wrong decision. -- Chomsky"

Re: Using ChatGPT to make Bash palatable

#86
post #79
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…

This is a tool that I think openai originally made and seems to give you a probability that a sample block of text was or was not generated by openai. I pasted some of my own writing in there and said definitely not AI-generated. At this point, I don't know if I should be insulted by that or not. ;D https://huggingface.co/openai-detector

Seems to have an issue with false positives:

https://wandering.shop/@janellecshane/109464780848248093

Re: Using ChatGPT to make Bash palatable

#87

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.

It basically gives you suggestions of what could be correct, or close to correct, but yes you have to verify yourself, and possibly make some adjustments.

Re: Using ChatGPT to make Bash palatable

#88
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.

User error.

Re: Using ChatGPT to make Bash palatable

#89
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…

It won't kill personal blogs because chat GPT won't be messing around with weird hardware combinations and running into unique ender 3 firmware issues like real people will.

I also don't see them conquering falsehoods coming from the bots anytime soon.

Re: Using ChatGPT to make Bash palatable

#90
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…

It doesn't come up with anything new, but it can combine two existing things when there's no good Google results at the intersection of them.

I've been using ChatGPT to help learn WebGPU. There's basically nothing on the web about WebGPU except a couple of shitty half finished tutorials that don't explain anything. The spec is still changing so half the code in them is wrong.

ChatGPT can take a current code example from code using WebGPU (which it has completely incorrect knowledge about since the spec has changed since the training data cutoff), and explain it anyway. Presumably using it's knowledge about Javascript and the underlying graphics APIs (Vulkan, DX12, Metal). It's applying general concepts to new code, and doing it pretty well.

I'm not sure how much value this actually has. I may have just stumbled upon the one thing it's actually useful for. I actually think code generation itself is useless. I'm massively short on Copilot, in fact, I think it's actively making people worse programmers because it encourages a workflow that produces more code and less understanding. Good programming is about less lines of code and more understanding.

My initial read on ChatGPT is that it can potentially help with that, especially where Google results get thin. (And also that everyone using it to generate code to copy/paste is an idiot and missing the point, basically).

Post reply on HN