« first day (619 days earlier)      last day (4327 days later) » 

4:00 PM
Someone posts a long answer and OP deletes question.
 
sbi
@FredOverflow I would.
@Mysticial Got my vote.
 
Under what circumstances would you?
 
sbi
@FredOverflow If I saw any reason to do so.
 
@sbi Interesting read, but he contradicts himself somewhat in the usual USA sense (I'm not through it yet, give me a minute...)
 
@sbi What possible reason would you need? They're just titties.
 
4:01 PM
@sbi there's 5-7 includes above it + 1 #define
 
sbi
@user1477622 Well, one of them is the likely culprit. Usually it's the last one before the error occurs.
 
Someone's writing Sokoban in Haskell, looks interesting at first glance
 
Is there some problem with putting #define before #include?
 
sbi
@FredOverflow Right. Why would I move them back? They're just titties, after all.
 
@sbi thx, just need one more...
 
4:02 PM
@sbi Okay, enough chit chat about titties.
 
@Mysticial how do you vote to undelete?
 
sbi
@Mysticial I don't have one left. :-/
 
@user1477622 You need 10k rep.
 
@Mysticial you need one more vote right?
 
sbi
@user1477622 You click on the "undelete" link. You need enough rep for that, though.
 
4:03 PM
Ah. nevermind then. I'm pretty new
 
@RMartinhoFernandes Do you know of some alternative that's better
 
Anyone else wanna cast that last undelete vote? I even reformatted the qeustion.
 
sbi
@FredOverflow Are you trying to invoke the lion?
 
@sbi It appears the lion sleeps tonight.
 
invoked :)
 
4:04 PM
@FredOverflow hey, I have that too, and I wouldn't be surprised it looks somewhat like the picture (on one side, really). Can't afford to stay home though. Not that I'd enjoy that, either. Eating is painful. Gladly, the days with a fever have gone, just head-aches at the end of the day, now
 
sbi
@FredOverflow Damn, how am I gonna get that song out of my head now?
@TonyTheLion Whoopsie!
 
@FredOverflow where does your logo come from again?
 
@sbi the line that caused the errors: #define _DEBUG 1
 
@bamboon official Haskell logo
 
@FredOverflow ah ok, I must have confused it with something else then
 
4:05 PM
@sehe I didn't mind the fever and the pain and all. Not being able to swallow without severe pain was the worst part by far.
 
@sbi that's complicated
 
sbi
@sehe ??
 
@FredOverflow hmm. swallowing is no real problem (except for the pain). It's probably due to the fact that it is on one side mostly
 
@bamboon It's an amalgam of >>= (the bind operator) and the greek letter lambda.
 
@sbi Just follow the links. I'm not the one hiding the messages
 
4:06 PM
@sehe Are you treating the illness with medication?
 
why move titties to bin
:This article is about the human breast. For other animals, see Udder and Mammary gland. :"Boobs" redirects here. For other uses, see Boob (disambiguation). :For other uses, see Breast (disambiguation) The breast is the upper ventral region of the torso of a primate, in left and right sides, which in a female contains the mammary gland that secretes milk used to feed infants. Both men and women develop breasts from the same embryological tissues. However, at puberty, female sex hormones, mainly estrogen, promote breast development, which does not occur in men, due to the higher amount o...
 
@FredOverflow No. Though I might have to, soon. I hate medication. I just trust it will subside, as it "always" does. Oh, I forgot the earpain. The earpain is the motivating factor to consider meds, since the earpain induces the head ache and sleeplessness
 
@FredOverflow well, I recognise the lambda, then I know nothing about Haskell
 
@FredOverflow I guess I will gurgle some salt water tonight
 
@CheersandhthAlf because they have been very very naughty and dirty :)
 
4:09 PM
@bamboon Well, it's not like Haskell invented the lambda calculus :)
 
@sehe I don't think that counts as medication :)
 
sbi
@sehe I still don't know what's complicated.
 
@sehe if tiities dirty, just wash them, i say
 
@FredOverflow right, but I am probably even less into lambda calculus than into Haskell ;)
 
4:10 PM
@bamboon So what are you into?
 
@FredOverflow all the good stuff
 
how was it church's definition of exponentiation worked again
 
Java , PHP
 
ofstream ofs("file.bin",ios::binary); ofs.write((const char*)data[i],sizeof(int));
 
so sweet :)
 
4:11 PM
.................
 
power = Lm.Ln.(m n);
it's like it goes by too fast, one doesn't really grok it
 
