« first day (104 days earlier)      last day (4827 days later) » 

4:07 PM
Oh man, so much incorrectness. I had to downvote almost everyone.
 
what question?
 
3
Q: Accessing parent's protected variables

TimI couldn't think of a better wording for the title, so it is a little misleading, however, I am not talking about a child accessing its variables inherited from its parent, which is easy enough. What I am talking about is this: class Parent { protected: Parent *target; int hp; } cl...

@DeadMG The original question asker understands the point but many other answerers seemed to not.
 
that's pretty terrible
 
@CharlesBailey bad answers. but it's interesting that member pointers can do this without casting. if johannes were here he could provide link to his comp.std.c++ posting about that (of course, if I were here I could provide link to my own earlier postings about that)
 
actually
why does that even happen?
it seems to me that access should be based purely on type- that is, if you are a Parent and you make a variable protected, then all Child instances can access your protected variables
 
4:19 PM
@AlfPSteinbach: You mean something like this? stackoverflow.com/questions/3364722/…
 
@DeadMg. oh. it's to prevent simple inadvertent hacking by deriving from base class of X and then access base class state of instance of X.
@CharlesBailey huh, i didn't see that, is it the same question?
 
@AlfPSteinbach You have to resort to elaborate hacking by deriving from base class of X and using pointers-to-members.
No, I linked to it in a comment but it's a different question.
 
@CharlesBailey i think @DeadMG asked why rules are as they are (requiring the hacking)
 
@Alf: But why is that illegal?
Any class author can use private if they don't want to grant access
 
@DeadMG just as I said. if I derive AlfsClass from Base, and it uses protected state from Base, then don't want DeadMG class to derive from Base and change Base state of an AlfsClass instance, possibly breaking my assumptions (class invariant)
You can always work around it. It's there to prevent inadvertent mishaps only.
 
4:38 PM
How do you lose one point of rep?
 
if you're expecting the base class's members to hold the derived class's invariants, you're doing it wrong
 
Oh, I downvoted. OK.
 
the base class members should only hold the base class invariants
 
@AlfPSteinbach I'm usually a lot freer with my downvotes if my reputation isn't a multiple of 5. I don't have any OCD tendencies, though.
 
@DeadMG yeah, ideally. the rules are there to protect those who are not so cognizant of this.
@CharlesBailey hah! :-) but i think all people are more or less OCD about something. like, i don't like to write paragraphs with an even number of sentences.
 
4:41 PM
0
A: Accessing parent's protected variables

XaadeThis is so easy (meaning the apparent misunderstanding of the OP, is because people aren't taking the time to read the OP). You simply make the child a friend of the parent's variable that you need to access. Or, you can make the child a friend of the parent class. That way any child has acces...

Go give that a look. I think I understands the OP better than others.
 
@Xaade Generally it's not a good idea to have a base class give friendship to a derived class... it makes it harder to derive other classes from the base class.
 
Yes.
 
it's common misunderstanding, that when something can be explained in general terms, anything similar that you can express in general terms must be possible
 
Well, the only other option is to only allow other people to use an interface to the parent, and using that interface to represent public methods and variables. Otherwise, there is no known solution to his problem.
Not Withstanding the fact that his solution is bad to begin with.
 
@Xaade see discussion just a litlle earlier in chat
 
4:45 PM
@sbi "Concurrency" could also be translated as "Mitläufertum" ;-)
 
hm, and then we have liebfraumilch white wine
what's a liebfrau, by the way?
 
@Alf I don't see a resolution in the chat that is a good idea.
 
@Xaade: What compiler did you test your code with?
 
@Charles You can't do what I did?
What did I break?
 
sbi
@FredOverflow Leo doesn't know of that one, though: dict.leo.org/?lp=ende&search=Concurrency
 
4:48 PM
@Alf better yet. NO resolution would be a good idea.
 
@sbi By that logic, most C++ bashing should come from programmers who have no experience with C++ whatsoever. Oh wait...
 
