« first day (2090 days earlier)      last day (3083 days later) » 

00:04
Can't be good
00:26
damn this is some creative parallelization if I say so myself
replacing this:
for (int i = 0; i < num_l; ++i) {
    if (!comp(first[i], pivot)) {
        offsets_l[num_l++] = i;
    }
}
with this
for (int i = 0; i < block_size;) {
    unsigned m = 0;
    m |= (!comp(*(first + i + 0), pivot)) << 0;
    m |= (!comp(*(first + i + 1), pivot)) << 1;
    m |= (!comp(*(first + i + 2), pivot)) << 2;
    m |= (!comp(*(first + i + 3), pivot)) << 3;
    m |= (!comp(*(first + i + 4), pivot)) << 4;
    m |= (!comp(*(first + i + 5), pivot)) << 5;
    m |= (!comp(*(first + i + 6), pivot)) << 6;
    m |= (!comp(*(first + i + 7), pivot)) << 7;
    *(uint64_t*)(offsets_l + num_l) = multipliers[m]*uint64_t(i) + adders[m];
where popcount, multipliers and adders are tables of 256 magic numbers
@Mysticial ^
too bad it doesn't actually seem to be faster :( (than an unrolled version of the above loop)
vOv micro-optimization is always finicky
@orlp Looks to me like it's gonna depend on how much of the time is taken by comp. As it stands right now, the first looks like even a compiler should be able to unroll it to the point that unless comp is really slow, it'll be memory-bound so further parallelization won't do any good.
@JerryCoffin comp is the comparison functor
could be simple integer comparison, or a loop of thousands of cycles comparing vectors
Although they should probably fit in the cache, your second adds even more memory references, so it wouldn't be terribly surprising if it even ended up slower.
@JerryCoffin there is and advantage to the bottom one
it reads and writes in always the same pattern
so it's 100% parallel
unlike the loop
it turns out that they run at approximately the same speed
but the above version is vastly simpler, so...
@Jery
@orlp With what speed of comp though (as in: what comparison function did you test with?) If you're comparing a single int, for example, you have no hope of gaining speed. The only place you can hope to gain speed here is by running multiple invocations of comp in parallel, and for that to do any good, it needs to be slow enough to cover for the extra overhead of parallel execution.
00:40
@JerryCoffin I always test with integer comparison
that way I'm measuring my microoptimizations
for expensive comparison the number of comparisons matters
@JerryCoffin the crux of both is that they can be implemented branchlessly, which actually provides a big speedup in quicksort
the top one unrolls by repeating this line
offsets_r[num_r] = i; num_r += comp(*(last - 1 - i), pivot); ++i;
basically repeatedly overwriting elements that don't belong in the final array
00:58
@orlp But in this case, just a quick glance points to the fact that if comp is fast at all, you stand no chance of gaining any speed. For the moment, ignore comp itself, and just look at what the loop does: read fromfirst[i], and potentially write to offsets_l[j]. With a read every iteration, and almost no other computation involved, it takes almost no optimization to assure that it's memory bound.
@JerryCoffin it only reads single bytes in a sequence :)
Therefore, the only way you can even hope to gain speed is if comp uses enough actual CPU time that you can gain something from running multiple invocations of it in parallel.
I was talking about instruction level parallelism
@orlp I figured that (since you didn't have anything to indicate threading). ILP can do multiple comps in parallel just fine (in fact, most of what the loop unrolling is probably gaining is making it a little easier for it to keep more execution units doing your comparisons concurrently).
Any suggestions for obsolete projects?
01:16
Nope, I asked myself the same question an hour ago
01:49
I had finally got my rep to modulo 5 again and then i come upon this answer T_T
i should probably go to bed instead of looking at bad questions
02:00
Did you say bad questions?
-4
Q: Why Read() in the Console class is returning an integer?

BabyboBNukesI have a simple code as follows int n=Console.Read(); Console.WriteLine(n); When I gave 100 as input it is printing only 49 which is ASCII decimal for 1 and then what about the remaining zeros. I also found in the msdn website as "The next character from the input stream, or negative one...

slinks away earlier than usual
02:28
Fuck, I've been at work for 12 hours
not this again :p
02:49
you need to get a sleeping bag to save on commute time at this rate
Wow, instructables has the most vampiric userbase and lots of poor tutorials about misunderstood electronics/programming...
how would you rate the userbase of SO on vampirism on a linear scale from 1 to Instructables?
Probably an instantaneous 7 or 8, but due to fantastic moderation, it appears as if it's a 2 over the long-term
excellent
unslinks away
What does "vampirism" mean in this sense?
03:01
@Darkrifts r u a slinky
@jaggedSpire r u rock
@Darkrifts why yes, thank you!
no, I am an island
Mikhailpls
Time to find bad questions and bring them here to get shrekt
Let me get you started
-1
Q: strange issue about tagbar. works on python, but not on cpp

Justin Shanbo ChanI use tagbar in my macvim. When use the command :tagbarToggle, it works in python file, markdown file, but doesn't work in cpp file. it says "not an editor command: tagbarToggle". Did someone encounter such problem?

basically anything with the C++ tag
03:04
lol
gg no re
I am implementing B+ tree in C++
-1
Q: B+ Tree with C++, access variable of the tree class from node class

Mike YuanI am implementing B+ tree in C++ there some some function in the BpTreeNode class that will alter the structure the tree and possible change the root of the tree. As you can see that the variable root is in the BpTree class and I really needed to be able to reassign the root from the BpTreeNod...

Perhaps would have worked better with C+ tree
or in the mythical language of C+
How about 25+, the best language
-3
Q: can someone help me with this programable FSA? I think im getting a wrong answer

Danny Arnoldok I created this program to take input from the user and tell them if the work they test is accepted or not. but I don't think this is working right... can someone look at my code and let me know if I made a mistake. #include <iostream> #include <ctime> //needed for ti...

@Darkrifts help vampires; they come in to get simple things done for them, no intent to learn, then they disappear until the next time they need free labour.
03:13
ah
And the issue with them is that they don't stick around to improve the community. They just drain it.
0
Q: Which is faster in C++: compiling altogether, or linking to shared or static library?

BrunoThere are several discussions on forums about shared vs. static libraries regarding performance. But how do those approaches compare to compiling the code altogether? In my case, I have a class (the evaluation code) that contains a few methods that contain several for loops and that will be call...

close it
I'm looking for other closable ones :P
fuck, when will MSVC2015 get CUDA support?
should I shuttle this message to cacadi or are you researching it
03:20
I'm angry that it doesn't have it
shall I shuttle your anger to cacadi for commiseration?
How about closing this?
-6
Q: How to write functions or i/o statements in the parentheses of main?

Shreyas ChikodikarSo I am learning c/c++ and I came across a code wherein there was use of cout in the main parenthesis.So what is this exactly couldnt find it in my searches.And whar more operations can we do in main? #include<iostream.h> int main(cout << "Hi") { cout << "HI"; return 0; }

yeah thats pretty bad
closed
I can't cast close votes :P
2nub
03:32
@jaggedSpire Who is that again?
cicada?
I believe he got banned again
He had some penis name
that would do it
But I think that was his real name, tho
well I guess it depends on how overt it is
he got away with Mai Longdong
03:34
Mrs. Mai Longdong
Another one
0
Q: Undefined symbol references in boost and CImg

here_to_learnI am new to using CImg and boost. I am getting undefined symbol references as mentioned below, in the code also shared below. I am using this command line to build it: g++ -lboost_filesystem -lboost_system -L/usr/X11R6/lib -lm -lpthread -lX11 grayscaleConvertor.cpp &> errLog.txt errLog.txt ...

Is Cicada really that bad?
Some of these are good :-)
8
Q: Why is this program not optimized away?

