« first day (330 days earlier)      last day (4619 days later) » 

9:00 PM
@TonyTheLion Because an up cast can be decided statically.
 
For a downcast you can't be sure of what type the object is
pointing to *
An upcast you are sure that that is its base type, yeah?
 
If x is of type Derived& the compiler knows it is can cast to Base&.
 
@RMartinhoFernandes I thought Battlestar Galactica was great. Although not sure if it's really fair to classify it as sci-fi
 
but what if there is multiple bases?
 
i feel like im miles ahead of my classmates. however, when i come in here i feel like an idiot
 
9:01 PM
@TonyTheLion The compiler knows that it can cast to any of them.
 
Mmmn...good question..I think it is still valid
 
oh I see, but with a downcast, it can't just cast to any Derived
 
However, if x is of type Base&, the compiler cannot know if it's Derived1& or Derived2&.
 
Stargate is the best of them all
 
cpx
§ 3.10 In C++0x, it is mentioned about the lvalues and rvalues being on left and right hand side. But in C++03 there's isn't anything written about left and right side. hmm
 
9:02 PM
@jalf I have lots of recommendations for BSG. I'll have to watch it one day :)
 
lvalue simply means storage location yeah?
 
@RMartinhoFernandes but aren't you telling the compiler specifically, I want a static_cast<MyDerived1>(base); or have I got it wrong? I mean you do that even when using dynamic_cast ?
 
An lvalue cannot be moved. That's it.
 
what is it?
What do you mean moved?
 
9:03 PM
an lvalue is something which has a name and you can take it's address
 
In C++11 terminology, a glvalue means a storage location.
 
you can't for example take the address of a value like 42
 
which is a term we haven't introduced yet to make things even more confusing, but has basically the same meaning as "lvalue" of the olden days.
 
glvalue? Is different from lvalue how? What is that even?
 
@RMartinhoFernandes It's a great show, but not sure if it'll scratch your sci-fi itch much. I think it's interesting because the scifi stuff is really just the setting, rather than something that dictates the entire storyline
 
9:04 PM
so that's an rvalue
 
@TonyTheLion The difference between static_cast and dynamic_cast is on a question somewhere .
 
oh ok
 
ok so what is an lvalue..a memory location, a variable
 
The link I posted earlier explains it all.
8 mins ago, by R. Martinho Fernandes
http://www2.research.att.com/~bs/terminology.pdf
 
cpx
An lvalue expression can denote to an object or a function but it is not an object itself.
 
9:05 PM
it's just a genuinely good story in an intelligent show, which just so happens to take place on a group of spaceships. But it isn't really "about" sci-fi much.
 
@cpx so it is like a reference
 
sbi
@jalf The touchpad wasn't working when we tried to turn it one. After a few minutes the keyboard stopped working, too. He's going to turn it in to the shop he bought it on Tuesday. He says they also repair laptops. We'll see what comes out of it.
@Mahesh No. Should I have?
 
Trying to explain the value category system is like "who's on first" with 5 bases.
 
cpx
Yes you could say that but it actually not a reference.
 
Mmmn...I wonder if I'll ever get used to what is
 
9:08 PM
There are three kinds of values: 1) has identity and cannot be moved from; 2) has identity and can be moved from; and 3) does not have identity and can be moved from.
 
@sbi ah yeah, trying to fix it by drying it out was probably a long shot. But worth a try at least :)
 
1) is an lvalue.
2) is an xvalue.
3) is a prvalue.
A glvalue is either an lvalue or an xvalue. An rvalue is either an xvalue or a prvalue.
 
It scares me that I can remember what each of those categories mean
 
I would love to be scared to remember what they mean
 
then again, that section of the standard was unusually clearly written. It even had ascii art diagrams and stuff
 
9:10 PM
prvalue is pointer value?
 
sbi
@jalf Actually, it might even still be wet somewhere inside. I never got it fully open (I shied away from removing the display in order to fully open the case), so it's well possible some drops were still wreaking havoc. I hope it will be clear at the end of the week.
 
no, pure rvalue
 
Right...
 
