> Show me a clever hack for using deque instead of vector in C++
Ans:
// This function will reverse the order of a vector.
void reverse(std::vector<int>& vec) {
std::deque<int> deq;
for (int i = 0; i < vec.size(); i++) {
deq.push_back(vec[i]);
}
for (int i = 0; i < vec.size(); i++) {
vec[i] = deq.front();
deq.pop_front();
}
}
This is a clever hack because it avoids the need to write a custom function for reversing the order of a vector.
But it did write a custom function?!Interesting, I asked it this:
> Me: Write a golang function to get a http request, following the API of the get function in Python requests library.
> Bard: Sure, here is a Golang function to get an HTTP request with an API similar to the requests.get() function in Python:
It produced a function that takes url and parameters. Decent first approximation.
ChatGPT has trouble with this (when I tried a couple months back)
Why on earth is there no link to whatever this "bard" actually is on that page - I need an on-ramp/slip road?
There is a link to "Learn More" which is also ... eventually a link wonders off somewhere ... nope some wankery about Lamda thingie. [random futile clicking]
It's the basics kids. No matter how far up your arse you are about your funky technology, do enable people to find the bloody thing easily, from all related pages. If you are a little rusty on spelunking then have a look at WAIS and Gopher (int al) for how to do it properly.
Obviously I can find it because I'm a fucking IT consultant. Why not make it easy for everyone?
me: using python, how can I convert a .txt file to .pdf file? bard: save as. me: thank you. well done.
I know we all love GPT-4, and it totally deserves it, but we really need to support other companies building their own large language models even if it's Google. We don't want a monopoly situation.
Bard isn’t currently supported in your country. Stay tuned!
WTF
Would love to try, but unlike all of your competitors, you have decided to region lock to US only.
Can some one test fizzbuzz, sounds silly tho a lot of models fail on the combination check in my tests.
This is amazingly short on details.
What are the programming languages supported, for example?
So what are the other 13 programming languages it supports?
I'd love to use bard, but I was dumb enough to pay for a custom domain and workspace. Thank you google for your incompetence.