« first day (492 days earlier)      last day (4442 days later) » 

9:00 PM
What do slanted names mean? owner of the room? Cat Plus Plus etc?
 
its been bugging me for a while :)
 
Tin
one more question to this function. Currently, i've a static std::mt19937 engine local variable that it's passed as parameter to the randomNumber(engine, a, b) function. is it the best way to define it locally, because ideally the engine should be initialized only once, right? an illustration is given in line #30 pastebin.com/e9XHzauJ
 
Italic nicks are cruise control for cool.
Avoid statics like fire.
Pass dependencies via arguments, from the point where their initialisation makes sense.
 
@CatPlusPlus I want a code nick, that would be even cooler :)
 
Tin
9:05 PM
@CatPlusPlus, what would you suggest for this concrete case?
 
You probably want one randomness engine for the entire app.
 
Tin
yes!
would it be a good idea to define a global static engine then?
 
@Tin globals are never a good idea...
 
Tin
@Hoxieboy, why are globals not a good idea?
@CatPlusPlus, why does one should avoid statics?
 
Hidden dependencies.
 
9:09 PM
@Tin I think Cat should better knowledge you on the subject, globals, whether variables or definitions are insecure
 
Because they're not that much different from globals when it comes to problems associated with them.
 
@tin: you can pass the generator state as argument, but then you find that it's passed to every function. Such argument usually indicates that the functions should be members of a class. Then the argument is replaced with "this" (logically).
 
Tin
@AlfPSteinbach, but what if the function is called by different classes?
 
@Tin can you give an example where that is a problem?
 
Tin
@AlfPSteinbach, I hope I understood your suggestion. The randomNumber(emgine, a, b) is called by methods in different classes. From what I understood, you're suggesting to define the randomNumber(,,) as a member of a class, right?
 
9:15 PM
@Tin Yep. Removing that first argument. You can derive your class from the Engine, or have an Engine as a member.
 
Eh, explicit argument is not that bad, and it doesn't mean it's part of that class state.
 
sbi
Wow, my answer re the deletion of the C++ book list question has again made it to the top of the answers! I didn't know that! Last time I looked, the meta police answers ("just delete all that junk!", "it's not in Q&A format, so burn it!) had overtaken mine.
 
Each instance of that class is then a generator of sequence of random numbers.
 
But then again I begin to drift towards more functional than OO code.
 
Tin
@AlfPSteinbach, ah ok! I think, I got it. You're suggesting to define a class randomNumber having as class member an engine, right?
 
9:17 PM
So, clearly, you need to make a monad.
 
@Tin Yes
 
@CatPlusPlus There is one already, so don't try to reinvent it (and I really doubt you could reinvent IO even if you wanted).
 
I was thinking more about State than IO.
 
Well, State can only get you fixed seeds.
 
9:19 PM
The only thing you need from IO in pseudo randomness is the seed.
 
Tin
@AlfPSteinbach , good idea! initially I thought, you were suggesting to put the randomNumber(engine,a,b) as a class function of an already existing class X (not in a class randomNumber) :-)
 
And since main is in IO anyway.
 
Anyway, you don't need to reinvent State either.
 
Tin
@CatPlusPlus, what is a monad?
 
A burrito.
 
9:21 PM
@sbi This is good. Maybe there is still hope for Humankind. ;-)
 
You know, now we have three places with definitive book list.
Our wiki, tag wiki, and that question.
 
@sbi @sbi "seems to confirm my suspicion that this is the single most linked-to question in the C++ tag." Do you know that the site itself says it is the second most linked-to question in the whole site (only beaten by "the regex question")? stackoverflow.com/questions?sort=faq
 
Clearly, we need definitive definitive book list list.
 
sbi
@RMartinhoFernandes Wow. No, I didn't know that!
@RMartinhoFernandes Why am I seeing it atop that link and not underneath the regex one?
 
Tin
thanks for your feedback & ideas guys!
 
