« first day (646 days earlier)      last day (4310 days later) » 

7:00 PM
I just realized I "fixed" a newbie's question to a state where the error listed and title of the question didn't actually relate to his problem. Whoops. :( I feel really bad. He's got three downvotes now...
 
Also, I need to rewire the power switches etc.
 
@DomagojPandža I used to run a computer with no case sitting out in the open on my desk. Never had overheating problems.
 
@Ell :)
 
@MooingDuck O! let me see so i can downvote it too! :P
 
I am actually thinking about a shoe box. Reasons of style!
 
Ell
7:01 PM
@Steve why if it isn't steve, from the c# room?
 
@Drise if you dust it, it's fine. Probably better without the case actually.
 
@Ell lol maybeee
 
@Drise Actually, I only bought the Radeon because of the DVI output, my mainboard sadly just has VGA. But to be perfectly honest, the VGA quality was more than good enough for me.
 
Hey, why do you have a shoe bo -- Woah, it's a quad core, 8GB of RAM, 200 GB toy server of awesomeness!
 
@MooingDuck rollback
 
7:02 PM
@FredOverflow Meh, VGA. It doesn't boad well with A 40" tv.
 
@Drise I know, I expected total suckage, but the video quality was just fine. No flicker or anything.
 
@LucDanton @FredOverflow @MooingDuck @R.MartinhoFernandes

Ok so now only a few compile errors.. And this is where we stand:
http://pastebin.com/ptfBE390

Again, thank you for the help...
@MooingDuck Really? I assumed the case was good to get airflow through the components?
 
@JimNorton how does building a wall improve airflow?
 
@JimNorton You forgot to qualify SetSurface with CairoImage::
 
7:04 PM
@JimNorton I feel like m_cr ought to be a unique_ptr, but I'm not sure...
 
@JimNorton The case inhibits air flow in certain cases.
 
THE FUCKING MOON
 
@JimNorton In theory, it could be. From what I've seen, in reality it only rarely is though.
 
ahahahahah
 
@FredOverflow Oh crickey!
 
7:04 PM
Jesus Christ in a chicken basket
 
@MooingDuck It's a work in progress :)
 
I'm fucking dying over here.
 
Ell
gint?
 
@DomagojPandža Are you a vampire or something?
 
@JimNorton also, pass classes by const T& wherever possible. Don't need to be making copies everywhere (SetSurface)
 
7:05 PM
@MooingDuck Because with the fans it forces air to pass through the case over the components.. without a case you get little airflow, if any.
 
Don't.
Pass classes as makes sense.
 
@FredOverflow I'm on the fucking moon.
 
@JimNorton so leave the fans, just remove the case itself
 
"Prefer by ref" or "prefer by value" are silly rules for the lazy of mind.
 
@R.MartinhoFernandes well, sure, but in most cases I find I need ref.
 
Ell
7:09 PM
@R.MartinhoFernandes so what should you do, by default, or when it doesn't matter?
 
@MooingDuck Does little good -- without cowling of some sort, a lot of the air will flow from the front of the fan right back around the back. The idea of cowling is to force the air to actually go through the heatsink fins. Long before computers, aircraft started doing it during WWII. WWI planes mostly had the engine out in the open, with fins exposed. By the end of WWII, they were all surrounded by cowls to improve cooling (and overall aerodynamics)
 
@Ell why wouldn't it matter?
 
It's hammers vs screwdrivers again.
 
Ell
@R.MartinhoFernandes I don't know o.O Multiplying two members of an object?
`int multiply(Obj a) {return a.one * a.two;}` vs `int multiple(Obj& a) {return a.one * a.two;}`
 
That's not multiplying, silly.
 
Ell
7:11 PM
oops :L
 
@LucDanton Or, perhaps, "how well will a screwdriver work as a chisel if you hammer on the back?"
 
Attach a hammer to the backside of the screwdriver.
You can grip on the big T shape for extra torque.
 
So now here is the modification and new compile errors: http://pastebin.com/MRMcHxC3

