« first day (576 days earlier)      last day (4387 days later) » 

12:00 PM
If you ever throw anything that's not derived from std::exception, your code is bad.
 
void foo(function<void(function<void()> stop)> f)
{
    struct StopException {};
    try
    {
        f([](){ throw StopException(); });
    }
    catch(StopException) {}
}
^ you don't need std::exception here
 
std::bad_alloc?
 
Yeah, that's definitely not a bad code.
 
sure
 
give me a few minutes to understand it ;)
what is f in it?
 
12:04 PM
@Innuendo a function
 
I understand this :))) I mean, what is sense of it?
 
Showing off how not to use exceptions.
 
@Innuendo it's just a function which is executed by foo. It get another function which aborts it
 
@CatPlusPlus, so "Yeah, that's definitely not a bad code." was a sarcasm?
 
silly cat, it can't get beauty of my code
nevermind it
 
TDS
12:08 PM
Anyone know, how to configure github with Eclipse in Mac?
 
@sehe Our cats enjoy being tossed across the room on to the bed, never thrown one at someone else though
 
struct my_exc2 : std::exception { char const* what() const throw(); };
how to understand this line? const* what() const throw();...
 
@Innuendo read a textbook
or the standard
 
@Abyx, in {} is member-list of struct, am I right?. But why there is no semicolon between 2 members?
 
@Innuendo That's because there's only one member.
 
12:18 PM
@Innuendo there is only one member
 
@Innuendo that ^
 
...
 
@Innuendo that is a function called 'what' that returns a pointer to a constant char, this function can be called on a constant 'my_exc2' object and the function can throw promises not to throw
 
it's better to learn syntax before starting to read code, and have a language reference nearby
 
@thecoshman The function promises not to throw.
 
12:20 PM
lol
 
@LucDanton oh, is the throw() part saying that it throws nothing?
 
And if it does violate that promise then std::terminate or whatever is called.
 
@thecoshman thank you.
 
@thecoshman throw() is empty list of exceptions it can throw, so it can't throw
 
@Abyx, I agree, that I should learn syntax before. I've read a few books, but such throw() syntax don't remember. That's why it was confusing for me
 
12:23 PM
Since it's a struct, it defaults to public inheritance, right?
 
@Collin yep
 
@Collin well, more that the members are public by default
 
A base is not a member though.
 
@Innuendo That's because nobody uses exception specifications anymore.
the C++11 nothrow stuff is OK, but the old throw() stuff, nobody uses.
 
@DeadMG, that code i quoted from boost site...
 
12:30 PM
@Innuendo most of boost is workarounds for limitations in C++, a lot of it is now part of standard C++
 
@Innuendo It's probably just old.
 
sbi
 
@sbi care to give some context?
 
It's a banana.
 
@DeadMG is there a "new" prescribed method for advertising that exceptions are thrown ?
 
12:32 PM
@Scottymac There is nothrow in C++11. I am not particularly familiar with it, though.
 
sbi
@thecoshman There a children's rhyme in German about nobody going to the jungle to make bananas straight. Maybe that's just a German thing, and it's not as funny to other nations to have that done virtually at a high technological level.
 
noexcept.
void foo(); // can throw
void foo() noexcept; // can't throw
 
that might be it instead of nothrow
wait, I'm pretty sure that nothrow is a keyword or something
 
@sbi so to you, that picture is funny?
 
std::nothrow is for new (std::nothrow) foo.
 
12:33 PM
what's the difference between nothrow and noexcept?
 
What he said.
 
They're completely unlike.
 
@DeadMG I'm quit old school... and actually like semantics of the throw declarations (I do understand the limitations of it), but wondering if there is a "new" replacement for advertising what a method actually does throw (ie. here is what you can expect from me)
 
nothrow isn't a keyword.
@Scottymac No noexcept == can throw.
That's it.
 
You could put noexcept(false) but it's a waste of time.
 
12:34 PM
@CatPlusPlus but no way to advertise what id does throw ???
 
Documentation.
 
@CatPlusPlus funny :P
 
