« first day (639 days earlier)      last day (4308 days later) » 

7:00 PM
@Drise Correct
 
@MooingDuck I'd rather have a type-safe sprintf; std::string foo = sprintf("fucks given == %@", 0) or something like that.
 
@AgainstASicilian Not output stuff...
@RadekSlupik EW! Get that shit outta here.
 
@RadekSlupik why?
 
@Drise Stringstream is both an input/output stream class
 
@MooingDuck using it to tokenize strings
 
7:00 PM
think I found something interesting in the standard @Xeo (regarding the question by @FredOverflow), hold on
 
@MooingDuck I find that much more readable than the <<'s.
 
@AgainstASicilian True.
 
I know this is not to be said here, but I love the sprintf() class of functions
 
what exactly does it use as delimiter?
 
@RadekSlupik That's a typesafe printf? How?
 
7:01 PM
and how to change
 
@David: anyway, i fail to see the utility of not having a more safe to use make_unique function. why are you arguing that it should be more risky? — Cheers and hth. - Alf 3 mins ago
 
It's typesafe-ish.
 
@RadekSlupik eh, most of us don't.
 
@JimNorton Get out lol. Also, be careful when you use the word "class". Family is probably better.
 
@R.MartinhoFernandes It was just an example, it could be a variadic template function.
 
7:01 PM
@Drise :-)
 
printf() is also much faster than cout <3
not sure what the speed of puts() is though
 
Just be careful with those functions...
 
@RadekSlupik sprintf("fucks given == %@") type safe that.
 
@Drise Agreed, family is the correct term.
 
@Nils streams normally delimit on spaces or other invalid values, depends on what you're doing.
 
7:02 PM
Just give up that illusion. You can't make a typesafe printf.
 
@MooingDuck let's say I have a string with int values separated only by commas.
 
@MooingDuck Getline does NOT delimit '\r' on unix! I found that out today when someone filed a bug report on my code... I was like "You dumbass, you're using CRLF"
 
@R.MartinhoFernandes Of course you can. It can use std::stringstream internally.
 
Doesn't C# have a type safe printf() type function?
 
@Drise open the file in text mode and that's completely irrelevant.
 
7:03 PM
@RadekSlupik That doesn't help with this sprintf("fucks given == %@").
 
It compiles fine.
And shouldn't.
 
@Nils Whatever the locale says is whitespace.
 
@JimNorton Console.WriteLine(..) or something
 
@JimNorton Just as typesafe as you can make in C++.
 
7:04 PM
@Nils (1) read in int, delimiter, int, delimiter, etc
 
@JerryCoffin uhhh what do the locales have to do with that?
@MooingDuck?
 
@R.MartinhoFernandes At least it could throw an exception instead of triggering UB.
 
@Nils Each stream has an associated locale. It uses the locale for most formatting, and also figuring what's a delimiter.
 
(Which is the case with printf.)
 
 mystream >> valuefirst;
 while (mystream>>delimiter>>valuemore && delimiter==',')
      push_back(valuemore);
 
7:05 PM
@JerryCoffin Like 5.9 vs 5,9
 
@RadekSlupik Yes, but that's not type safety.
 
@Drise Among other things, yes.
@Nils Here's an example:
 
You need TMP strings for that.
 
0
A: C++: Splitting a string by a character

Jerry CoffinAnother possibility is to imbue a stream with a locale that uses a special ctype facet. A stream uses the ctype facet to determine what's "whitespace", which it treats as separators. With a ctype facet that classifies your separator character as whitespace, the reading can be pretty trivial. Here...

 
But that throws localization out the window.
 
7:06 PM
sorry for this noobish question.
how to print the check sign '✓' in the console ???
 
if I wanted to read and manipulate a 2MB arbitrary string, would string + getline do the job well?
 
@Jonas std::cout << "✓";
:P
 
Isn't this type safe?
s = System.String.Format("{0} times {1} = {2}", i, j, (i * j));
 
@Jonas what operating system?
 
7:07 PM
Or maybe u"✓". I'm bad at such things. std::cout << "✓"; always worked for me.
 
@MooingDuck windows xp
 
@Jonas can't be done, windows console only does ASCII. (There probably is a way involving codepages, but it's not worth the trouble)
 
@JimNorton Nope. Pass in one less argument and it booms.
 
Where is the "how to accept answers" post?
 
