by extr · 3y ago · 0 comments
Here is the javascript if anyone wants to do something similar. I don't know JS really, so I'm sure it could be improved. But it seems to work fine. You can add your own hard coded prompt if you want even.
async (clipboardContentString) => {
try {
const response = await fetch("https://api.openai.com/v1/completions", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR API KEY HERE"
},
body: JSON.stringify({
model: "text-davinci-003",
prompt: `${clipboardContentString}.`,
temperature: 0,
max_tokens: 256
})
});
const data = await response.json();
const text = data.choices[0].text;
return `${clipboardContentString} ${text}`;
} catch (error) {
return "Error"
}
}You own your life - why not spend your own money for the things that make you and your life better?
Who cares?
I worked at a job where I had a small, crappy monitor. I made decent cash. I just bought a large decent monitor and brought it into work. I ended up using it for many years. My life was significantly better. I've done that at several jobs since then, and NEVER regretted it, in fact it was one of the soundest decisions I've ever made. Also keyboard and mouse.
There are so many people using the default keyboard, the default monitor, the default tools.
If you push work to do it for you, you need to challenge the "everone gets a dell 19" monitor" b.s. If you push your boss, he might have to do justification paperwork.
Just become what you are.
A one-off purchase is very different from making a hole in the bucket.
Obviously this all depends on how financially comfortable you are. But still.. time is money. Money you're spending today is time you're committing to work to earn back tomorrow.
$20/mo for a subscription of NYT, or Netflix is not one of those things. But ChatGPT in many cases can save whole days of work over each month, so - especially when you're a freelancer, it will pay itself off.
Which isn't to say that ChatGPT fits that bill for me - I think it requires too much supervision to save time. But people are too cheap about genuinely useful tools.
I suffer from this. Currently paying $30/mo for midjourney but get zero value. need to go delete that sub.
Everything we spend money on has a price that is set by what we are willing to pay collectively. Just because you don't want to pay the price doesn't mean it's not the right price.
It's a bit amusing that we find any price objectionable considering this ChatGPT experience didn't even exist a few months ago!
A monitor is relatively cheap, I would own it, and it will primarily improve my life and secondarily improve my productivity.
In contrast, with ChatGPT, if I'm working on a difficult programming job, I spend X time thinking deeply and Y time actually typing the solution. A system that can type for me is convenient but it may not speed things since I can only think so fast, so many hours a day. And the situation of renting a thing for $20 isn't just a constant expense but a bit of a feeling of being beholden - the price could be and probably will be raised, there is a pressure to get value out of the thing by using it more, etc.
And there's no guarantee that a code generator will make my life more pleasant - the time saved typing may be absorbed by meetings or whatever.
It's a bit like home automation or car dongles - some people might like never throwing a switch as they walk into a room but I think fewer people would see a benefit they'd pay for since they still have to walk into the room.
And it's good to keep in mind, the comparison is not $20 for ChatGPT versus nothing. It's $20 for ChatGPT Plus, versus my API-hacky-solution for $2, versus ChatGPT free, for $0.
It'll be absorbed by reviewing the generated code, which you are ultimately responsible for. Is typing speed actually a bottleneck to many programmers, beyond certain point of expertise?
To be clear, I am not judging you. You did what was good for you and took the path of least resistance, as we all do many times a day. I am just trying to answer your question of "who cares?" We should all care a lot about this!
I'm an in-house producer at a tech company. I own a lot of film and audio equipment. I made it very clear in my initial negotiation that my gear was to be used solely at my discretion that and within 12mo we will fully transition off of it. I also used it to negotiate a slightly higher salary. It would've been easier to just give it away, but then why would they ever stop? I could've easily slipped into a position where they just use all my film equipment rent free and then I am on the hook to replace it as it breaks at a faster rate. That's not right without proper compensation.
If I have a nice dual-monitor setup, in a business where everyone gets a 19" Dell, I will be more productive. That will lead to more promotions, lower odds of being fired, etc. I will come out ahead. Plus, I'll be happier.
If my employer benefits too, how does that hurt me?
About monitors and larger stuff, you may argue. Employers can find and buy good ones in bulk, instead of making everyone individually spend hours being annoyed, searching and comparing and buying better equipment. Either way, for monitors the financial hit will be way less than 1% of a typical salary (okay, may depend on location, but a monitor lasts 5+ years).
I agree it has to stop somewhere. For me that would be stuff like Unity3D subscriptions, or tables, or FPGA tools and oscilloscopes. But monitors... shrug
This is nevertheless a great point. This culture is coming if it isn't here already especially when you add WFH to the mix
Objectively, a few reasons:
- You can't afford it.
- Paying for it doesn't let you "own" anything
- It's not reliable
- It's legal compatibility is not fully decided yet
- It can preclude opportunities for learning and even teach you entirely false things under the guise they are true
The list probably goes on, but I don't think we should buy everything that stands to make our lives better. If we applied that logic to everything in our lives, we'd all use computers from Skymall and eat food we see on QVC.
Pretty sure GP didn't say "completely give in to all impulse purchases and cease to use your brain about the worth of things."
I agree with GP. I bought my own monitor. It's great. It significantly improves my workday, and I get to take it with me if I quit. It generally gets two reactions: first, "how did you manage to get a better monitor than everyone else" and second, "why would you spend your money to help the company?" Not sure how something that contributes directly to my comfort while performing my job is helping the company more than it's helping me, but whatever. Seems very much like cutting off your nose to spite your face to just stick with the standard monitor to avoid "giving" the company something. Same as the folks who spend time every month filing expense reports and having corporate mobile device management profiles on their phones so they can get reimbursed $20/month for their mobile data.
An example? The OP was talking about purchasing a monitor/keyboard/mouse.
There's something to "owning" a thing. You can resell it and rent it out, etc. It's an asset. SaaS is not an asset. It's a service.
It still makes sense for me to pay because I get more value compared to if I didn't.
Reminds me of the Built to Spill lyric. “It's barely yours on loan What you think you own”
Not wanting to spoil it, I’ll just say that if you haven’t seen this show then you’re in for good laugh:
I have no issues paying for thing I can use for a long time or re-sell if it turns out not being that useful, but spending money and investing time using cloud-based tools that can be discontinued by next month, thanks but no thanks.
I wish I could do the same with my laptop, WFH would be better, but it is against security.
It’s a few thousand dollars, but I make a comfortable six figure salary, and I think it’s worth it.
Recently, I've been gasp paying for software. Open source and free tools have come a very long way, but paid tools can be better. Especially when those tools are used daily as part of the job.
The paid tools often have free usage, albeit with some limits, so they are still useful to the defaults.
For example, TablePlus vs SQL Server Studio. I'm not a DBA and most often just need to run a quick query or two to check things. In this regards, TablePlus is light years ahead. No need to load a dinosaur for that.
"Consoom more tech hardware made in China!"
"Don't think too hard about your monthly expenditures!"
"Trust the science!!!1!"
Well you've convinced me, buddy.
And not for nothing you probably will have better luck scoring a promotion by spending $20 a month on doughnuts for the team than on ChatGPT.
I am also a salaried employee and if I can save a minute of work time that’s one less minute I have to work.
I have a body of work I need to complete and sometimes that takes me 40 hours and sometimes much more.
The only way I can think of that $20 per month for increased productivity doesn’t help is if your company’s metric of success is being present/working 8 hours per day.
This is why productivity improvements feel so meh. For people that are hyper competitive and ambitious, it's a way to tackle more and bigger challenges. Fine.
For others though, the benefits do not really materialize in meaningful ways. Maybe you can win some slack/recovery time, but it's not really truly free time. You're still working and on call.
In fact, in quite a lot of teams being productive is actively punished. Say that in agile you do a great sprint, and execute 10 story points instead of the normal 5.
Nice. Oh...so you can do 10? 10 it is then for all the future sprints. Without a pay increase, obviously.
You've just described most office jobs.
I use my keyboard everyday but I wouldn't pay $20 per month for it. In fact, I paid around $4 total for it, as paying more would bring significantly more diminishing returns.
I use my phone every day and have used it for the past 5 years with no issue, it has brought me so much value and yet, if I draw the line, it didn't even reach $20 per month (price divided by time used), not even mentioning that I expect it to last another 2-3 years, bringing the cost down even further.
What kind of crazy value would you expect something to have in order to be worth $20/mo?
if it makes you more than $20 or saves you more than $20 then it’s worth it. Simple as that. That’s it. That’s the test. For some, the time they save and spend with family is “worth” $20, for others, productivity increases don’t lead to free time, while others still don’t have $20 to spend.
Fwiw I get my teeth professionally cleaned once a month and spend more than $20 on it. Because it’s worth it to me and because dental care is expensive. Toothbrushes are cheap not because they’re worthless but because they’re undifferentiated. All toothbrushes are the same. ChatGPT… isn’t.
If he wouldn't pay $20 a month to prevent tooth decay, he clearly is the type who knows the price of everything and the value of nothing.
Brushing your teeth takes time. If you could pay $20 p/m to get the same results from say a stick of gum (i.e., no time)...is that then worth it?
The KB "as is" makes sense. But that's a fairly generic item. Adding value / differentiation is minimal.
Phone? Maybe. Put what's your service p/m? Is one worth considering without the other?
What crazy value? At $1 per work day?? It doesn't have to be crazy. Just 5 minutes per day is breakeven (and that's generous). In many cases, ChatGPT is more helpful than the ever polluted Google SERPs. One buck a day to avoid that? With the weekends free? Perhaps not crazy value but worthy of reasonable consideration.
No, because I start the kettle (or coffeemaker, depending on what I want) before I start brushing. I brush my teeth while waiting for the kettle to boil.
I don't get that time back if I don't brush my teeth; I still have to wait for the coffee anyway.
I wouldn't pay $20 per month for a keyboard either, but I doubt that a $4 keyboard is even close to diminishing returns unless you got a really good deal. Even $100 for a decent mechanical keyboard is not much if you use it for many years.
And I paid 220 for my phone, which easily lasts 2 years.
That said: As a self-employed programmer, I think 20$/month for increased productivity is a steal!
Are you serious? If you had to pay $20 per month to brush your teeth you would stop doing it?
This would be the fast track to dentures by the time you're 45.
When you're a high schooler, yes, even Steve Jobs did it. But when your monthly salary is easily in the thousands, it's not a matter of pride to get it for <$20, it's a matter of stupidity.
He's a thought experiment: imagine a device that changes the scent of the air I breathe to something I find pleasant. I could use this device all day everyday for free (or on the cheap), but I will not pay $20/mo for it. Losing access to the features really isn't worth that much. On the flip side, many people pay thousands of dollars to rent machines that helps them breathe, even if that adds up to total of less than an hour of their lives - which is nor much.
$20 a month for ML tool that is only sometimes useful is a tough sell, especially in a world where a lot of people feel like $80 a year for IntelliJ is too much.
Coders are thrifty bastards, except when it comes to their personal vices in which case financial responsibility goes out the window...
Since the $20/month is for priority access to new features and priority access including during high-load times, not API access (a separatr offering not yet available), I don't understand the cost comparison. What you are proposing does not substitute for any part of the $20/month offering over the basic free product.
Idk why but programmers are the cheapest people on earth in regards to programming tools.
I bought Intellij idea for $400 like 12 years ago and got made fun of at work even though it made me substantially faster than eclipse.
The lack of distinction on this term plagues the English speaking world in more ways than frugal programmers. See: the entire political spectrum in the US
"Free as in beer" you get something, you don't have to pay. "Free as in speech" you have the rights to do things, like modify source code.
and later
"Free as in puppies" As in you get it for free, but it's gonna cost you later. Most open source software is like this, you get it, but have to invest is using/mastering/maintaining it. Of course, you have to invest like this in paid, software as well.
Suppose a new word was introduced. What would the dictionary definition be?
I'm intrigued by ChatGPT as a work assistance tool. I have found it useful a number of times. But there's no way it's adding a contours $20/month of value to my day when I compare it to other things on which I spend my money. I'd rather just not have it than spend that much.
$20 one time fee? Maybe. $20/mo? Not at all.
This is no different than streaming media services. There are streaming apps where I'd like to see their content, but not the rate they charge I don't find worth the value. So I don't subscribe.
And? You have 400$ less than them.
It probably reduced my work stress by 20% so this was incredibly cheap. And even then I used that license for 2 years, so it was really 75 cents a day. Developers will spend $5 on a bagel but not $5 a day for tools, it's pretty wild
What is unexpected is the ability to perform highly in a multitude of tasks it was never trained for, like answering questions or writing code.
I suppose we can say we basically don't understand what the f* is going on with GPT-3 emergent abilities, but hey, if we can make it even better at those tasks like they did with chatGPT, sign me in.
Is not that the AI is too dumb, it's that my computer now can write me code I'd take one hour to Google and check and test. Now I ask, ask for corrections, test the answer and voila, my productivity just went through the roof.
So, my point is: don't believe (or be mad about) the hype from people that don't understand what curious marvel we got in front of us, just see how you can use it.
It's like an employee, but for $20/month.
It strikes le that most people don't see that as fundamentally problematic.
Caution is always required.
As a reader of people's paragraphs, please don't. Stick to bullet points.
1. Person has brilliant insight
2. Insight is 3 bullet points
3. GPT expands into prose (because that's what people think people want)
4. Reader sees paragraph, thinks "Bah that's long"
5. Reader uses GPT to extract the 3 core bullet points
I think the most important lesson of anyone's first job is that you have to stop writing like you're in school. There is no minimum word requirement. Only maximum.I was surprised at first, but I notice you're using GPT-3 model, not chatGPT (no API so far)
> have found it useful for open ended programming questions
i have found it to be terrible when it comes to something simple, like constructing a regex.
curl https://api.openai.com/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "code-davinci-002",
"prompt": "##### Create a regular expression to match words starting with 'dog' or ending with 'cat'.\n \n### Java Code",
"temperature": 0,
"max_tokens": 182,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop": ["###"]
}'
This returned: ```java
String regex = "\\b(dog|cat)\\b";
```Wouldn’t having ‘\b’ on both sides match beginning AND end? It’s got the parenthesis for the ‘|’ in the wrong place.
https://regex101.com/r/ZNQa9X/1
The generated regex is the same as
(\bdog\b)|(\bcat\b)
https://regex101.com/r/vTtEU4/1I’m currently trying to figure out how to match a word starting with dog without using
\bdog.*
because .*
would proceed to eat the rest of the line.So I was thinking I could say
\bdog[^\b]*
But that doesn’t work, it also ends up eating the rest of the line as well.The regex I was expecting would be
"\\b(dog.*)|(.*cat)\\b"
The key point is to ask the code model. Part of what ChatGPT does is it appears to categorize the question and then may dispatch it to the code model. If you know you have a code question, asking the code model first would likely be more productive and less expensive.> i have found it to be terrible when it comes to something simple, like constructing a regex.
Oh yeah, agreed. It's not good for super specific stuff like that. But more like, I write a weird loop and ask if there is a more idiomatic way to do the above. Or I just describe what I want to do and say, "list three options for accomplishing that". It's great for "feature discovery" essentially. I find it complementary to copilot.
I think it absolutely worth 20 bucks/month. It's an absolute helpful tool. To write text, but as I discovered yesterday, to write code. Over a long chat with many iterations, you can produce code,test code or pseudo code. I used yesterday in a meeting with some colleagues, while discussing a new feature. The code produced after our initial spec was pretty good to make sure we all understood what we wanted.
I'm working on a product with this capability, plus a lot more including cross-app contextual support and developer extensibility.
If anyone is excited about this kind of embedded-in-your-workflow integration of AI tools I'd love to chat! (email in profile)
TypeError: undefined is not an object (evaluating 'data.choices[0]')
I prefer to use clipboard as the exchange place. I select text, copy it, then query the service. Once the query completes I can see the answer in popup and can paste it to my current editing place.
This is the code:
local hyper = {"cmd", "alt", "ctrl"}
hs.hotkey.bind(hyper, "Y", function()
local url = "https://api.openai.com/v1/completions"
local api_key = "..."
local headers = {
authorization="Bearer " .. api_key,
["content-type"]="application/json",
accept="application/json"
}
-- hs.eventtap.keyStroke({"cmd"}, "c")
local message = hs.pasteboard.readString()
local data = {
prompt=message,
model="text-davinci-003",
max_tokens=32,
temperature=0
}
hs.notify.new({title="OpenAI query", informativeText=message}):send()
hs.http.asyncPost(url, hs.json.encode(data), headers, function(status, body, headers)
local response = hs.json.decode(body)
local answer = response["choices"][1]["text"]
print(body)
hs.notify.new({title="OpenAI response", informativeText=answer}):send()
hs.pasteboard.writeObjects(answer)
-- hs.eventtap.keyStroke({"cmd"}, "v")
end)
end)"Authorization": "Bearer YOUR API KEY HERE"
I’ve consistently found that Google returns similar results. The only difference is that if it’s a longer snippet I need to click into the website, but even then, it’s usually faster than chatGPT.