« first day (838 days earlier)      last day (4103 days later) » 

8:00 AM
We really haven't thought of that!
 
lol billz edited my braces
 
@Rapptz link?
 
4
A: How does one declare a variable inside an if () statement?

RapptzIf you want specific scope for value, you can introduce a scope block. #include <iostream> int get_value() { return 101; } int main() { { int value = get_value(); if(value > 100) { std::cout << "Hey!"; } } //value out of s...

 
I was about to add to my original question, as and edit, "Without introducing a scope block" but I guess it's too late now! — DrTwox 2 mins ago
People with shitty arbitrary restrictions like that need to seriously fuck off
"too localiseD"
 
?
he's curious about the language, as to whether it has this feature
nothing wrong with that
 
8:05 AM
The function answer is probably the last way he can do what he wants.
 
I want to introduce a scope! Without using a scope!
No, it's just pointless waste of time
Speaking of pointless waste of time, another day another exam
 
@LightnessRacesinOrbit Right. Just like many of you asking about templates and stuff. They're just, like, elaborated questions about the language.
 
This time is UML and patterns
~engineering~
 
@MarkGarcia Exactly.
 
@CatPlusPlus Well, there needs to be some room for homework questions.
That is, if ewe decide want to allow homework questions.
 
8:07 AM
It doesn't look like a homework question to me.
However I also don't want it getting lots of upvotes and being confused for an excellent advanced C++ question, so I found a duplicate :D
 
Whoever assigns homework like that needs to die
:angrycats:
 
i think that is the reason why they introduced for loops — Mayank Sharma 1 min ago
lol?
 
I'll feel better when the exams are over
(and I'm drunk)
 
@LightnessRacesinOrbit I have faint hope that he's being facetious.
 
@Rapptz I dunno. India.
 
8:10 AM
lol
 
haha
@LightnessRacesinOrbit Cool down man.
 
@CatPlusPlus Do you know anyone that actually used UML in a real day-to-day job ?
 
@MarkGarcia I'm cooler than you'll ever be!
@ereOn We use E-R diagrams once in a while.
 
@LightnessRacesinOrbit: I don't know what that is (or at least, not by this name)
 
@ereOn You aren't familiar with entity-relationship diagrams?
 
8:15 AM
@LightnessRacesinOrbit: I am. It's just we used to call that differently (and in french)
 
You .. translate technical terms?
Strange.
 
It's France :)
 
Oh, and we use sequence diagrams all the time
 
Why would we use a perfectly chosen term when we can use a stupid translation instead ?
 
In fact, looking through Wikipedia's UML article, we use quite a few UML diagram types, often and thoroughly. We will not be unique or rare in doing so.
So, yes, UML is used in real day-to-day jobs.
@ereOn True. Can't think of a reason.
 
8:17 AM
@LightnessRacesinOrbit: Do you see a gain using those ? (Not a trolling question, I really wonder)
 
@ereOn UML diagrams? Absolutely!
Sequence diagrams are a godsend for documentation and for annotating specs
 
I always joined teams that didn't cared much about the overall design. When one needs something, he usually put it in the first place he founds adequate.
This obviously results in a gigantic mess.
 
@ereOn I'm sorry to hear that :(
Yeah.
There used to be several of us on my team who would stab you in the face for that
Sometimes it feels like now it's just me, and it's not an easy battle to fight on your own.
Ooh, pay day
 
I had several different jobs and every time, people didn't cared much (or at all) about software design.
The moto was more : "If it works, it is good enough (and you wouldn't dare suggest any change !)"
 
What country was it in?
 
8:20 AM
Hence the question about UML : I never could practice it for "real" and so I really don't know how useful it may be.
@LightnessRacesinOrbit: France, always. I don't know if it is country related though.
 
Stack Overflow is slowing down
 
@Rapptz Indeed. I got a timeout on every single message.
 
It's been really unreliable lately :(
Jon Skeet went for a sandwich and stopped pedalling for a minute or two
 
user142019
People.
 
8:26 AM
@LightnessRacesinOrbit That wouldn't be an issue. The pedal moves itself on Jon Skeet's command.
 
@MarkGarcia He didn't give the command. Sandwich was too good.
 
@LightnessRacesinOrbit Oh. I think he made that sandwich himself.
 
@MarkGarcia It's the only explanation.
 
8:53 AM
This meme died quietly:
@fogus I used to be language researcher like you. Then I took a numerical tower in the knee.
 
it's funny how so many of my disputed flags for low quality are on a question that got closed... it's almost like the questions where actually low quality
 
@Zoidberg Person
 
@sehe I still don't think it was ever born; still born perhaps
 
@thecoshman cough. that's one heck of a misplaced space
 
@thecoshman What even is it?
 
8:56 AM
@sehe don't tell me it's 'stillborn'? (╯°□°)╯︵ ┻━┻
 
@thecoshman of course it is. I mean, everything that was ever born, is still born.
 
though, I can see the sense in that one
 
whew
 
what the bacon?! I am currently ranked as the 6th most frequently in here
 
Thinking outside the box - research by autistic scientists? bakadesuyo.com/2011/11/…
@thecoshman You drop the ball. In other news, the ape silently slipped out of the list (probably temporarily back once in a while)
 
8:59 AM
@sehe well he's been enjoying his job, the lucky fecker :P
 
Mawning
 
I know that I am in here a lot, and I've seen my self bobbing on the coat tails of the list, but it must just be over an odd time period
especially as I wasn't on at all Monday and Tuesday
@TonyTheLion rawr
 
There wasn't really that much wrong with the original =/
 
@thecoshman I seem to be quite high on the list still
@thecoshman rawr
 
@Rapptz Well, the code wasn' t in the code block. It's ok to fix that, right
 
9:02 AM
@TonyTheLion he he he, just refreshed it and you over took the white bear
(opposed to all the other bears we have in here)
 
@sehe Yeah I guess. I looked back at it now and it wasn't as minor as I thought.
 
:_)
 
