i used the same API but for an ios shortcut. it's not the same thing as chatgpt, as the completions api doesn't know about context. but it does feel a lot snappier.
> 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.
Out of curiosity: if humans have trouble coming up with anything non-trivial, like regexes, why should something that has been trained on the output of humans do much better?
To me it feels like if 90% of $TASK content out there would be bad and people would struggle with it, then the AI-genrated $TASK output would be similarly flawed, be it regarding a programming language or something else.
As a silly example, consider how much bad legacy PHP code is out there and what the answers to some PHP questions could become because of that.
But it's still possible to get answers to simplistic problems reasonably fast, or at least get workable examples to then test and iterate upon, which can easily save some time.
Agree; the ChatGPT answer is not correct, as the assignment is to match a word that starts with `dog` and ends with `cat`. You can make .* non-greedy by adding ? at the end, but it's not needed in this case, as the engine should backtrack. Something like this should work: /\bdog[\w_-]*cat\b/ (assuming _ and - should be allowed inside words). You can also specify word-separators ([^ ] instead of [\w_-]) if that's easier to read.
Yep. But it gave straight up code rather than trying to persuade a natural language LLM to write code.
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.
WYDM exactly by iOS shortcut? I use a Mac but only an android phone. Do you mean for mobile usage?
> 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.
Set this up on my phone without any of the home automation stuff just to have an alternative to Siri. Its pretty good, I wish I could have a back and forth conversation with it but I don't think I can do that inside of a Siri shortcut.
> 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.