9:24 PM
@sbi You have ignored?
 
sbi
@CatPlusPlus Ah, of course I have! Silly me.
 
sbi
It's also the 8th-most-upvoted question on the whole side. (I am now looking at it through IE, in which I am not logged into SO.)
 
I was going to suggest porn mode, but then I remembered Firefox requires you to close your session for that. :( Chrome can have porn mode windows and regular windows simultaneously.
 
sbi
@RMartinhoFernandes Oh yeah, I should have used IE's porn mode rather than logging out. I always forget there's a porn mode. :-/
(And now I was logged out in FF, too! I dunno how that happened when I logged out in IE. Flash cookies?)
 
9:31 PM
Weird.
When you say IE, do you mean real IE or IETab?
 
Ell
Opera is good for "porn mode"
Not that I would know, of course
 
sbi
@RMartinhoFernandes I used real IE this time.
 
Tin
@AlfPSteinbach, so the class randomNumber<T> would have then as class member a std::mt19937 engine, for instance, and also a method T getRandomNumber(T a, T b), so that we initialize an object of this class only once, in the main.cpp for instance, say: randomNumber<float> myRand. in the other classes I could add a new class member of type randomNumber<T> m_myRandNum and modify the constructors such that they accept and object of this type as parameter, right?
 
@Ell Any decent/recent browser has that, but it's usually disguised as "private browsing mode".
 
@sbi Does that mean you don't look at porn?
 
sbi
9:33 PM
@RMartinhoFernandes Anyway, I have now added that fact to my answer.
 
That's exactly what I mentioned it for :)
 
@Tin yep :)
 
@sbi I just logged into meta just to upvote your answer.
 
Tin
@AlfPSteinbach, great, thanks!
 
sbi
@FredOverflow Haha! I'd thank you, but then you did for yourself at least as much as for me. :)
 
9:36 PM
I did it for us. The C++ Borg.
 
There's a C++ borg? Damn, that raises hard ethical issues on our (robotkind's) plans.
 
@daknøk I think he means the experience, not the 'incognito' ness. Nice full screening of images, gesture based browsing, swift keyboard based navigation. Everything you need :)
 
What's this!
 
@sbi I upvoted yours as well.
 
9:40 PM
> for every Academy Award quality post like "The Definitive C++ Book Guide and List," there are a thousand monkeys bashing away at a thousand keyboards asking book recommendation questions that will never see the light of day.
Can someone explain that to me, I don't get it.
 
sbi
@EtiennedeMartel Even if I did, I could do so in a VM, on a throwaway account, a third browser I don't care about, or just don't care whether my main browser on my account shows porn in its history. (This is Europe, remember?) But, yeah, of course, I mentioned the fact I forget about that to imply I don't look at porn. And now I have mentioned all those other possibilities to imply I have put a lot of thought into how I am doing this. — So in the end, you don't know, and that's how it mostly is with me.
@EtiennedeMartel Brave knight! I appreciate it!
 
Sometimes I feel like the mods have a grudge against the C++ community here on SO.
 
@JohannesSchaublitb I was going to say you sounded like Johannes. Only then did I noticed your username.
 
@EtiennedeMartel grow more skin :)
 
And that they're doing everything they can to piss us off.
 
9:41 PM
@EtiennedeMartel Maybe they simply don't like C++. Like many people do :)
 
I assume you got a haircut.
 
@EtiennedeMartel No, the symptom is that we actually care. As opposed to most other subcommunities ?
 
oh porn
 
That's a good point.
(The fact that we care, not the porn)
 
sbi
9:42 PM
@EtiennedeMartel Like hanging out here watching over us. Although, of course, they denied it this morning, when I openly accused them of doing so.
 
@EtiennedeMartel Both, actually :)
 
The only good porn is Haskell code.
 
@RMartinhoFernandes woot! I got a haircut!? how's taht!
 