Kretab ChabawenizcConsider the following, simple program (adapted from this question): #include <cstdlib> int main(int argc, char** argv) { int mul1[10] = { 4, 1, 8, 6, 3, 2, 5, 8, 6, 7 }; // sum = 50 int mul2[10] = { 4, 1, 8, 6, 7, 9, 5, 1, 2, 3 }; // sum = 46 int x1 = std::atoi(argv[1]); int x...

lowest rated, but still open question:
-37
Q: Why won't clang compile this source code that works in VS2012?

Sod AlmightyI don't know if I'm doing something wrong here, but I can't for the life of me get clang to compile existing code that compiles fine in VS2012. Includes like strsafe.h and xstring cause weird compilation errors, the strangest of which is a "missing close bracket" in the middle of a standard incl...

How can it be -37, but still open?
lol
GG no RE Sod Almighty
obvious troll post?
-18
Q: why not drop auto keyword

salsabearNow that the auto keyword was introduced in c++11, I am of the opinion that we should be able to drop specifying auto and simply initialize variables as v = 20. Since c++ is able to deduce the type of a variable on it's own, why not drop the auto keyword all together and deduce the type of a vari...

03:43
Is this a good question or not?
I actually up-voted it, because in principle somebody could explain it
0
Q: do you really remember all/most of the codes you have seen/studied?

