Once in a blue moon I need to remember what the syntax for C++ explicit template instantiation is. All I need is a short snippet showing me an example of the syntax, but usually this means asking google and then trawling through several tangential SO questions ("why would one use this feature?") or scrolling through cppreference until I am reasonably confident I am looking at a valid example. This, to me, sounds exactly like the use case you are targeting.
Here is the kind of output that would have been meaningful/useful to me (although I was only looking for the second part, since I already knew the theory just not the syntax):
An explicit template instantiation definition (usually placed in a source file) makes the compiler instantiate the template for the given arguments. An explicit template instantiation declaration (usually placed in the header) tells the compiler that the template will already be instantiated elsewhere, so implicit instantiation can be skipped.
template <class T>
class Foo {};
// Explicit template instantiation declaration:
extern template class Foo<int>;
// Explicit template instantiation definition:
template class Foo<int>;
I tried six different queries, of the form "C++ explicit template instantiation [declaration|definition] [syntax]".
In all cases, the synthesized explanation was either gibberish or flat out wrong. For example:
> Explicit template instantiation is a feature of C++11 that allows you to declare a template as a class, rather than a function. This means that if you want to use the template in a program, you don't have to declare it in the program itself, but rather in the template file. [Entirely nonsensical]
> Explicit template instantiation definitions can be put into header files, but they can't be put in source files. [Aside from not actually explaining the feature, this is more or less exactly backwards!]
The best it managed to output was a mediocre explanation of what a template is.
I mean, it is about what I would expect a language model to interpolate from e.g. the StackOverflow corpus of questions tagged "C++" and "template", but it is a very far cry from being useful.
The quality of the code snippets was better, but still not at a usable level. Among outputs like `mytemplate.cpp`, `extern template` and compiler error messages, some snippets did correctly employ the syntax. It's clear that the model is selecting query-related code from query-related questions/tutorials, but it's still very hit and miss and not very focused. In my case, it certainly didn't "understand" the declaration/definition distinction, and even for most "good" snippets you first had to picture a bunch of surrounding code to make sense of it.
I'd say from a technical level the code snippet output is certainly impressive. But at this point I would have no reason to use your search engine over others for this narrow task of recalling the correct syntax for a language feature (or at least this one in particular - maybe it is too deep), because it involves just as much comparing snippets from various sources as opening the top three google results would - except without having any of the context. And if I didn't already know the topic quite well, none of the outputs (or even all 18 of them together) would have made me confident enough to say "ok, got it, this is the syntax I need to use".
> I refuse to do work that harms society, but other than that I'll gladly tell whoever in the office anything they want to hear if "that's how it works".
So does that preclude work where telling your boss what they want to hear puts others at risk? Where along the scale of Chernobyl, Challenger disaster, medical implants, working on Facebook ads, writing enterprise grade Java, or creating eggbeater calibration routines do you draw the line at "harms society" when all you care about is keeping your boss happy?
> An agreement was quickly reached on Hitler's terms
> Shortly afterwards, Hitler reneged on his solemn promises to respect the integrity of Czechoslovakia
> Today, the Munich Agreement is widely regarded as a failed act of appeasement, and the term has become "a byword for the futility of appeasing expansionist totalitarian states".
Giving in to the demands of the aggressor may "stop" the war for the time being, yes. It doesn't actually solve the problem.
> > On the negative side, though, there's essentially no rule of law to prevent the people making the decisions in DeFi from doing things that are bad/illegal/invalid.
> Very true, there's a lot of scamming going on. It's still very bleeding edge and not ready for mainstream adoption.
Could you elaborate how you think this problem will be fixed for mainstream adoption?
By that notion, the fact that almost all home locks are easily pickable and glass windows breakable is also insane. There's tons of valuables behind almost all of these!
We found meaningful ways of disincentivizing theft, which turns out to be largely sufficient even in face of fallible security. The exact same applies to card data in the hands of merchants.
Truck-loadings-per-hour will increase, but that does not help shrink the buffer if every truck picking up a container also brings back an empty one.
Increasing the buffer size is a temporary relief, but clearly the underlying problem is an ever-increasing number of containers (empty or full), or we wouldn't have gotten into this situation.
If we could dispose of the empty containers somewhere then this bottleneck would cease to exist - trucks could just haul away containers at max throughput. I gather that it's become harder to ship back empty containers though, and presumably just scrapping them is not a sound solution in the long run either.
I was also thinking about this after reading the original thread.
If the port is full and the trucks are full, clearly we have more overall containers than before. Where did they come from? And is the place they come from now short on containers?
Those are of course separate problems. If we are accumulating empty containers, you could just dump them somewhere for the time being. Yes, the trucks would have to drive somewhere else than the port to dump them, but that's clearly better than economic standstill. And if it turns out that China is short on empty containers, then we might need to work on the incentives for ships to bring back the empties.
But unless this whole clogging was caused by a very temporary spike in container throughput, increasing buffer capacity will only alleviate the problem for so long.
But this is not about eradicating all opportunities for bias, it is about reducing them. Making e.g. the filtering of resumes blind to race and gender would likely improve the situation, even if e.g. the interview still provides opportunity for biases to creep in.
Once in a blue moon I need to remember what the syntax for C++ explicit template instantiation is. All I need is a short snippet showing me an example of the syntax, but usually this means asking google and then trawling through several tangential SO questions ("why would one use this feature?") or scrolling through cppreference until I am reasonably confident I am looking at a valid example. This, to me, sounds exactly like the use case you are targeting.
Here is the kind of output that would have been meaningful/useful to me (although I was only looking for the second part, since I already knew the theory just not the syntax):
I tried six different queries, of the form "C++ explicit template instantiation [declaration|definition] [syntax]".
In all cases, the synthesized explanation was either gibberish or flat out wrong. For example:
> Explicit template instantiation is a feature of C++11 that allows you to declare a template as a class, rather than a function. This means that if you want to use the template in a program, you don't have to declare it in the program itself, but rather in the template file. [Entirely nonsensical]
> Explicit template instantiation definitions can be put into header files, but they can't be put in source files. [Aside from not actually explaining the feature, this is more or less exactly backwards!]
The best it managed to output was a mediocre explanation of what a template is. I mean, it is about what I would expect a language model to interpolate from e.g. the StackOverflow corpus of questions tagged "C++" and "template", but it is a very far cry from being useful.
The quality of the code snippets was better, but still not at a usable level. Among outputs like `mytemplate.cpp`, `extern template` and compiler error messages, some snippets did correctly employ the syntax. It's clear that the model is selecting query-related code from query-related questions/tutorials, but it's still very hit and miss and not very focused. In my case, it certainly didn't "understand" the declaration/definition distinction, and even for most "good" snippets you first had to picture a bunch of surrounding code to make sense of it.
I'd say from a technical level the code snippet output is certainly impressive. But at this point I would have no reason to use your search engine over others for this narrow task of recalling the correct syntax for a language feature (or at least this one in particular - maybe it is too deep), because it involves just as much comparing snippets from various sources as opening the top three google results would - except without having any of the context. And if I didn't already know the topic quite well, none of the outputs (or even all 18 of them together) would have made me confident enough to say "ok, got it, this is the syntax I need to use".