« first day (2121 days earlier)      last day (2831 days later) » 

10:00 PM
yeah at least for me it doesn't tell you when the message is too long on top of everything else
it just doesn't send it
 
Even Nokias used to tell you how many characters you had left
 
user5378087
One week and I'm trying to understand rvalue references and value category... :(
 
@FernandoK. rvalue references are just l value references specialized in moving operations
that's it
 
What
 
@Shoe they refer to rvalues, and are used in move semantics
and that's about it
 
user5378087
10:16 PM
@ChemiCalChems yes, I understand your view, but wait, let me make my question. haha
 
@ChemiCalChems Shoe knows C++ you don't need to tell him
 
user5378087
In some examples, I realized that in a move constructor we need to destruct or "set to null" resources of the moved-from variable. Why do we need to do that? If I do it, will I destruct the resources of my move-to variable too?
 
I can't make two lambdas share the same state if they both capture by value the same variable.
 
@ChemiCalChems it's just that you're wrong
 
RIP.
 
10:22 PM
@FernandoK. the moved-from object remains an object, so the destructor will be called on it
 
@FernandoK. you set them to null after moving them to the move-to object
 
@ThePhD why not?
 
@jaggedSpire possibly
 
not possibly. rvalues aren't lvalues.
not modified lvalues, not weird lvalues.
 
@jaggedSpire I don't have any extra state space, or at least my system doesn't accept any.
 
10:23 PM
You don't "set to null" resources. You usually set to null pointer like objects
 
not lvalues
 
@jaggedSpire i know that
 
@ChemiCalChems then why did you say otherwise
 
user5378087
@milleniumbug what is the problem if I don't do that?
 
@Shoe which can be viewed as a special case of a generral resource
 
10:24 PM
@jaggedSpire because their only fucking use it to make move semantics possible, and their fucking name says what they refer to
 
for example, a neutral value for a file descriptor
 
@FernandoK. Depends on the context
 
@ScarletAmaranth I like Momokuri.
 
Possibilities likely include UB
 
@FernandoK. Depends on the invariants you provide in your class
 
10:25 PM
@StackedCrooked sore wa nani desu ka
 
std::unique_ptr for example calls the deleter on a non-null pointer
 
13 mins ago, by ChemiCalChems
@FernandoK. rvalue references are just l value references specialized in moving operations
 
@ScarletAmaranth It's a cheesy teen romance anime.
 
that doesn't change the part where you just told someone rvalue references are a special case of lvalue reference
 
so if it hadn't cleared the moved-from std::unique_ptr, then the deleter would be called twice on the same pointer
 
10:26 PM
@StackedCrooked oo, my favourite :P (if it's anything like Nodame Cantabile then I might take a look)
 
@jaggedSpire are rvalues == lvalues? no, and he knows that. the only difference is what they refer to and their use, which was described
 
@jaggedSpire well, fuck it, let's be explicit about everything
 
@ScarletAmaranth Hm. It's very different.
But I like it. So it can't be bad.
 
lvalues may be cast to rvalues to indicate they may be moved from. However, rvalue references are also used to refer to temporaries which is actually an important thing, and which your treatment of rvalues as special lvalues specifically ignores
 
10:28 PM
@ChemiCalChems not everything
 
@jaggedSpire i reiterate, i did not mean to treat rvalue references as special lvalue references, because they are not. the wording was off, excuse, now crucify me
 
shoe demonstrated confusion that you would explain rvalues in such a way, and then you explained it to him as though he didn't know what he was talking about
@ChemiCalChems thank you.
 
@jaggedSpire not at all, i was correcting my wording. that you did not want to understand it that way is not at all my fault
 
@ChemiCalChems my mistake then
 
@jaggedSpire no problem, we all make them, just like me earlier
 
10:32 PM
@ScarletAmaranth Also, "91 Days". It's about mafia during the prohibition. Not your typical anime, but it managed to suck me in.
 
@StackedCrooked I hate mafia-settings :) (except for nisekoi)
 
user5378087
Sorry for causing this entire discussion...
 