the result of 2+2 is a pure rvalue
it's a rvalue in the traditional sense, basically
an xvalue is stuff like a rvalue reference
 
mmn..
so the xvalue can also store data?
 
9:12 PM
@LewsTherin Now you're getting it!
 
it's a value. A value contains data
the difference is in what you can do with it
 
i = has identity; m = can be moved from; I = no identity; M = can't be moved from.
 
@Potatoswatter so you were being sarcastic?
 
although "stores data" is a bit misleading. The expression 2+2 doesn't store any data
but its result is a value, and a value is a kind of data
 
but it returns data...
 
9:13 PM
@LewsTherin No. "xvalue stores data" is right, if you mean "has an identity" in terms of Stroustrup's diagram above.
 
@LewsTherin No, it evaluates to value. Nothing is "returned" or "stored" at that level
 
oh all these value things
confusing as FUCK
 
when you evaluate the code, it results in a result value. Where it is stored, or how it is returned, is a completely different matter
 
Oh yea... @TonyTheLion yeah :(
 
I only know the difference between lvalue and rvalue, and I don't care about the rest atm
 
9:14 PM
I know what rvalue is ... I think
 
Those are the iM and m nodes in the diagram above.
 
Something on the right side
and can go inside an rvalue
but rvalue :S
 
an rvalue is something which has no name and you cannot take the address of
like foo() is an rvalue
 
Personally, I find the i/i, m/M notation much easier to deal with than the names that were chosen.
 
@LewsTherin yeah, that's what it originally meant, and it's a good way to think of it, but it's no longer strictly true in all cases :)
 
9:15 PM
@JerryCoffin Yeah, me too. It's perfectly clear.
 
@TonyTheLion that isn't true all the time I think
an rvalue can also have an address?
 
not that I know of
 
@LewsTherin Yes, if it is an xvalue.
 
I mean
int a = 10 ;
int *b = &a
 
oh like an rvalue ref?
but an rvalue reference is an lvalue no?
 
9:17 PM
so "a" is an xvalue then
 
@TonyTheLion it's an xvalue, which is kind of in-between :)
 
@TonyTheLion no, only a glvalue.
 
it has identity and can be moved
 
@LewsTherin No, it can't be moved.
 
@jalf oh crap, another C++ ism
 
9:18 PM
Why not? By "moved" how do you mean?
 
so what is an rvalue ref, a glvalue or xvalue?
 
a GL-value is 3-dimensional and lives on your GPU :)
 
@TonyTheLion seriously, look it up in the standard. That part of it is surprisingly readable :)
they have a nice diagram and everything
 
I hate reading standards...so bloody hard to read
 
@jalf oh, ok
 
9:19 PM
It's at §3.10.
 
@RMartinhoFernandes what do you mean by "moved"
 
@LewsTherin It means that you don't take away the value of a and put it somewhere else.
Roughly.
 
:S
Sure I can...I can do this
int a = 10;
int b = a ;
 
that's copying a into b
 
@LewsTherin But you don't take away the value of a.
 
9:22 PM
not moving
 
@LewsTherin "moved" in this context simply means "transformed to an xvalue", such as by static_cast< T && >( value ).
 
So to actually take the value of a, leaving a empty..?
 
Yeah, that's the general idea.
In C++11 if you do std::vector<int> x; x = std::vector<int>{1,2,3,4,5}; you're creating a temporary vector that will be moved into x. The value will not be copied, but "stolen".
 
the lulz of C++, found in glvalues, xvalues, prvalues, lvalues and rvalues :)
 
However std::vector<int> x; std::vector<int> y{1,2,3,4,5}; x = y; will copy y into x, not move, because y is an lvalue (cannot be moved).
 
9:24 PM
Bloody ashes..you have to be a computer to remember that sutff
 
I guess using it enough, will get you to remember it
 
and understand it perhaps
 
that too :)
 
There's a function that transforms lvalues into xvalues: std::vector<int> x; std::vector<int> y{1,2,3,4,5}; x = std::move(y); This will move the value of y into x, leaving y in an unspecified state, because std::move(y) is an xvalue, and thus can be moved.
 