@Xaade i didn't say it was a good idea. just wanted you to note that your "the only other option" is not quite correct, and that there are many known solutions. including one not mentioned here yet, a simple downcast, if type is actually derived's own.
 
sbi
@FredOverflow Haha!
 
downcast wouldn't work because everyone's forgetting that target could be a different instance than the instance of child.
 
@Xaade sorry, that's bull. instances have nothing to do with it. types have.
 
sbi
4:49 PM
@AlfPSteinbach That's a contraction of "liebe Frau", meaning "nice/good woman".
 
So if I have instance A, and send it a pointer to instance B, instance A automatically has access to everything in instance B?
 
so, it's milk from nice/good woman. :-) he. reminds of the irish reaction to dogs+ladies calendar :-)
no i won't paste that picture here. it's ok. it was just a puppy apparently suckling a woman's breast
@Xaade if same type, yes
 
Does anybody know how easy it is to pick up C# as a developer with some experience of (say) C++, Java, python, perl, C ?
 
@Alf hmm.... I've been misunderstanding that for a long time.
IMO that seems so...... wrong. I mean, how do you keep data private from other instances?
 
@CharlesBailey There's nothing earth-shattering new in C# compared with Java, except the functional stuff, of course, which is quite fun.
 
4:55 PM
I mean, it allows you to write copy constructors, and I thought that was the only place that worked, but still...... any class Person can affect other Person's "height" if they have a pointer to another Person. That seems to break OO.
 
@FredOverflow You mean there's a whole lot of disfunctional bits?
 
If you already know how to program and just want to pick up C#, you want this book:
 
@Xaade practically, i don't think you can. :-( instances have to trust their own kind.
 
@CharlesBailey OOP is often quite "dysfunctional", yes :)
(When applied to the wrong problems.)
I just realized something: I haven't used inheritance in quite a while.
Templates FTW!
 
@FredOverflow that amazon logo looks like a smiling snork.
 
4:58 PM
@CharlesBailey It was pretty easy for me to pick up C# from C++. However, in C# there's a lot of language support for things that to me places the language syntax all over the place. So whereas you can do anything in C# out of the box, you may not know how to save yourself time using the language supported stuff.
 
C# has a nice lambda syntax.
Here is an example from MSDN:
(int x, string s) => s.Length > x
 
@FredOverflow If that does what I assume it does that makes sense.
Are precedence rules not too surprising?
 
C# seems to jump out of its own mold to acquire language support for some pretty confusing things, but those shortcuts save a lot of time.
 
@CharlesBailey Dunno, I'm not a C# expert.
 
@FredOverflow Not to worry, I have a couple of books on the way.
I should be an competent in a couple of decades, I should think.
 
5:00 PM
Here is a more practical example from MSDN:
int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };
int oddNumbers = numbers.Count(n => n % 2 == 1);
Although I'm pretty sure that should be n % 2 != 0 instead.
 
@FredOverflow it's the same, if remainder for negative numbers is well-defined. is it?
 
@Fred Does this read as (n WHERE n MOD 2 equivalent 1)?
 
@AlfPSteinbach You get negative results for negative inputs. At least that's the way in Java.
 
Python's different, though. So ... C#?
 
@Xaade Well, I suppose you can read it like that... but I like to think of lambdas as function literals. A function that takes an n and delivers the result on the right side of the "rocket operarator" => ;-)
@AlfPSteinbach I don't have a C# compiler on my machine ATM :)
 
5:04 PM
@Fred Where does N come from?
 
@Xaade n is the parameter of the lambda, to the left of the =>.
 
sbi
@JamesMcNellis See what you did:
 
In lambda calculus, I believe n would be called a bound variable. (Right?)
@sbi That's disgusting. Please remove.
 
now i'm shocked. just because of a delete. can you remove pic please?
@sbi please remove pic
 
sbi
@CharlesBailey I did it. It's quite easy. The things you don't know right away (Lambda, LINQ) are actually fun to learn.
 
5:07 PM
LINQ looks interesting.
 
lol a dead kitten
 
sbi
@AlfPSteinbach I'm sorry, but I can't anymore. You'll have to flag it, if you want to get rid of it.
 