I'm not a fan either.
@ScarletAmaranth I miss Nisekoi :(
 
@StackedCrooked I haven't even seen S2 yet :)
 
@FernandoK. nah it's not your fault I was a drama-llama
 
10:33 PM
@ScarletAmaranth wow
 
@FernandoK. it's normal here
 
@ScarletAmaranth Btw, did you watch RE:Life? All episodes are available.
 
Ell
Guys
 
@Ell what
 
@Ell yeah?
 
user5378087
10:36 PM
And my native language isn't English, so I write slowly. I don't know a fucking verb that we can use to express a lot of time to do something
 
btw, first quantum gate at 99.9%+ fidelity created
look it up
 
Ell
Hi :3
 
Guys
 
Ell
@Nooble what?
 
@Ell Hi :3
 
10:38 PM
@Ell yo
and here I thought you were going to announce something untoward had happened to your copy of gentoo again :P
 
@StackedCrooked nope, what is it ^^?
 
Hello, Cruel World!
 
So we're talking about rvalue references
 
C++ruel
 
@ScarletAmaranth Another school romance.
 
10:41 PM
I'd like for everyone to hear about my C++ proposal called Ellvalue references.
 
@ScarletAmaranth For some reason crunchy roll decided to release all episodes at once. Many people marathoned it :P
 
It's basically T&&&.
They're like rvalue references, but they specialize in fixing kernels.
 
T&&& is actually T&, no?
 
@Nooble i see what you did there
 
When you apply reference collapsing rules?
 
10:42 PM
&&& would be better than confusing && we have now.
 
@EnnMichael he is trolling i think
 
@ChemiCalChems You know what? I think so too...
 
@StackedCrooked first time i saw that i thought wait if T** is a pointer to a pointer of T, T&& must be a reference to a reference of T. adding one & more...
 
user5378087
@ChemiCalChems why? I have another question, in a move assigment, the moved-from variable is transfered to moved-to with value and not address, right?
 
@FernandoK. you set things to null because you move the data, so you don't want any data in the old object
else, you'd just copy it
 
10:44 PM
@FernandoK. Right.
 
@FernandoK. and yes, it's moved by value, not address
 
@FernandoK. It actually depends.
@FernandoK. Moving buildin types makes no sense, it does nothing. But if you have your pimpl class, you could implement your move operators to just transfer ownership of the impl pointer, which would technically evalueate to transfering the address.
 
user5378087
@ChemiCalChems So the purpose is that the old variable couldn't be accessible.
 
user5378087
I mean...
 
@FernandoK. not necessarily, but you shouldn't have the data there, cause you moved it elsewhere
 
10:47 PM
@FernandoK. Yes and no. Again, it depends of the implementation. But it is assumed that the old value won't be used ever again in most cases.
You know that rvalues are temporares by default, right? (unless you explicitly std::move a non-temporary)?
 
user5378087
Thanks, but I need to read a little more about it...
 
user5378087
@EnnMichael yes
 
Thats why most classes assume that the rvalue woun't ever be used again - because it usually won't. It's usually a temporary.
Rvalu references and move sematics is more of an abstraction, in a way. Because, they do nothing for built in types. They are only used to a) provide increased speed with you own ( or tthe standard library ) classes when working with temporaries or b) provide speed when you try to assign/construct an object from another object that you will never use again - this is where you use std::move.
That is why, when you write rvalue constructors or assignment operators, you should assume that the object being assigned from may as well be unusable.
After the assignment/construction, that is.
 
er, you clearly don't know what the fuck you're talking about
 
@Puppy Sorry
 
10:54 PM
for simple instance, std::swap moves from an object and then promptly moves back into it.
 
@Puppy Where am I going wrong?
 
The Programmersā€™ Credo: we do these things not because they are easy, but because we thought they were going to be easy
3
 
Yeah sir but thats not what I was talking about
 
So guys I'm writing a book and I need someone to write a short introduction to it.
 
oh yeah and
 
10:55 PM
I need someone who specializes in perfect forewording.
 
did I mention all those move-only types like unique_ptr?
put that in your performance pipe and smoke it.
 
Dawg
I was just gonna say
 
@Nooble lol
 
Not in all cases
 