@bamboon You have a strange definition of "good stuff".
 
sbi
@CheersandhthAlf I dunno. I didn't do it. I just saw no reason to move them back.
 
@FredOverflow harhar, just kidding
 
sbi
@CheersandhthAlf Faulty referral.
 
4:13 PM
@FredOverflow poor cat!
 
It looks quite comfy to me...
 
^ Another cat.
 
sbi
@CheersandhthAlf Andy cat.
 
With an Drew.
 
Notice how the camera looks up to Koenig? :)
 
sbi
@FredOverflow Everybody should look up to him.
 
um... lol
Mac = get ripped off
 
sbi
@Mysticial Yeah, I saw that earlier today. Immediately sent a link of it to some Apple lovers among the people I know. :)
 
I used to love Macs as a kid... and then it went downhill fast.
 
Hey @sbi how are you?
 
4:19 PM
@NinjaTurtle what the, you have 105 rep, with 0 questions asked and 0 answers posted? Interesting...
 
@MooingDuck from edits
 
@MooingDuck Thank you, Do you have hands on open ssl?
 
@MooingDuck sounds like synching accounts between SE sites
 
@CheersandhthAlf No it is only possible if you have more than 100 reputation :)

PushNotificationConversation

18 mins ago, 13 minutes total – 60 messages, 7 users, 0 stars

Bookmarked 1 min ago by NinjaTurtle

If anyone has a knowledge of open ssl then please let me know :)
 
sbi
What the fuck? Someone comes in here who has never asked or answered a single question, let alone about C++, made all his rep by doing edits to others' answers, plus a stupid "I was first!" tag edit, and asks me how I am. What am I here, that people would do this to me, an ape in a zoo?
 
