« first day (628 days earlier)      last day (4317 days later) » 

9:01 PM
@Drise Asshat Dumbledass. Famous wizard.
 
@RMartinhoFernandes How did you modify your quote of me?
 
By typing?
 
@Drise he didn't quote you
 
@Drise erm... a bit obvious too
 
@Abyx broken link
 
9:09 PM
@MooingDuck yes he did. just not oneboxed
@MooingDuck also deleted link
 
@MooingDuck no, it's not broken
only @Drise can use it
 
@MooingDuck You don't have access to the edit page of Drise's account.
 
@sehe Ok, then I'm confused how he got the bar to make it appear like he quoted me.
 
@Drise '>' is the magic
 
> is the magic?
What is this magic?!?!
Ok, now I'm really confused
 
9:12 PM
 
Markdown doesn't work on multiline messages.
 
I have 2 integer variables, a and b. if b > a, then I want to switch them. Any elegant solution? or should I just use the a = temp... method?
 
@Drise (b > a) && (std::swap(a, b), 0);
 
@Abyx c++11 I presume?
 
@Drise why?
 
9:16 PM
@RMartinhoFernandes ah, that's what I missed
 
No. std::swap has existed since ever.
I'd prefer if(b > a) std::swap(a, b);, btw.
 
Do you guys know any good website which have like C++ tests, so that you can try your skills in some way?
 
stackoverflow
 
@Abyx I try to introduce as little 11 as possible due to development environment concerns.
 
Similar to those that employers have
@FredOverflow Is there a special tag for it?
 
9:18 PM
@Drise it's pre-C++98, just old weird C++
 
@ManofOneWay just answer all the questions
 
@Abyx Much thanks.
 
@ManofOneWay
@Drise What exactly do you mean by "elegant"?
 
@Drise it was used as a fast way to swap containers before we had rvalue referenes.
 
9:19 PM
int y = -(b > a);
int n = ~y;
int t = a;
a = b & y | a & n;
b = t & y | b & n;
 
@FredOverflow Don't forget !
 
@FredOverflow branchless and everything, what more could one want?
 
@MooingDuck I would prefer readability.
 
This freak puppet is scarying me. — Vincent G Apr 6 '11 at 13:37
 
Am I the only one that finds the temp = a; a = b; b = temp method elegant?
 
9:20 PM
@RMartinhoFernandes yes
 
@FredOverflow Something that doesn't involve temporary variables.
 
@RMartinhoFernandes swap is better, because it says that it's swap
 
@Abyx Oh sure. I meant that as an implementation of it.
 
@RMartinhoFernandes That's simplistic.
 
Thus elegant.
 
9:21 PM
What idiot invented the notion that swapping without temporary variables is preferable? It lead to this whole "OMG x^=y^=x^=y" nonsense cult.
 
And that also slower, right?
 
How do you swap in the real world without extra space?
 
@RMartinhoFernandes well... then you should also try to use a.swap(b) if there is such method
 
@ManofOneWay Even worse, it's UB in C++.
 
I am lazy and typing double temp = a; is too much for me.
 
9:22 PM
Here's the answer from someone with experience in real world: you can't.
The temporary based solution works exactly as it works in the real world. And that's not elegant?
You guys suxors.
 
std::tie(a, b) = std::make_pair(std::max(a, b), std::min(a, b));
 
IRL, we have xchg in x86 instruction set - xchg a, b
or cmpxchg
 
For 10k numbers, this answer is really pretty win: stackoverflow.com/a/11236232/85371
 
@FredOverflow That's cool.
@sehe FU!
 
@Drise Not my type
 
9:27 PM
void swap(int& a, int& b)
{
    int t = a;
    a = b;
    b = t;
}
 
@sehe Wasn't a question.
 
The compiler converts this into:
movl	(%rdi), %eax
movl	(%rsi), %edx
movl	%edx, (%rdi)
movl	%eax, (%rsi)
 
@Drise Wasn't an answer
 
So you see, no third variable is actually used. It all happens in the registers.
 
@FredOverflow it should be inlined.
 
9:28 PM
@FredOverflow har har
@Abyx ?!
 
also crappy AT&T syntax
 
Your mother can't be inlined.
 