@Nooble oh you
 
10:55 PM
Cmon..
It is documented that unique_ptr stays usable
But when you move std::vector you move it for performance sake
 
I am the pun master.
 
"I'm sorry for spewing absolute crap; I was going to correct myself later"?
 
When you have a type that remains usable after being moved, it is well documented
Dude
 
@EnnMichael So... a vector of unique_ptr?
 
Thats an edge case
 
10:57 PM
@Nooble ā˜ž ( Ķ”° ĶœŹ– Ķ”° ) ā˜ž
 
it's the most fucking basic case.
or how about noexcept guarantees? some algorithms are only possible with noexcept moves.
 
well if you move a vector of unique_ptr, then the unique_ptrs don't give a shit about it
 
also
the Standard says that literally every type in the entire language is still usable after being moved.
so yeah, it's well documented, in the fuckin' standard.
one reason: you dumped it in here
so all I'm saying is
 
Okay. Here's your deal. You have a fucking idea that you're never wrong. You don't like to be straightforward about it, because then people will judge you. Realising you probably should swallow your pride when people truly are smarter than you, you try to find those who aren't and stick you filth right on them. And I ain't talking about you correcting me - sure, that was on point.
 
before lecturing other people on rvalues, references, moving, and the usages thereof, you might want to have the most basic understanding of the topic first
 
11:00 PM
Oh fuckkkkkk
 
daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaamn
 
If it gets worse, you can all count on me to take it to meta.
 
hehehehe
 
@Puppy Hey man.
 
is that all you got?
 
11:01 PM
on one hand puppy says "you're wrong" when you don't tell the whole picture, which I find controversial, on the other hand, you're clearly overreacting
 
@Puppy Yeah. Fuck you for being a jerk.
 
@milleniumbug i must agree
 
HE SAID FUCK YOU PUPPY ARE YOU JUST GONNA TAKE THAT
<3
 
> They are only used to a) provide increased speed with you own ( or tthe standard library ) classes when working with temporaries or b) provide speed when you try to assign/construct an object from another object that you will never use again - this is where you use std::move.
 
@EnnMichael over reacting is not necessary when you can plonk / ignore him
 
11:02 PM
this is clearly presented as the complete picture.
 
and it's a much better option i find
 
so when it's not the complete picture, it's wrong.
that's all there is to it.
there's nothing there that says "Oh by the way I also left out the infinite majority of the feature for lols; ask me more"
 
i'm learning a lot here
 
user5378087
@EnnMichael I got it. But let's suppose that I forget to "cleanup" my moved-from object. Does it remains a move? I read that in this case would be a copy, and I can't see why.
 
don't talk about stuff you don't know about at full
 
11:04 PM
@FernandoK. it really depends on what you are modelling
 
@FernandoK. The Standard requires that all operations that have no preconditions, including destruction, must remain valid on the moved-from object.
 
@FernandoK. because moving implies making the other object not hold the data anymore
 
otherwise you are free to leave it in whatever state you see fit.
a "move" that leaves the source value intact is a totally legitimate move.
 
@FernandoK. else, you'd just be copying the data over
 
or randomly changes it to some other valid value.
 
11:04 PM
@Puppy it is, but it's synonymous to a copy
 
@ChemiCalChems Yes, but that's ultimately completely irrelevant.
 
@Puppy isn't this what applies to standard library classes, not in general?
 
@Puppy i was adding onto your explanation
 
Ell
@jaggedSpire not today :P
 
@EnnMichael sure
 
11:05 PM
@milleniumbug No, it's mandatory for all types.
 
@Ell :P
 
Ell
I gotta sleep
 
it's not irrelevant based on his question
 
Ell
Guys
 
night Ell
 
Ell
11:05 PM
Night!
 
@Ell Night
 
although probably there's not much difference between telling "hey, all the ops I provide won't work on moved-from values"
 
destruction absolutely must be functional.
 
indeed
 
and basically everybody expects re-assignment.
beyond that you have more leeway about what you permit or don't
but typically it's considered less than good if moved-from is a special state that bans all other ops
 
11:07 PM
oh look flags
 