Also, what is a "tag wiki"? Is that something new?
 
9:43 PM
I should really study about PDDL. But I think it's much better to hang out here and talk about people who can ban me when they get bored.
 
int * p <---- naked pointer = code porn
 
dangling pointer
 
@daknøk "Oh yeah, deliver your result to the IO monad!"
 
@sbi The shog is on a break though
@TonyTheLion struct X { int* p; /* <-- public nudity */ };
 
@TonyTheLion you're late
 
9:43 PM
Those dirty IORefs.
 
sbi
@FredOverflow I'm not sure myself. Why don't you ask him?
 
@sehe lol
 
Oops I did it again:
0
A: Dynamic Spirit parser depending on flag bits

seheOk, you are making me guess about the actual question. But I made up a few test cases with 'telling' fallback values. I use karma to format the parse result. For good measure (checking my own sanity, really) I provided both little-endian and big-endian test results. Hope this helps: Code #inc...

 
struct X { long double penis; };
 
sbi
9:44 PM
@sehe I did mention they denied watching us, didn't I? :)
@JohannesSchaublitb Are you a crocodile?
 
Hmm, 40 users.
 
do crocodiles have double penises!?
 
Kinda full.
 
@RMartinhoFernandes Oh, the book list already is in the tag wiki. Since when?
 
@JohannesSchaublitb I think sharks do.
 
9:45 PM
lol
 
@JohannesSchaublitb mine unsigned long long
 
wait i'll sign it
 
sbi
@JohannesSchaublitb Yep. Well, I don't know if all of them have those, but at least some definitely do.
 
He said it's about his ex.
 
@FredOverflow I wouldn't know. I've been offline for a week.
 
9:46 PM
@RMartinhoFernandes So less than a week?
 
That's a good guess.
 
sbi
@FredOverflow WHAT?
 
does that mean they deleted the question?
 
9:48 PM
Ah, I answered a question with an "SO Answer" instead of in a comment.
 
Damn, I was beaten to it.
 
Well, crap.
 
0
A: there are many ways to split a string in c++, whose performance is best?

Cheers and hth. - AlfTo maximize your chance of a Very Fast Implementationâ„¢ you should use a substring creation operation that has constant time. One way to do that is to ensure that the original string exists and is not modified over the lifetime of the substring references. You can then represent each substring as ...

 
It's a losing battle, folks.
 
I already said that like an hour ago!
 
9:48 PM
I don't know why "Modern C++ Design" is ranked as "Above Intermediate" while "C++ Templates: The complete Guide" is "Intermediate".
 
We're gonna need to go LOIC on their asses.
 
@AlfPSteinbach clever SO name
 
sbi
@JohannesSchaublitb Because that's how it is.
 
"Modern C++ Design" is basically just jerking off on template code, while "Templates: The Complete Guide" is really useful in-depth detail on C++ templates IMO
3
 
@AlfPSteinbach Woot!
 
sbi
9:49 PM
Anyway, I'd vote for removing that duplicate information in the tag wiki. Anyone have an argument against that?
 
@sbi oh good
 
@JohannesSchaublitb "Porn for C++ programmers"
 
@JohannesSchaublitb Because Andrei is hardcore.
 
@sbi No need to go all bold and italic on us, buddy, we're all with you.
 
@sbi I have an argument for: I have never noticed it, and would have to sort of research how to find it.
 
sbi
9:50 PM
@EtiennedeMartel BUT I FEEL LIKE YELLING! GOT A PROBLEM WITH THAT?!
 
@sbi I don't care either way. As long as it's easily findable.
 
@sbi Have a beer. Everything is going to be just fine.
 
And like the Cat mentioned an hour ago, it's triplicate: loungecpp.wikidot.com/programming-library
 
@RMartinhoFernandes +1
 
@JohannesSchaublitb Since when do you have a problem with template wankery?
 
9:51 PM
@FredOverflow i've always had a problem with that
 