NewFagim very curious to see some answers. im super new to this programming thing and what happens is that i skip a day of practice programming, to comeback and forget things like tags or (",=.)... btw, this is my first question on here.

pls
I'm no SO pro, but this isn't the kind of questions they like, right?
indeed
NewFag, Escuinapa, México
1 2
but he is probably a troll
> I am afraid you are on the wrong site. Questions such as these are primarily opinion-based and off-topic for StackOverflow
03:51
That kind of question is better suited to discussion in chats/forums, and yeah, probably a troll.
> Person is called "NewFag"
idk, the guy is from some foreign country
I need to save that image to troll someone I know by setting a site's favicon to that :P
A lot of people don't realize that 4chan is being ironic
like muslim people actually using the muslim memes
Wrong place to ask, but if a mod could help me out that would be nice
Somebody just blatantly copied my answer
03:52
how bad?
post the question?
1
A: mongoose count number of returned array?

Jasch1I think it would be something like this. var query = {job:"developer",sick:1}; User.count(query, function(err, count) { if(err) console.log(err); console.log(count); }); The better way(depending on if you want to use the returned documents) is to use .length. However, if you are just d...

I had a typo and his code showed the same one
I edited it
And his code is blatantly copied
If you look at my edit history
well I feel bad for you, so have an upvote
Thanks
Looks legit. Even suggests the same fix in the comments. Don't know what mods can do though
The thing is though....
Tim's answer was before yours, right?
03:56
Yes
But look at edit history and time
@Darkrifts lol
He copied my code which can be seen because he has a typo that I made
My typo was made before his, and he has the exact same one
I corrected mine btw
Ah
Noticed that now :P
He fixed the typo faster, and posted the first part first...
Have you tried leaving a rude and/or abusive comment? If it's good enough, it might end up on this list: meta.stackoverflow.com/questions/326494/…
8
03:57
He hasnt fixed the typo yet
In any case, he did say "Some users recommend to use this"
His still says Song
@Mysticial You got a copy of that old "this website is strict like the Taliban" post?
@Jasch1 Look at his comment
Which one?
03:58
>>EITHER NORMAL FORM POST (PAGE REFRESH) OR FORM POST WITH AJAX. NO OTHER POSSIBILITY
Wait a second
The typo I'm refering to shows that he blatantly copied my code
@Mikhail Which site was it?
It seems he was quicker on the draw, and copies your code to demonstrate why he thinks it isn't the best.
Because he had the same typo as me, with the same word-for-word code
03:59
@Mysticial this website, duh
He pulled a "How is urs the same as myne" lol
@Mikhail As in SO, or meta.SO, or meta.SE?
@Mysticial SO
Now I ask him why it seems like he copied me, and he isnt responding
@Jasch1 might a little extreme, just move on
04:00
k
@Mikhail Is "Taliban" in the title?
Tim did post a comment on his answer afterwards :P
> ok does this work? User.find({job:"developer",sick:1},function(err, items){console.log(items)})
Timpls, y u so copy
@Darkrifts Prior to Tim's edit, too
Hmmmm........
@Mysticial I believe so, but I can't see closed questions
04:01
I found it in chat.
I think it is actually before Jasch1's edit, if I'm reading it right too :P
Aug 7 '14 at 5:45, by Mysticial
0
Q: This site is really strict like the Taliban

user3125707I have been banned from posting questions on stackoverflow and I don't even know the exact reason for the ban. It seems I may have posted 1 or 2 "bad" questions which may have resulted in this ban. I had also not received any kind of warning or intimation about the ban. Another ridiculous thing i...

He posted slightly before me, but he copied a lot of my edits
@Mysticial pls, print screen it for teh Karma
I was writing my answer when his got posted
04:02
>>Here are some similar questions that might be relevant:

Should 'strict-mode', 'use-strict' and 'strict' tags be merged?
Seems his comment had the proper thing before yours did lol
Meh, he still copied ur code anyway
Pisses me off
Classic Tim
I think you can live having someone steal a function call :P
> Classic Tim
04:04
I guess I could.....
:P
I love how it got closed too :P
There will be other opportunities to be helpful. Right now it seems like a big deal, but upvotes are honestly going to turn into your biggest income for reputation, so don't worry about best answer
That "NewFag" character has a great profile
> yo wassa. as you can see from my fckboi greetings and my username. i am completely new at programming. but i wish to be succesful.a millionairs type of succes! im not much of a smart person but what the heck help me out and ill try to help you out as best i can too! we cool? fingerpistols
I know this is for C++, but anybody got some decent js knowledge?
I will build a great std::barrier to keep JavaScript programmers out, and I will make @BrendanEich pay for that std::barrier.
6
04:09

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
@Jasch1 dere
They all dumbbb
Yeah, I tend to read Hegel while MSVC++ compiles
You could ask NewFag for help :P
He has the js tag on his profile lol
How do you do things like putting tags in a chatroom?
<blink>tag</blink>
<--- 2scrub2tag
Figured out how2tag now :D
04:46
this room needs more (pseudo) vaporwave
05:08
I don't know why 80s Japanese culture is being revived by future funk, but it's a pretty upbeat mix
actual vaporwave is more hard core
05:35
Haha, I see. I actually shouldn't be surprised it's 80s stuff when it's called future funk, especially given all the tap wah and synth effects
Ven
Ven
06:01
Hi
> Ou comment j'ai perdu deux heures à essayer de regarder légalement un film avec Marion Cotillard (spoiler alert: j'ai abandonné).
quelle drôle d’idée
06:33
@Mikhail Vaporwave is so 2013.
@sehe Wait before you see the one where a guy throws an actual concrete block into the thing.
@Mikhail Seatrap is the new thing.
Ok, that's probably too 2014.
I fear we have moved forward too far in time
06:55
TIL the Czech Republic is the biggest producer of poppy seed in the whole world.
Ell
Ell
@LucDanton completely ridiculous
I'd be happy to assume they don't mind the piracy if it's that difficult to watch it legally
user1804599
@wilx completely ridiculous
user1804599
No j/k poppies are super rad
Yum yum.
Made me hungry now.
@Morwenn it was listed in the side bar. It' s my duty as a denizen to watch it, no?
user1804599
06:58
@wilx Looks like rotten narutomaki
@Bassie Heh.
Ven
Ven
@Morwenn keep me posted?
Classic @JerryCoffin - how did I not know about this at the time :)
07:18
@Ell I know first-hand that the language and subtitle options in Netflix are quite limited, too (although at least you can not have subtitles at all)
@sehe Er, maybe?
@Ven I will.
Ven
Ven
okay. :P
ITT Netflix not so chill with subtitles
07:51
Afternoon
Which is better style?
do {
    // stuff
} while (stuff);