Please let me know what I can do to repay you guys for taking so much time to help me out...
 
Ell
That reminds me of that emac thing
 
7:13 PM
Chat moar.
 
@CatPlusPlus ?
 
The Cat wants to be entertained moar*.
 
Yes. Chat, chat, chat.
I'm the lord of chat and I command you to chat.
3
 
@DomagojPandža Maybe my sister can send him a ball of yarn.
 
@CatPlusPlus Cat, cat, cat.
 
7:14 PM
So how about Penn State penalties?
 
lol
 
Ell
@JimNorton I think you should check for nulls in the ctor, some cairo functions return null on error I think
 
I'm thinking about setting up my own instance of EtherPad.
So I don't have to look for it every time dammit.
 
@Ell Yes, when I get the basic stuff working, I will add error checking
 
Ell
Right okay :)
 
7:15 PM
Authing with SO would be nice.
 
@JimNorton You first used reset when SetSurface was accepting a cairo_surface_t*. Now that it's an std::unique_ptr, change to m_surface = std::move(s).
 
Ell
"I'll do it tomorrow" ;)
 
@JimNorton $$$
 
@MooingDuck Paypal?
@LucDanton thank you :-)
 
@JerryCoffin oh, ok
 
7:17 PM
@Ell No really... :-)
 
@JimNorton The only currency us noble stack overflowers accept is rep ;)
 
Ell
@JimNorton haha of course :)
@FredOverflow I beg to differ :P
 
@LucDanton or m_surface.swap(s);
 
Ok, rep it is then.
Is it .swap or move?
 
both work
 
7:18 PM
which is better in this case? swap or move?
 
Hey, you could also send us stack over flowers. Get it? :)
@JimNorton doesn't matter, I would use swap
 
Ell
haha
 
@JimNorton Overall both approaches have the same semantics.
 
We come now to interrupt your scheduled programming chatting to bring you:
 
@JimNorton Swap is defined in terms of move semantics
 
7:19 PM
 
@DomagojPandža certainly not the member swap
 
@Drise Live? That's like 2 or 3 weeks old.
 
Well, the general one, of course.
 
Note that that's 'overall'. That doesn't mean that a swap operation alone is the same as move assignment. There's more going on.
 
@JerryCoffin Oh, it is? Damn.
 
7:20 PM
@DomagojPandža I wouldn't use that here. I would say x.swap(y);
 
@FredOverflow Yes, of course, I'm not recommending anything right now, just some general info. Trying to hook up the power switches to the naked mobo.
 
In any case if you do want to use swap then the canonical approach is to do using std::swap; swap(x, y); (where x and y are placeholders).
 
Probably missed the gist of the discussion.
 
@JimNorton I don't know much about the cairo library, but it seems the surface and context objects are very much tied to each other (since the latter is obtained via the former). In that case, when someone calls SetSurfacedon't you want to update the context member also?
 
Oh, wow.
Looks so damn delicious.
 
7:22 PM
@Drise From 9 July, to be exact.
 
@Prætorian Not in every case.
 
@JimNorton Also, what if I call SetContext without a matching SetSurface call? Is that OK>
 
I was considering giving you an example, but caps and multiple question marks? I'll skip. — DeadMG 6 secs ago
 
@JerryCoffin I removed live therefore I am exempt from your accusations.
 
@DeadMG Gangsta.
 
7:24 PM
@DeadMG Oh you.
 
@Drise "exempy"? And I make no accusations.
 
@JerryCoffin I don't know what you are talking about.
 
@Prætorian I believe so yes.
 
@Prætorian What.
 
Dat qwerty.
 
7:25 PM
@CatPlusPlus Nevermind, I thought @Drise posted that
 
@CatPlusPlus Ha, almost as dickish as you.
 
@DeadMG Don't you know that it's the Summer of Love!?!
 
@JimNorton Ok, lastly, why a raw pointer for the context? Wouldn't that benefit from being a unique_pointer as well?
 
@EtiennedeMartel puppy and cat combined would overload even my vagina ship™ (courtesy of Etienne) with their dickishness.
 
