Conversation started Jul 23, 2012 at 20:51.
Jul 23, 2012 20:51
has anyone here ever had the disgracing experience of using a version control system called Serena Dimensions?
@sehe, it's for you.
@chris OP didn't understand my answer, and trusted the other more because it looked more like code he would write I guess.
@MooingDuck, Yeah, not too many people who ask those sort of questions do understand it, but they should take the time to learn when it gets that many upvotes.
@ManofOneWay Default behaviour is to swap via one copy and two successive assignments in C++03, and one move and two successive move assignments in C++11.
@chris I commented and described it, but he just didn't get it. (this question btw)
Jul 23, 2012 20:55
e.g. auto temp = std::move(first); first = std::move(second); second = std::move(temp);.
can I bombard this channel with haskell questions again (no one seems to be active in Haskell)
@Nils It was for sure an interesting movie. I enjoyed it.
@MooingDuck, Yes, I see. I already had it upvoted from before sometime.
@LucDanton I see, then I guess my code should work
Jul 23, 2012 20:56
:(
Do you get an error or does it fail in runtime?
@ManofOneWay oh wait, Visual Studio? Look at the warnings when you compile
@ManofOneWay the error is in the link
@nightcracker Haskell questions are fine as long as the Lounge is quiet, which is not the case now. Just invite us to the Haskell channel.
@MooingDuck Oh I didn't try it in ideone. I use clang 3.2 here
@FredOverflow: how?
@ManofOneWay unrelated: B::swap uses std::swap instead of A::swap to swap A objects.
Jul 23, 2012 20:57
Yeah, it's perfectly fine to come here and say "hey guys, anyone available to meet me in the Haskell room?"
@MooingDuck Oh hey. That was me.
    friend void swap(A &first, A &second) {
            using std::swap;
            swap(first.t_,second.t_); //uses correct swap function
            swap(first.size_, second.size_);
    }
@MooingDuck What doesn't work here is that you're trying to swap A<int> with B<int>.
@Drise no, I think you understood the code, it's just the OP
@MooingDuck I meant that was my answer. I still took a lot away from yours.
Jul 23, 2012 20:58
@LucDanton that's exactly what I'm telling Man of One Way, yes.
How come it calls the A::swap by saying using std::swap?
@nightcracker Just paste a link here or something, dunno :)
@MooingDuck Is that really relevant?
@ManofOneWay using std::swap is a fallback in case no specialized swap is available.
@ManofOneWay using std::swap means if you can't find a swap function, use std::swap as a fallback. But it should find ::A::swap. Technically the using line isn't needed there, I jsut put it there out of habit.
Jul 23, 2012 21:00
or just use boost::swap :)
But A::swap is private, so I guess it will not find it ?
Why on earth would you make swap private?
@ManofOneWay it's a global function, so there's no such thing as private
Also, you should have a global swap(x, y) that calls the member function x.swap(y)
I didn't consider the fact that it could be used by other classes :P
Jul 23, 2012 21:00
@ManofOneWay It's not private, it's not A::swap, and accessibility never affects lookup.
@ManofOneWay friend functions are put in the scope just outside the class
swap was the way to emulate move semantics before move semantics made it into C++11.
@FredOverflow he only has the global :D
@n2liquid Oh boy. Yes /cc @R.MartinhoFernandes
He has a private global??
Jul 23, 2012 21:01
Should I have it as a member function ?
@FredOverflow it's a friend function of a class in it's private section. Its easy to see the confusion there.
@FredOverflow At this point you could take a look at the code. There's nothing special going on lol.
@ManofOneWay no, the function is perfectly fine the way it is. Just remember that it's a global function, not a member of A, and that everyone can use it. Though I'd probably move it to the public side, to avoid confusion
Then maybe I should define it outside A just for clearness?
@ManofOneWay you could do that too, but it makes things slightly more complicated. You have to friend the function in the class first.
Jul 23, 2012 21:03
Ah yes
I'll make it public inside then instead
class B {
    friend void swap(B&, B&);
};
 void swap(B& lhs, B& rhs) {stuff;}
