« first day (855 days earlier)      last day (4076 days later) » 

1:00 PM
Also, my second half just went shopping, feel free to come over. I am buying beer
 
return !(x&(x-1)) tells me if x is power of 2 or not. What will be time complexity for this? Can we consider bit wise operations O(1)?
 
@vaibhav it's O(1), silly
if it fits into registers, it's O(1)
 
@BartekBanachewicz Thanks (^.^)
 
@Xeo Not the same.
 
Xeo
@R.MartinhoFernandes How so?
Oh, right, nvm
"I just got up" will be my excuse.
 
1:02 PM
@vaibhav The answer to "Can we consider bitwise operations O(1)?" is "Do you want to consider bitwise operations O(1)?".
> Would not be the first time that Mr. Verdy's statements are in an interesting relation to empirically determined results.
haha, nice way of saying "that guy keeps spewing bullshit".
 
Xeo
Also, WHYYYYY does boost::counting_range(r) have these horrible semantics of counting_range(*r.begin(), *prev(r.end())). :s
 
@Xeo becauce C++ cannot into space ranges
 
Xeo
@R.MartinhoFernandes I use counting_range to get iterators from a range, and I'd be nice to just be able to do for(auto it : boost::counting_range(r)), but that has the wrong semantics... I need to do for(auto it : boost::counting_range(r.begin(), r.end())) :|
 
1:06 PM
zomg
srsly, I want proper ranges in C++14
also, TIL my bank account is under 0.
 
We just got C++11
 
Xeo
@BartekBanachewicz That has nothing to do with how C++ itself handles ranges. It's just Boost.Range sucking again.
 
Meh, I don't mind them not being in C++14.
 
Already C++14?
 
I want them somewhere. Which isn't Boost.Range.
 
1:07 PM
@GamesBrainiac that was a few years ago
 
dude, wake up
we used C++0x, remember?
 
Lol. My teacher still teaches with 0x
 
does not want to use c++11
:P
Talk about crazy right?
 
1:08 PM
no, just plain stupid
 
> Get this: "Buy.com" is changing its name to "Rakuten.com."
 
I mean, who'd wanna miss on the enhanced for loop! :P
@R.MartinhoFernandes lol? Great for them
 
I love how people say C++11 and then "lol range for is super cool"
 
@GamesBrainiac also, C++11 is just standard C++ :)
 
duh. it is, no doubt. But C++11 is so much more.
 
1:09 PM
Yea, tell that to a crazy instructor
 
s/crazy/stupid/ again
 
Thanks to stackoverflow, I am still sane with the language
 
You are? I am not.
 
It does not have a crazy amount of documentation like java
 
6 mins ago, by Xeo
Also, WHYYYYY does boost::counting_range(r) have these horrible semantics of counting_range(*r.begin(), *prev(r.end())). :s
 
1:10 PM
i have no clue as to what boost.range is though
 
range wrappers and adapters
ah wait, you have 130 rep
the thingy that is on the right side of : in for (i : range)
 
@Xeo It feels just like a collection of itch-scratchers.
 
Xeo
@R.MartinhoFernandes You know what's even worse than those horrible semantics? The documentation saying it needs just a SinglePassRange.
 
So much for documentation
Its just plain horrible to be honest....
By the way, what IDE do you guys use for writing this stuff?
 
1:13 PM
They use vim
I use Visual Studio
 
I use Eclipse CDT
Not that bad
 
DUDE
no, it is that bad
lemme...
 
okay
maybe it is
 
"I'd rather write code by colouring pixels in Paint than use Eclipse" #LoungeCpp
 
1:14 PM
I've heard that VS 2012 + Visual Assist X is just plain killer
 
it's nice, but lacks proper C++11 support still
but it's more lazy fuckers in dinkumware than MS actually
 
@BartekBanachewicz Wat.
Dinkumware writes the standard library, not the core language.
 
And the core language has, for example, uniform initialization
 
Which is where MSVC is missing the most.
 
still, the goddamn std doesn't
 
1:16 PM
@BartekBanachewicz Not in MSVC.
 
@R.MartinhoFernandes CTP.
 
Buggyform initialization, you mean?
 
oh goddamn
Still, it's the damn stdlib blocking me right now
because ICC is light years ahead in proper C++11 support
 
@GamesBrainiac Intel Compiler
 
Xeo
1:17 PM
@BartekBanachewicz FWIW, their internal Milan build has all the goodies in the stdlib - just constexpr, noexcept and using aliases missing now (from the important stuff).
 
Oh, I see
So, what do you like if you don't like Visual Assist X?
 
@Xeo STL news? :)
@GamesBrainiac I didn't say I don't like it
 
So, are there better alternatives?
 
For what, exactly?
You are asking many unrelated questions :)
 
Xeo
@BartekBanachewicz It's just what he says in his videos (Core C++ 8, in particular this time).
 
1:18 PM
Code completion, intellisense, refactoring, that kinda stuff
 
user142019
Haaaaa.
 
user142019
My code workz.
 