@Collin I am going easy on our 'new' cat, but he already seems to enjoy floating across the room (we have laminate floors, which is really really smooth sailing :))
 
@CatPlusPlus fair enough... but we all know that documentation is.... hm.... not always what is should be
 
But exception-specifications are?
 
12:36 PM
Old exception specifications don't help anything.
 
@thecoshman Members I can always remember, but for some reason my brain forgets that rule is consistent
 
they do if they are written
 
No.
 
They really don't.
 
12:37 PM
You can lie in an exception specification and end up in std::unexpected. What good is that?
 
so you are saying a throw list doesn't act as documentation ???
 
You don't need a broken language feature for documentation.
 
The point is that if you can write up-to-date exception specifications you can write up-to-date documentation.
 
@Scottymac we are saying exactly that: exception specifications are merely documentation as well, but with the added hazard of suggesting more
 
@sehe Our newer cat is very suspicious of me, but she's slowly warming up
 
12:39 PM
@LucDanton totally agree... but I guess what I'm saying is that I appreciate the conciseness of a throw list... in fact I typically comment methods with a commented out throw list...
 
Well, the good news is that you can keep doing that.
 
:-)
 
Win-win!
 
true
 
Now begins my second week of work. Woohoohoo!
 
12:39 PM
Btw do you remember to put std::bad_alloc in those specs?
In all the spots where it needs to be?
 
@LucDanton but would I lose street credit ? :-)
 
She's a calico we picked up off the side of the freeway. The vet thought she might have been sleeping on an engine and jumped out when it got too warm
 
@Collin Figure that when I got my cat from the pound, she was a tiny underfed little kitten. Everytime I'd go to pick her up she'd hiss.
 
@Neil this one just wants to be about 6 feet from you while rolling around on the ground
 
@Collin She started warming up more and letting me pet her, though she'd still hiss. I couldn't figure out for the life of me why. It was like I'd pass by her in the hall and pet her, and she'd hiss and continue walking as if to say, "F*CK YOU! Oh hey, human."
 
12:42 PM
she for some reason will let me pet her as I'm going into or getting out of the shower in the morning, and she'll sleep on my feet at night, but during the day she avoids me
She sits with my wife quite a bit though
 
Oh, our new cat is very 'chill'.
I haven't seen such a 'I'm cool' cat in my life, so we feel like we won the lottery with this former asylum cat.
We're just slowly warming up to the cat with respect to how the kids approach him
 
Cats are cool.
 
You forgot the (TM) sign
 
@Collin It's normal, give her time. Take it from me though, let the cat come to you, not the other way around. In other words, pet the cat if she's near, but don't go search for her in order to pet her. You can imagine that if a large ape began chasing you down, you'd probably freak out as well.
 
@sehe We had a cat who used to like being thrown across the room, bounced on the bed, have his fur ruffled up, play with the dogs and would sleep under the covers between us at night
he was an awesome cat
 
12:46 PM
@sehe Damn, alt doesn't seem to work on this keyboard
 
@Neil That's pretty much what I've been doing, I'll try to call her over if I see her, but I don't follow, usually she puts her tail up and rolls around some, but won't come near me
 
@EtiennedeMartel I never know how to use those special combos. I use Vim®
 
Prrrtttt.
 
@Collin Wouldn't hurt to keep little treats in your pocket, so when she does come, you can encourage her all the more
 
@Neil That's not a bad idea.. I'll have to find some she likes
 
12:53 PM
@Collin Don't overdo it though. It should be to encourage her to associate positive things with being social
 
sbi
@thecoshman Yup.
 
@EtiennedeMartel :)
 
@Collin Was it you who wanted to know how the graphics to engine plug would work ? I can't quite recall.
 
Oh damn, my custom made drag-and-drop works.
 
@sbi to me it just seems random
 
12:57 PM
Okay, you can only drag along y = -x, but still.
 
@ScarletAmaranth Nope
 
@thecoshman sigh. what's your point :) got a mirror handy?
@EtiennedeMartel the diagonal, that is?
 
@sehe oh, didn't see you their Sbi
 