@ManofOneWay that's what I do
You can indeed define outside and not need to friend it, as it would instead call the member.
@LucDanton he'd have to add a member for that
@n2liquid I appreciate you let me be. I'm still recovering. And that is from just a pilot. We'll be using Serena fulltime from September onwards. I think I might call my head hunter
@MooingDuck Probably the least surprising interface when it comes to providing swap.
Jul 23, 2012 21:05
I have the feeling that on my (non-retina) Mac the the Menlo font looks less sharp in TextMate than in Xcode.
Can anybody confirm that?
@sehe dealing with it on a daily basis; codebase is 2.5MLOC of pure PHP sadness
Oh gawd. You're still alive?
@n2liquid Hah! I beat you! We're doing C# :)
I'm almost quitting >_>
Jul 23, 2012 21:06
How can I check if there are characters still in a stream?
dear god
@Drise: read from it :D
@LucDanton I agree, public member swap and global swap calling member is cleanest.
@n2liquid How does serena pan out for you? Practically, what are the top 2 most annoying limitations?
the thing takes 5 minutes to copy 2 files from one environment to the other for no apparent reason
Say NO to php!
I don't think that I have a problem with any other language.
Jul 23, 2012 21:07
@sehe limitations? I guess the first problem would be the speed
@MooingDuck Thanks for the help!
it can literally take hours to move code from one environment to the other
@LucDanton Thanks!
I can't choose a second biggest limitation, there are just so many
@n2liquid Ah, that was my top 1 peeve already. I only did a one month 'pilot' using it (and I went back to SourceSafe + git locally...) and I was appalled at (??) speed (??)
Jul 23, 2012 21:08
If this is using C++11 consider not providing a specialized swap operation at all. Maybe I should write about that, too.
@sehe they claim it's faster than SVN.. I wonder what kind of benchmark they did
oh yeah, second biggest issue would be limited number of licenses
quite frequently, I have to ask our internal mailing list to spare a license for it so I can use it
from there, it only goes downhill
@n2liquid Well, a random round of annoyances then? I'd say (a) flakey UI (b) horrendous wizard design (c) confusing checkmarks (d) restrictive workflow (e) hard to view diffs (f) extremely hard to cater for ignores (got to repeat the 'ignore' at every synch?)
@n2liquid Oh joy. They do know how to extort the money
@sehe what 'ignore' at every sync?
Quite literally I've had the synch wizard die on me more than once, I've had spurious errors at checkin make me go back to step one of that dreaded wizard and redo all my selections.
I haven't bumped into that; but it's got plenty of funny issue, such as inability to order search results by a given column because "the result set is too long", lol
@sehe haha, I haven't had that kind of problem yet; oh yeah, and branching is also a bliss ;)
Jul 23, 2012 21:12
I've had some silly confirmation dialog loop that popped up a message box with only an 'Ok' button... IN THE BACKGROUND ... so I had to use the mouse to click it to the foreground, then dismiss it. And the loop repeated for about 96 times. Then, it rejected my commit for lack of rights to delete 1 item. I had to start over.
@n2liquid Though they don't call it that, do they? They call it... streams?
@sehe in this version I'm using, it's called branch
I wonder if this is up-to-date, btw
@n2liquid When you compare local to base revision, you want to ignore things like temporarys, compiled files etc. I have yet to find a way to make the 'ignores' stick
version is 10.something
I wish all new people would separate the error line and point it out, along with the actual error, as well as an sscce: stackoverflow.com/questions/11620437/…
@sehe oh, I haven't done directory compares yet, I always do it per-file
Jul 23, 2012 21:15
@n2liquid Shit, I don't know the version number. I'm so bookmarking this conversation, though. I'll send it to my colleagues (I won't be in the office until 3 weeks from now myself - motivational mail is all I can manage) :)
So, I'd like some feedback on these ideas before I start writing teh codez. gist.io/3166256 // cc @DeadMG and anyone else interested in the Unicodez.
@n2liquid Foot in mouth
Also gist.io <3
@sehe bahaha :D
 
Conversation ended Jul 23, 2012 at 21:15.