4:23 PM
nine  = ((power two) three)
          => ((Lm.Ln.(m n) two) three)
          => (Ln.(two n) three)
          => (two three)
          => (Lf.Lx.(f (f x)) three)
          => Lx. (three (three x))
          => Lx. (three (Lg.Ly.(g (g (g y))) x))
          => Lx. (three Ly.(x (x (x y))))
          => Lx. (Lg.Lz.(g (g (g z))) Ly.(x (x (x y))))
          => Lx.Lz.(Ly.(x (x (x y)))
                    (Ly.(x (x (x y)))
                     (Ly.(x (x (x y))) z)))
          => Lx.Lz.(Ly.(x (x (x y)))
                    (Ly.(x (x (x y)))
^ I don't want to use a language where one can do that
 
@sbi this message has a history that shows you unbinned a message that was previously binned. That's complicated. :)
 
@sbi Would you like a banana?
 
sbi
@CheersandhthAlf I wonder if C++ operator overloading could get you there.
@FredOverflow I already had one, today.
 
@sbi bwhahah, I was renamed from feed, remember?
 
In case you want more: Going Bananas
 
4:27 PM
ha! I just got a badge on meta...
 
This must be the greatest day of your meta life!
 
@FredOverflow nah, I've gotten 125 rep in a single day on meta before.
 
@SethCarnegie No :(
 
can I construct a ifstream from ""?
no, that would be silly.
 
4:36 PM
If you don't want to open immediately, then just default-construct it and use open later.
 
@SethCarnegie The fact that there's no alternative makes it even more suckier :(
 
(For some inexplicable reason.)
 
Yeah, I guess I have to change my other member to a pointer rather than a reference.
 
0
Q: Is this the right way to implement pimpl wth unique_ptr and move-semantics in C++11

user1483198I haven't yet seen a pimpl example that utilizes both unique_ptr and move-semantics. I want to add a CHelper class to STL derived containers and use pimpl to hide what CHelper does. Does this look right? Derived.h class CDerived : public set<CSomeSharedPtr>, public CHelper { ...

Should be closed as a dupe of GOTW 100.
 
Lol checking for this == &argument in move ctor.
 
4:45 PM
lolwut.
I didn't even notice that.
 
Ell
if my programme works now, I will be completely astounded
aww dayum :(
 
@Ell we are not astounded
@TonyTheLion "Happiness"
 
indeed
 
Ell
attempt no 2
 
4:51 PM
 
@Ell "Day 8..."
 
I can't imagine what I have to imagine with this :P
 
Ell
it no work again :/
 
Everyone in my house is fucking annoying.
I want it to be tomorrow already, so I can run away and never look back.
 
@Ell Welcome to programming! :D
 
Ell
4:54 PM
haha oh the fun it is
right, attempt 3
oh great, won't compile >.<
 
@Ell seriously, don't bother counting, it's fine. It takes a while
 
Ell
haha a long while, methinks
 
@Ell yes
 
It doesn't matter how many battles the compiler wins as long as you win the war.
8
 
Ell
yay! got somewhere! "Player Joined". "Segfault".
 
5:04 PM
@RMartinhoFernandes robots & philosophy? amazing.
 
THAT KID IS SO ANNOYING.
 
Ell
oh I despise children
brb, getting an ice cream :D
 
@CatPlusPlus Which kid?
 
House owners'.
 
Ell
hmm I wonder where that segfault is coming from o.O (talking to myself :L)
 
5:10 PM
Your code.
 
There's a magical thing we call a debugger. It tells you that sort of stuff.
 
Is Ell one of those who "can't" use a debugger or was that Drise?
 
I think it's Ell.
 
Haha oh wow I scored 2/20 in "Sensors" (university material)
 
@RMartinhoFernandes The segfault is coming FROM INSIDE THE HOUSE.
2
 
5:12 PM
That's an average of 2 points per line I wrote on my sheet.
 
@Cicada Sounds great.
 
@Cicada Someone jammed you.
 
@CatPlusPlus ...but only if you're really polite and nice to it. And it's often hard to know what question to ask until you already realize what the problem must be...
 
Well, in case of segfaults it's just a matter of running the program and letting it crash.
 
@CatPlusPlus Good point, now that you mention it.
 
5:13 PM
Shouldn't be too hard. It's C++ after all.
 
I think I'd rather have a segfault over what my program is doing now. My program runs, and then completes. Doesn't seem to actually do anything, including output the text anywhere I see.
 
@RMartinhoFernandes Hmm...now I wonder. Is it barely possible that I might detect the tiniest hint if irony there? :-)
 
The difficult part comes when you're corrupting memory that you own
 
@JerryCoffin Irony? No, I'm made of organic polymers.
 
@MooingDuck Maybe you're editing the wrong files again.
 
5:14 PM
@Cicada Memory is like a cat: it may choose to live with you, but you never really own it.
 
oh, I'm writing all my text to an unopened stream. Oops
 
@JerryCoffin The comparison is interesting
 
What the hell is with thread safe singletons questions today.
 
@MooingDuck The computer also works better if you plug it in.
 
5:15 PM
@CatPlusPlus The pattern is actually not so obvious to get right.
 
@Cicada It's also worthless.
 
Also, it's World Thread-Safe Singleton Day today.
 
@Cicada The trick is to not use it at all.
 
@Cicada I specialize in interesting comparisons.
 
And quite simple to get right nowadays.
stupid& get_stupid() {
    static stupid the_stupid;
    return the_stupid;
}
 
Ell
5:17 PM
@MooingDuck yeah I'm the one who can't use a debugger :L
 
Deep-copy unique_ptr like this? => std::unique_ptr<T>(new T(*original_ptr));
 
If only C++ had a mechanism for threading data along easily.
 
@robert Yes, that works.
 
@RMartinhoFernandes Do you know a better way?
 
make_unique<T>(*original_ptr);
 
5:19 PM
Unfortunately make_unique is not in C++11 (only make_shared is). (Correct me if I'm wrong.)
 
@RMartinhoFernandes Yeah with method-static variables it's pretty simple idd
I didn't have C++ in mind
 
clone_unique(original_ptr);
 
@robert make_unique isn't C++11 because of an oversight. Implement your own.
 
@robert it's a easy one line function, just add it
 
@robert Write it.
 
5:20 PM
It's worth it.
GOTW 102 explains all about it.
 
@robert Herb is making an effort to have make_unique added as Soon As Possible
but i think the design is wholly wrong
 
I could write it from memory any day. template <typename T, typename... As> std::unique_ptr<T> make_unique(As&&... args) { return std::unique_ptr<T>(new T(std::forward<As>(args)...)); }
 
I know another better way, by the way: wheels::value_ptr<T>, but that's not in C++11 either :P
 
Ell
@CheersandhthAlf the design of make_unique?
 
make_unique should produce a make_unique_t<T> instance, so as to provide a solution to the most nasty UB
 
5:22 PM
What UB?
 
Nasty UB.
 
in foo( unique_ptr<A>( new A ), unique_ptr<B>( new B ) )
 
That doesn't have make_unique.
 
^ your not forced to use make_unique by the formal argument type.
 
5:24 PM
@RMartinhoFernandes right, that's the point
 
Oh well, just run from new like the plague. That's a good guideline.
 
But then again, functions should rarely take smart pointers as argument anyway.
 
@CheersandhthAlf that would prevent passing in existing unique_ptr.
 
@MooingDuck no, but it prevents doing so accidentally
 
I wouldn't want "smart" people deciding I have to do foo(make_unique<T>()).
 
5:26 PM
the idea of std::move is that doing things like moving rug from under feet, should be explicit
explicit = good, implicit = bad
similarly for passing ownership into function arguments
 
How would you allow moving unique_ptr into that argument, but at the same time disallow creating it there?
 
sbi
@CatPlusPlus You know, most children learn that they have to deal different with different adults and adapt pretty well to their different ways. (You did react different to your granny that to your parents, right?) Therefore, more often than never, it is also in your hand to make them aware of how you want them to behave and insist on them behaving thus.
 
Aha! My output was going to file.txt! (forgot that was the default out >.< )
 
Ell
what? functions should rarely take smart pointers as arguments? aww man :( what are we supposed to do then?
 
@Ell Take values or references?
Why do you want to take a smart pointer as argument (I'm not saying there is no reason, I'm trying to get you to consider it)?
 
Ell
5:28 PM
To take it? as in, transfer ownership - or something. Not sure really - I'll check all my functions that take it
 
@sbi I just want him gone.
 
@CatPlusPlus make_unique is all about creating, creation isn't disallowed. it's only the raw new that's discouraged. because two of them makes for UB
or just one
 
But I'm too polite to tell anyone to fuck off. :(
 
sbi
@CatPlusPlus From your room (in your hands) or from the house (probably not)?
 
@CheersandhthAlf is that actually UB? Are leaks UB?
 
5:29 PM
"My" room is hardly in my hands.
 
@CatPlusPlus It's not "fuck off" you want to say, it's GTFO.
 
sbi
@CatPlusPlus What arrangement are you living in, really?
 
Tomorrow I move out, thankfully.
 
@MooingDuck good catch. i'm not sure
 
@MooingDuck No. Garbage collected implementations are allowed after all.
 
5:30 PM
@sbi Crappy leases, what else.
 
@RMartinhoFernandes Go to fun otherplace?
 
I don't think it was UB even in 03.
 
sbi
@CatPlusPlus Mhmm. I was hoping for something more specific. Don't you have the right to privacy in your own room?
 
My room is in-between hall and two other rooms.
Privacy exists only when there's nobody else in the house.
 
@MooingDuck A leak isn't UB in itself, but may lead to exceeding implementation limits, which would be (at least if memory serves -- might be IB or something, but you get the idea).
 
5:31 PM
It's a shitty layout created by drunk designer.
 
Another problem: Say there is a class with many members, some of which are dynamically allocated objects managed with std::unique_ptr. The presence of std::unique_ptr members (not copyable!) makes it impossible for the compiler to generate the default copyconstructor/assignment operator. So, a single std::unique_ptr can force you to write the whole stuff yourself?
 
@JerryCoffin Would be std::bad_alloc, no?
@robert Why use unique_ptr members if you want value semantics?
Just store Ts.
 
@robert Use a smart pointer that's copyable. value_ptr if you want deep-copying unique_ptr.
 
Ell
I have only just heard of value_ptr today as you mention it?
 
@CatPlusPlus Is that the same as the clone_ptr which is sometimes proposed?
 
5:33 PM
@RMartinhoFernandes Maybe, but maybe not. Just for example, you could have big region of memory with the heap starting from one end and the stack from the other. If a heap allocation fails, you get an exception, but if a stack allocation fails, you get no assurance of what happens.
 
@robert yes, unless you have a value_ptr (such as R.Martinho has)
 
I don't know, I don't track proposals, really.
 
IIRC Scott Meyers describes a technique in More Effective C++ where something is allocated and never released. He claimed this isn't really a leak because we never lose access to the pointer.
 
One standard proposal called it value_ptr.
 
5:33 PM
@robert probably
 
@CatPlusPlus clone_ptr is not an official proprosal, but I have seen it on some random websites.
 
I don't track random websites even more.
 
@StackedCrooked I think that's subject to debate, since it depends on the OS. Most OS's have no problem with that but...
 
Anyway, value_ptr is only useful in niche cases.
 
Ell
Program received signal SIGSEGV, Segmentation fault.
In ?? () ()
 
5:35 PM
Use T before value_ptr<T>.
 
If backtrace shows nothing, you failed and didn't compile with debug symbols.
 
The most common reason to use value_ptr<t> is to avoid slicing. Other than that, T is usually a better option.
 
Ell
@RMartinhoFernandes as in, allow polymorphism? orr?
 
@robert It would be contradictory if a class with unique members would be copyable.
 
5:36 PM
@RMartinhoFernandes If you have a polymorphic member, you need to use a pointer.
 
He already said that.
 
@robert Right, but then you want special copy semantics anyway.
 
@RMartinhoFernandes Fair enough.
 
@StackedCrooked nonsense, a string's members are unique, but copiable
 
@StackedCrooked unique_ptr doesn't mean the value pointed to is unique. To me, unique_ptr is just an improved auto_ptr.
 
5:38 PM
It means the object is uniquely owned.
 
unique_ptr models unique ownership.
So yes, it is unique.
In terms of identity.
 
True.
 
@CatPlusPlus In terms of identity all objects are unique :P
 
Why did my Visual Studio 2008 stop attempting to build first when I hit "debug"?
 
Well, almost all objects.
 
5:40 PM
Are references objects?
 
@RMartinhoFernandes T* a, b, c; T o; a = b = c = &o;
 
@StackedCrooked No.
@CatPlusPlus The identity of an object is its address.
All of a, b, c, and o have distinct addresses.
 
I mean the identity of indirected value.
 
@MooingDuck Probably because it thinks everything's up to date?
 
@CatPlusPlus How's that different from shared_ptr?
 
5:42 PM
@RMartinhoFernandes { int a; } { int b; } // are a and b unique in terms of identity?
Not a serious question :)
 
Multiple shared_ptr point to the same thing.
 
sbi
@CatPlusPlus Ah, I see. Well, still. You could explain to the child that you are working (which would be a lie, but a white one), and that you expect it to move through your room only when it is necessary, and with as little disturbance as possible. If the kid isn't a complete brat, and if you aren't a complete asshole, it is bound to learn this to some extend.
 
@StackedCrooked Objects are allowed to reuse storage previously used by other objects. But they're still distinct, because they never exist simultaneously.
 
@CatPlusPlus Some kinds of stack corruption can do this too.
the debugger bases it's callback on information from the stack pointer and frames, if they are corrupted, you can get a bollocks trace
 
It can usually reconstruct at least part of it.
 
5:44 PM
@StackedCrooked If you're wondering: auto x = "foo"; auto y = "foo"; creates two objects which may have the same identity (and most likely will).
 
But I'd check debug symbols first either way.
I think I'll preorder GW2 to get into beta weekends.
But egads 55€.
 
@CatPlusPlus I find it horrible they force you to pay for testing events.
I refuse to pay to be a cheap beta tester
Those things used to be free, you know.
 
You don't have to preorder, you know.
 
@CatPlusPlus you do to get into the beta weekends if you're unlucky.
 
It's a closed beta. You can't get into most closed betas in any way.
 
5:52 PM
MSVC9: Why does my cute little console app take like ten whole seconds to start executing main?
 
Well, A closed beta for an MMORPG (or whatever you want to call it) is not really effective IMHO. Just see where that single weekend put Diablo III.
 
Into "we failed to get our servers ready despite the open beta".
 
@MooingDuck Debug stuff! Microsoft! Windows gnomes! The upcoming release of MS Surface! The universal uncertainty of the universe!
Wow. FF's plugin container is still playing my mkv's audio after I closed Media Player Classic homecinema...
 
Also D3 tries hard and hilariously fails to be an MMO.
 
W...T...F...
 
5:54 PM
@CatPlusPlus I don't think they're trying.
 
@CatPlusPlus Yeah. I kinda hate it for that. That and the Titan Quest feel it has with that dumb skill system.
 
@MooingDuck Microsoft adding a little incentive to upgrade: every quarter you fail to contribute your developer's tax, they add more stalling before your applications start.
 
@rubenvb Good it's not Opera still playing porn audio after you closed it. Because that's awkward.
 
My coworker is shaking his laptop until the fan stops making noise. It's hilarious.
 
@CatPlusPlus They succeed enough to piss off all the people who don't want an MMO.
 
5:56 PM
@CatPlusPlus Wut.
 
The kid is starting to annoy even his parents.
 

« first day (619 days earlier)      last day (4327 days later) »