?
 
sbi
??
 
1:01 PM
@thecoshman I assume you want to imply that I'm not entitled to respond to your message?
Well, news-flash: this is a chat room
 
Xeo
-1
Q: Copying List to Map in C++

user617554I am new to C++. I need to know how to copy from a list to a map in C++. A code sample would be great.

NARQ please
 
@sehe That one, yes.
 
sbi
Oh, it seems my rant on meta from this morning is a dupe of an older one by @Konrad (to which I even had responded), which which has been abandoned since Jeff killed it with a heavily downvoted answer.
 
Oh, wait, that would be y = x in window coordinates.
@sbi Jeff is a funny person.
 
sbi
@EtiennedeMartel If so, then this escaped me.
Oh wait, you mean in appearance? Ah, I see.
SCNR.
 
1:05 PM
No, I mean that I really enjoy dark humour.
 
sbi
@EtiennedeMartel Now you've lost me. What's he got to do with dark humor?
 
@Xeo What, 10 minutes after it's posted? It's not like the OP has said he's refusing to improve the question, ever.
 
@sehe oh your perfectly entitled to respond to messages. You just don't need to act like a jerk because the conversation others are having is boring you
 
@sbi I said he was funny. In a fucked up kind of way.
 
sbi
@EtiennedeMartel But I will keep refusing to admit that I understood that!
 
Xeo
1:07 PM
@LucDanton I'm fast with NARQing and always open to reopen the question later on
 
@thecoshman Do you still have that mirror handy?
 
@sehe ¬_¬ didn't have one handy in the first place, but go on
 
@Xeo Asking for close votes to potentially reopen minutes later seems like a lot of noise.
 
@sbi But, yeah, after all the horror stories I heard about that guy's "community management", I can't say I miss him.
 
Xeo
Maybe, but having answers that don't answer anything is noise aswell
Also, the question shows no research at all
 
1:10 PM
Woa, I'm on a roll this morning: +6 on an answer!
 
@Xeo No, I mean in the chat.
 
Xeo
Oh, maybe.
 
Given how many poorly-written, likely unsalvageable questions that are posted by second, the less I know about them, the better I feel.
 
Okay, I found the problem. I only used the mouse's X coordinates, even when dragging along Y.
Damn you, copy and paste.
 
@EtiennedeMartel So... the upvoters are on a roll (responsibility inversion)
@EtiennedeMartel So, damn you for copy/pasting (responsibility inversion)
:) SCNR
The WPF answer is, of course, a good answer
 
1:23 PM
Har har har.
 
when using __declspec(dllimport) void foo(); how do you know wich dll __declspec is pointing at?
 
@tree The next symbol. So, foo in this case.
 
so the the dll is foo.dll?
 
Scratch that.
I misunderstood your question.
 
@tree The import library has that information, AFAIK.
 
1:28 PM
There's probably going to be a foo.lib somewhere that tells your compiler where to look for foo.
I think.
I'm not really a DLL expert, I only use implicit linking.
 
> The user LabUser could not be granted Standard user access because LabUser does not exist
Yes windows, that is why I clicked the Add button
 
Windows high as fuck, forgets to create the user before trying to give access rights.
 
actually I guess it's because this computer is on a domain
which for some reason makes this hard
 
lol!
 
@EtiennedeMartel Windows is made by the same guys who thought ERROR_SUCCESS was a good idea.
 
1:34 PM
-1
Q: C++ character visualization in win32 project

The unknownduring visualization in win32 project i have this problem, if I do something like that: char temp[80]="hello"; and then: MessageBox(hDlg,(LPCWSTR)temp,_T("titolo"),MB_OK); The result is in japanese characters, what's the problem? Thanks.

 
To be fair, Windows seems rather duct tape heavy: I'm surprised it works that well.
 
aaargh Blizzard servers y u so crappy?
 
^ I like my comment because I'm grumpy.
 
@EtiennedeMartel Duct tape fixes anything, that's why.
 
@CheersandhthAlf I like your comment because I believe that justice should be served.
 