@thecoshman lol
 
@sehe only one character was out of the code block, AFAIK one character edits are discouraged
 
@thecoshman Well, that's probably a good reason why the rest was fixed too
 
9:04 AM
they painted one of the walls in the office bright red, it's all I can see to one side
 
@Rapptz It's an invalid edit. It just needed a single space before the final }
 
@sehe wasn't worth it though
 
plus some fixes within the code
@sehe It's not a good reason to make the formatting worse, though.
 
still, do we really have to bitch about edits in here?
 
@thecoshman Meh. You get to decide that. But it is only your opinion you decided on
 
9:05 AM
yes the system sucks, move on
@sehe my opinion is the most right one :)
 
@thecoshman That's most of what we do!
@thecoshman It's nice to have people with whom to talk about it.
 
@LightnessRacesinOrbit Gah. So you decide that braces-after is better. I liked you better when you were just a grammar nazi
 
@LightnessRacesinOrbit only recently
 
@thecoshman Implying a scale. My opinion is the right one. Period.
 
@LightnessRacesinOrbit it's nicer still to have people talk about something interesting
 
9:06 AM
@sehe We don't need SO questions taking a shitton of vertical space
 
@thecoshman Well the review queue is pretty shitty.
 
@sehe mine is more right though
 
Xeo
Mornin'
 
However, I don't generally enforce my code style on SO posts
 
Gives me something to nag about.
 
9:07 AM
@Rapptz yes, it is also the most boring thing to talk about
 