sbi
@EtiennedeMartel Already had one. ALREADY HAD ONE!
 
@RMartinhoFernandes Yeah, at worst, we could always just link to the wiki.
 
you will not find random template wankery in any of my answers
 
@sbi WELL SHIT
 
sbi
@RMartinhoFernandes Nothing is easy when information is duplicated. People will start to fix and edit one copy of this, and will forget or not even know about the other one.
 
9:52 PM
@JohannesSchaublitb No, leave that to @Xeo.
 
@sbi HAVE ALL THE BEER
 
@AlfPSteinbach Bahaha, I just saw your new name. Nice.
 
Beer won't cut it. Have a whiskey.
 
LET'S GET DRUNK.
 
Let's not write in bold capitals.
 
9:53 PM
ohhh Whiskey, I love that stuff
 
sbi
@TonyTheLion Ok, that's an argument. I'll gonne grab another one... Goes to fridge.
 
Responsibilities are for pussies.
 
heheh :)
 
@EtiennedeMartel Is SHIT the past participle form?
 
@sbi Your English is breaking up.
 
9:53 PM
@sehe No, it's just that I was too lazy to add the missing comma.
 
sbi
@FredOverflow LET'S WRITE IN BOLD ITALIC CAPITALS.
 
@FredOverflow What if I live in a bold capital?
 
hahah
 
If I can write perfectly fine English when drunk, anyone can.
 
9:54 PM
@sbi When in Rome... WHEN IN ROME
 
@CatPlusPlus oh rly
 
@CatPlusPlus But you can't.
 
sbi
@CatPlusPlus That must be the beer! Cheers!
 
@sehe Better to live in a bold capital than to live in a bold italic capital.
 
sbi
@CatPlusPlus Except you never drink.
 
9:54 PM
I'm one hour late for the 4 o'clock beer.
 
@RMartinhoFernandes Yes, I can!
 
Dec 20 '11 at 1:26, by Cat Plus Plus
i dont know im drunk
Right.
 
sbi
@sehe What about Rome? When in Berlin, grab another beer!
 
@AlfPSteinbach You could only live in a bald italic capital and have many sex slaves. It is a job vocation
 
9:55 PM
There are different stages of drunk.
 
ah
let's figure out the drunk stages
 
Helps. Where are the mods when they're most needed ?!?!
 
Not drunk, drunk, really drunk, drunk, not drunk.
 
fuck mods
 
sbi
9:56 PM
And then there's knurd.
 
@sbi Steer cleer of the peer beer cheer!
 
sbi
@TonyTheLion Egad! Didn't SO just lose its one female mod? I am strictly straight, and wouldn't want to fuck any of the other mods.
 
We don't talk about that.
 
@TonyTheLion As long as it's consensual.
 
9:56 PM
@RMartinhoFernandes +1
 
wtf is "knurd"?
 
@TonyTheLion Not a puzzler, are you?
 
It's a dark place.
 
@TonyTheLion boost::reverse("knurd");
 
9:58 PM
It's "so drunk the world is backwards".
 
@RMartinhoFernandes lol
ohhh
 
Have cake and eat cake
 
sbi
@sehe What's wrong with std::reverse()?
 
Again?
 
Or, knurd is KDE 2 on GNU Hurd
 
9:58 PM
@sbi takes two iterators
 
But no macros, string literals or comments!!!
 
sbi
1 message moved to bin
 
Wait, what?
 
Why did you move the quiz to the bin?
 
@sbi Nothing. I just wasn't about to declare a var and use std::begin() and std::end(); would have taken the punch out of a punchline
 
9:59 PM
Where is the quiz?
 
Guys, Quiz!
 
what's wrong with my internet
 
But no macros, string literals or comments!!!
 
What a mess.
 
9:59 PM
@JohannesSchaublitb What's wrong with comments?
 

« first day (492 days earlier)      last day (4442 days later) »