1:36 PM
@CheersandhthAlf I like it because it's true.
 
@Collin you must add user before you can add user!
@Collin nope, on windows, that's why it's hard
 
On non-domain computers it's much more obvious
You know, going to the Users and Groups control panel allows you to add users and groups (gasp)
There's even a video!
 
on linux, it's even easier 'useradd newusername'
 
@Collin I don't know why, but I imagined that as a bubble being said by the annoying Word paperclip.
 
@sbi I’ve voted to close my own question as a duplicate of yours since mine is obviously dead and buried
 
1:44 PM
> net user /?
The syntax of this command is:

NET USER
[username [password | *] [options]] [/DOMAIN]
         username {password | *} /ADD [options] [/DOMAIN]
         username [/DELETE] [/DOMAIN]
         username [/TIMES:{times | ALL}]


[R:\examples]
> _
 
-1 The reason why you are wasting people's time here is that you have a C style cast in there telling the compiler to shut up because you know what you're doing. I.e. you're lying to the compiler, so that it won't tell you about the problem. Then you ask people here to use their time to tell you what the compiler would have told you. — Cheers and hth. - Alf 10 mins ago
Stylish
 
sbi
@KonradRudolph Hey, what a nice idea. I am actually in the process of writing a ranting message about how your request has been dealt with. Gimme a few more mins.
 
@sbi And I like the subtly insulting tone in yours better. This behaviour is really grating, being visibly pissed off but posh about it very well done.
 
@Konrad can you fix "downsites" to "downsides"? It annoys me, and I can't suggest a 1-char edit.
 
I think they should remove that arbitrary limitation of "one message per second" after you get enough rep.
Come to think of it, they should do the same thing to comment voting, too.
 
1:46 PM
@RMartinhoFernandes … but I was talking about sites! ;)
Done. Now vote me up, b*tch!
 
@KonradRudolph You havta now.. it's th3 rulez.
 
weird sehe's edit looked like it had the typo fix it when I reviewed that
 
Why the fuck did my post get edited by THREE people?
 
@KonradRudolph Because you failed to do the job yourself ?
 
1:50 PM
@KonradRudolph it had a pending edit when I looked that seemed to fix it so I hit improved to remove the 1 char work around and insta-accept simultaneously
 
sbi
@casperOne: The real problem with Konrad's question is that it has a score of 21 (with not a single downvote) and a lot of positive comments, but one answer by Jeff, denying the request, with a score of -7 (with not a single upvote) and a lot of negative comments — but no action was ever taken on the issue, it wasn't even closed as "STFU, we do it this way no matter how loud you complain". It's now sitting around there as a bait for any other discussion on a similar topic to get closed as a dupe of, very effectively and very infinitely stalling the discussion. — sbi 1 min ago
 
What job did he fail at? Adding whitespace at the end?
 
@sehe I didn’t – see edit history
 
sbi
Concerning ways to deal with bug reports/support requests this is about as bad as it can get. — sbi 1 min ago
 
@RMartinhoFernandes Failed at being in time
 
1:51 PM
@sbi "very infinitely". Nice. :)
 
@sbi –10 actually, last I looked
 
sbi
@KonradRudolph Well, it certainly was -7 when Caspar linked to it. I fixed my comment, though.
 
Jeff's answer got a downvote from me since you posted that
 
@sbi I have considered downvoting (in fact, I revert my downvote), since I don't really care (meta votes are supposed to be agree/disagree). But then again, I don't really disagree, I jsut don't care so I removed my downvote
 
sbi
@sehe You have considered downvoting what?
 
1:55 PM
@sehe If you really want limits there are smarter ways to do it than how it's done now
 
It would be awesome if Jeff could just acknowledge that he is wrong about this.
> We do not feel one second wait between messages is prohibitive.
This subjectively worded statement is simply objectively wrong.
 
I think he never actually used the chat.
 
@EtiennedeMartel From this statement, probably not.
 
"We think..." bullshit, you think.
 
@sbi Your meta question, obviously
 

« first day (576 days earlier)      last day (4387 days later) »