« first day (473 days earlier)      last day (4467 days later) » 

7:03 PM
GoingNative is going to be awesome.
 
Are we going to play with the Indians?
 
sbi
@EtiennedeMartel What I always think when I hear MS banging their Going-Native! drum: We've been there all along, while they left us in the cold for so long, celebrating their .NET. And now they again celebrate as if they had discovered something new.
 
@StackedCrooked You mean the guys who write stuff on CodeProject?
@sbi Marketing. M-a-r-k-e-keting.
 
Als
@StackedCrooked: Which Indians? ;)
 
@Als The native ones, of course.
 
Als
7:07 PM
@StackedCrooked: Native American Indians?
 
No, the European ones.
 
Wait, what?
 
Als
@StackedCrooked: Not asian Indian Indians? :P
 
They are extinct.
 
Just got done posting flyers for my PC repair business :D
 
Als
7:13 PM
shit im bored
 
Oh what the hell, I got upvoted on 6 different answers. Somebody wandered on my profile page and felt charitable.
 
Als
@EtiennedeMartel: Its one of those basterds...Serial Upvoters.
Don't feel lucky though, probably, the fraud detection script will detect and reverse those.
 
sbi
@Als Not with six upvotes. That will fly under the script's radar.
 
:D
 
Als
@sbi: Yeah We both know that better than anyone else here ;). Actually, I thought maybe some more would follow.
 
7:17 PM
What about serial Downvoters? They re more dangerous than the Upvoters?
 
Als
@DzekTrek: They are PITA.
 
sbi
31
Q: Shouldn't anonymous serial downvoters be banned from SO?

sbiThere was a discussion about unexplained anonymous serial down-voting in the C++ room this morning (starting here). The user affected by it explained it to me thus: It started on a particular Q, Wherein, I had a rub-in with a particular user over one of my answer. Immediately,within seconds,...

 
@DzekTrek not really, the serial upvoters won't trigger immediate complaints quite like the downvoters, but they subvert the quality of the site in similar manner
 
Anyone here dealt with sockets? I'm writing a web server and while(read(fd, buffer) > 0) seems to read X bytes and then hang.
 
@Als I have only had 1 case of serial upvoting, and it got reverted overnight even though it was only about 5 upvotes in a row.
 
7:19 PM
@Als Yeah. @sbi Problem solved, no panic. :) @sehe I think you are right. Upvoters are just like spammers, don't contribute to anything but a false image of dynamic activity.
 
Als
@Levi: We got folks here who have dealt with things right from sockets to rockets, so fire it
 
Those 5 upvotes happened within a short time though
 
sbi
@LeviMorrison Well, I have a lot of sockets in my apartment, and I use them regularly. I haven't plugged a web server in, though, so I'm not sure I can help.
 
@levi I suggest using boost::asio it gets rid of all of the semantic issues related to raw socket programming.
 
Als
@sehe: Yeah, Actually, No one knows how the fraud detection script works, but it can be gamed and we have seen that conclusively atleast once, see the link @sbi posted.
 
7:21 PM
It's convenient that every time I have a problem, boost has already solved it. Thanks, @HassanSyed. I'll look it up.
 
sbi
@sehe Oops. So it seems the algorithm is more elaborated. I'm pretty sure that 6 votes can fly under the radar. Not sure about the necessary circumstances, though.
@Als "No one knows how the fraud detection script works" — That's certainly wrong.
 
I once got 15 sudden upvotes on different answers and they weren't reverted.
 
Als
@sbi: As you said circumstances, Yes I think how the serial votes were spaced in time matters.
@sbi: Yes My bad, atleast one guy that we know, knows
:P
@RMartinhoFernandes: Probably, the fraud detection bots called in sick that day
lol
 
I know I've looked at the boost header files online somewhere, but I can never figure out how to get at them when I need them. How do I view the boost/chrono/system_clocks.hpp?
 
@MooingDuck SVN?
 