but part of understanding it, is having used it
 
9:26 PM
for the most part, the exact differences don't really matter
 
Is it used much?
If it can be avoided I'll gladly do so lol
 
if you implement a compiler, yes ;)
 
@jalf except when you answer a question on SO and pedants come along, that will downvote you, if you don't have it exactly right. :)
 
No chance of that happening ha ha
 
or if you need to really dig into exactly how some code is evaluated. But normally, no, it doesn't matter at all
 
9:27 PM
Well, you don't need to know what is an whatevervalue, but understanding moves is important.
 
and understanding move semantics, involves at least understanding lvalues and rvalues
cause it's based on that idea
 
A bit. They're related.
 
That is very right.....oh well, I will have to do that later
 
But you don't need to know the terminology.
It's best to use the i/I m/M notation for that.
 
No more notations!
 
9:28 PM
oh, but every text I've read on it, has used that terminology, which kinda makes it hard to ignore I find
 
@TonyTheLion yeah, but you don't need to understand every subcategory
 
not talking about subcategories, just lvalues and rvalues
 
The main gotcha I can think of is that named rvalue refs behave basically like lvalue refs
hence the need for std::move
 
I thought std::move was to convert an lvalue to an rvalue so it can be moved from
 
to an xvalue
an rvalue can't be moved from right?
 
9:30 PM
to a prvalue, isn't it?
don't confuse me ;)
 
@jalf Except at initialization, in which case they behave like no reference at all unless an xvalue is used as the source.
 
@jalf No! std::move doesn't remove identity.
 
now we're having a massive confusion all together
 
It makes rvalues.
 
9:31 PM
xD
 
Which can be either xvalues or prvalues.
 
I will make my own value
 
svalue
 
@RMartinhoFernandes but what kind? It returns a prvalue, doesn't it?
anyway, sleepytime for me
 
9:32 PM
lvalue = lion value :)
it's basically like me
 
Why is it that in a class you can't create normal objects anyways?
it has to be a pointer?
or a reference
 
@jalf You can do &std::move(y) can't you?
 
@LewsTherin you can create normal objects
 
@TonyTheLion So an lvalue is a GRRRvalue?
 
@TonyTheLion lol...or it could be lews value
 
9:33 PM
class obj { private: myotherobject other;};
 
@RMartinhoFernandes Mmmaybe. ;)
 
perfectly valid!
 
Maybe not...
 
@TonyTheLion I dunno..doesnt work for me
 
@LewsTherin show me
 
9:33 PM
Oh yeah sorry...works, typo :(
type typo :(
 
@Potatoswatter yea basically :P
@LewsTherin :P
 
@jalf My understand it that the result of a call to std::move is a prvalue if you pass a prvalue, and an xvalue if you pass a glvalue, i.e., it only messes with the m/M part.
Why you would pass a prvalue to std::move is beyond me.
 
@sbi Not that you should. Just asked :)
 
Not as esoteric as a const xvalue, which can still be moved as long as that doesn't involve changing it.
 
I'm getting "no appropriate default constructor" why? :S
 
9:38 PM
myotherobject doesn't have a default constructor?
 
probably cause your object is not default constructable
 
I feel bored and planning to watch a thriller movie. Any suggestions ?
 
You probably want to initialize it in the constructor.
 
oh man, home alone, is just alone, innit
 
Ok I had to create a default constructor..
 
9:40 PM
so damn quiet
 
oh yeah that's why
I had a constructor that takes 2 parameters..so the compiler won't call a default constructor when I just did private: Dog a ;
 
Woo, I can pass arbitrary dot strings to Google Charts and it draws them!
 
link didn't work
 
Should work now.
Martinho 1 - 0 Markdown.
:P
 
cool xD
 
9:44 PM
woah, that is cool :P
 
Indeed ;)
 
Yeah, dot syntax for graphs is neat.
 
Was it me or the Thor movie was damn short?
 
Never watched it.
 
@Mahesh try The Way Back..not thriller but you will be lucky to find a good movie out there
@RMartinhoFernandes was actually good
 