@LightnessRacesinOrbit So? Suggest it in a comment. It's also about readability. There's taste involved in readability. I always try to maintain the original bracing style, if it at all was consistent. (And I've done a shitton of code cleanup edits)
 
screen -dmS <scren name> <command>
 
@sehe I had to fix alignment probems with the braces anyway so, whilst I was there...
 
@thecoshman You didn't get my point about absolute vs. relative scale, did you
 
that will start a screen with given name, running that command, and detach it so a script can carry on with shit... right?
@sehe and you didn't get my point about me being the most right, did you
 
9:08 AM
@thecoshman What happened when you tried?
 
@LightnessRacesinOrbit don't give me that 'try it' shit
 
@thecoshman too fucking late
 
@LightnessRacesinOrbit That edit. Shameless. Of course all this is pedantry to rationalize the edit that was indeed a single-space edit.
 
now go try it
 
do you think nuclear scientist just see what happens when they through some shit into the reactor?
 
9:09 AM
@sehe No - two-characters. There was an invalid . in the code block
 
Xeo
@Mysticial: Awesome.
 
@sehe (Yes, basically.)
 
@LightnessRacesinOrbit Oh I missed that.
@LightnessRacesinOrbit lol
 
@Xeo Yeah, the front page right now is basically all seeded questions that are not Naruto.
 
@Xeo Majestic
 
9:10 AM
@thecoshman Do you think that launching screen will beam you into a nuclear reactor?
 
@LightnessRacesinOrbit it could do, I am not quite familiar with the source code
 
@LightnessRacesinOrbit It is unlikely, but it could happen if the is only a smidgen of UB in the code
 
Xeo
@thecoshman I have a feeling that's a reference to Etho saying such stuff when looking for Redstone, but that may just be me.
 
@Xeo wonderful
 
Xeo
@Mysticial Oooh, I want to answer the TLR question, but I don't have anything about the author.. I can only talk from the manga POV. :(
@thecoshman Magnificent.
 
9:12 AM
@Xeo Wut.
 
@Xeo I actually know the answer to the TLR question.
But I'll let someone give a proper answer.
 
Xeo
@sehe I probably misspelled that, huh?
 
Since what I've heard is second-hand info.
 
@Xeo super
 
12 hours ago, by sehe
@MooingDuck Wokay. Anyhoops, the interwebs agree with me: http://www.wordnik.com/words/magnificient is not a word (although there are plenty prior occurences of the typo)
 
Xeo
9:12 AM
LOL
 
Xeo
@Mysticial So it's fine if I answer with info from the manga? :) I mean, it can be seen as the official statement of the author.
 
@Xeo Of course it's fine. The Anime is based off the manga.
 
@sehe Yeah I was disappointed to see that typo.
 
@Xeo You might like my railgun question.
I don't think it's answerable, but I posted it anyway since it might be amusing.
 
user142019
9:14 AM
Tremendous morning.
 
so... any one else caught up with managers who have heard the words 'agile' and 'scrum' and think it's the dogs bollocks?
 
I take it you mean in XKCD?
In a post about pedantry, no less
 
user142019
Haskell y u ucs2BigEndianToUnicode but no unicodeToUcs2BigEndian.
 
@sehe Exactly. Hell, in a webcomic about pedantry, more or less.
 
@sehe he can just hide behind a false claim of being ironic
 
9:16 AM
@thecoshman like you're about to?
 
@Zoidberg something about sucking comes to mind :P
 
user142019
Indeed; UCS-2 is terrible.
 
@LightnessRacesinOrbit ¬_¬ huh?
 
@thecoshman you accidentally the whole behind a false claim of being ironic
 
user142019
And Minecraft should have used UTF-8. Like, the preferred encoding for networking.
 
9:17 AM
@LightnessRacesinOrbit shut it :P
 
Xeo
@Mysticial Hm I think it is actually answerable. The coin isn't the main force here, it's the lightning backing it. I think that's said when Touma first meets Mikoto in S1.
 
@Zoidberg you say that like it could never change to it
 
Xeo
It's also said that the coin melts after ~50m, but we've seen here shooting her railgun much farther.
 
user142019
It could and it should.
 
@Xeo: I'm starring that because you sound ridiculous.
 
9:18 AM
@Mysticial link
 
Xeo
@LightnessRacesinOrbit Shaddup.
 
4
Q: How is Misaka's railgun so destructive?

MysticialIn episode 1 of Railgun, Misaka's railgun up-ends a good chunk of what appears to be an olympic-sized swimming pool. Later in the same episide, it is revealed that her railgun travels at a velocity of 1030 m/s. However, the numbers don't add up. Suppose Misaka uses 10 gram coins. At 1030 m/s,...

 
I actually went and did all the math.
 
Xeo
9:19 AM
@Mysticial Do you have time to check the episode I mean?
 
@Xeo which episode?
 
Cartoon physics is a jocular system of laws of physics that supersedes the normal laws, used in animation for humorous effect. Normal physical laws are referential (i.e., objective, invariant), but cartoon physics are preferential (i.e., subjective, varying). Many of the most famous American animated films, particularly those from Warner Bros. and MGM studios, unconsciously developed a relatively consistent set of such "laws" that have become regularly applied in comic animation. In a common cartoon scenario, for example, when a cartoon character runs off a cliff, gravity has no effect u...
 
@Mysticial Rule of Cool, etc.
 
Xeo
@Mysticial Whatever episode Touma first meets Mikoto in. :)
 