@Zoidberg Impossibru
@GamesBrainiac There's no good tool atm. VS is getting to it slowly, and if you dont need full cpp11 is ok. Otherwise theres not much choice
 
Why is C++ so ill supported? I mean, its one of the most used languages in the world
If you take a look at IntelliJ IDEA for jetbrains, its the best, most friggin awesome IDE I've ever used
 
@Xeo Maybe I'll finally find time to watch those. I'm learning too much OpenGL ATM :(
@GamesBrainiac It is hard to create good tools for C++
 
1:22 PM
@GamesBrainiac yeah, IDEA is great
 
user142019
I wrote a function that doubles a number.
 
Yea, Its one of the main reason,s I keep coming back to JAVA, writing code is literally effortless
 
Xeo
0
A: C++11 Best Practice: When to accept by value vs const&?

tp1Here's some additional rules that will fix the problem: Never derive from a concrete class. A concrete, instantiable class is already completely implemented. Deriving from it is bad use of inheritance. => your constructor parameter cost disappears. Decide between pass-by-value and pass-by-const...

Ugh...
 
user142019
It's seven lines. xD
 
user142019
@GamesBrainiac HHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAA
 
user142019
1:24 PM
You should try Haskell or Python really.
 
Xeo
@Zoidberg Wtf
 
@Zoidberg : I tried python
I loved it even more
Its my favourite lanauges
 
user142019
@Xeo in machine code *runs*
 
Xeo
Aka you suck?
 
Havent tried Haskell though, heard it was the language of geniuses
 
user142019
1:25 PM
@Xeo nah I'm writing a code generator and I want to experiment a bit.
 
user142019
@GamesBrainiac now's your chance before you go back to Java again!
 
@Zoidberg : But lemme ask you zoid, why is it considered the language of geniuses?
 
@GamesBrainiac because functional
 
user142019
Because some people think it's difficult.
 
Xeo
Hm. Damn. My fridge can be considered empty for all practical purposes. :(
 
user142019
1:27 PM
And it's full of ~difficult~ maths.
 
@Xeo does it have beer?
 
Xeo
Only a pack of cheese left.
Atleast I got some bread lying around.
@BartekBanachewicz I dislike beer.
 
Xeo
It does have some milk, though.
 
you can have milk with cheese and bread, then
 
1:28 PM
@Xeo On Sunday. You are so screwed.
 
user142019
I don't see the point of unsafe when you can just execute literal machine code without it.
 
@R.MartinhoFernandes don't you have shops open on sunday there?
 
@BartekBanachewicz AFAIK most things close. Germany sucks.
 
Xeo
@R.MartinhoFernandes I originally planned to get some stuff yesterday before heading to the D&D session, but... I forgot. :|
@BartekBanachewicz There are some expensive 24/7 shops.
 
@Xeo what about supermarkets?
 
1:29 PM
Closed.
 
Xeo
Also, we had a TPK yesterday - again. :s
 
@Xeo hahaha, your GM sucks.
 
Xeo
Though we're not really dead.
@R.MartinhoFernandes Nah, our fault entirely.
 
again.
TPKs are rarely the fault of the players.
 
Xeo
1:30 PM
Some goddess gave us the option to draw cards from a magical card deck
These 22 Tarot cards.
 
Like a Deck of Many Things?
 
Xeo
Yeah, that exactly.
And I decided to draw 11 cards.
Guess my first card. :3
 
You what.
You drew how many.
 
TPK?
 
Total Party Kill.
 
Xeo
1:32 PM
@DeadMG Total Party Kill
 
oic
 
Xeo
@R.MartinhoFernandes 11
 
in other words, the players got their arses handed to them in a really bad way?
 
Xeo
1:32 PM
:D
 
@DeadMG Also called Wipe in MMOs
 
Xeo
1 min ago, by Xeo
Guess my first card. :3
 
Dunno. I don't remember any effect. My players found one once, but all they got from it was some badass wraith or something.
 
Xeo
@R.MartinhoFernandes That would be "The Death" - also my first card. :3
 
@DeadMG Most of the time it means that the GM did not balance stuff properly.
 
Xeo
1:33 PM
And guess what, I killed it.
 
@Xeo What was the card?
 
Xeo
@DeadMG Look 4 messages above.
 
Also, my players were L16 when they found that Deck.
 
oic
 
Xeo
@R.MartinhoFernandes L11 here.
 
1:35 PM
@Xeo So what was the issue?
 
@R.MartinhoFernandes 10 more cards
 
Xeo
@R.MartinhoFernandes I drew the 4 of swords, which means imprisonment and no drawing further cards. :/
Although I did get the sun (+50k xp) and stars (+2 on an attribute of your choice) before that.
I wish I could've drawn the 3 of cups (IIRC), which is practically a jail-free card.
 
@Xeo But that's just you, not the party.
 
Xeo
@R.MartinhoFernandes Another one drew 5 and was lucky, and the last one also had bad luck with the 4 of swords.
There are practically 3 really evil cards in the 22 card deck.
 
WTF, why did you guys want to draw so many cards?
@Xeo What? You are sooo wrong.
It's almost 50/50.
 
1:38 PM
"But then I would generally ask why you feel the need to create a temporary on its own line that you then do nothing with." .. off course because it is the re-creatable minimal failing code. — Abhijit 1 min ago
 
Xeo
The death, 4 of swords, and 8 of swords, where I can't remember the effect.
 
Xeo
@R.MartinhoFernandes Nah, the rest isn't that bad.
 
@Xeo Riiight. "Enmity between you and an outsider.", "Lose 10,000 experience points and you must draw again.", "Lose Intelligence (permanent drain). You may draw again.", "One of your friends turns against you.", I could go on.
 
Xeo
@R.MartinhoFernandes Wasn't that "+10k xp, draw extra 2 cards"?
 
1:40 PM
@Xeo That's another one.
 
Xeo
Also, all of those are practically harmless in face of eternal imprisonment and death.
 
@Xeo It's not eternal imprisonment. It's awesome!
Your party now has a very strong motivation.
 
Xeo
Oh yeah, I think I remember the 8 of swords now - your body goes into a coma, and your spirit is imprisoned in some object far far away.
That's what the third one actually got.
 
So go fetch him back!
That's not a TPK.
 
@R.MartinhoFernandes In my town there's market on Sunday morning and one supermarket is open until 13:00. After that there's a little shop called "Bablu", owned by Indians. However, most food there is beyond expiration date and also way too expensive. I only trust the canned food there.
 
Xeo
1:41 PM
Eh, 2 of us imprisoned, out of 3. :/ (The fourth one wasn't there yesterday.)
 
hm, nice
30
A: Compelling examples of custom C++ STL allocators?

timdayAs I mention here, I've seen Intel TBB's custom STL allocator significantly improve performance of a multithreaded app simply by changing a single std::vector<T> to std::vector<T,tbb::scalable_allocator<T> > (this is a quick and convenient way of switching the allocator ...

It so happens I have TBB
 
alright you ignorant fucktards I said BOO!!!
 
Anyway, "enmity between you and an outsider" is not harmless.
It's probably worse than death.
 
@LightnessRacesinOrbit eh. hello
 
@BartekBanachewicz Hi! Great. There we go.
 
1:43 PM
@Xeo Oh well, yeah, this was totally your own fault. You guys suck.
 
Xeo
Heh
 
@Xeo You're not, like, actually imprisoned though, right?
 
Xeo
Anyways, there also was another fun aspect - somebody stole those cards from the goddess before, and I brought them back - not knowing that the goddess was a "Good" one - and we actually did a good deed in an evil party. :/
 
Drawing 11 out of 22 cards is gambling too much, even when you think only three are harmful.
 
Xeo
Although you could say the only real evil deeds we did before was pulling people out of their special space, which would cause them to go up in fire and be "released".
It was fun trying to get them to hold out their hand so we could pull them (they were all blind).
@R.MartinhoFernandes The others only drew 5 and 6 each, IIRC.
 
1:47 PM
That's a total of 22 cards.
 
Xeo
Eh, they get put back together before the next one draws.
 
So what?
You suck at probabilities.
 
Xeo
Also, I never even got further than 6 cards.
That G5 key really is in a bad spot...
 
1:49 PM
@Xeo refreshed again?
 
@Xeo That's irrelevant. You picked 11 before you knew that.
Chances of none of you hitting one of the bad cards: wolframalpha.com/input/?i=%2819%2F22%29^22
That's about 4%.
And that's assuming three bad cards, which is wrong.
 
@LightnessRacesinOrbit times new Roman bold hope this helps
 
Xeo
I got the death right at the beginning, so eh.
 
Ooh, there's also "All magic items you possess disappear permanently."
 
Xeo
Oh, yeah, but magic items were hard to come by in that world anyways, so I think the only thing we had was a staff of some sort.
 
1:53 PM
My players once lost a god's philactery.
 
Xeo
lol
 
Irretrievably.
 
Xeo
Anyways, we decided to try Pathfinder next time, with the current GM and a player switching places.
And then we made our characters till 1 in the morning. ./
@StackedCrooked Aye
 
1:55 PM
@Xeo We used to call that 3.75 edition.
 
Xeo
@FredOverflow Noooo
My connectionnnnnn~~
 
I played DND briefly, but then it was paused due to exams and never got back to it.
 
Xeo
@R.MartinhoFernandes Yeah, I heard it was from the 3.5 guys that didn't like how 4.0 went.
 
@R.MartinhoFernandes Are you a dungeon master?
 
@StackedCrooked I don't have a playing group right now, but yeah, it used to be me running the games back when I was in Portugal.
 
1:58 PM
Cool.
Back when I played our DM was a severe case of ADHD.
 
Xeo
I'd like to see how you do a campaign.
 
> TIL painting roofs white can actually help lower the temperature of a city and is the quickest and lowest cost ways we can reduce our global carbon emissions
No shit sherlock, what do you think Morocco and the likes have been doing for *centuries*?
Reddit is fucking retarded
 
Some of us also tried it, but then everyone would be asking to have me back :)
 

« first day (855 days earlier)      last day (4076 days later) »