9:49 PM
I wish Boost would know better and supply fwd headers for its libraries.
Right now boost::gregorian::date in particular. I have a class that has a date member, and it hogs my compile time so painfully I want to kill myself. With boost::date_time not even a pimpl can help.
 
Last movie I watched was Sunshine. I'm not sure how I got convinced to watch it. Crappy premise, but I managed to suspend my disbelief enough to start enjoying it. Until the final act ruined everything again :(
 
Has good rating..might as well try it..like I have a choice anyways :(
Pandorum was good...who can guess why?
 
@LewsTherin - I will put it on my list. I have started Oldboy. Thanks
 
np..and enjoy :)
 
10:04 PM
What's funny?
 
lol Homer rules
somewhere stuff just happened
@RMartinhoFernandes I finally got the cannon thing to shoot right
but the weird thing is..i didn't have to subtract -90
maybe because atan2 returns radians in normal degrees...hence the reason why I didn't have to do a -90
 
If I told a jerk what I think...I probably won't get to live life
 
lol
How many of those things do you do?
 
10:13 PM
I spend all my cash
 
Sing out loud...in private
 
I lol
I do tell a jerk what I think
I don't date atm, so I don't do that
 
Really? Why are you still alive?
 
10:14 PM
Jerk != psychopath.
 
you bot, you counted the bloody things
 
user457812
Pfft, apologies are for pansies.
 
COUNT ALL THE THINGS
 
@TonyTheLion I can't help it :(
 
now you made me laugh :P
 
10:15 PM
Mmmn...maybe you are right
 
user457812
One time I laughed so hard that I had the hiccups for 12 hours
 
Yay....canon shoots correctly now
 
> American Charles Osborne had the hiccups for 68 years, from 1922 to 1990, and was entered in the Guinness World Records as the man with the longest attack of hiccups.
 
@nil lucky it didn't stay forever...some are unfortunate...
 
user457812
Eventually I threw up, tore my esophagus, and then hiccups stopped.
 
10:16 PM
@nil That's peanuts to Charles Osborne.
 
user457812
I was spitting up blood for a few days afterward.
 
Bloody hell
 
user457812
So what's the lesson? Laughter kills.
 
You are alive
maybe causes pain more like it
 
user457812
You can't prove that.
 
10:17 PM
No, he's a zombie now.
 
user457812
I could be dead and communicating from beyond the grave for all you know!
 
oh dang, I just got goosebumps
 
user457812
Is it bad that I want whatever was in that guy's wallet?
 
10:19 PM
Yes, it is.
 
user457812
Well, that sucks. 'Cause I don't even have what was in his wallet. :(
 
The problem is whencit is rotating...it lags a few pixels behind..but I am getting there
Is collision detection hard?
 
user457812
I'm just baffled by your font size now
 
10:21 PM
With simple shapes like that it's relatively easy.
 
Font size?
@TonyTheLion xD
 
@TonyTheLion I like the function call style :)
 
user457812
In VS.
 
Oh yeah..I'm blind as a bat...but I don't really want to strain my eyes
 
user457812
10:24 PM
Fair enough
 
@TonyTheLion Makes it clear that was made by a geek and not a random.
 
@nil :O where ya from?
 
user457812
Let's see, which book of Bukowski's poetry should I read..
 
user457812
The US
 
@RMartinhoFernandes lol yea
 
user457812
10:25 PM
Bumfuck, ID is the nonspecific location, currently Boise if you want specifics for some reason.
 
@RMartinhoFernandes funny how many people think putting on a glasses makes you a geek rofl
 
user457812
Putting on glasses makes me look smart, so I like 'em
 
Mmmn....probably why there is a sudden increase of people wearing them lol
Damn specsavers using hot models
 
user457812
Maybe, but I also dislike contacts.
 
Yikes, contacts are horrible
 
10:27 PM
Why?
 
Did it a trial on it...and the damn yoke just kept falling out
 
until my eyes were streaming rivers
 
@TonyTheLion Now the real question is: did he succeed in jumping over the table?
 
user457812
I just dislike contacts because putting anything on my eyes bothers me
 