7:27 PM
Ok new results: http://pastebin.com/kS9x3W5C

When I'm done I'm going to have to study this so I actually understand what is happening.
@Prætorian Yes, when I get the current version working, I will using unique_pointer for m_cr as well
I just want to get it working with one member variable first
 
21
Q: What should I do if a user posts sensitive information as part of a question or answer?

tombull89I've noticed recently there has been at least two incidents of users posting a lot of detailed sensitive information, from the guy the edited a post to replace it with his CV (which I would say is an interesting way of getting your name known) to the ServerFault user that posted a question with w...

Laugh at them for being stupid.
 
There is something so sexy about C++ code. Damn. Especially when coupled with the Consolas font.
When I first saw it in Visual Studio 2010, I jizzed in my repo.
 
@JimNorton Either do using std::swap; swap(m_surface, s); or do m_surface = std::move(s);. But std::swap and std::move simply aren't interchangeable.
 
@DomagojPandža For sexy, you really want Consuela instead of Consolas.
 
(That using declaration can be on its own line of course, that's a restriction of writing inline code in chat.)
 
7:29 PM
@CatPlusPlus, douchebag extraordinaire.
 
@LucDanton ok :-)
@LucDanton @MooingDuck @FredOverflow @R.MartinhoFernandes

Current state of affairs: http://pastebin.com/km8yn5Fe