it just makes the program more awkward.
 
@Puppy sure, but that's a "what's wrong with you" issue, not "standard demands it"
 
@milleniumbug Well, strictly speaking, the Standard does demand that all ops without preconditions are permitted.
 
And fitting.
 
11:09 PM
look upon the field in which Mysticial grows his flags
and see that it is fruitful
 
it just doesn't prevent "not moved-from" from being a precondition ;p
 
@StackedCrooked why do so many anime begin with "RE"? does it mean something?
 
Must be Japanese Zeitgeist.
Re:Zero seems to be about "starting from zero". "Re-life" also suggests taking a new start.
Both are good shows though :P
Re:Zero turned out totally different than my first impression of it though.
 
user5378087
Thanks guys!
 
The Reinhard vs Elsa fight was neat.
Now it's like a totally different genre.
@Puppy I have some old code where I call .clear() on moved-from string/vector.
I wonder if I should replace that with assignment.
 
11:15 PM
totally legit, if most likely pointless.
clear() has no preconditions if memory serves
 
Well. I call clear() in order to be able to use the object again.
 
.clear() has no preconditions
but what about a random-joe-function
 
Saw this in an e-mail at work: Why do programmers always mix up Halloween and Christmas? Because Oct 31 = Dec 25.
 
did Joe documented the preconditions for it
 
@Puppy IIRC there might be some residue from small string optimization ..
 
11:16 PM
there are some odd things permitted of std::strings specially to allow that, if memory serves
but I'm pretty sure that this is not one of those times
if you want to set the moved-from object to a specific state, and empty is the state you want, clear() is totally fine.
SSO would not be special in not immediately clearing the source object - it's totally legal for any implementation to do that or not as they see fit in any case.
it's simply most likely that the implementation will clear it- it's certainly not guaranteed or dependable, SSO is just an example of one practical implementation case when they might not.
 
That's good to know.
 
@Borgleader I think this is the most ancient IT joke I have heard
 
@milleniumbug Really? First time I heard of it was like this week
 
it's exceedingly ancient.
it's somehow even older than your mother.
 
oh, you're one of the today's lucky 10000
carry on
 
11:22 PM
it has low impact for me anyway because I could not give the slightest shit about Halloween
 
@milleniumbug My favorite programming joke is: "Knock, knock." "Who's there?" very long pauseā€¦. "Java"
 
I think you dun fucked up your Markdown son
 
> "Knock, knock."
Is the point supposed to come before the end quote?
 
@StackedCrooked yeah, with the continuation jokes of "Knock, knock." "Who's there?" "C++" and "Knock knock. Assembler." "Who's there?"
 
It's like this for parenthesis iirc.
 
11:24 PM
I'm pretty sure the end quote should go after
but I always ignore this rule and treat the quotes as a nested subexpression that has no effect on the surrounding grammar
 
@StackedCrooked ISTR this is a contentious issue, but having the question mark or period outside feels so retarded
 
I do know that a closing ')' is supposed to come after the point. As weird as it may seem.
 
@milleniumbug You forgot "Knock knock. Assembler SEGFAULT"
 
hehehehehe
just add some garbage before
 
@milleniumbug For some reason that doesn't bother me. I see why it frustrates people. Yet I'm perfectly fine with it.
Like the "I could care less" debate. I like actually like that expression. Even if it's wrong.
 
11:31 PM
I think it's an Americanism
it offends me ;p
 
@StackedCrooked I'm easily irked with such trivialities
 
Me too. But that particular rule doesn't feel wrong to me.
Lol. I have no idea why.
Ah well.
Back to anime.
 
Xeo
@milleniumbug If it's just a quoted piece of text, then the period should be inside. But if I quote something as part of a larger sentence, I put the period "outside the quotes".
Because this looks weird to me, with it "inside the quotes."
 
yeah, if you add quoting of a single sentence it gets even funnier
 
@Xeo Heh. I think that is occupational disease, the urge for consistency. :)
 
11:37 PM
> Alice asks Bob "Do you feel lucky?".
 
11:58 PM
Alice cocks gun
 

« first day (2121 days earlier)      last day (2831 days later) »