user457812
10:29 PM
So, mostly just a psychological issue, I'd think
 
For me it was the pain...girls are apparently good at using it
 
I got used to contacts, even though they refused to stay in my eyes.
 
@RMartinhoFernandes donno
 
Then one day a hair got stuck under the lens.
 
I'm gonna need glasses, and I hate the thought of glasses
 
10:30 PM
@Potatoswatter Ouch.
 
I think you could get some sort of disease conjunctivitis or some other crap out there
 
I once got a loose eyelash stuck in my eye. It was horrible.
 
so I just quit using it..
 
My hairs are pretty long. I can't remember the details now, but I ended up with more than a foot of hair slid completely behind my eye.
 
behind your eye?
 
10:31 PM
I assume that's about the size of a human foot.
 
I sat in front of the mirror for like an hour and darted my eye back and forth until it reappeared.
 
Great, now I'm gonna be sick
 
Right, about 30 cm. Then I scratched at my eyeball until I could get the hair off the surface and pulled the whole damn thing out.
 
user457812
I'm glad you've reinforced my dislike of contacts
 
10:32 PM
including your eye ?
 
LOL, why not :vD
 
Ever considered selling your story to Hollywood?
 
So you are one-eyed? Cool!
 
user457812
Oddly enough, I don't think have your eye pop out of the socket is likely to be that big of a deal medically
 
user457812
10:33 PM
Psychologically, though, you are going to have nightmares for the rest of your life
 
He can be a pirate
 
@nil Actually it is. And you're not supposed to try to put it back in.
 
user457812
Interesting
 
Or other people would have nightmares
 
user457812
10:34 PM
I'd see a doctor before attempting to do a thing with it
 
user457812
I'd be trying to call 911 and screaming at them
 
Seriously, that did happen to me. I think the reason the whole hair worked its way back there was that I'd learned to ignore minor irritation.
 
Well, you should've called an Uchiha
they're pretty good with this eye stuff
 
What's that?
 
Sasuke, Itachi Uchiha?
Damn, you don't watch Naruto :(
 
10:35 PM
You're talking gibberish to me.
 
Oh man...odd
 
user457812
I got it, but I would never admit to getting it
 
user457812
Well, aside from now.
 
I mean at least one programmer in a forum should've watched or heard of Naruto
it is popular
 
user457812
10:36 PM
But, this might be interesting: an article on what happens when your eyeball decides to pop out of your skull: slate.com/id/2137959
 
Ouch, poor bastard
 
user457812
Indeed, though his eye survived
 
@LewsTherin Well, I don't have time to watch everything under the sky. I still haven't caught up with all the classics.
 
Dude there is always time...just don't sleep
I'm an example :P
 
10:38 PM
Dunno, but I'm sure I've read that there can be complications from just pushing it back in.
You're supposed to bandage your head with cloth so it's not hanging, and get to the hospital.
 
@Potatoswatter Like dirt, maybe.
 
Good thing you are supposed to bandage it
imagine frightening the wits out of an old lady or some poor kid :(
Jesus, I can even see the image...why are we talking about hanging eyeballs ?
 
@LewsTherin You suggested it.
8 mins ago, by Lews Therin
including your eye ?
:)
 
ah yeah...lol
 
> Sow the wind, reap the whirlwind.
 
10:42 PM
@Potatoswatter you could be madeye
 
user457812
I think you're supposed to also keep the eyelids open so it's not clamped down on the thingy holding the eyeball in your skull whose name I already forgot
 
@RMartinhoFernandes good quote
 
user457812
Basically, take any possible stress off the eyeball, I guess
 
user457812
Hm, I'm bored.. time to go read the SCP foundation
 
Going to read? wow
bye then
 
10:47 PM
What? Reading is cool.
 
user457812
I never leave the internet
 
internetz = life
 
@RMartinhoFernandes I concur
But it depends on what you are reading
@nil same here
 
user457812
Actually, scratch that, I'll go grab some Bukowski books from the library
 
I'm going to read up on coll detect
later dudes..night
 

« first day (330 days earlier)      last day (4619 days later) »