7:08 PM
FAQ.
 
@JerryCoffin Ok ic, but it is still quite complicated just to take a string apart.
 
sbi
@CatPlusPlus This I'd like to see happening. Really. On SO, a place where even questions about questions about Brainfuck get censored, create a room dedicated to Brainfuck.
 
@RadekSlupik no it doesn't work for me
 
@Jonas Buy a better terminal emulator.
 
@RadekSlupik the second version only works if console accepts the same encoding as the cpp file format, and then only sometimes.
 
7:09 PM
Alf had a painful experience with that a while ago. He wrote his findings somewhere.
 
@RadekSlupik actually I need it for an OpenGL window
 
My summary is: it's not worth the hassle.
 
@MooingDuck But u"✓" would work with any terminal that accepts UTF-8, right?
 
@AgainstASicilian it's easy. If you profile it to be slower, then do something else. But it's probably fast enough.
@RadekSlupik yes
 
Hmm…
 
7:10 PM
@RadekSlupik u"✓" is UTF-16, btw.
 
@Nils Yes and no. In any case, I wasn't really advocating that you do things this way, only pointing to the fact that the locale is what determines what the iostream will treat as a delimiter.
 
That's nice to know.
 
So, check your conclusions again.
 
@Jonas then look in the OpenGL docs for what text encoding they expect
 
@R.MartinhoFernandes I thought u"" was a UTF-8 string?
Or is that u8""?
 
7:10 PM
@R.MartinhoFernandes oops
 
Nope.
@RadekSlupik Yes.
 
why are compiled languages so much faster than interpreted?
 
@AgainstASicilian you are trolling right?
 
@AgainstASicilian They aren't, at least not necessarily.
 
It's funny that static_cast<char32_t>(0xFFFFFFFF) is ok, but U"\UFFFFFFFF" is UB.
 
7:11 PM
@AgainstASicilian Languages are not “compiled” or “interpreted”; the code written in those languages is.
 
@AgainstASicilian because people with bigger brains use compiled languages
 
@MooingDuck I'll look that up. I need the sign for menus
 
sbi
@thecoshman You are wrong. I have to take care of two of kids. Also, I expect visitors tomorrow, and I will need to get a few things done before that. So no bilge drinking tonight.
 
@R.MartinhoFernandes TIL.
 
7:12 PM
However the native language got me thinking. Most languages are not native there is only C, C++, Objective-C, Fortran and ..?
 
@AgainstASicilian And that is relevant to what?
 
@MooingDuck OpenGL itself basically doesn't support text at all, so it doesn't care at all about encoding.
 
Pascal has been compiled for quite some time now
 
@AgainstASicilian interpreters can't take advantage of branch prediction is a big one. Interpreters also are required to make far more function calls
 
@RadekSlupik Overly pedantic responses
 
7:12 PM
Also, it's stupid that I have to write 8 hexits for an UTF-32 codepoint in a string, but the standard forbids me from using any value that isn't a valid codepoint, i.e., anything above 0x10FFFF. So the first two hexits are always 00.
For no reasons whatsoever.
 
@Nils Objective-C++, GLSL, D, Go(?).
 
ah yeah the shading languages
 
Machine code.
 
and go is compiled too I think
 
@MooingDuck No I just wonder why Python for example is slow compared to C++ in things like looping iteration, or I/O
and why these things can't be sped up
 
7:13 PM
Objective-C++
:D
headache++
2
so i'm off
 
@Nils Haskell.
 
@AgainstASicilian because interpreters can't take advantage of branch prediction and all of the other things I just said
 
ah that is compiled?
 
sbi
So this guy has been annoying you to the point where the whole starboard is dedicated to ways to deal with him, and he has the balls to still be around when I enter the room?
 
cu
 
7:14 PM
@Nils Yep.
 
@Nils there's several others. Javascript can be compiled to native now.
 
@Nils Ruby is compiled too, if you use MacRuby. Saying a language is “compiled” is a bit strange, even when you mean only ahead-of-time compilation to machine code.
 
@R.MartinhoFernandes That is strange. I would have expected compiler error.
 
@MooingDuck What's branch prediction?
 
@Nils Later.
 
7:14 PM
yeah mac ruby
 
@DeadMG Oh, you're right, not UB. It's ill-formed. Sorry, got confused.
 
@AgainstASicilian See this answer.
 
