« first day (592 days earlier)      last day (4358 days later) » 

7:00 PM
@RMartinhoFernandes the struct that contains them is a template.
 
My next post will be on SFINAE and enable_if. Don't expect a comprehensive explanation of SFINAE though, that's not what I'm focusing on.
 
@Xeo still shows the avatar
 
@RadekdaknokSlupik Not enough.
 
@Xeo No thanks :P I'd rather, say, screenshot the avatar.
 
The functions must be templates themselves.
 
7:00 PM
oh now it updates
 
Xeo
@RadekdaknokSlupik SFINAE only works during substitution, hence its name
And substitution doesn't take place without a template.
 
It's a cache thingy.
 
7:02 PM
@Xeo Thanks! This seems to work.
template<class U = T>
Base* operator()(typename std::enable_if<std::is_constructible<Base, const U&>::value, const U&>::type val) {
  return static_cast<Base*>(new T(val));
}

template<class U = T>
Base* operator()(typename std::enable_if<!std::is_constructible<Base, const U&>::value, const U&>::type val) {
  return nullptr;
}
 
Xeo
@RadekdaknokSlupik No need for the static cast
 
The puppy told me to do that.
 
@RadekdaknokSlupik No, that was when using the C++11 generalized expression SFINAE
 
so that you would get the return type as Base*
 
7:04 PM
Base* operator()(…)
 
@RMartinhoFernandes Nice indeed
Btw. of course that 'culture' was a lame joke I copied off some guy's blog. It wasn't original anyways
 
hmm, I just realized that the interpreter that my company has been using for 20+ years leaks memory like mad if any sort of error is found or occurs.
 
static if would turn this hell into a heaven.
 
@MooingDuck Is it a problem?
 
Hehe.
@RadekdaknokSlupik Use decent SFINAE. It's very close to static if.
 
7:07 PM
knock knock
 
@sehe yes, since it's been modified to be called from our main program as a function. Whenever anyone hits the "compile" button, if any error is found or occurs, the interpreter leaks all of it's memory.
 
@DeadMG I have a better picture of Scott Meyers:
 
@RMartinhoFernandes uglier though
 
Jan 10 at 21:08, by FredOverflow
user image
2
 
@MooingDuck Wow. That's something to behold.
 
7:07 PM
:)
 
I don't have that big a desire for static if anymore.
 
@MooingDuck If it's an interpreter, why does it have a "compile" button?
 
@MooingDuck Not that much, really.
 
static if (std::is_constructible<Base, const T&>::value) {
  return new T(val);
} else {
  return nullptr;
}
// Still looks much nicer and is less repetitive.
 
@JerryCoffin technically it's a compiler, I'm not sure why I said interpreter
 
7:08 PM
@MooingDuck In fairness, it sounds looks like pragmatic design: in the old design, the memory leak was fine (in a way) since the process would die (IIUC)
 
@sehe exactly
 
@MooingDuck So, the new design really needed a bit of impact analysis/test before deplying :)
 
I found a wild @sbi
 
7:08 PM
@RadekdaknokSlupik the example you gave me before with the errors shouldn't compile anyway.
 
also just had a minor "cat has escaped" panic
 
You have CastExpression parseCastExpr(...), and return parseCastExpr from a function with return type wheels::value_ptr<...>.
 
turns out she had just sneaked upstairs
 
@RMartinhoFernandes isn't it implicitly convertible?
 
7:09 PM
Implicit conversions are evil.
 
@sehe I'm going to talk to my supervisor and ask if I can RAII the memory and files at least.
 
@MooingDuck We pRAII for your success.
 
@thecoshman I had a major 'I let the cat run free' day today. I started out with the cat upstairs asleep. I decided that I wanted to open the door to the garden anyways (it is quite warm here).
 
@FredOverflow :-)
 
@RadekdaknokSlupik Yeah, but it raises some other issues, in an attempt to solve a problem that can already be solved. It's not all roses.
 
7:11 PM
@thecoshman An SBI with a Nintendo? Obviously a fake!
 
@sehe our's is a strictly indoor cat
 
@thecoshman At the end of the morning, I noticed my cat stretched out across the living room floor, all 'gray' from garden sand/soil (natural colour: white + spots).
So I figured: ok, he got downstairs with me noticing, rummaged around and returned.
 
