Live data from Hacker News

Command line functions around OpenAI

kadekillary.work

271–280 of 316 posts

Re: Command line functions around OpenAI

#271
post #227

Wow. 210+ comments and maaybe 10 of those actually talk about the article! (yes, I've read them all because I can't believe almost everyone missed the point) The point of the article is actually neat: a small shell (Fish) script to send query to ChatGPT or DALL-E and get response back in the terminal. As a terminal user myself, this is really nice! (I rewrote it for myself in bash which I use, but used the curl comma…

I couldn't figure out how to replicate the gpt_data one, how did you replicate the "string join" part? I'm not exactly sure what it was supposed to be putting in the json. I mean, obviously the full data in the second parameter, but I'm unsure how to encode that..

What I did instead is just join all the args with spaces (so I don't need to use quotes around the prompt), with no care about the newlines, and it seems to work okay for me with multiline input:

    prompt="$*"
Here's the complete script: https://gist.github.com/senko/68026864d502473eacd56b2e16e401...

Since I can use this with multiline input I didn't create a separate data-gpt one.

(Note I also used gpt-3.5-turbo model and not gpt-4 because the former is faster and cheaper and for quick one-offs from cmdline it's usually enough for me).

Re: Command line functions around OpenAI

#273
post #162

Not mentioned in post this but occured to me by reading: I think I will start changing my functional prompts to require a JSON format in responses so that various aspects of the response don't need to be manually parsed, and requests can be more reliably piped to subsequent requests.

> Not mentioned in post this but occured to me by reading: > I think I will start changing my functional prompts to require a JSON format in responses so that various aspects of the response don't need to be manually parsed, and requests can be more reliably piped to subsequent requests. that adds more characters though so maybe hits token limits faster, I was thinking about how to have better contexts then found out…

Beyond artificially increasing prompt length, vector DBs also allow you to inject domain knowledge into autoregressive LMs.

Re: Command line functions around OpenAI

#274
post #179

Earlier quoted context omitted.

Usually the person with the ability to create the best products and services is the one with the deepest reservoir of background knowledge and aesthetic taste that they can apply to a given problem. So, for example, someone who can productively spend 100 hours working on a blog post is probably going to get win out against someone who can only productively spend 5 hours working a blog post on the same topic. And give…

Unfortunately the person who only spends 1 hour working on a blog post, but can spend 100 hours cranking out 100 blog posts, wins out. See Simon Willison, for example.

You're not wrong, but it's ultimately the same background and skillset as what I'm talking about that enables that also. E.g. Simon Willison could easily sit down and write a bestselling book if he wanted to.

Re: Command line functions around OpenAI

#275

Earlier quoted context omitted.

Question is whether you have to go through the bootcamp stage to become an architect? Like many skills, you often start with the simple stuff.

Yeah I'm wondering the same thing. How do we train up the next generation of SWEs given the new world we live in? Interesting times.

I would think whatever we consider today as mid-level would become the expectation for entry-level. It would be nice if we had a culture of apprenticeship in our industry though.

Re: Command line functions around OpenAI

#276

Am I the only one that doesn’t get it? I tried GPT and it’s unable to write anything but the most simple code from simple requirements. As a tiny bit of complexity and it’s lost. Are people at work dealing with tiny code bases with well defined requirements?

I don't know what kinda code-bases you work on, but I think there are many more potential factors which determine how useful GPT might be besides "tiny and well-defined". I won't try to enumerate them here, but as an example if you are working in a much more / entirely functional way, you can think of your entire code-base as tiny and well-defined, even if it is composed of 1000s of functions. Can think similarly if…

In which case the main problem an engineer is solving is how all these interact together. And not the X minutes that it takes to write each individual well defined tiny function.

So, I still don’t get it.

Re: Command line functions around OpenAI

#277

Earlier quoted context omitted.

I don't know what kinda code-bases you work on, but I think there are many more potential factors which determine how useful GPT might be besides "tiny and well-defined". I won't try to enumerate them here, but as an example if you are working in a much more / entirely functional way, you can think of your entire code-base as tiny and well-defined, even if it is composed of 1000s of functions. Can think similarly if…

In which case the main problem an engineer is solving is how all these interact together. And not the X minutes that it takes to write each individual well defined tiny function. So, I still don’t get it.

you don't get it because it's all hype

it's a slightly better version of google

Re: Command line functions around OpenAI

#278

Earlier quoted context omitted.

I briefly worked with a software engineer who was making about a million dollars a year. I mentioned that an approach would be a lot of work. His response: “It’s just typing. Typey typey type (makes fingers on keyboard gesture).” Absolute lightbulb moment for me. To become a senior engineer is to realize that the code writing part is inconsequential as long as there are no technical unknowns in the work. It’s freed m…

I often suffer from impersonator syndrome, my freelance rates should be North if 70 per hour but I keep getting stuck at 40... I grew up poor though and teaching myself coding moved be to earn more then I thought I'd ever earn without a college degree. I knew about for loops almost a decade before I decided web dev would be my career, not just my hobby. it's insane that you could get hired and not know how they work.…

Put your resume up on job sites!

Even not-so-great-sounding contracts pay 50-65/hr, might be a confidence boost. Level up your skills on udemy, if necessary (wait for courses to be 80% off or whatever, happens regularly).

Could also go corporate at a non-tech for low stress and a decent salary.

Re: Command line functions around OpenAI

#279
post #227

Wow. 210+ comments and maaybe 10 of those actually talk about the article! (yes, I've read them all because I can't believe almost everyone missed the point) The point of the article is actually neat: a small shell (Fish) script to send query to ChatGPT or DALL-E and get response back in the terminal. As a terminal user myself, this is really nice! (I rewrote it for myself in bash which I use, but used the curl comma…

Yes, that's certainly the effect of linkbait titles, which is why HN's guidelines call for changing them:

"Please use the original title, unless it is misleading or linkbait; don't editorialize."

If anyone suggests a better title (i.e. accurate and neutral, preferably using representative language from the article), we can change it.

Re: Command line functions around OpenAI

#280
post #227

Wow. 210+ comments and maaybe 10 of those actually talk about the article! (yes, I've read them all because I can't believe almost everyone missed the point) The point of the article is actually neat: a small shell (Fish) script to send query to ChatGPT or DALL-E and get response back in the terminal. As a terminal user myself, this is really nice! (I rewrote it for myself in bash which I use, but used the curl comma…

[dead]
Post reply on HN