I'm trying to connect to a tor hidden service using the following php:
$url = 'http://jhiwjjlqpyawmpjx.onion/'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, "http://127.0.0.1:9050/");
curl_setopt($ch, CURLO...
@R.MartinhoFernandes sure, but if someone "forgets" to implement a standalone swap for the element type you are doomed to make copies everywhere, I guess
here is the fcuk-up (that kinda works), I guess it won't work at all if the move isn't written in such a way that it actually swap the data between the two. if it just default initialize one of them instead of swap.. boom
(Consider what happens when you move from a global variable, or any other long-lived object. It's just counter intuitive that the old state will live forever)
(Btw I have to go back over my 'ginormous iterators' comments from earlier, I completely overlooked that debug iterators for std::vector start at 80 byte apiece.)
Ah, probably GCC, then.
@Rapptz There's a macro for it. Don't know it offhand. (you can check my build scripts, as I know I enable it there)
@Rapptz It does seem to be quite an accomplishment. Even assuming 9 individual bytes, each aligned to an 8-byte boundary you'd only be looking at 72 overall...
@MarkGarcia nhaa, just me messing around with some silly uni-assignment. started out to show a friend what a "neat" implementation looked like, then I tried to make it as fast as possible
@MarkGarcia too lazy to mess around with the commandline so that it doesn't try to compile the code, etc etc
that insert implementation is actually quite fast (a little bit faster than libstdc++4.8.1 with the same version of g++ -O3)
the hack of first moving the object to be placed into the end position than swap:ing it back out (just to have an element which std::move_backward can move things to) and then moving it where it's supposed to be.. kinda sweet
@R.MartinhoFernandes Yeah, I realize it's a holiday tomorrow, but even so, about the only time I'd be up to 0400 is if I was either working or drinking...
@refp The purpose of doing the move and swap, and the subsequent move after the if. Though I may not be understanding how your insert method should work in the first place.
Basically I don't know what I'm doing with my life. I attend an university in which less than half of the courses are nearly interesting, which is instead sucking up my free time that I could spend developing some experience with personal project or learning from studying things I actually care about.
@Pawnguy7, don't worry, this is just a depressing rant. I'll be fine. In two of three days I'll be the happiest guy in the world, when I'll finally remember why I am doing this. It happens every year.