@Fred I'm sorry. Where was n declared, and what does n contain. How does Array.Count(arg) work. I'm not understanding how n gets set.
 
sbi
Wow, a message that got both a star and a flag.
 
@AlfPSteinbach According to MSDN.aspx), the % operator does indeed yield negative results for negative inputs.
 
5:08 PM
@FredOverflow As it should
 
i've starred it
 
> are STL Containers .push_back() naughty
 
Next time get a pic of a kitten PLAYING dead.
 
What a great title :)
 
now it's a flag with a star. haha
 
5:09 PM
@JohannesSchaublitb Now all we need is stripes...
 
sbi
@JohannesSchaublitb Who else would do such a thing? :)
 
@JohannesSchaublitb can you please stop that. first comment was funny. not this shit.
 
@Alf please clarify yourself. what comment was funny and what comment was shit?
 
@JohannesSchaublitb lol comment was funny. starring was shit.
 
Just make pic scroll into archive.........
hurry.....
now
 
5:11 PM
@JohannesSchaublitb it's strangled cat in case you don't see it
 
i starred it because that kitten died for our sin. it was a good kitten. it deserves the worship
 
The more you reference it, the more posts I have to flag.
 
sbi
Honestly, I'm not sure why you are so offended. (And I have buried a kitten weeping, mind you.) It's a dead animal. Whenever I am in a car on the road (rarely ever, I don't drive), I see lots of them near the road, and there's no flagging.
 
@sbi but this one was strangled by some sicko, using a wire
 
sbi
Can we now please stop the silly flagging wars? Are you aware that the whole of SO chat is seeing these silly flags and are urged to look at them?
 
5:13 PM
Yes, very annoying. Do we have meta-flags?
 
@sbi i flagged the starred thing
 
Change of topic.
How's the weather.
 
sbi
@AlfPSteinbach If that's true, then you know more about its history than I do. I can't infer this from the pic.
 
killall cat
 
@sbi our visual systems don't work the same then. t'was the first i saw
 
sbi
5:15 PM
@AlfPSteinbach FWIW, I starred it because I considered it silly to flag message.
And another useless flag. WILL YOU PLEASE STOP TO ANNOY THE WHOLE OF SO CHAT?
 
@sbi it's not me
 
ok lets talk about c++
 
@sbi: As a moderator, can't you just capture the flags?
2
 
sbi
@AlfPSteinbach Well, of course you wouldn't flag your own message.
 
5:16 PM
@sbi do you want them to stop TO ANNOY.... or stop annoying.
 
sbi
@FredOverflow This isn't Quake, you know.
@Xaade How about stopping annoyingly?
 
Was Quake written in C++?
 
Quake was writ in blood. The blood of my enemays!!!
 
@sbi Xaade has been flagging my messages? Jeez. Kids on the block.
 
@Xaade ManOwaR fan?
 
sbi
5:18 PM
@FredOverflow Probably in "C/C++".
 
The jellyfish?
 
@JohannesSchaublitb that means, "delete", yes?
 
@Xaade No, these guys:
 
@AlfPSteinbach The convo had devolved. There's no reason to archive that crap.
 
I'm outta here. :-)
 
sbi
5:19 PM
@AlfPSteinbach Again I'm confused by your ability to infer.
@FredOverflow Uh, and you guys said "ick!" because of a dead kitten!
 
No, I said ick because people were beginning to find torturing an animal funny, rather than the image itself.
 
what means "delete"?
 
At least me and Alf felt that way.
 
sbi
@FredOverflow BTW, there's no moderators in the chat, only room owners. (I meant to add what privileges room owners have, but I just saw that you are an owner, too.)
 
the death of that animal gives life to other animals.
 
5:21 PM
6 hours ago, by sbi
Every time you write delete, a kitten dies.
 
@JohannesSchaublitb So does rape.
 
@JohannesSchaublitb In C++0x, delete can be used to stop the compiler from providing default versions of special members functions. But I guess you already knew that ;)
@sbi I don't believe in the concept of ownership. As Homer Simpson once said: "Jede Form von Besitz ist flüchtig."
Anyway, what can I do as an owner of this room? :)
 