Wait, it can be.
 
@RMartinhoFernandes No.
 
@RMartinhoFernandes I guess the 'is' is superfluous
 
7:12 PM
8
A: Is the ranged based for loop beneficial to performance?

MottiRange for is as fast as possible since it caches the end iterator[citation] and does pre-increment. so if you tend to write: for(iterator i = cont.begin(); i != cont.end(); i++) { /**/ } Then, yes, range-for may be slightly faster, since it's also easier to write there's no reason not to use...

> I said it's as fast as possible, it isn't however faster than possible.
lol nice
 
@thecoshman "ours".
@DeadMG Hm, right. Dunno what I was thinking.
 
@RMartinhoFernandes Didn't somebody coin a law that anybody attempting to correct an error in spelling or grammar will have at least one of the same in their attempt?
 
@JerryCoffin But I didn't have one! I made it up.
 
@thecoshman I labeled his collar with a phone number and let him run free. I have been checking and 'rattling' the cat food in case he would have trouble jumping the fence (literally) or finding the back yard.
 
@RMartinhoFernandes it would be an abbreviation of "our cat is" thus shortening it "our's"
 
7:14 PM
@RMartinhoFernandes I thought I was wrong once, but I was mistaken.
 
@thecoshman But when you do that, it becomes "ours".
 
@RMartinhoFernandes see "don't"
 
@thecoshman On the 12th try he was actually there and all of us, including the cat were very happy that he was back.
 
@thecoshman "ours is".
"our" is not a pronoun.
 
fine, I'll fall back on 'screw you' :P
 
7:15 PM
our's is not valid
 
A possessive pronoun is a part of speech that substitutes for a noun phrase that begins with a possessive determiner (also known as a "possessive adjective"). There are eight possessive pronouns in modern English: mine, yours, his, hers, its, ours, theirs, and whose, plus the antiquated possessive pronoun thine. The word "its" is, however, rarely used as such (almost always it functions as a "possessive adjective"). Among these, "its" and "whose" are properly distinct from "it's" (a contraction of "it is" or "it has") and "who's" ("who is" or "who has"); however, these and other misspel...
 
@sehe you have a fair bit of garden don't you. We live in a terrace/semi-detached estate with plenty of cats, dogs and feral children so we intend to keep her inside for ever more
 
Is Scott Meyers left-handed?
 
1 min ago, by thecoshman
fine, I'll fall back on 'screw you' :P
 
7:17 PM
@FredOverflow Well, I guess nobody's perfect.
 
@FredOverflow if I could be bothered, I could make him right handed
 
@thecoshman Ours was strictly an outdoor ('all-terrain' if you will) cat but we kept him indoors while accomodating to his new home. He had been outside on a leash but became increasingly 'twitchy' - it didn't look like a lot of fun and we didn't want to leave him on a leash unattended.
I had already experimented with going outside 'untied' without any fanfare (but always right before feeding time) and noticed he was no longer 'eager' to run or explore the territory. He was basically unaware of the change.
Our garden most accurately resembles a postage stamp.
It isn't much. Also, we're right on the street, but there is a nice alley to a park that the cat should be able to find.
 
@thecoshman You mean like this? ;)
 
@FredOverflow A paper phone book on the shelf? Clearly faked!
 
@sehe I guess once he gets used to it being the place where his servants are feeding him, he'll see no need to go too far away
@FredOverflow exactly :D
 
7:18 PM
@FredOverflow lol
@thecoshman That was the idea.
 
I might be pushing it now. "gets".
 
@FredOverflow except, now this picture looks 'wrong', could be because I've just seen it the other way
 
Apostrophe: when in doubt, don't.
 
@FredOverflow Nope -- the picture of Persephone on the CD on the wall is backwards.
 
@RMartinhoFernandes Apostrophe: when in doub't, dont.
 
7:20 PM
@JerryCoffin Everything on the wall is backwards, for example "DC ++C evitceffE".
 
@FredOverflow Obviously (the picture was one thing that could be turned around without being obviously backwards).
 
Oh, now I feel stupid.
 
@FredOverflow The area behind that monitor needs quite the dusting.
 
huh, so there are two females who come this chat :P
 