do {
    // stuff
}
while (stuff);
first one
hi, can I ask 1 question?
how can I declare vector of map that has 10 elements in it?
vector <int> my_vec (10); // this gives me 10 elements vector
@Mikhail Thanks!!
map<vector<int> > my_map; //but where do I pass in the 10 element in the declaration?
C++, thx
245
Q: Initializing a static std::map<int, int> in C++

NithinWhat is the right way of initializing a static map? Do we need a static function that will initialize it?

07:57
@Mikhail, r u talking to me?
std::map<int, char> m = {{1, 'a'}, {3, 'b'}, {5, 'c'}, {7, 'd'}};
if I have 1000 elements
this method wouldn't be good
@kuku Do it in a for loop then
Also above ^ only works in C++11 I believe
Hi @tty kitty!
@kuku that's a map, but there's no value type, only key type
also you're asking for a "vector of map", but you declare a map
@milleniumbug I think he means std::vector<std::map<type, type>>
08:03
map of vector, sorry
I am drunnk
what's the value type
if you have a map, then you are associating "keys" with "values"
Young voters should count more
yep, totally see that's going happen :rolleyes:
but young voters are cunt
old people vote more often, sometimes more than once
Disclaimer: I am not a C++ programmer, and the only C++ I know comes from reading a tutorial on writing a compiler using LLVM.
I am better with C.
08:10
nobody is better with C
its unsafe
no C is better because you have control over everything C++ is for pussies who don't even know how to write a Linux driver
Look! a stray epoll!
I would love to see Linus Torvald gives a talk on what he thinks about C++ at CPPCon
a great entertainement
C++ is for pussies?
kidding?
r u drunk, bro?
U know C++, u earn twice as much the other guy who only know C
OK?
wow the noobie has to calm down
and grab a C++ book. C++ for dummies for instance
All the money is in CSS anyways
what is CSS?
08:17
therefore CSS > C++
if we follow his philosophy
great world we re living in
I follow the way to earn $$
not empty talk
ReferenceError: $$ is not defined
then stop trying to understand what a std::map is and go sell drugs. Or become a business analyst.
or don't be drinking at 3:00am on a work day
u r drunk
08:20
or 9:00 am in fucking England
I am not drnk
r u drnk?
this isn't an SMS
?
I am playing OW
sheesh
:31548411 That image is disturbing...
Here is a better copy
Anyways, it needs more corporate logos
08:26
GAAA
How the beep am I supposed to xorswap my structs?
std::swap
std::swap(outsize.height, outsize.width);
04:21 $ gcc wormhole.c
wormhole.c: In function 'assignPairs':
wormhole.c:10:27: error: invalid operands to binary ^ (have 'struct coor' and 'struct coor')
 #define XORSWAP(a, b) ((a)^=(b),(b)^=(a),(a)^=(b))
                           ^ ~~~
