I couldn't resist - the other answers are undoubtedly true, but you really can't walk past the following code:
var aᅠ = 1;
var a = 2;
var ᅠa = 3;
if(aᅠ==1 && a== 2 &&ᅠa==3) {
console.log("Why hello there!")
}
Note the weird spacing in the if statement (that I copied from your...
I was referring to the specific answer. (Yes, the c++17 "always auto" gag is similar)
I would deliberately give this answer even if I knew the other solutions, because it answers the question but is obviously not what they were after. Play stupid games, win stupid prizes. — Edmund Reed5 hours ago
Today I found myself reinventing output separators for the zillionth time.
I have converged on an approach like the following that seem pretty clean:
Live On Coliru
#include <iostream>
template <typename... T>
void foo(int a, int b) {
auto sep = [first=true]() mutable { return first? (fir...
> Hold your breath > Make a wish > Count to three > Come with me > And you'll be > In a world > of Pure imagination > Take a look > And you'll see > Into your imagination
Well, I guess it's an unknown book then. Sigh. My boss (who hadn't had time to write code for half a decode) looked into it, considered it interesting, bought it, and dropped it off at the developers'. I now wonder whether I should quickly confiscate it and let it disappear, or encourage reading it.
I'm using a transformation matrix at work which I learned in linear algebra. My whole world view that school and uni is useless is being threatened. Someone help.
@nwp Oh don't be silly. It's always a bug in either the compiler or the operating system. You clearly need to read some questions from low-rep users on SO to get your head straight.
This is because void process_value(double& ref_value); accepts the argument by reference. The compiler/optimizer assumes aliasing, i.e. that process_value function can change memory accessible through reference ref_value and hence that size member after the array.
The compiler assumes that becau...
Someone nails the explanation of ~~purfarmance~~ related question.
Guess what happens in the comments.
"I'm smarter than the compiler" on the house
@LoïcFaure-Lacroix If you get yourself some more healthy rest, likely.
@sehe The Scalar Replacement of Aggregates optimization should normalize both versions of the code. But I presume it's failing here because the array is too large.
There's probably a threshold in struct size (or # of elements) before the compiler skips that optimization completely.
I thought aliasing was spot on. And I tend to pass "small enough" (which is very relative) structs by value. I trust inlining and it makes everything simpler
I need to write a macro that processes an arbitrarily long list of things like (A)(B)(C). If I could take a Boost dependency, I would just use one of the BOOST_PP_SEQ_ family of macros. Unfortunately, I can't so I am left trying to figure out how it works. This Stuff Is Not Obvious.
Can anybody ...
@Mysticial That makes sense (unless all the code is inlined in which case it could still inline everything ultimately. I'd be very surprised if LLVM didn't)
I'm not 100% sure what AF_UNIX is for, but if its for interprocess comms, Windows can do efficient interprocess comms using AF_INET sockets bound to localhost. In this case windows does detect that the socket is pointing to another local process and shortcuts the comms stack, using LRPC to do the data transfer (That uses memory mapped files for a zero copy move of the buffer between processes). — Chris BeckeOct 6 '10 at 14:16
it says here that I need a special build of windows
> Please note, this Windows SDK Insider Preview is only supported on the Windows 10 Insider Preview operating system. Installation on an operating system that is not a Windows 10 Insider Preview build of Windows 10 is not supported and may fail.
@sehe I'm not sure that's entirely true. UNIX file redirection definitely descended directly from a similar facility in MULTICS (though, admittedly, the relationship between the MULTICS version of pipes and the UNIX version is somewhat weaker). It's also to be expected that "X was invented" precedes (often by quite a bit) "X was done right". Looking at this particular case, UNIX named pipes are still almost hopelessly clumsy (e.g., having to create them with mkfifo).
@JerryCoffin You could say that Microsoft "accidentally" did kernel namespacing right because their filesystem namespace was such a in-homogeneous mess. I mean, Windowstations, IPC namespaces and control sets were strangely "ahead" while they were continuously struggling to even deliver simple functionality as working rename function in Explorer :)
MS's system is kinda fragmented due to COM. For example, you can use SendMessage to show and hide certain kinds of dialogs (tooltips) in the taskbar, but showing and hiding other categories of dialogs require COM and thus IPC.
So, using COM to communicate with Explorer.exe makes perfect sense, except you can also use what is conceptually the process local SendMessage command...
@Mikhail it's actually worse because the shell team wanted to use COM but in pre win 95 COM was a massive memory hog, so the shell actually had it's own mini-COM
while this has since been removed it still manifests in various odd ways
An algorithm that given some code returns a number that represents the "abstractness" of the code so you can say "this code is 17% more abstract than that other code".
4
Repeat for various other attributes and hope they are helpful.
@FélixGagnon-Grenier I wouldn't be surprised if @Mysticial runs a user script or proxy that blocks that click
@nwp I think tag search is not strictly a search. It "comes-from" a search, which is probably why someone decided it should be visible that the view is filtered
The top search bar is still editable for me(Chrome Version 63.0.3239.132 (Official Build) (64-bit) linux)
Ah, got it. The field has a size limit and [tag:c++*] expands to something that is bigger than that limit so you can't add any characters until you delete a bunch of them.