7:23 PM
@FredOverflow No, I'm just being perverse. BTW, did I ever mention that I have one of, like, a dozen or so signed copies of the Effective C++ CD, sent to me by Scott personally?
 
0
Q: Want to get details about structure detail in C++

Raj Singhaniaiam new to C++ but studied other languages. would you please explain me the code i had written below.... struct Point { int x,y; bool operator <(const Point &p) const{ return x

Detailception.
 
Can someone summarize the porn discussion I missed? Anything interesting?
 
@thecoshman maybe, from what Cicada said before, she might not come back.
 
@JamesCuster And while he's at it, he should throw away the ZIP drive or whatever it is :)
 
@MooingDuck oh? I must have missed that
 
7:27 PM
@FredOverflow Anger. Mostly.
 
@FredOverflow Cicada said it was sexist, DeadMG countered, they yelled, DeadMG ignored, Cicada left.
 
@JerryCoffin How many Effective C++ CDs are there in total? 12?
 
@RMartinhoFernandes I think I detect an editing war..
 
There are Effective C++ CDs? What's on them?
 
@FredOverflow Not sure.
 
7:28 PM
@JerryCoffin ARrgh, yeah. People kept pushing crappy partial edits while I made a full dressing of the thing.
 
Well, @Cicada's still online, she just edited that question.
 
@thecoshman from a weekish ago, last time she got mad
 
@MooingDuck What's sexist about porn? Isn't there porn for females, too?
 
@MooingDuck I've seen here plenty this last week
 
Read the topic!
 
7:30 PM
@FredOverflow Don't start.
 
@RMartinhoFernandes Do we have a "What's sexist about porn" question on SO? :)
 
@Pubby Mine, at least, is pretty out of date -- Effective C++ (Second Edition), More Effective C++, and a bit of bonus material. Uses such advanced HTML that they recommend at least version 4 of Netscape or IE!
 
@FredOverflow I remember seeing some sex.SE proposal on Area 51. Not sure how it turned out.
 
Which is weird. I mean, the Web desperately need proper sex ed.
 
@JerryCoffin Aww, I was hoping they would contain some C++ tunes by Scott
 
7:32 PM
Sexualitysexuality.stackexchange.com

Q&A site for educators and professionals to discuss human sexuality.

Closed after 13 days in beta.

> The Sexuality site didn't have enough activity during the beta, and has been closed.
 
Sad. Now the only thing these kids got is Yahoo Answers.
 
@Pubby Songs are more Herb's thing.
 
Not enough activity?
 
voretaq7 is the sexiest
 
7:33 PM
How come there's not enough activity on a site about sex?
 
@RMartinhoFernandes people want to see boobs, not talk about herpes
3
 
@RMartinhoFernandes At a guess, because most questions were ruled off topic -- people had the temerity to try to discuss sex, which clearly couldn't be allowed!
 
oh nice!
@RMartinhoFernandes sounds like a reason for a break up :)
 
@thecoshman Judging from YA, I don't think that's true.
 
told you there were two CS sites
cstheory for pompous jackasses, and another one
 
7:35 PM
@DeadMG link to other one?
 
@RMartinhoFernandes was going to ask if that was a mistype, or a piss-take :P
 
GTA4 is boring even with cheats.
 
@CatPlusPlus lol
 
oh sweet, I got a necromancer badge on Fred's question. Amusing since I clearly didn't answer the question, and say so in the "answer"
 
7:36 PM
lol
 
fedora 17 here we go
 
@DeadMG Theoretical Computer Science, Computer Science, Computational Science... Stack Overflow (kinda)
 
I swear this was not me!
 
"Hail Satan"? That's quite offensive!
 
28
Relationships

Proposed Q&A site for people seeking answers to questions about dating, long term relationships, love, marriage or other commitments, and everything else typically considered a "relationship". (Intended to encompass the Love and Dating sites and extend them.)

Currently in commitment.

28 committed
 
7:41 PM
@MooingDuck At least computational science is difference -- it's for scientists using computers (whereas, as Dijkstra pointed out, computer science mostly isn't about computers at all).
 
> It appears that "Relationships" will fail due to commitment issues.
 
Nothing is offensive.
 
@EtiennedeMartel really?
 
@thecoshman No.
@RadekdaknokSlupik Except an offensive.
 