wormhole.c:44:7: note: in expansion of macro 'XORSWAP'
       XORSWAP(worms[filled], worms[i+1]); // swap
       ^~~~~~~
wormhole.c:10:36: error: invalid operands to binary ^ (have 'struct coor' and 'struct coor')
 #define XORSWAP(a, b) ((a)^=(b),(b)^=(a),(a)^=(b))
std;:swap
Does C also have swap ? Or is this the time I finally have to switch to C++ ?
19
Q: Is there a built in swap function in C?

user1149207Is there any built in swap function in C which works without using a third variable?

also use a macro
its like a template
Ven
Ven
08:30
i'm about to report you
Oh. Okay great, thanks!
@Ven Who?
Ven
Ven
mike
Be nice...
"You can inline images (URL must end with a recognisable image extension). Animated GIFs are likely to be binned."
Ven
Ven
i'm never nice
08:42
from the comments:
> every high level language is based on C so they are turing complete
lol
Ven
Ven
lol reading comments!
I have a bump on the top of my left foot (accidental injury I think), twisted my lower back a few days ago, injured some muscle near the neck the day after I hurt my lower back. Now it's that time of the month. My life is complete(ly ruined).
@Telkitty Sounds like extreme sex session happened...
And the irony - I had no idea how I got all these injuries.
@wilx yeah right ...
I ran (half) marathon, did long distant cycling, walked bushwalking/hiking tracks rated hard/extreme, even built a house, nothing have caused so much injuries in such a short time.
> To a computer scientist, watching Brailsford is like watching porn: you already know what's going to happen, you know you're not going to learn anything new, but when you see that particular sexy cutie in a thumbnail, you immediately click it because it's going to be SO GOOD.
08:49
@Telkitty Roofied then?
"8 years ago, I said it was time to change the tone of our politics. In hindsight, I clearly should have been more specific." —@POTUS #WHCD
4
OW DAT BURN
How could I have missed this awesome one before
Maybe I about about to disintegrate and turn into a puddle of bloody water tomorrow morning ...
@Telkitty Your brain is melting right now, already.
:'(
@wilx only if real life is as 'secure' as the internet
I can't lay on the side because it will hurt the muscle near my neck & I can't lay on my tummy because I will end up with tummy cramp and lower back pain & if I lay on my back, somehow that would trigger the pain on the top of my left foot.
Actually. In most ways, the internet is much more safe. Which is, ironically, what makes it so insecure
08:55
rock & a hard place
Luckily you can still type with your nose
@sehe :D
My hands are perfectly fine, thank you
@Telkitty: Get some painkillers.
that's the last resort
I am afraid I would wake up with another mysterious pain
08:58
@Telkitty Either that or get soaked in a hot tub.
can't ... not for these a few days ...
@Telkitty Well, painkillers, go for it, like Max Payne, by handfuls!
No access to illegal drugs
@Telkitty Why illegal? Don't you have something like Ibuprofen?
also pain at lower back seems minor & already recovering now
so is the bump at the top of left foot
09:03
@Telkitty I am sure Lounge helped a lot with this. :D
People did suggest that I could use my nose if I injure my hands, I will try to remember that 😂
Catch 22: if I don't exercise I would end up with a bunch of diseases, if I do I would end up with a bunch of injuries
@Telkitty Well, maybe avoiding extreme whatever is the key. :)
Ben
Ben
10:03
hi morwenn
10:54
I heard that this was the best chat room on SO
Ben
Ben
@GillBates according to whom?
According to this room.
Keyboard nerds: anything good that comes with reverse tilt? /cc @Bartek @sehe @anyoneelse?
Reverse tilt is the single best keyboard feature ever.
Actually
Backlight is
Backlight won't save my hands.
Also, I don't look at keyboards.
That's for chumps.
(And the logical conclusion is that nipples is the second best feature)
Nipples are great.
12
11:09
You program on an iPad
@R.MartinhoFernandes Good thing (almost) everybody has two of them.
@Morwenn Two keyboards, yes.
I do have two keyboards here.
Ben
Ben
ooh, a picture
A-Apple
11:22
@R.MartinhoFernandes I see you havent forgotten your wallet :P
11:36
Great minds amateur chicken farmers think alike
That's plagiarism
@Telkitty gogo paternalism the new colonialism

« first day (2090 days earlier)      last day (3083 days later) »