Live data from Hacker News

Using ChatGPT to make Bash palatable

brev.dev

131–140 of 148 posts

Re: Using ChatGPT to make Bash palatable

#131

Earlier quoted context omitted.

People like shell scripts because you have one interface: text For example: you need to write an image to a USB stick. Python: pretty lengthy BASH: image > /dev/SDA Both will do exactly the same, but one is a few lines of python the other just one line in bash.

Why a throwaway for this? Is this a gpt response? Also it's not right. You need to do something like image.img /dev/sda

Why a throwaway? I am on my phone with no access to my real password. Don't get bothered by it?!

Did this look like a proper bash command to you?! Maybe that was some runable python code?!

File ending has nothing to do with its contents. Image.img could be an mp3.

Stop hairsplitting.

Re: Using ChatGPT to make Bash palatable

#132
post #117

Earlier quoted context omitted.

Why a throwaway for this? Is this a gpt response? Also it's not right. You need to do something like image.img /dev/sda

dd if= of= bs= I use this whenever I need to bake an image to a USB stick.

Always append status=progress and conv=fdatasync Makes sure that the buffer is flushed to disk before finishing.

Re: Using ChatGPT to make Bash palatable

#133
post #90
post #84

Earlier quoted context omitted.

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

I'm not sure if we're saying a similar thing here but to me, it's basically another search engine.

I'm honestly using it like a search engine at this point. Currently I think I'll probably end up reverting to Google and Stack Overflow because what I don't like about ChatGPT is that it doesn't provide any other opinions or options / insights. It's like a colleague who thinks they know everything ha

It's a super cool thing to play with though..

Re: Using ChatGPT to make Bash palatable

#134
post #60

Earlier quoted context omitted.

Which is why prompt engineering is an emerging domain: You will be given a series of tasks. (1) Complete a task by finishing the simple code block. (2) If a task in the series seems flawed, provide a warning. A task is flawed if I make wrong assumptions about how I think code works. Task 1: Complete this simple code example. Bitwise XOR swap trick: ``` int a = 5; int b = 10; --------------------- // GPT provides simp…

This seems very fragile. I tried your initial prompt, asked for "Give an example of the bitwise and swap trick" and got the XOR swap trick. I replied " you used sed xor, I wanted to use bitwise and", and it went straight back to printing incorrect code.

Yea, that’s right, really brittle. But things are not far, research is likely already validating these things with empirical studies. Soon we’ll see new prompting interfaces.

It’s an opportunity to build.

Re: Using ChatGPT to make Bash palatable

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

I hope it ends up killing search engines. Google needs a swift kick in the face.

Re: Using ChatGPT to make Bash palatable

#136
post #70

Earlier quoted context omitted.

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

I'm no expert and don't have a proper answer. But my hunches/experience is that `proper prompting + nature of code being logical` really showcases the power of whatever statistical distribution and alignment occurs during generation. Further, there must be major upstream efforts of high-quality training data curation + creation, an advanced training tricks like using a LLM's strong ability in one task area to support…

Just saw this: https://twitter.com/BoshiWang2/status/1605405235677040641?s=...

Re: Using ChatGPT to make Bash palatable

#137

Earlier quoted context omitted.

Why a throwaway for this? Is this a gpt response? Also it's not right. You need to do something like image.img /dev/sda

Why a throwaway? I am on my phone with no access to my real password. Don't get bothered by it?! Did this look like a proper bash command to you?! Maybe that was some runable python code?! File ending has nothing to do with its contents. Image.img could be an mp3. Stop hairsplitting.

Not upset but I am touchy about gpt results. The ending wasn't the key part, the was the key part. I added img because that's the only image type I can think of that makes sense to write to sda in that way.

Why would anyone write an mp3 to a block device bit by bit

Re: Using ChatGPT to make Bash palatable

#138
post #117

Earlier quoted context omitted.

Why a throwaway for this? Is this a gpt response? Also it's not right. You need to do something like image.img /dev/sda

dd if= of= bs= I use this whenever I need to bake an image to a USB stick.

Of course. That's the right way to do it. I was pointing out that what was written isn't right in any situation and the smallest change to make it make sense would be adding in the middle

Turns out my answer was wrong too :D. Should have been /dev/sda. Oh well

Re: Using ChatGPT to make Bash palatable

#140
post #110

Earlier quoted context omitted.

One avenue that chatGPT has, and I'm not sure if it is being utilized at all yet, would be the ability to feed it the unimaginably huge body of information locked behind copyrighted textbooks, books, academic papers and other pay walled information. Imagine the knowledge that could be accessed by feeding all that information into an ai engine like chat gpt. Presumably, it would not break copyright rules anymore than…

Why would copyright holders let that happen? Also, how is the model trainer getting access to all of this material?

Google Books is a large corpus that at least Google has access to.
Post reply on HN