@Mysticial oh for fuck sake man, you are taking Anime and trying to apply logic to it! Next thing you know you will be trying claim there is a valid use case for Java
 
9:21 AM
@Xeo In any case, this railgun question is something that we might plan to reddit.
Logan is working on an "amazing" answer to it.
If anybody here can also do it, go for it.
Yes it's crazy.
 
Xeo
@Mysticial Mhm
 
But people who watch Anime are crazy.
 
Xeo
Too bad I have to work today. :)
 
It doesn't have to be now.
It'll be at least a few days before we do anything.
Since we have some administrative tasks to clean up on before we launch our publicity campaign.
 
@Mysticial you also need to consider that normal currency is not magnetic, and thus not much use in a rail gun.
 
Xeo
9:23 AM
@thecoshman It's not a real railgun.
It's just her letting a coin ride along a big load of electricity.
 
It's not a real railgun.
 
@Xeo oh, so we can excuse the fact that the ammunition would not work in the type of weapon it is claimed to be, but when it appears to carry more energy then it should we have to rip it to shreds?
 
It's a cartoon
I think I'm going to start referring to all "anime" as "cartoons". Anime is not an English word.
 
@LightnessRacesinOrbit then stop drink coffee, in fact, don't even go in cafes. Eat cow not beef, pig not pork. in short, don't be an idiot
 
@thecoshman Those are all English words, doofus.
 
9:29 AM
Oh god help me the gravity is too high today and it's raining I don't want o get up
 
Xeo
@thecoshman It's not a wreapon either.
 
Anime refers to a very particular style of cartoon
 
Xeo
She's just creating electricity and sending it somewhere, along with the coin.
 
@LightnessRacesinOrbit They are now but they were not always, doofus
@Xeo shut it
@BartekBanachewicz just a few more days and I will have a working anti gravity device...
 
@thecoshman And I have decided that "anime" never will be, doofus.
ooooh
 
9:31 AM
Anime sucks anyway, so why bother, my stellar frind?
 
@LightnessRacesinOrbit good job majority consensus can out way idiotic views, doofus
 
just realised something
@thecoshman You mean "outweigh" and, no, because I lead the way in everything.
 
@LightnessRacesinOrbit perhaps...
 
@Zoidberg I can now go get ingredients for this! Hurrah!
@thecoshman Certainly.
 
@LightnessRacesinOrbit needs bacon too
 
9:33 AM
@thecoshman Yep.
5
A: A virtual function header followed by a statement

Lightness Races in Orbit Am I right ? No, not at all. These are declarations of functions that are intended to form, in part, an interface. Read about pure virtual functions in your C++ book.

^ mehehe
 
and black pudding
 
@thecoshman NO.
 
@LightnessRacesinOrbit (╯°□°)╯︵ ┻━┻
 
@thecoshman Very inventive.
 