> What's this "friend zone" women place their male friends in? How can I escape it?
Ooooh boy.
 
@EtiennedeMartel oh good, because I really don't want to have rant about why it isn't
 
> Two of my employees are romantically involved. One of them got me pregnant after a one night stand but I'm keeping the baby. Should I say anything?
2
 
@EtiennedeMartel There's only one way out and it usually involves her never talking to you again.
 
Gosh, what?
 
7:44 PM
> Two of my employees are romantically involved. One of them got me pregnant after a one night stand but I'm keeping the baby. Should I say anything?
lol
 
If these are the good questions, I can understand how that site is not picking up.
> What can an attractive but otherwise ordinary woman do to make herself more interesting to those objects of all women's desire, computer programmers?
 
@thecoshman Having grown up (sort of anyway) in South Dakota, I'd find "Snow, Satan" much more offensive than "Hail, Satan". Hail may dent your car, but at least you don't have to spend six months out of the year shoveling the damned stuff.
 
That page is really funny.
 
I think it was besieged by trolls.
@JerryCoffin Oh, I see you also have to deal with snow.
White shit, as we call it.
 
@FredOverflow I actually wanted to post it more like this:
The CD can be browsed just as easily in reverse: http://www.amazon.com/‮Effective-CD-Specific-Improve-Programs‬/dp/0201310155 (just copy/paste that into your adress bar and cursor through it from left-to-right. It'll be fun
 
7:46 PM
Playing around with the RTLOs, are we?
 
Jewish SE is out of beta? Wish there was some way to get notified when stuff like that happens - I like to look at the site designs.
 
Who, me? :)
 
Smargorp is a cool word.
 
It is. .is tI
 
@Pubby They usually post about it on the blog.
At least they did when scifi.SE got out of beta.
 
7:48 PM
@EtiennedeMartel I've used even less complimentary terms at times...
 
Yahoo Answers: Because any answer is better than no answer - http://www.sheldoncomics.com/archive/120530.html
 
-3
Q: What is this operator< syntax?

Raj SinghaniaI saw the following code: struct Point { int x,y; bool operator <(const Point &p) const { return x<p.x||(x==p.x&&y<p.y); } }; I don't understand what this thing is: bool operator <(const Point &p) const { return x<p.x||(x==p.x&&...

Why the downvotes?
 
I can see several reasons: 1) the original post was badly formatted 2) it clearly shows lack of research.
 
3) Downvotes attract downvotes
 
google.com/#q=c%2B%2B+operator<; gives minimally informing results.
Where did that semicolon come from?
 
7:51 PM
@RMartinhoFernandes Porkdown at your service.
 
@RMartinhoFernandes operator and operator< give the same results for me.
 
Really, there is no semicolon in the source! chat.stackoverflow.com/messages/3921893/history
 
@RMartinhoFernandes Maybe it's the < tripping things up.
 
@EtiennedeMartel: "3) Downvotes attract downvotes" - it's called mass hysteria :)
 
@FredOverflow Yeah, and some of them mention operator overloading at least in the title.
 
7:52 PM
@RMartinhoFernandes And what if someone has never heard of operator "overloading"?
 
damn kitty! Clearly knows she's not meant to be on the table, so just runs really fast across it
 
@FredOverflow That Google query is enough to hear of it.
 
Just look up 'C++ operator keyword'
 
And how do you know "operator overloading" is related to "operator <"?
 
@FredOverflow Then they probably need to read a book before much of anything in C++ is going to make much sense. I doubt questions on SO can make up for that much of a vacuum.
 
7:54 PM
@FredOverflow You do more research than just looking at the Google results. For example, click them and read them.
 
What if you were in a real hurry? ;)
 
@FredOverflow you get down votes :P
 
> Want to get details about structure detail in C++
lol
 
31 mins ago, by R. Martinho Fernandes
Detailception.
 
@FredOverflow Then check out my new book, "Learn C++ in 21 seconds" [But you may want to read the disclaimer carefully first].
 
7:58 PM
Does it involve time travel and self-murder?
 
@RMartinhoFernandes No, nothing so violent as that. I found that most people were unwilling to murder themselves, so I recommend hiring somebody to do it for you.
 

« first day (592 days earlier)      last day (4358 days later) »