Do compilers do branch prediction, I thought the CPU did that?
 
@AgainstASicilian it's where the CPU looks at the code and guesses what comes next and calculates many things at the same time. But it can't see interpreted code, so it fails left and right, and runs much much much slower.
@JimNorton CPU does
 
@AgainstASicilian It's the prediction of which branch will be chosen.
 
7:15 PM
@EtiennedeMartel 1538 votes? Bullshit.
 
wow, beefy question
 
Stupid tooltip.
 
7:17 PM
@JimNorton Both, in some cases. Some CPUs support static branch prediction, so the compiler can say "this branch will usually be taken". Early PowerPC and SPARC both have that (if memory serves, Itanic may also, but I'm not sure).
 
@RadekSlupik Mystical has been getting 200 rep every day from that
 
@MooingDuck Is a fair analogy that interpreted code is "interpreted" on the fly versus compiled code that is processed before running?
 
@JerryCoffin Is that a typo or a pun?
 
@AgainstASicilian that's.... roughly it yes.
 
@Drise whoa that's much.
 
7:18 PM
@R.MartinhoFernandes Intentional.
 
@JerryCoffin hehe, nice one.
 
@AgainstASicilian think of the difference between (1) translating a speech in a word file between two languages, and (2) translating a speed one word at a time on stage as they talk. The second is far harder, and you make mistakes and have to redo sentences.
 
@RadekSlupik He deserves the rep.
 
@DeadMG That's true, but it's still much. :P
Mystical is the new Skeet.
 
@JerryCoffin Interesting
 
7:20 PM
I wonder how much upvoting is caused by user bias
If you were to blind every user's answers, would skeet's responses still get the massive upvotes?
 
Oh, not this again.
 
reasonable question
 
@AgainstASicilian probably almost all of it
 
Hm, I created a yes_no_maybe when I could have used boost::tribool.
 
@AgainstASicilian But essentially unanswerable.
 
7:22 PM
@R.MartinhoFernandes file not found?
 
@R.MartinhoFernandes Should be true_false_fileNotFound, duh.
 
@FredOverflow, @Xeo, @DeadMG (see below)
 
@MooingDuck Hey, don't look at me. I don't make the spec.
 
1
A: Implicitly treating returned lvalue as rvalue

refpRegarding parenthesized expressions [√] You are wrong when talking about parenthesized expressions and that it shouldn't be able to trigger a move when being returned and containing only the name of a moveable object. 5.1.1/1      General      [expr.pr...

 
Unanswerable in the strictest sense, but not impossible to predict
 
7:22 PM
feedback is appreciated
 
class Bool {
  Bool(bool) = default;
  operator bool const() const {
    return rand() < (RAND_MAX / 2);
  }
};
// you mistyped zeh data type
 
@R.MartinhoFernandes (A)bort? (R)etry? (F)ail?
 
@Collin I have no idea. It's a unicode property.
Something to do with normalization, which I haven't looked into yet.
 
0
Q: firefox plugin development in linux

arun arunI'm doing my master thesis, my topic is to develop a firefox plugin for MiniSIP application(its a open source VOIP application) on linux platform. Basically i need to use the sip stack of the MiniSIP source code for my devlopment. I need to develop a new firefox plugin based VOIP application alo...

Too localized?
 
#ifndef _DEBUG
#define if(X) if((rand()<RAND_MAX-2) && (X))
#endif
 
7:26 PM
#define return if (rand() < 1) { throw 1; } return
 
You fail at macros.
 
I know. :(
 
Now it's not single statement-safe.
 
7:28 PM
Argg.
 
no point in making too many things x-safe
 
#define return throw :)
 
@RadekSlupik #define return if (rand() < 1) { throw 1; } else return?
 
Of course!
 
I'm an evil genius.
3
 
7:29 PM
Døh, you're a robot.
But only in release builds, otherwise the debugger would print a backtrace to the origin of the exception.
 
-1
Q: Comparison code For Webbrowser vs Gecko

chikani dipanThis Works Fine For "Webbrowser"... But What is similar code for Gecko?

Close votes please.
 
@Drise lol he posts the code in a comment. Will close.
 
@RadekSlupik I just realized wtf was going on there. Regardless.
 
It being tagged alone is enough reason to close it.
 
After taking off my numerous *tag-to-ignore*, I now see the slew of shit that is SO new posters.
 
7:33 PM
My ignore list is pretty small.
 
@RadekSlupik I had most of mine wildcarded. So windows* would get windows-7, windows-phone, etc
 
I have zero ignored tags. I should probably put some in there.
 
@Drise Good idea! Forgot that was possible.
 
@RadekSlupik Also useful for things like ruby-on-rails where there is like v1, 2, 3, etc.
 
@RadekSlupik I don't have one.
I just watch .
 
7:35 PM
anyone else here an ivy leaguer
 
I watch
 
@R.MartinhoFernandes You're quite specialized.
 
I don't know why you'd ignore though. It's the stuff that's not tagged homework that should be that I would like to ignore.
 
-1
Q: jQuery html-swap and hover

xTyPwhy this is not working well can't explain http://jsfiddle.net/9rxVv/

Um... low quality?
 
7:36 PM
Ha, I watch Java.
Well, well.
 
@EtiennedeMartel Hey, I'm actually quite close to the Generalist badge.
 
@RadekSlupik Thet's how my board used to look. SO was fairly boring then.
 
@EtiennedeMartel That's curable with early detection.
 
sbi
@R.MartinhoFernandes Puppy?
 
@rubenvb really rebun?
 
7:38 PM
@Drise question edited, it's passable now, though possibly a dupe.
 
@sbi Does he admit to being evil?
 
@AgainstASicilian Thank god I'm not.
 
sbi
@JerryCoffin He says he's a genius.
 
@sbi Hey, it's you!
 
@JimNorton wherefore?
 
7:39 PM
... art thou, Romeo?
 
pray tell
 
sbi
@EtiennedeMartel What's me?
 
@AgainstASicilian I probably have a bad stereotype view of Ivy League universities and their students.
 
WTF, how did I get that wrong.
 
@sbi Yes, I've noticed that. I don't recall seeing him say he's evil though.
 
sbi
7:40 PM
@JerryCoffin "him"?
 
@sbi Puppy (i.e., the same "him" as your "he" apparently referred to).
 
@JimNorton Hmmm, it's probably partially true and partially hogwash (as most stereotypes are). What is your view?
 
sbi
@JerryCoffin Oh, him. Well, we all know the puppy is evil. So what are you asking about?
2
 
puppies are inherently lacking in evil
 
7:41 PM
@AgainstASicilian You know the stereotype, spoiled bratty kids from money, partying all the time and not studying...
 
That Ministry of Shame wiki-entry is hilarious. :P
 
@RadekSlupik Albeit totally inaccurate :P
 
@AgainstASicilian Not really…
 
@JimNorton Plenty of kids like that, sure
 
@sbi "Does he admit to being evil?"
 
sbi
7:41 PM
@AgainstASicilian Why don't you just keep your moth shut for a while, and watch how this room works?
 
@RadekSlupik Well, evidence wins every time, so yes, really
 
@RadekSlupik It's needs (@CatPlusPlus) another column - Snarky Redeeming qualities. 'Is an "Ivy Leaguer"'
 
@sbi Because I can chat if I so please
 
sbi
@JerryCoffin Why do you consider this important?
 
Also, what is wrong with Sicilians?
 
sbi
7:43 PM
@AgainstASicilian You know, that's exactly the effect I'm after.
 
@AgainstASicilian You realize all the evidence in this particular case supports the wiki entry, right? This is an entirely rhetorical question, as if you did understand that, the wiki entry would not exist.
 
@sbi Honest evil is better than dishonest evil.
 
@SamDeHaan Claims to be an Ivy leaguer -- but shows no sign of being particularly honest.
 
@RadekSlupik They are vulnerable to iocaine powder.
 
@SamDeHaan The evidence does not. The question I was asking was in fact not a common tutorial question -- even when you break its components down. It's patently false
If you wish to prove me wrong, feel free to invoke a reference
 
7:44 PM
@R.MartinhoFernandes Hmm…
 
sbi
@R.MartinhoFernandes If someone clubs me over the head, I wouldn't find myself comforted by the fact that he admits to being evil.
 
@AgainstASicilian No one cares about the question. The evidence shows that you're an entitled ass, not that the question was bad/good/etc.
 
Are moderators or people who review edits invalidating more edits that remove "thanks" and "Thanks in advance" and such clutter removals?
 
@SamDeHaan Moving the goalposts eh
 
@sbi What? You think being mentioned in chat means (somebody thinks that) something is important?
 
7:45 PM
@AgainstASicilian Not at all. The evidence supports the wiki entry. The wiki entry calls you an ass. That's a very consistent argument.
 
@JimNorton Probably marking them as "too minor".
 
@SamDeHaan "Asks for help about simple tasks that can be solved by looking at the docs, repeatedly rejects actual solutions" = false, not supported by evidence
 
@R.MartinhoFernandes Even though posts with those in them are frowned upon?
 
"claims anyone trying to help them is stupid and has no idea what they're talking about." also false
 
@JimNorton shrug
 
7:45 PM
not that I really care, considering I figured it out anyway
 
@JimNorton Including them is frowned upon, but editing just to remove them generally is as well.
 
@AgainstASicilian As I said above - purely rhetorical question, because if it wasn't rhetorical it would be unnecessary.
 
sbi
@AgainstASicilian Just look at the damn starboard you fool! When I came in here, the whole thing was dedicated to you being an idiot! If you cannot see that bringing up half of the chatroom's population against you must mean that you did something wrong, then there is no proof that you would accept.
 
@sbi tldr
 
sbi
I don't even bow low enough to do this as a reply.
 
7:47 PM
@sbi Especially since the other half probably would be as well, except that most have already plonked him.
 
@JerryCoffin that, my friend, is a truthfact.
 
@JerryCoffin Interesting... I got over 200 points on Friday for largely editing that stuff out of questions.. I don't seem to be having that level of success this week. Perhaps a change was made... I just don't want to be editing in poor taste..
 
I don't care what the popular "opinion" is if that opinion is ill-informed or just flat-out wrong.
 
@sbi 'bilge drinking'... typo or pun?
 
@JimNorton Well, basically more substantial edits are better :)
 
7:48 PM
besides that stuff happened a while ago anyway, why drudge it up again? that serves no purpose
 
@R.MartinhoFernandes I get that... I try to edit for other things as well
@AgainstASicilian Your latest comments confirm what we thought earlier about your attitude. And it seemed you had learned to work well in this room... but now you've kind of gone back to your old ways.
 
@JimNorton What comments
 
@sbi I don't plonk him; he's too hilarious.
 
@sbi "I fart in your general direction!"
 
7:49 PM
hahahahahaha
 
@SamDeHaan lol
 
sbi
@thecoshman Worse: I didn't know better.
 
That's new: "Please aid!"
 
sbi
@RadekSlupik When I was young, I also wasted lots of time discussing with people who discuss for the sake of proving they're right. Now that I am older, I feel like I don't have so much time to waste anymore, and try to limit discussing to people discuss for the sake of learning from each other.
 
lol, the plonkfish (clupea plonkinus) got starred.
 
7:52 PM
@R.MartinhoFernandes and it got unstarred.
 
@sbi A decent heuristic
 
@RadekSlupik :( I even made up a pseudo-scientific name for it.
 
You suck at taxonomy.
 
sbi
@RadekSlupik Better now?
 
@R.MartinhoFernandes Should've called it clupea plonkinus martinensis since you coined it :)
 
7:54 PM
@sbi It doesn't make a difference for me. Actually, I unstarred it.
 
heh praetorian. I know you
 
This smells of spamming.
0
Q: Reddit api request limit?

jawertyI'm making an app that submits links to reddit using the reddit api with PHP. The main problem I have is that there's a limit to the amount of requests I can make per minute. I've been searching on google for certain methods to use cache files to override this, but I haven't seen anythhing that c...

 
sbi
@RadekSlupik Oh well, then forget about it.
Wait, are you an owner, too, now?
 
No, he's messing with you.
 
The point of the request limit is to prevent you from making too many requests. If you do make more requests than the API allows, I hope you get banned and your web app gets DDoSed. — Radek Slupik 6 secs ago
@sbi I am not a room owner.
 
7:56 PM
@RadekSlupik I posted something myself, and flagged it.
 
If I want to pass a pointer &a1 that points to a stack allocated object a1, to another object b. Where b should only use the value for calculations but not own it, should I use another pointer than just a regular A * in C++11? ideone.com/OJUrS
 
@Drise I just closed it. :P
I am a bad moderator, I am bad, and I feel bad. :(
 

« first day (639 days earlier)      last day (4308 days later) »