sbi
@Xaade It was @James who killed a dozen kittens in one message, just for fun. I only meant to confront him with the consequences. :)
 
So, why escape from inheritance?
 
sbi
@FredOverflow Goto chat.stackoverflow.com/rooms/info/10/loungec and find out. But please be careful. One thing you can do is damage. (I remember the time I setup a new feed, and that Feed guy dumped several dozen of messages on us within 2mins, practically drowning us.)
 
5:26 PM
How do you become an owner?
 
@sbi Be careful which hand does feed!
 
sbi
@FredOverflow An owner makes you an owner.
 
room topic changed to Lounge<C++>: Home of sbi's gang of whippersnappers
 
i was surprised that i'm an owner. i dunno who made me one
 
5:27 PM
lol
 
sbi
@Xaade His name is Feed, not Feeder. <pavlov> Feedest </pavlov>
 
@JohannesSchaublitb Same here. I just looked at the room info and discovered I was one.
 
I discovered I was not.
Amazed?
 
@Xaade As I have never seen you here before, no.
 
@FredOverflow LIES! j/k
 
5:30 PM
Did we meet?
 
sbi
@FredO, @Johannes, @Charles This room was created by one who disappeared, so a new C++ room was setup by others. A mod stepped in objecting to two C++ rooms. He transferred ownership to those who had created the new room (which then was left to die). Since then it is somewhat of a room policy to make regulars into owners, to prevent this from happening again.
3
@FredOverflow I have.
 
@sbi Sounds like a passage from the bible...
 
sbi
@FredOverflow I said be careful!
 
@sbi ;)
 
sbi
@FredOverflow Yeah, it's ancient history to you young 'uns.
 
5:31 PM
lol
 
> Thou shalt no dwell in separate C++ rooms!
 
@sbi In the tech world..... it happened more than 1000 ns ago... that's ancient.
 
I believe roger or gman was one the original owner
 
sbi
Note that I was told this room's genesis myself, as I wasn't there. I only joined later.
@JohannesSchaublitb These were among them when I came.
 
gman housed in ##c++ for a short period of time. i think one or two weeks
 
5:35 PM
@JohannesSchaublitb I visited ##c++ once. Then I reimaged the machine and never reinstalled an IRC client on it.
 
@AlfPSteinbach BTW i just sent a reply to a message that was crossposted to comp.lang.c++.moderated, comp.lang.c++ and comp.std.c++ . but my reply hasn't appeared anywhere
what could have caused that?
 
@JamesMcNellis Opera has IRC built-in.
 
i thought it should appear on comp.lang.c++ immediately, since that one isn't moderated?
 
I'm pretty sure firefox has a plugin.
 
@James oh i remember
it'S called chatzilla
 
5:36 PM
Sind Kokosnüsse eigentlich gesund?
 
sbi
Anyway, as owners please keep up place tidy by adding new regulars (and removing those gone). I'd rather have a few to many owners than one to few, but please be careful. (It must have been one of the regulars who unpinned Roger's and my messages the other day.)
Opps, where's Roger's message?
 
@FredOverflow i think coconuts are healthy
 
sbi
<sigh/>
 
ohh where is it gone. someone removed it again. bah
 
All I did was change the title, I swear.
 
5:38 PM
lol i didn't remove it either
 
I didn't unstar it.
 
this is no good
 
It was the lampstand in the kitchen.
 
apparently sbi left out of frustration
i can understand him lol
imho it should be recorded who removed starred messages
 
What did the message say, anyway?
 
5:40 PM
let's try to reinstate it
hm doesn't work.
0
Q: Please show who pinned or unpinned a message

Johannes Schaub - litbSometimes it happens that an owner that wants to troll the channel unpins an important message from a chat list. It happened 2 times in total now, for the C++ Channel. This is frustrating, because an owner that previously pinned a message can't pin it again, apparently. Please show who unpinne...

 
5:59 PM
damn
I am feeling so much better today
 