7:25 PM
@sbi I believe there is human inspection involved. It is not impossible that someone reads up on a users other answers after reading a very interesting answer (I did that on occasion when first learning about a litb, butterworth, lippert, pengone etc. And then - ...
... -after reading and appreciating, decide to upvote answers that taught me something valuable (where no better answer was provided). That way, the pace will be '1 in 5 minutes' at most, and I'm pretty sure those won't automatically be reverted
 
@MooingDuck what is preventing you ? you should have them on your hard drive ?
 
sbi
@sehe 10mins ago I was sure they are reverted.
 
@RMartinhoFernandes I'm apparently on their blacklist. I can never access SVN of boost from my home ADSL (similar issues with their bugtracker)
 
@HassanSyed I don't have them downloaded, and all I can find on the boost site is a 100M zip file.
@sehe perfect! (How did you find it?)
 
7:27 PM
boost.org/doc/libs/1_48_0/boost and navigate from there?
 
@MooingDuck I see, you want an online resource for the headers. The documentation is rather concept oriented. It is best however to download them, there are too many levels of indirection to comfortably browse them in a browser imo.
 
@sbi at least for serial downvoting patterns, I remember reading on meta that they require moderator attention (it is possible that someone detects a 'fraud' that gave horrific answers, and decided to visit more of them just to check. I have done so with stackoverflow.com/users/1056328/mywalljson when I suspected he was a question-troll in his first 14 days of membership....
 
@HassanSyed The boost::asio examples are a lot for me to take in. Do you know how to specify what port a tcp::acceptor should use? Or is that even the correct part?
 
... I made sure I edited any question that was ill formatted, commented at overly broad, vague ones and didn't hesitate to downvote the ones that simply wasted our time without showing any previous effort.
He did come round - a bit
 
@levi See at the bottom of this link, there is an example :boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/ip__tcp/…:
 
7:31 PM
@MooingDuck I just type boost in my address bar. Either google, opera or my browse history will popup any link on boost.org (including the documentation site) and I just know that it has the same layout as the tarball/svn repos
 
Als
@sehe: The problem is the human element involved, you cannot distinguish a user serial downvoting after careful consideration from a hate serial revenge downvoter though a script.
 
So, I put the tail behind http://www.boost.org/doc/libs/1_48_0/boost and Bob's your uncle
 
@HassanSyed How I missed that, I don't know. Thanks.
 
@levi it's ok asio can be overwhelming :d
 
@Als That's why downvoters should be flagged. Without that, only downvotes in less than 15s intermediate should really alarm a script, IYAM
 
Als
7:33 PM
@sehe: people would still game it.
I have had an incident before.
 
@HassanSyed Oh, and don't forget to s/1_\d\d_\d/1_48_0/g. Or, pick the non-topmost link in google: teach google page rank the most current version of boost documentation!
@Als Well, I had one incident with a downvoter, one with an upvoter that got reverted. Both times I didn't flag or report, I took my losses and commented with the 'guilty'.
The comments were easier to do with the upvoter ("Gee, thanks, but it's not helping, just so you know"). The downvoter got a constructive question in the spirit of ("I get the impression you are angry with me..... blabla"
 
@HassanSyed I'll say. Have you done anything HTTP related with it?
 
@Levi no, just building RPC servers/ services. There is a boost targeted http library out there. cpp-netlib.blogspot.com
 
@Als So, how bad was it? dozens of downvotes over several weeks?
 
Als
@sehe: Yeah well in bigger scheme of things it doesnt matter but sure gets annoying sometimes.
@sehe: It was a shit storm that got out Jeff to comment on this one here:
31
Q: Shouldn't anonymous serial downvoters be banned from SO?

sbiThere was a discussion about unexplained anonymous serial down-voting in the C++ room this morning (starting here). The user affected by it explained it to me thus: It started on a particular Q, Wherein, I had a rub-in with a particular user over one of my answer. Immediately,within seconds,...

 
7:38 PM
@LeviMorrison: For something full featured well documented see Poco HTTPServer
 
@sehe that looks like a vim search and replace command, what browser does that work in ? :D
 
Als
@sehe: Eventually, the guy was caught and punished but he exactly knew how to game the script.
 
@Als ah you were the subject (object?) of that infamous case. It is where I gleaned my knowledge about the fraud detection system.
Well, of course it can be gamed, since this is the internet, we don't require certified identities etc. I suppose we'll deal with it when it is necessary. Not nice to have that happen to your account, though
 
What's a raw pointer and why is bad?
 
Als
@sehe: I guess the issue drew lot of attention that time.
@Meysam: A raw pointer is a naked pointer, ie not a smart pointer.
 
@Als is it a bad practice to manually allocate (new) and deallocate (delete) memory?
 
@Meysam use an allocator
 
Als
210
Q: In C++, why should `new` be used as little as possible?

BitgardenI stumbled upon the Stack Overflow question Memory leak with std::string when using std::list?. One of the first posters says: Stop using new so much. I can't see any reason you used new anywhere you did. You can create objects by value in C++ and it's one of the huge advantages to us...

 
sbi
OMG. I just read about the temperatures in Poland. Has anyone seen the @Cat posting messages today?
 
Als
@MooingDuck: Don't scare him/her.
 
7:45 PM
@MooingDuck What do you mean? any example?
 
Als
@sbi: Yes, She was here before, fine and healthy.
 
@Als thanks for the link
 
sbi
@Als Huh? A girl called "Peter"? Nono, you must be wrong there.
 
@Als That running gag is still going strong, eh?
 
sbi
@EtiennedeMartel That was about @Xeo, but I have met him, so it failed.
 
Als
7:46 PM
@EtiennedeMartel: That one never gets old around here :)
 
@sbi we shouldn't judge masculine looking girls
 
@Meysam In general you shouldn't manually use new much, and all new should be assigned to a smart pointer. (Thus, no delete). If (and only if) you are writing a container class, you should research allocators first.
 
It's only -11 here.
 
sbi
@CatPlusPlus Oh, good. We have that, too, at night.
 
It was around -10 all day.
 
Als
7:48 PM
Oh we have a cosy 10-12
;)
 
@MooingDuck Well, if you use shared pointers, then you should use make_shared/allocate_shared, not new.
 
Als
fuck here we go again damn you geeks.
 
sbi
@sehe If a girl is so masculine that her mother would refer to her as "him", I'd be fine with referring to that female as a male.
 
Als
first @MooingDuck, scares a kid by saying allocators and now @CatPlusPlus wants to discuss it further
 
@CatPlusPlus there's no make_unique, so all new should be assigned to a smart pointer.
 
7:49 PM
Manually allocating and deallocating memory is not only a bad practice, but it is mostly a stupid practice.
 
@EtiennedeMartel
 
make_unique is trivial, though.
 
@CatPlusPlus Oh. That's not cold.
 
@MooingDuck Write your own make_unique!
 
@CatPlusPlus true enough. I even think it should have probably been in the standard.
 
7:49 PM
Hide all the news.
 
Everyone has their own make_unique
 
Fox news.
 
Als
@RMartinhoFernandes: That is censorship, hide newS
 
@MooingDuck It wasn't in the Boost, so they had nowhere to steal it from.
 
@MooingDuck It will be. It was forgotten.
 
7:50 PM
@Als no, cat is discussing smart pointers, we dropped allocators
 
@Als Yes, "censorship" is what I've called this idea before.
 
47 mins ago, by Etienne de Martel
GoingNative is going to be awesome.
 
Als
@MooingDuck: And the kid who started it is already scared and left
 
@sehe Yes.
 
GoingNative is going to be awesome native , FTFY
 
7:52 PM
@Als smart-pointers are the correct answer to his question.
 
Als
@MooingDuck: His Q was what are raw pointers?
 
(gnarl, dang mark smackdown)
 
Als
@MooingDuck: How is smart pointer an answer to something which it is not?
 
What's GoingNative?
 
Xeo
Yay, my banana juice is deeply frozen oô
Damn -10°C outside..
 
7:52 PM
@CatPlusPlus GoingNaive, for you
2
 
Als
lol
 
sbi
48 mins ago, by sbi
@EtiennedeMartel What I always think when I hear MS banging their Going-Native! drum: We've been there all along, while they left us in the cold for so long, celebrating their .NET. And now they again celebrate as if they had discovered something new.
 
@Als "@Als is it a bad practice to manually allocate (new) and deallocate (delete) memory?"
 
C++-related stuff, streaming for free, starting tomorrow.
 
Xeo
7:54 PM
@EtiennedeMartel Did it start already?
 
@Als No I didn't :D
 
Als
@MooingDuck And did you see my answer to his/her Question?
 
@Xeo Feeds said Herb said it starts tomorrow.
 
Xeo
I remember @FredO saying something about today
 
@RMartinhoFernandes And Herb is always right.
 
7:55 PM
@Als nope. I tabbed in, saw a question, and answered it.
 
1 hour ago, by Feeds
posted on February 01, 2012 by Herb Sutter

GoingNative 2012 is a global live C++11-fest with unlimited free worldwide attendance – both live and on demand. The goal is to make it interactive, and we’ve asked the speakers to reserve time at the ends of their talks for questions. Tweet questions to #ch9live or #GoingNative and we’ll try and get them asked. To [...]

 
Als
11 mins ago, by Als
210
Q: In C++, why should `new` be used as little as possible?

BitgardenI stumbled upon the Stack Overflow question Memory leak with std::string when using std::list?. One of the first posters says: Stop using new so much. I can't see any reason you used new anywhere you did. You can create objects by value in C++ and it's one of the huge advantages to us...

Anyhow, I don't know why are we discussing this.
 
@Als I was just wondering that too
 
Als
And it's too late for me already, I should go ZzZz
Calling it a day, See you folks around
Have a good day y'all.
 
Herb says it starts tomorrow 9:30AM US Pacific Time. God knows when that is.
 
Xeo
7:57 PM
See ya.
@RMartinhoFernandes I think 4:30 PM UTC
 
sbi
I really hate watching videos, or listening to podcasts about C++. I'd rather they'd take the time to sort through their thoughts and write an interesting article about them.
3
"anyone could read this information in 3 minutes, but let's make it a 48 minute audio file" -- podcasts
 
You mean, 16:30?
 
Xeo
@RMartinhoFernandes And you know, that sentence links to a world clock
 
sbi
@RMartinhoFernandes For you, add 8hrs.
 
@Xeo I know, but I like to bitch about this.
 
Xeo
7:59 PM
> Thursday, 2 February 2012, 17:30:00 UTC
 
> sigh, this answer is just going to grow and grow – Useless 2 mins ago
 
I dislike video tutorials. It always seems as if it would be much quicker to just read the damn thing.
However, I can't get enough of Bjarne's sexy accent.
4
 
Xeo
I can't get enough of STL. I really like that guy.
 
sbi
@EtiennedeMartel It's a Scandinavian accent, actually. He isn't from Sexon.
 
@Xeo Tomalak says he's dead.
 
sbi
8:02 PM
@Xeo You perverts!
 
Xeo
@RMartinhoFernandes The fuck?
 
sbi
@RMartinhoFernandes What?
 
What the shit?
 
STL is dead. Nowadays we have the standard library.
Geez.
 
8:02 PM
Ah.
 
@RMartinhoFernandes oh right, that
 
@sbi Are you kidding? I love watching C++ gurus talk. The most recent Stroustrup talk I have is from 2009 or something, and tomorrow, he's gonna deliver they keynote.
 
Xeo
Tomalak's an idiot going on and on about that STL vs stdlib debate.
 
@Xeo not an idiot, just... OCD or something
 
@Xeo I know. I was trying to make a joke, but it failed terribly. Can't rely on meatbags for anything.
 
8:03 PM
Your humor circuits must be fried.
 
@RMartinhoFernandes come now, we invented humor
 
Ugh, videos explaining programming things.
 
@Xeo He's a repwhore, as well.
 
@Xeo STL vs. litb, now that is something I'd be looking forward to!
 
Xeo
lol
 
8:04 PM
The STL would probably implode.
 
sbi
@FredOverflow But you don't have a family. For me, watching a 45mins video is just a waste of time when I could skim an article with the same content in about 20mins. My free time is little, and I have to divide it across a lot of interests.
 
You could sacrifice 30 minutes of sleep.
 
sbi
@RMartinhoFernandes You can rely on meatbags for the activity that should not be named unless we want to invoke @Tony.
Damn.
 
Or create time.
 
Xeo
@sbi Always call him @TonyThePervert. That doesn't plink him
(I think)
 
8:06 PM
@sbi You mean Sexon's main hobby?
 
Xeo
@FredOverflow Or watch the video in a negative amount of time.
 
@sbi Oh, right, that's why we have the Internet.
 
@sbi how does it know which Tony to plink? There's 115 perfect matches on SO!
 
It's easy: the one that frequents this room.
 
That guy.
 
sbi
8:08 PM
@FredOverflow Not after I have already sacrificed 2hrs to do the laundry, done some bureaucracy, read politics on spiegel.de, and read a dozen pages in my current book.
 
the Tony is #117 in the results for "Tony"
 
sbi
@MooingDuck It would be a problem if more than one had been in this room recently. (You cannot plink a random SO user here.)
 
@RMartinhoFernandes is SO smart enough for that?
 
Etienne de Martel, you live in SD?
 
@sbi I think you might have to rethink your priorities.
 
8:09 PM
@sbi interesting
 
@szielenski Sherbrooke, Quebec, Canada.
 
Oh ok.
 
sbi
@EtiennedeMartel You mean I should have listed reading my book first? You got a point, there.
 
Xeo
@MooingDuck I thought there were only 115 perfect matches?
 
@sbi Well, laundry isn't that important.
 
8:10 PM
@Xeo "Tony The Lion" is not a perfect match for "Tony".
 
@szielenski What's SD?
 
A type of memory card.
 
Xeo
Oh, right. He has those extra words
 
@Xeo Yeah, "TonyTheSomething" != "Tony"
 
@RMartinhoFernandes Ha.
 
8:11 PM
0
Q: Build 32 and 64 bit libraries for boost at sametime?

PopcornKingWill the option "--address-model=32,64" build both 32 and 64 libraries or do you have to do two separate builds?

 
Xeo
The fuck?
 
@sbi What are you reading?
 
Your question!
 
sbi
@EtiennedeMartel Not when you're on your own. But remember, I have many kids. That's a lot of laundry to do. If I ever get behind for only a few days, it piles so high in my bedroom I have trouble to find my bed at night. And in the morning I have trouble finding fresh shirts for everyone.
 
Set fire to the clothes. Then buy new ones.
Capitalism!
 
8:12 PM
They should make disposable clothing.
 
sbi
@FredOverflow Currently I'm reading Frank Herbert's Dune.
 
Oh, that's awesome.
 
public class Clothing : IDisposable { ... }
 
@sbi No way, that's in my current queue.
 
@sbi Oh, I really should read that.
 
sbi
8:13 PM
@EtiennedeMartel You know, unfortunately I have found out that doing the laundry is still easier than shitting money.
 
@RMartinhoFernandes it already is disposable
 
Yeah, you should all read that!
 
@sbi you just haven't got the trick of it then yet
 
@MooingDuck What ingredients do I have to eat in order to shit money?
 
Cyanide. You'll shit money for the rest of your life.
 
8:14 PM
@FredOverflow well there's a lot of technique involved too
 
@RMartinhoFernandes Said life will be quite short, however.
 
@EtiennedeMartel irrelevant!
 
sbi
@FredOverflow It's been sitting in my shelf since November or December and just wound up at the top of the list now. I have been on a kind of quest to read SF classics for a few months now.
 
@EtiennedeMartel The ends justify the means!
 
@MooingDuck Well, I actually like being alive. And most of my friends are alive, so it would be quite lonely if I was dead.
 
sbi
8:15 PM
@RMartinhoFernandes It doesn't justify a mean end, though.
 
@EtiennedeMartel Don't worry, there are lots of dead people.
 
sbi
@MooingDuck I freely admit that. As soon as you let me in on the secret, I can stop bothering about the laundry.
 
@EtiennedeMartel oh c'mon, lots of neat people are dead! Turing did it! And Babbage!
 
And it's easier to make more dead people than it is to make more living people.
 
@sbi I got Steve Job's biography for Christmas. I still need to start reading the damn thing. Battlefield 3 eats too much time.
 
Xeo
8:16 PM
Damn. Someone take all that delicious sour stuff away. My tongue's hurting. :'(
 
sbi
@RMartinhoFernandes You might need to replace your empathy module.
 
Xeo
 
@MooingDuck Yeah, but they did all those cool things before their death.
 
sbi
@RMartinhoFernandes Actually, that's wrong. I think we currently have more living people than we ever had dead ones. ICBWT.
 
@sbi That's not what I said.
 
Xeo
8:17 PM
@sbi Oh, we're only a red button click away from reversing that situation.
 
I was going to say that initially, but doubt crept in and I went for a safer assertion.
 
@Xeo I don't think that's a good thing.
 
sbi
@EtiennedeMartel I wouldn't touch it with a ten foot pole. I resent anything that's hyped.
 
Xeo
Still, it's a fact.
 
8:18 PM
@sbi You mean BF3?
 
@sbi resent?
 
sbi
@RMartinhoFernandes I know, but it implies that what you said is wrong.
 
It takes five minutes and nine months to make more living people. It takes a few seconds to make more dead people.
 
sbi
@sehe Indeed.
@EtiennedeMartel We were talking about books.
 
I was talking about books and BF3.
 
@sbi Actually, I think that's jsut a rumor, and I highly doubt it's truth
 
I bet you didn't see that one coming.
 
Yeah, that's pretty much the intersection of the two sets.
@RMartinhoFernandes Indeed, I wasn't.
 
@sbi I've been postponing reading Dune for over half a year now...
 
sbi
@RMartinhoFernandes August I of Saxony (aka August II of Poland) is said to have sired a three-digit number of children. Since he lived only a little more than 60 years, he must have found a way to be faster than 9 months/child. (Hint: Modern CPUs do the same.)
 
8:25 PM
But there's still a lot of latency.
 
Xeo
 
sbi
@RMartinhoFernandes I think it could be true. Humans didn't leave Africa until a 100-50k years ago, and when they did, there were only a couple 10 or 100k of them. I don't think we reached 7-digit numbers until the beginning of scripture, if not the medieval ages.
 
@sbi I think even pipelined, death is faster than new life
 
Xeo
New Remi video :D
 
sbi
@MooingDuck In theory you're right, in practice, however, people seem to fuck more than they die.
 
8:28 PM
@sbi snopes.com/science/stats/dead.asp and many other sites refute that there more people alive than dead and variations of.
 
@Xeo I think firing flashes at oncoming drivers like that is criminally irresponsible.
 
sbi
@MooingDuck Ah, thanks!
 
12
A: Do Americans use three times as much toilet paper as Europeans?

Oliver_CYes, the US population uses more toilet paper per capita than Western Europe. No, not three times more. From RISI: Per capita consumption of tissue (2007): The North American tissue market is comprised of: The US remains the largest single market because of its continue...

 
@sbi some sites claim more people alive than dead since the pyramids were built or since 1AD, but those are disputed.
 
sbi
@MooingDuck Yeah, the site you linked to said so.
 
Xeo
8:31 PM
@RMartinhoFernandes That's how Remi is.
 
Ok. I'm not sure if that makes me happy.
 
Xeo
That's it.
 
@Xeo nice 8^) C'est en faisant n'importe quoi qu'on devient n'importe qui
 
@Xeo that... he's a bad man
 
Xeo
@MooingDuck Am I a bad man too if I find that funny? :3
 
@Xeo I think the answer is yes, but I'm less sure :/
I find it amusing my second highest rated answer is about super low level details for a microcontroller I've never heard of. stackoverflow.com/questions/8981031/what-is-1ocie0a-in-c/…. "TIMSK0 is the Timer Interrupt Mask Register for enabling compare A interrupts" But I still have no idea what that means :(
 
Doesn't matter, had rep.
 
Xeo
9:03 PM
 
3
Q: use of typeid to make a comparison between derived classes

AleI have a vector of pointers to derived objects insert by the user (so I guess the correct term is "known only in runtime):: vector<Person *> vect; The derived classes are Male and Female. I want to make an iteration on the vector to select only the Female objects and call the copyconstru...

This must be one of the strangest designs I have encountered in a long time.
 
Yeah.
Because you know, inheritance.
 
A letter is a character, so why is there no Character base class and a Letter subclass? :)
2
 
Maybe he's just always copying the females… it's a way of life.
 
> insert a calling to the copy constructor in the default constructor of Female so every time the user creates one, automatically create the twin.
 
9:11 PM
@FredOverflow that design seems kinda common. They are similar in usage
 
wtf?
 
It's taxonomitis.
 
woman::woman() {females.push_back(*this);}
 
Wait, what?
@FredOverflow Infinite loop!
 
9:13 PM
@FredOverflow Can you make sense of that?
 
Wait, that's not an infinite loop.
But it's still weird.
 
@EtiennedeMartel nope, not quite
 
9:27 PM
oh god, now so will consume even more of my time.
(never noticed chat before, for some reason...)
 
@JasonCarreiro chat's great!
 
@RMartinhoFernandes The question is, where would that twin be stored?
 
@FredOverflow In a global twin-store. It's a terrible design, but so far still consistent.
 
Wait, men and women tend to display quite different behavior, don't they? Maybe distinct subclasses aren't such a bad idea after all? :)
 
9:40 PM
I'm surprised nobody has advised him to implement a virtual method get_sex().
 
> I don't like the first option in the case of many kind of derived classes.
Where "first option" is "use a flag", which is basically what you said.
But yeah, I mean, there's Male, Female and possibly Both or Transgendered. That's not that a lot.
 
Yes, but get_sex is humorous unto itself. And cleaner than a flag, as it doesn't require additional state.
 
Hello everyone
 
How do I scan for a whole line?
 
9:50 PM
std::getline.
 
How about in c?
 
Simple. Switch to C++. Then use std::getline.
 
Xeo
 
Lol
 
Seriously, erm, fgets.
 
9:52 PM
I was going to suggest an extern "C" based approach too :)
extern "C" char * my_getline() {
  std::string s;
  std::getline(std::cin, s);
  return strdup(s.c_str());
}
 
simple, just do python -c help(file.readline)
 
@awoodland Yeah, that works.
 
oops, wrong room. sorry.
 
Just don't forget to call free on the string once you're done with it.
 
user457812
O_o
 

« first day (473 days earlier)      last day (4467 days later) »