and I would drop the silly tomatoes and scramble the eggs
 
9:34 AM
I would, usually
 
and brown sauce
 
But this time I'm feeling it just as shown.
> I found my way over the Ireland
 
oh for fuck sake
 
could not one of you have told me that before now
 
9:34 AM
and your link to None_atm_:( doesn't work
@thecoshman I don't understand; please repeat that in English.
I just spotted bacon on the plate that's only partially visible
and HP sauce, though I won't be using that
 
@LightnessRacesinOrbit ¬_¬ are you broken?
 
@thecoshman That's what she said
 
@LightnessRacesinOrbit then you are doing it wrong
 
@thecoshman You haven't figured out how this works, yet, have you?
 
@LightnessRacesinOrbit you are doing it wrong
 
9:37 AM
@thecoshman What I do is the correct approach. Pretend my name is Icorrect and it'll be easier to remember.
1
Q: How to get int's from one .h to another .h

user2028399I have two header files, and I need some of the variables from header file 1 in header file 2. Here is some info to help. int SelRace, ... char Race[80], ... These two are from header file 1, and I need these values in header file 2 to follow if() statements. In header file 1, SelRace is assig...

enjoy
 
@LightnessRacesinOrbit If I do pretend that, your name sucks and is terrible and you should feel bad
 
@thecoshman I'll merely need to pretend to feel bad, and I'm fine with that.
I gotta go prepare for my beastial shopping trip.
 
@LightnessRacesinOrbit fine with pretending that you feel bad, or pretending that you feel fine with your feeling bad that you are pretending?
@LightnessRacesinOrbit :O
that sounds so wrong
 
pthread_mutex_t mutex = {0}; this is valid initialization right?
 
@TonyTheLion looks fine to me
 
9:45 AM
@thecoshman out way! - Epic
 
that doesn't mean much mind you :P
@sehe shut it
 
and plonk
@LightnessRacesinOrbit hard-porn-sauce?
 
@thecoshman ok
 
@TonyTheLion No
Use PTHREAD_MUTEX_INIT or whatever it's called
 
@CatPlusPlus ah
 
9:48 AM
Or pthread_mutex_init(&mutex)
 
so that doesn't just put the mutex to 0
 
@ereOn No
 
@sehe plonking who now?
 
Calling on all iostream experts
0
Q: Implement reading from stream via copy

Konrad RudolphI have a class which represents a character sequence and I’d like to implement an operator >> for it. My implementation currently looks like this: inline std::istream& operator >>(std::istream& in, seq& rhs) { std::copy( std::istream_iterator<char>(in), ...

 
@sehe you surely no of the greatness that is HP sauce :O
 
9:51 AM
ohhhh HP sauce
it's like awesomesauce, but better
 
see, tony knows his shit
woah, what a typo :P
 
so today I'm tired and I feel awful
 
@TonyTheLion It's not defined
 
and I have no motivation to do stuff
 
@TonyTheLion You should do sports, that always helps me.
 
9:52 AM
especially not with XML
@FredOverflow I can't
 
Xeo
@KonradRudolph AHAHAHA
 
@TonyTheLion pool?
 
@TonyTheLion Not even some simple dumbbell exercises?
 
@thecoshman as in, swimming?
@FredOverflow oh man.
 
@TonyTheLion as in pub snooker
 
9:53 AM
@thecoshman only for limited time
 
@thecoshman Snooker and pool are not the same thing at all!
Oh wait, you said pub snooker.
Nevermind.
 
tut tut, jumping the gun a bit there freddy boy :P
 
@Xeo Well just answer the flippin’ question ;)
 
I googled for "Medic" and Team Fortress was the first hit.
Is that a good thing?
 
9:56 AM
No.
 
@Mysticial depends
 
Depends on how many hats it has
 
Xeo
@Mysticial: Some questions are tough: anime.stackexchange.com/questions/2229/…
 
@Xeo We don't intend for all of them to be answerable right now.
And we'd actually want a good chunk of them to stay unanswered for when we do the first of our publicity stunts.
 
Xeo
Use of "auto" reduces readability of code, except for code in which types do not convey much information to the reader, like in templates.

In other cases it's important for the user to know if he is dealing with a std::vector or a std::list and not infer that from how it is used, or worse, have to mouse-hover over each variable (while this is not even possible for most editors!).
 
user142019
10:04 AM
Is there something like hPeek to peek a Word8 from a Handle?
 
@Xeo Scott handled that well though
You could use templates, and you could somehow find a way to use multiple inheritance, threads and anything you can dream of, but it just would make your life so much harder and not give you any visible benefits. So why force yourself to use iterators and algorithms that obviously don't fit the needs of the task at hand? Keep it simple, use that plain loop and go on to solve the real problems. Don't mess up your project with 15 lines of workarounds to get in one line of a library solution meant to be slick and elegant. — Arne Mertz 1 min ago
what the frack?
 
@Xeo Oh look someone doesn't know what typing is about
I'm shocked, shocked
 
dat sarcasm
 
I, too, mouse-hover over variables
 
10:13 AM
why why why do I have to deal with frecking XML every single day of my existence?
 
10:29 AM
@Xeo lies
 
Xeo
Uhm, crap. What do I do if pressing . in Vim inserts a tab? :|
 
. repeats last command in normal mode
If you want to type, go to insert mode
 
Xeo
That's not the problem, but I can't enter commands anymore. : will inserts tab aswell, but I see now this isn't related to me fucking up something in Vim. Even in normal console, I only get > when pressing :.
So I must somehow have changed my layout.
 
Congrats
 
@Xeo Alt+Left Shift is the default key combination.
 
Xeo
10:36 AM
Yeah, that's what I thought too. :(
But doesn't fix it.
 
Have you tried "reset"'ing your console ?
 
Xeo
Hm, seems related to that one terminal only, yeah
 
@Xeo That sounds like an English layout.
@Xeo Keyboard layouts are per-app in Windows.
 
Xeo
@R.MartinhoFernandes Aye
@R.MartinhoFernandes Linux.
$ loadkeys de doesn't help. :|
 
Have you tried turning it on and off again :P
 
Xeo
10:47 AM
I have an unsaved file in Vim, although I finally found : on the English layout.
 
kick it
 
I thought all programmers more or less knew most of the quirks of English keyboard layout
 
I don't know how you can use non-English layouts
 
I hate iostreams :(
0
A: Implement reading from stream via copy

Konrad RudolphAnswering my own question, I should have been more careful: The std::copy method will always read until the end of the stream’s input. This is simply not what I want so I cannot use that method here: I want to read only as long as reading is successful (in other words, as long as in.good()). In...

(except that in my case it’s vastly more complex since I’m not actually reading chars, so while (in.get(ch)) doesn’t succeed …)
 
@CatPlusPlus I get confused and upset with even an Merkin one
 
10:54 AM
@StackedCrooked Coliru is timing out on some very simple code (a call to std::make_pair<int, int>).
 
@KonradRudolph you are not alone
 
@jalf Small solace that is
we should ditch (= deprecate) all of C++ iostreams and write a completely new API proposal for a better, incompatible streams standard library
 
Xeo
@KonradRudolph Good luck.
 
@KonradRudolph of you go then
 
@KonradRudolph not the first time it's been suggested. It'd be a lot of work though :)
although I did see somewhere that the committee actually stated they were open to a completely new I/O library, which was a bit heartening. I'd assumed they didn't want to add new libraries which overlapped too much with existing noes
 
10:57 AM
if you are going to introduce a new one, it has to be worth while
at least you can ignore the existing iostreams stuff, just leave it in so that old stuff still works
 
yeah
 
what's the boost thingy like for it?
 
Xeo
There's no I/O replacement in Boost. But there's Boost.IOstreams
 

« first day (838 days earlier)      last day (4103 days later) »