I have some bad news, @DeadMG: I don't think you are going to be the next Stack Overflow moderator.
 
meh
 
@DeadMG: not sure if I voted correctly. I just used upvote on your presentation?
 
@JamesMcNellis Isn't that good news? (Considering how offensive everyone seems to get towards moderators and candidates I can only see not being one as being a good thing.)
 
@JohannesSchaublitb Can take up to a day before someone processes it. The groups crossposted to should be OK. Other groups means -> bitbucket, not accepted.
 
6:08 PM
@JohannesSchaublitb No -- if you cross-post to a moderated newsgroup, it gets turned into email to the moderator(s). It'll only appear in the un-moderated newsgroups when/if the moderator(s) release it for posting.
 
@AlfPSteinbach hmm, comp.lang.c++ isn't moderated so there shouldn't be any rejection. maybe he message was lost somewhere in teh server chaos
ohh
does it depend on the order of the news-group in the "To:" header?
 
@JohannesSchaublitb it's not in queue so someone's evidently taken it already
 
6:30 PM
is looks like the New York Times is spamming Twitter #egypt with requests for photos. shame on them! some years ago they also made FireFox' BugMeNot not work, IIRC.
 
6:52 PM
@JamesMcNellis Holy ** did he lose rep for those downvotes?
 
7:04 PM
Hum... What do you think about this?
5
Q: Ambiguous definition of operator() with multiple inheritance

mattia.penatiI compile this code with GCC (4.2.1 Apple build 5664) #include <cstddef> using std::size_t; template <char I> struct index { }; struct a { void operator()(size_t const &) { } }; struct b { template <char I> void operator()(index<I> const &) { } }; ...

clang can compile OP's code, but GCC cannot, and the way I proposed to fix that seems kind of weak, after thinking about it...
 
 
1 hour later…
sbi
8:32 PM
0
A: Please show who pinned or unpinned a message

balphaI haven't checked the specific issue, but be aware that pins are auto-removed after 14 days, because we found this feature to be abused too much. If you feel so strongly about a particular message, why don't you just post it again and pin the new one?

"...be aware that pins are auto-removed after 14 days..."
@Johannes You there?
 
@sbi LOL :)
Where do we get our scapegoat now?
 
sbi
@FredOverflow Well, since I shouted at people for no reason when that happened the other day, it should probably be me.
Anyway, that wouldn't explain the unpinning of Roger's message today, but I think we can put this down as an accident. Probably one which, whoever this happened to, didn't even realize.
 
8:54 PM
@sbi yeah
 
sbi
@JohannesSchaublitb That's somewhat of a meager statement, actually. :-x
 
that's BS
those newbie hints have been up there for eternity
no way they're removed every 14 days
 
@sbi ohh they are removed automatically
interesting. hmm
i feel guilty now for having accused the system of trolling
 
sbi
@DeadMG Actually, that message is from two months ago. (Although there was an earlier, less informing message there before that.) And I keep updating those hint whenever I run into something new that I consider worthwhile. (Credit to @FredN who came up with the bookmark idea that allows this.)
@JohannesSchaublitb Haha!
 
room topic changed to Lounge<C++>: Home of whippersnappers
I object to being owned :P
 
sbi
9:07 PM
@DeadMG (Fine with me, in case there was any doubt. :))
On a somewhat lighter note (well, at least for a few of us): Have you noticed that a quarter of the people currently in the room (it was a third until a few minutes ago) and a third of the room owners are Germans? I'd like to think that this is the reason why this room is so active. :)
 
It has been discussed extensively
never been so proud to be Britishâ„¢ :P
 
sbi
Um, I just see that this "lighter note" now can appear as it was connected to @DeadMG's issue. Of course, I didn't intent this...
@DeadMG Ha, and with you, @Alf, and @Tony we probably have more right-pondians here than left-pondians! <smug_look/>
 
uh, right-pondians and left-pondians?
 
room topic changed to Lounge<C++>: Where do you want to goto day?
 