Modified SetSurface to use m_surface = std::move(s); and now I get new errors. :-(
 
@JimNorton Did you #include <utility>?
 
in the header yes.
 
@JimNorton So, how are you enjoying C++ land so far?
 
7:35 PM
@JimNorton Use surface_type also in the parameter list of SetSurface. Right now you have a type mismatch between the argument and the member m_surface.
 
dinner finished - back to chatting
 
@TonyTheLion As our illustrious incremented cat would say...
Sup.
 
@DomagojPandža Well, I've jumped into the deep end a bit early... but I'm enjoying it.
After this works, I will need to study to understand what it does... the folks here are basically writing/modifying what I had before and I really don't understand all of it.
 
Ell
@JimNorton which parts don't you understand?
 
the sky is always up
 
7:37 PM
@JimNorton I think you'll be better for it.
 
@Ell All of the unique_ptr stuff and some of the syntax... but I'll get it figured out.
@keith.layne agreed/
So then this line would be changed to look like??
void CairoImage::SetSurface( std::unique_ptr<cairo_surface_t> s )
 
Ell
@JimNorton all of the unique_ptr stuff?
 
@Ell Yes.
 
@JimNorton You want SetSurfe(surface_type s); because std::unique_ptr<cairo_surface_t> uses the wrong deleter.
 
My name should really be Tony The Frustrated Lion
 
7:39 PM
is there a make_weak?
 
@TonyTheLion Why?
 
@keith.layne you wouldn't want to tell a boxer that
@JimNorton cause I'm frustrated, I'm always in pain
 
@TonyTheLion Splinter in your paw?
 
bit more than that, my paws are so permanently damaged, there's no doctor that can heal them, and make the pain go away
 
@FredOverflow So then both .hpp and .cpp need that change I assume?
 
7:41 PM
of course
 
@TonyTheLion Oh lord that sounds bad. What happened?
 
born with club feet, were straightened out surgically with 5 different surgeries, but now the cartilage between my ankle joints is mostly gone, so you get bone to bone friction when walking, standing, moving
 
@JimNorton No. Remember how you changed m_surface to have type surface_type rather than std::unique_ptr<cairo_surface_t>? You want to make that change as well for the parameter of SetSurface.
 
also, it's been messed with so much, it's very damaged and wear and tear that's unusual from strange deformations
entirely meh
 
@TonyTheLion Eww -- that does sound nasty.
 
7:43 PM
You want to make that change everywhere because the type std::unique_ptr<cairo_surface_t> doesn't make any sense; it has the wrong deleter.
 
@JerryCoffin may sounds nasty, but it's fairly painful, I can assure you
it makes for a frustrated lion
 
@TonyTheLion Yes, that's pretty much what I meant. Probably a bit beyond normal pain, into the range of being fairly debilitating.
 
@LucDanton Ok I did that and now getting more errors around the same spot... link coming...
 
@JerryCoffin yea, pretty much. I have garnered the skill of keeping a straight face even during the most agonizing times. Not sure if that's a good thing or not.
 
7:48 PM
@LucDanton Here is the current state of things: pastebin.com/2bxcMg3G
 
@TonyTheLion I find it hard to think of it as a good thing, that's for sure.
 
@JimNorton Missing the return type.
 
@TonyTheLion Oh sorry to hear that. Can you get some sort of "ankle" replacement surgery?
@Drise Lol! That's awesome!
 
@JimNorton nope, my ankles are too fucked up to put any replacement in
 
@TonyTheLion :-(
 
7:50 PM
@JimNorton You commented out the void by accident.
 
@FredOverflow Oh gawd.
 
How long have you been working on this now? Maybe it's time for a little coffee break.
 
@FredOverflow Been working on it four 5 hours.. need a break... But hey! It works now!!! THank you so very much!
 
"Programo ergo sum"

"I program therefore I am"
 
How come this is ambiguous? ideone.com/ovNqX ? I'm using std::move to explicitly convert c to an rvalue
 
7:53 PM
Now I need to go over it and make sure I understand it... Because my colleague who is going to integrate it into his larger C++ application will have questions.
So if it is noble and right, I will hand out some rep to those who helped me out? I will go through and upvote on answers and questions where I learned something... so I won't just serial upvote...
 
@ManofOneWay You cannot overload on A and A&&. Just get rid of the A&& version.
 
@ManofOneWay A and A&& are equally good match for such an rvalue. It's customary to either provide two reference overloads, one A const& and one A&&, or just one A overload (that usually make use of copy-and-swap).
4
 
Is this actually ok code in C?
 
@FredOverflow Wouldn't void foo(A); void foo(A&&) &&; work?
 
@JimNorton Better to put it into a question (or more than one), let them post answers, and upvote their answers. If you want to do more than that, add some bounties so the accepted answer(s) will get as much more as you thin they should.
 
7:56 PM
minus the missing free
 
@chris Returning a pointer to automatic storage is never okay.
 
I don't actually know what value restricting does so probably not.
 
@chris no, you're returning a pointer to a local in f
 
@JimNorton It may not be entirely appropriate. One goal of the rep is to make a good question or answer more visible so it can help others better. If you upvote an answer which has nothing to do with the help you received today, that's no good.
 
Oh crap, it is too.
 
7:56 PM
@CatPlusPlus I don't know, you'd have to try.
 
and returning a ** is meh
 
@CatPlusPlus Can't overload members with different 'kinds' of ref-qualifiers: either all of the overloads have no ref-qualifiers, or they all have.
 
@LucDanton Really? Didn't know that.
 
But isn't there are difference between the two operators? If I can pass it as an rvalue I don't have to make a copy of it at all. If I use the A& operator = (A a) it will force me to make a copy?
 
This should fix that, right? ideone.com/dPLd9
 
7:58 PM
@ManofOneWay No, pass by value means move if you provide an rvalue.
 
And C has no better way of returning a 2D array that isn't just a 1D array that I know of, so :/
 
9
A: C++11: Do move semantics get involved for pass by value?

FredOverflow"Pass by value" can mean either copy or move; if the argument is an lvalue, the copy constructor is invoked. If the argument is an rvalue, the move constructor is invoked. You don't have to do anything special involving rvalue references to get move semantics with pass by value. I dig deeper int...

 
@FredOverflow Oh really? Does it happen implicitly you mean?
 
@LucDanton Ok. Well, I want to somehow pay your all back for the help... somehow... I've never been helped so much at a site before....
 
@chris Why are you using C?
 
7:59 PM
@FredOverflow That one is a candidate.
 
A question came up about it
 

« first day (646 days earlier)      last day (4310 days later) »