@Abyx I didn't actually call the function, so I didn't test for inlining, but yeah.
@sehe What do you mean "har har"?
 
@FredOverflow Since when is a register not a variable. Arbitrary distinction. IMO
 
@FredOverflow He wanted to type the name of that obnoxious thing from Star Wars, but missed the J key.
 
9:30 PM
@sehe compiler should inline such small function, so it will look different where it used
 
@Abyx Ah well. I thought it was shown as inlined, but you may be right, the 'defaultness' of registers may suggest it is taken from the function def with the prologue/epilogue removed
 
@Abyx Damnit, I tried swap in a toy example with variables initialized by constants, and the compiler optimized the swap completely away and simply initialized the variables differently. Stupid smart compiler :)
 
Fred 0:1 compiler
 
@Abyx Is xchg faster than a bunch of movs?
 
@FredOverflow usually works for initialize from std::cin or argv[]
 
9:34 PM
@FredOverflow dunno, maybe it depends on specific CPU, also pipes and other stuff
 
How do I remove a deletion from the index in git?
Well, $ git reset --mixed worked.
No, wait, it didn't.
 
user1182183
I'm broken :(
 
user1182183
;(
 
user1182183
A crying guy.. I fail :(
 
user1182183
9:42 PM
and the best part is no one cares
 
user1182183
she broke up
 
user1182183
;/
 
user1182183
it hurts so badly :(
 
; usually indicates winking. Try '
 
user1182183
:'(
 
9:43 PM
:'( is crying
 
user1182183
:'(
 
@GamErix Tears of joy?
 
user1182183
no.. :(
 
user1182183
i'm just broken apart, It's really hard now
 
user1182183
i bursy on tears
 
9:43 PM
Ah, got it, $ git checkout.
 
user1182183
goddamit fuck my life ;/ I loved here.. ;/;/
 
user1182183
and still love her
 
user1182183
;/
 
I hate when C++ cheats on me with Java. And then crashes with an out_of_bounds exception.
 
@GamErix We can't care because we don't know you. Do you have any friends you can talk to?
 
9:45 PM
@Drise True love has no bounds.
 
user1182183
ye, all on vacation..
 
@RMartinhoFernandes No, C++ does.
 
user1182183
it's 23.45 so not rly anyone online
 
user1182183
;/
 
user1182183
and still it hurts so badly, It was almost an perfect relationship.. ;/
 
9:46 PM
@GamErix Stop winking, it's weird.
@GamErix No relationship is perfect. And if it seems so, then it's horribly broken. Trust me.
 
Xeo
@ScottW looks good
 
user1182183
that's why I said almost perfect :'(
 
user1182183
bacause it was everything I needed, to be happy
 
user1182183
cuz, my life is just like something,.. well, nothing. If I think about it she's the only person who actually cared about me :(
 
user1182183
nd that's terrible pain now :'(
 
9:48 PM
@GamErix I know how you feel.
 
user1182183
can't rly handle it :'(
 
how old are you?
 
@GamErix think about something good, like you aren't merkin if there is 23.45
 
@GamErix You'll always meet new people. The end of a relationship opens many opportunities to meet others. Trust me.
 
@ScottW Kewl. Btw, is it "Professor Stange" or "Professor Strange"?
 
9:49 PM
@GamErix When I have trouble with women, I like to watch "Vollassi Toni", but that only works when you understand German :)
 
@FredOverflow That looks very NSFW
 
user1182183
ofc my profile says 24 but that's just to hide my age from google..
 
@GamErix Dons tinfoil hats
 
@Drise It's just a guy without a shirt on a couch, rambling on for 10 minutes about women.
 
:4404595 Mine broke up with me right before my summer exams, when I was 17.
not very well timed by her
 
user1182183
9:50 PM
Well then I know now how you felt
 
user1182183
doesn't matter if 17, 20 or 40
 
user1182183
it it's love, it hurts if it ends
 
well, you're kinda lucky, cause at least it's after any examinations you may have taken
 
user1182183
always the same
 
user1182183
ye..
 
9:51 PM
@GamErix Women under 20 tend to be very confused and hormone-controlled. I wouldn't read too much into it.
 
what I would say is
it really messed with me for a very long time
but I don't worry about it anymore
 
user1182183
hopefully she will reconsider her decision, I still love her...
 
user1182183
now the doog is barking, somebodies in range of our home ~.~
 
that's highly unlikely
 
@GamErix It's best to move on.
 
user1182183
9:51 PM
I doub't it's her
 
both #1 and #2
 
user1182183
she's sleeping already
 
user1182183
Well this is like the 9th time somebody broke up with me.. eh it hurts more every time
 
user1182183
but this relation was different than all others
 
user1182183
much more better
 
9:52 PM
well that should indicate to you to take more care next time :P
 
@Drise std::move(on)
 
I realized, eventually, that my girlfriend was completely wrong for me
and that I had completely screwed up any chance it may have had
 
@GamErix How old are you?
 
So what's happening tomorrow? Gonna go out and find some nice girls?
 
user1182183
seventeen
 
9:53 PM
and you will probably realize the same
 
user1182183
I think I'll be home the whole vacation
 
@GamErix You already had 9 relationships at the age of 17? Wow.
 
user1182183
:/
 
because it's easy to have a little chemistry with someone and get your hopes up
 
user1182183
erm, don't look at it bad
 
9:54 PM
When I was 17, I was too shy to even look at girls, let alone talk to them.
 
user1182183
I counted in the short relationships too
 
but it's a lot harder to actually have something that could last
 
@FredOverflow What about now?
 
user1182183
longest relationship one year, she, now, after almost 3 month says she doesn't feel the love
 
@ManofOneWay He's a womanizer.
 
user1182183
9:54 PM
while I had my first tyime with her, and she with me..
 
@ManofOneWay I have been just fine for a couple of years, thank you :)
 
@RMartinhoFernandes I figured
 
user1182183
:/
 
hah that's nothing
I was with my girlfriend for 11 months and she still wouldn't sleep with me
 
user1182183
nothing, but huirts as hell
 
9:55 PM
@DeadMG Did you not catch the InterruptedException? <- Java joke
 
@FredOverflow Pimpin?
 
yeah, it does
 
user1182183
you guys are the only thing in thhe world left, that I can talk to..
3
 
posted on July 06, 2012 by R. Martinho Fernandes

Variadic templates is one of the interesting new features in C++. It allows one to write generic functions that take any number of arguments of any types. Or class templates like std::tuple, which can have any number of template arguments. Them tuples A std::tuple is a fixed-size collection of heterogeneous values. It’s like std::pair, but with the number of possible values is not fix

 
@GamErix I've had my heart broken twice more than that. You'll be just fine in a few weeks.
 
9:56 PM
@GamErix I sure hope not
 
We talk about sex and the feed says "Size matters"? lol
 
@Feeds @RMartinhoFernandes bwahahaha epic title
 
user1182183
dafuq, i have a big one, actually our xxx was great..
 
@ManofOneWay what?
 
user1182183
wtf did I just say
 
user1182183
9:57 PM
-.-
 
lol
 
@GamErix We are the Lounge. We're gonna take care of you. Just pretend you are interested in templates and we'll get along just fine.
 
@GamErix Woah. Talk about such objects gets some excited around here. Careful.
 
@sehe Oh, oops. I had that title written since a month ago.
 
damn
 
user1182183
9:58 PM
I'm really broken..
 
where are you Tony?
 
Also, I borked the image links.
 
you've been le summoned
 
@GamErix OMG you just summoned the @Tony!
 
Dammit, I can't put a single post up with seriously messing something up.
 
9:58 PM
@GamErix That's okay, sometimes you need a break in life. Or in a switch statement.
 
@ScottW This shit's getting nasty
 
@GamErix If I were you, I wouldn't worry about it. Just feel free to mope around for a few weeks. If you're not feeling better after that, then you might have a problem.
 
user1182183
well, I bet at least one of you guys tried to kill themselves, or at least thinked about it?
 
@GamErix *thought
 
lol
 
user1182183
9:59 PM
but I'm not going to do that
 
@GamErix Everybody thinks about suicide from time to time. It's normal.
 
@MooingDuck GG.
 
@FredOverflow No it's not?
 

« first day (628 days earlier)      last day (4317 days later) »