is that like big-endian and little-endian?
 
9:13 PM
Anybody get the goto joke?
 
yes
it's just not terribly funny
 
room topic changed to Lounge<C++>: Where garbage collection dies of starvation
3
 
sbi
Oi! We already had a flagging war today!
We don't need a tag line war atop of that!
 
@DeadMG Hm, I can't top that from the top of my head.
 
9:15 PM
but I didn't get to participate! :(
 
Ha ha ha ha ha! Well, I guessed we figured out who the troll was!
 
what, Jeff? :P
 
sbi
@DeadMG balpha! (With that exclamation mark it sounds like barking.)
 
woof woof?
 
That is good to know, though. I was starting to wonder which idiot was deleting those posts...
 
sbi
9:21 PM
@DeadMG That sounds like one of those small, cute, friendly couch cushions. Balpha! sounds more like a mastiff.
 
uh
 
sbi
@JamesMcNellis We can now all stop looking suspiciously at each other.
2
 
where is balpha!?
 
oic
 
sbi
9:23 PM
I could probably throw a stone at him while going home in the U-Bahn later. :)
 
@sbi Be careful. He might send his unicorn army after you.
 
sbi
@JamesMcNellis Ha! Like any true wizard, he's got no power outside of his own realm.
Oh, look, these mandalas have a real names: identicons.
 
that's pretty interesting
 
wow, that xRobot guy has a weird background...
the most downvoted question of SO and a load of funny questions...
 
lol
 
sbi
9:33 PM
@peoro Who??
 
@sbi OP of "How RealVNC works ?", xRobot:
 
haha
I earned the Nice Question badge, finally
guess what question for
the good old What's wrong with Const question
 
sbi
@peoro Wow. Looking at this guys records: ~250 questions, most of them abysmally poor and/or off-topic, not a single answer, but >1.5k rep - this guy can edit tag wikis!
 
@sbi yup! isn't that nice?
 
sbi
@DeadMG Ah, that one. Had a hard time finding it. Well, who'd have thought? At least you got a lot of heat for it. :)
http://apple.stackexchange.com/ launches with a beautiful UI even mac fan boys can love
@peoro I was about to flag him, but I didn't knwo what for. :(
 
9:48 PM
lol
 
@sbi not sure... Anyway I think he's already been flagged plenty times due to the "send 100k mails" question.
 
don't understand why that was so downvoted
seems like a perfectly legitimate question
 
@DeadMG well, I don't think a blogger with 100k subscribers needs to send emails weekly and doesn't know how to
it smells like a camouflage for a "how to spam" question
 
it sure smells like it
but you haven't verified that it is
 
sbi
@DeadMG You'd think those upvoted comments would give you a clue...
@peoro Actually, given his track record, it smells more like troll bait.
 
9:59 PM
@sbi hum, I don't know... it looks like he's following some logic: his last three questions are "How RealVNC works ?", "Simplest way to make screenshots with C++" and "How to create a remote viewer for a games LAN party ?"
maybe he gave up about spamming and is now looking for a way to re-invent some sort of remote desktop in C++...
 
yeah
maybe :D
 
who cares... I don't think he needs to be moderated unless starts abusing his powers...
 
10:22 PM
i like the app.se gui too
 
10:34 PM
@peoro Hmm... I have avatar jealousy. Mine always look like blobs
Can I get a new one?
 
@Xaade What has that to do with me? :-P
anyway default avatars are generated using your email's md5... look for a better avatar and use it instead of your current one!
 
md5?
@peoro Doesn't have anything to do with you!!! I linked the post.
 
10:54 PM
@peoro I have a better theory. He didn't give up on spamming, but his keylogger isn't giving him enough money. He probably wants to capture screencasts and have full access to victims machines to retrieve passwords from bank systems or make transactions directly from them. Makes sense?
 
@jweyrich Or maybe a reasonable person has hijacked his account?
 
@Xaade looking at the line of his questions, I'm quite sure he wrote a keylogger/trojan to steal money.
 

« first day (104 days earlier)      last day (4827 days later) »