« first day (613 days earlier)      last day (4332 days later) » 

sbi
10:00 AM
Nothing is less amusing than a constant stream of amusements.
 
@sbi That is amusing.
 
@sbi while(true) std::cin >> amusement;
 
I'd think it more like constexpr stream<amusement> amusing;
 
@Serge The secret to happiness, summed up in a short c++ program.
 
sbi
@Serge The stream operand of operator>>() is always non-const. (You might want to read the Operator Overloading FAQ.)
 
10:02 AM
lol
@sbi Erm, wrong direction.
 
Awwh...
 
sbi
@RMartinhoFernandes OMG. In almost twenty years, I have never stopped doing this occasionally.
 
Lol... =)
 
@sbi I'm just work with the presumption that the image is NSFW
 
It's SFW.
No wait, it isn't.
 
10:05 AM
You'll do it to the code of your grandkids, "No no, you've got it all wrong. the stream operand of operator>>() is always non-const. You might want to read..."
Grandson: "I know grandpa! I know!"
 
sbi
@thecoshman Um, quite. Really, I dunno.
 
@RMartinhoFernandes damn you!!!
not that bad though
prime example of rule 34 though :P
 
@thecoshman I thought it referred to the one with the knitting old lady.
 
Fine.
char* const amusements = new char[1024];
while(true) std::cin >> amusements;

there.
something's constant.
 
@RMartinhoFernandes are you trying out you troll chip again?
 
10:07 AM
@thecoshman I don't have one.
 
@RMartinhoFernandes would you look at that, it sort of works
 
sbi
@Serge Ugh. That's an unnecessary dynamic allocation plus a buffer overflow lurking. What did you say is the reason you have so little rep?
 
Wut? I didn't troll anyone.
 
It's integrated into main CPU.
 
It was an honest mistake.
 
10:08 AM
Why anyone would decide to use garbage collectors, vs managing it themselves, is beyond me. But maybe I'm just a masochist.
 
sbi
Anyway, you guys are a hedonistic bunch. Rather than suck amusement out of your input, you should feed output into the world: while( protagonist.is_alive() ) std::world << protagonist.create_something();.
 
@sbi Because I do not have many questions to ask, and I definitely do not have many answers.
 
How many roads must a man walk down?
 
sbi
@Serge Because they write code as bad as yours, and find letting the machine clean up after them easier than learning.
 
@RMartinhoFernandes 13
 
10:09 AM
@sbi and how would you suggest dealing with the buffer overflow issue?
 
@Neil Wrong. 42.
 
sbi
@Serge std::string
 
Als
Ola
 
sbi
@Als Is that her name?
 
@RMartinhoFernandes That's the answer to life, the universe, and everything.
 
10:10 AM
@sbi Is there another option?
 
Als
@sbi Naah...I am just lazing around before the new job commences :)
 
sbi
@Serge Of course. Create your own type amusement and implement input so that it cannot overflow.
 
@Neil No. It's the answer to "How many roads must a man walk down?"; "What do you get when you multiply six by nine?"; and the Ultimate Question of Life, the Universe, and Everything, which is possibly one of the other two.
 
Als
@Serge std::vector<char> if not std::string.
 
sbi
@Als And you do this lazing-around with a girl named Ola?
 
10:11 AM
"life, the universe, and everything" isn't even a question.
 
sbi
@Als For that, no stream input operator is defined, though.
 
Als
@sbi uhm...Not..but the lazing around ends with a moan ooolllaa
 
@RMartinhoFernandes Whatever. I still say it's 13.
 
(This is one of my pet peeves, btw.)
 
sbi
@Als That sounds dirty. What is it?
@RMartinhoFernandes It is — in the same way that "42" is (not) an answer.
 
10:13 AM
She's named Ola? I suppose she is ethnic then.
 
Als
@sbi Yup, std::string is the only way, and if Op can't use that I guess S/He can't use 1std::vector` either and is stuck in dark world of procedural C++.
@sbi It is what it seems :P
 
@sbi What? How isn't it an answer?
 
Any examples of this you could point me to?
Or would it just be an overload of operator>>(std::somethingstream, my object type goes here); ? I've never really worked with the cin or cout object's members, outside of >> and <<.
 
sbi
@RMartinhoFernandes What does "ethnic" even mean from a southern Asian POV?
 
@sbi Nothing. That was the joke.
 
Als
10:15 AM
nitpick: I am not South Asian. I am just Asian.
 
sbi
@Serge I could point you to the Operator Overloading FAQ.
@Als I thought you are living in India? Isn't that in the south of Asia?
 
@Als India is in the south of Asia.
 
I'm tired.
 
sbi
@Als I still have no idea. Give me a hint?
 
Als
uhm...I think We are in central part of Asia!
oh goddamn We make up most of Asia anyways
 
10:16 AM
And I never said my code was good. =/
 
sbi
@Als Not geographically, no.
@Serge Nor did I, really.
 
Als
Okay before my poor geographical knowledge gets raped, switch the topics...
 
Technically Russia makes up most of Asia for what concerns land mass, unless I'm mistaken
 
sbi
@Als Fine. Now what about that Ola?
 
10:19 AM
@sbi Yes, I know. You were rather closer to implicitly insulting me, as a whole, over a joke piece of code. But nothing more, goodnight.
 
Als
@sbi What about? psst psst lets keep that a secret
 
@Serge Serge, he's an ape. He doesn't know any better.
 
sbi
Wow, someone is hurt here, because his code was criticized. That's a concept I have a hard time understanding.
 
Als
@Serge uhm...even if the ape did said something bad (i am not sure he did), I am sure he said about the code not you.We all write bad code sometimes, Its natural. And any criticism should be only taken constructively to write better code next time.
 
sbi
@Neil That, coming from a rectangular mandala, is hilarious.
 
10:21 AM
@sbi At least I'm not an ape. :P
 
I don't write bad code.
I often read bad code I wrote, but I never write bad code.
3
 
sbi
@Neil At least, non of us envy you for being a randomly computer-generated pattern.
 
@sbi At least I don't smell my own poo.
 
If C++ was on Steam, you'd get an achievement now. — R. Martinho Fernandes 14 secs ago
 
Als
@RMartinhoFernandes Ya you are a machine, You were programmed to write good code.Not that its to your credit, its to credit of ones who programmed you
 
sbi
10:24 AM
@Neil And how could you, lacking a nose?
 
Als
57 secs ago, by R. Martinho Fernandes
Ow.
One more takes offence
 
@sbi I wouldn't, that's the point.
 
sbi
@Neil No nose, no point.
 
@Neil You would if you could.
 
10:26 AM
Though admittedly, I should probably update my avatar to something that can easily be made fun of
It's lonely being a rectangular mandala
 
@Neil A singleton!
 
PHP logo!
 
Not quite so literal :P
 
Upside down PHP logo!
 
10:27 AM
bHb :/
 
sbi
@RadekSlupik byb
 
Als
Whats with php these days? Earlier it was Java! Java programmers were shot at will here
 
Both suck, but PHP sucks more.
PHP is a vacuum cleaner, and Java is the dust.
 
sbi
@Als Yeah, but in order to not to get bored, we can only keep bashing the same (non-C++) language for so long.
 
Als
oh btw moderator elections are out @awoodland didn't win again.
 
10:30 AM
Slowpoke.
 
sbi
@RadekSlupik More like "Java is the dust, PHP is the mites." Otherwise you could clean up the mess that Java made by applying PHP.
 
hello bestest room :)
 
@sbi but PHP sucks more. 3:
 
Als
@TonyTheLion Hello horny tiger/lion..dont know which one you are today :P
 
A Lion, cause I am King!
 
sbi
10:32 AM
@TonyTheLion Hi!
 
Als
@TonyTheLion who used to be a tiger..not so long ago
lol
 
@sbi ohai :)
 
13 hours ago, by R. Martinho Fernandes
@awoodland didn't win. That's proof the conspiracy exists. Btw, I have designer tinfoil hats to sell.
 
Als
@sbi uhm thats nice
 
@Als well, it's been while, I've left that Tiger part of me behind.
 
sbi
10:32 AM
@Als That's art! (Allen Jones, Table; 1969)
 
Nicer would be if she's been real.
 
har har
 
Als
@sbi just hope that glass is detachable haha
 
Tigers eat redcurrants.
 
@sbi damn you and lack of NSFW tagging!
 
10:33 AM
But they don't eat peaches. For peaches you need a crocodile.
 
Radeks eat pork.
 
@RMartinhoFernandes Wut?
 
oof
 
Als
oh I got a gold shiny for famous question..that too a question on Android :P
 
sbi
@thecoshman It's quite simple, really. You do not open every mail attachment coming in, you do not fuck every whore, and you do not click on every link in the Lounge. The all might be contagious.
 
10:35 AM
looks like our VC solution is going to grow by quite a few projects
 
@Neil I'm quoting Monty Python. It's not supposed to make sense.
 
might hit 170 or so. Fun fun
 
@RMartinhoFernandes Ah, okay, you're excused then
 
sbi
@jalf Puppy? That you in there? Did the angry penguin eat you?
 
oof, not woof
 
10:36 AM
Jalf a penguin?
I thought Jalf was a snowman. :/
 
sbi
@jalf I saw that, but I presume a "w" sound is hard to make with that beak?
 
Are you blind?
 
Als
lol
 
sbi
@RMartinhoFernandes Snowblind, prolly.
 
Snowmen don't eat dogs.
 
10:39 AM
@RadekSlupik Jalf is clearly a penguin name.
 
But maybe it's also a snowman name!
 
@sbi Are you at work?
 
@RadekSlupik It's not.
 
Weird. I had just closed a link showing "I'm a lumberjack lyrics" from Monty Python and hit this link: stackoverflow.com/questions/11114862/…
 
Pop quiz: Am I bored?
 
10:41 AM
lolz
 
@RMartinhoFernandes I've printed the book now =)
 
And my first thought was, "Monty Python doesn't suck"
 
Python doesn't suck.
 
sbi
@ManofOneWay Sure. And you?
Oh, the robot finds out about cheating. Nice. It now reaches the intellectual level of crows and apes.
 
@sbi I didn't cheat! There's a typo there in "penguon" and a sentence starting with lowercase. It's clearly not faked by me.
 
sbi
10:45 AM
@RMartinhoFernandes Yeah, that's what my 5yo would say, too, when caught at cheating.
 
@sbi Not today actually, I'm taking two days off. And on friday it's midsummer and then we are free as well. So I'll be having a long weekend!
 
sbi
Ugh. Someone again sneaked The Language That Must Not Be Named into the tagline. You bastards!
 
it is a penguin, yes. :)
 
sbi
Much better now.
 
Wut. It didn't mention any language.
The ape is gone bananas.
 
sbi
10:47 AM
@RMartinhoFernandes I cannot go bananas, since I am born that way.
 
53 mins ago, by R. Martinho Fernandes
room topic changed to Lounge<C++>: This room is bester than the others. [c++] [c++11] [c++-faq] [c++-fuq]
You fixed nothing.
 
sbi
@RMartinhoFernandes I swear it read Haskell here.
 
What do you guys think of the Windows Surface Tablet?
 
user457812
I think nothing of a product that doesn't have any announced specs or price.
 
It sucks.
 
sbi
10:50 AM
I like that.
 
@Etienne do you want to add Radek to your list of haters?
 
user457812
I want a WTF stamp
 
sbi
@nil On your forehead?
 
user457812
Yes.
 
user457812
I can pretty much guarantee that's the first thing I'd try it on.
 
user457812
10:51 AM
Before going to walmart and stamping everything there
 
why would you do that
 
sbi
@nil If that is indeed the case, then you already have a big read "WTF?!" stamped across your forehead.
 
user457812
I checked, it's definitely not there.
 
@sbi indeed they might, misguided trust
 
sbi
Once I'm at it, I might as well ask the office girls to order this one, too.
 
10:55 AM
@RMartinhoFernandes Are you at work now?
 
@sbi "Whilst I'm at it" FTFY
 
sbi
@thecoshman Oh, so you are ordering them, too?
 
Fuck. Google's decided to do 2PA today. And my phone battery is dead. Arrgh.
I'll just hope no important e-mails come up.
 
@sbi you are already arseing around with linking, thus 'whilst' if you where planing to start linking to shit, it could be 'once', but would be making use of obscure rules for sure
 
sbi
@RMartinhoFernandes "2PA"?
 
10:59 AM
Two-phase authentication.
 
@thecoshman linking != liking
 
sbi
@RMartinhoFernandes Oh, is it a must now?
 
@RMartinhoFernandes aw. that hurts, then
 
@sehe well done
 
@thecoshman :)
 
10:59 AM
@sbi No, but I have it enabled. I need to enter a code every 30 days or something.
Today is day 30, it seems.
 
@sehe hinting != hitting
 
sbi
@thecoshman Actually, I was planing to ask the office girls to order that "WTF" stamp. And once I was at it, I could ask for the like/dislike stamps, too.
 
@RMartinhoFernandes yeah... that is the one slight down side to it
@sbi ¬_¬ you win this round 4ner
lunch time :D
 
room topic changed to Lounge<C++>: Round two is about to start. [c++] [c++11] [c++-faq]
 
sbi
@RMartinhoFernandes Wait. You need to do 2PA only once per month? Then what's the point in this? If someone hacks into your account, first thing they do will be switching off 2PA.
 
11:02 AM
Trolls everywhere!
-2
Q: Is it possible to get local variables through reflection?

user960567I have a method with at least 50 local variables. I need to select a variable from a string value. Is it possible to access a local variable with C# reflection?

 
@sbi You need to do it if you use a different computer too.
 
sbi
From my childhood.
 
@KonradRudolph Dammit who closed it. I have answered it :)
 
sbi
@sehe It's written right there who closed it.
 
@KonradRudolph Code was edited in. Not even compilable.
 
sbi
11:05 AM
@RMartinhoFernandes Ah, Ok. But if you leave for lunch and forget to lock your screen, and some cow-worker of yours logs into your google account, you're still busted except for once a month? That sounds quite useless, IMO, because most attacks are social anyway.
 
@sbi Hmm. I think I knew. It's figurative speech/idiomatic excalamation (WhoDunnit)
 
@RMartinhoFernandes So now he’s proven that he’s a troll, or a huge idiot, who uses arrays (well, lists) without understanding what they are
 
sbi
Wait. How did you sneak this in after the question was closed?? — sbi 13 secs ago
 
@sbi There's a window when you can answer, if you start writing before it closes.
 
sbi
@RMartinhoFernandes Is that true? This must be new then, because I was often bitten by a question being closed while I was writing an answer.
 
11:07 AM
It's new, but old.
 
why do stupid comments get upvoted?
Can't add this as an answer while the question is closed, but try replacing all these with a Dictionary<string, List<MyClass>>. — Rawling 4 mins ago
 
sbi
@RMartinhoFernandes Oh, just like me, then?
 
@sbi I never forget to lock my screen. I lock my screen if I get up from my chair for any reason. Anyway, I trust the few people that could possibly have access to my computer without having to break in to the building (that's two people).
 
sbi
@RMartinhoFernandes That was "you" as a plural ("anyone"), not "you" as in "Martinho".
 
@RMartinhoFernandes I did, indeed, start before it closed. And I was pretty swift (replicating/building on the comment)
@RMartinhoFernandes Hehe. Since I started bringing in my SSD to work, I carry the SSD itself in my jacket. I trust everyone, just not the office cleaning crew. Well, less
 
11:13 AM
@sehe We are the cleaning crew here :)
@sbi Meh, teaches them to care about trust.
 
@RMartinhoFernandes Uh strangely related... true
 
sbi
@RMartinhoFernandes Using "closed" as a search string, I can't find anything at meta.stackoverflow.com/questions/59445/….
 
I think it's from before that question.
 
sbi
@RMartinhoFernandes Ow c'mon! That thing starts at Q4/2009!
 
Hmm.
It says it was asked 2010-08-03 12:44:34Z.
That's not Q4/2009.
 
sbi
11:21 AM
@RMartinhoFernandes What? Where?
 
On the right side.
And edit history.
I guess the 2009 bits were retroactive.
Those records are probably not exhaustive.
10
Q: Question Answered After it was Closed?

John Saundershttp://stackoverflow.com/questions/2750866/what-should-i-do-from-here-closed was closed at 2010-05-01 18:08:48Z, but was answered at 18:19:38Z (http://stackoverflow.com/questions/2750866/what-should-i-do-from-here/2751048#2751048). How'd that happen?

 
sbi
Wow. This was in effect as early as May 2010?! I never knew. And I could swear I was prevented from posting an answer long before 11mins after a question was closed.
This (PDF link) is a very interesting study comparing statistical parameters of the evolution of subway networks in 14 metropolitan areas of the world. For example, all networks share the characteristic of having an old "core" and newer branches to that. Statistic properties between those are similar for all cities looked at. Fascinating!
 
11:38 AM
> Here's Jac again. He is writing a game called "Animal Fury", and says it will be "Like Monkey Quest but awesome because you can choose polar bears and they shoot guns." — from raspberrypi.org/archives/1444
 
@sbi This has definitely happened to me before, where I was prevented from posting within seconds after the question was closed, even though I had started composing my answer before.
 
sbi
@KonradRudolph Ah, Ok, so I didn't dream this up.
Come to think of it, there might still be angry comments from me about this at some closed/deleted questions.
 
12:04 PM
@sbi huh, they did songs other than 'you sexy thing'
WHERE DID THAT PLINK COME FROM?
I've hot them all turned off... ¬_¬
wait... it's that song. damn you @sbi
and now back to metal :D
 
sbi
@thecoshman Yeah, in the late 70s and early 80s they made a lot of those songs you will never forget.
@thecoshman What?
 
@sbi the song you linked me, keeps playing a noise that sounds just like the plinking noise in chat
 
sbi
@thecoshman Oh. I don't remember that. (But I haven't listened to that song in years...)
 
@sbi listen to it :P it will make you think you are getting plinked
 
@sbi i associate them with the ymca thing and "biker" gay movement
 
12:17 PM
@CheersandhthAlf hot chocolate? really?
 
hm, from which book do i remember some kid tricking the bad guy into walking into and a biker gay's bar and offending them?
@thecoshman yes?
i mean, not necessarily "biker" but body-building, that sort of thing
 
Heyhey. Is anyone slightly good with rotation matrices?
 
Er, what about them?
 
there are some sin and cos i lower left corner
i think
 
12:20 PM
I'm sure some people are slightly good at them
 
the puppy (@deadmg) also knows a bit about quaternions, i think
i meant lower right, sorry!
 
Well I copied the implementation of Matrix::RotationAxis from SharpDX
And there's a commit here in the git log that says "implementation is wrong. inverted signs"
 
Sooo, what's the question? ;)
 
Does inverting signs preserves the rotation?
 
In linear algebra, a rotation matrix is a matrix that is used to perform a rotation in Euclidean space. For example the matrix :R = \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end{bmatrix} rotates points in the xy-Cartesian plane counterclockwise through an angle θ about the origin of the Cartesian coordinate system. To perform the rotation using a rotation matrix R, the position of each point must be represented by a column vector v, containing the coordinates of the point. A rotated vector is obtained by using the matrix multiplication Rv. Since matrix ...
 
12:22 PM
Uhhhh I'm stupid. Just gonna try :x
derp
 
no, it doesn't preserve
 
hmmm
oh boy I hate people who change stuff without justification
 
the third one is jsut the first with inverted signs
 
you're right
 
I want to put a std::queue<string> on shared memory. Do I need a custom allocator for queue and string or just for queue?
 
user784668
12:31 PM
@Nils Probably for both.
 
What probably!?
 
@Nils both.
unless it's only updated by one process
 
no, you need custom allocator for both regardless
 
Wikipedia rotation matrix section Rotation Matrix from Axis and Angle
The formula has indeed signs inverted from the SharpDX implementation
Could it be related to right handedness / left handedness ?
 
12:37 PM
What exactly are the consequences?
 
@Nils allocators don't propagate (unless you're using a Halpern/Lakos allocator model, ha)
 
@Cicada yes, in the sense that common graphics coordinate system has increasing y downward
while math system has increasing y up
which changes meaning of left/right rotation, I think
 
bob
If I'm interating through a c++ list with an iterator, can I know at which iteration I'm at, or do I have to keep a separate int variable that is incremented at each step to know that ?
 
you have to track that yourself
 
@bob the latter, because list iterators are not random access so you can't just subtract
 
bob
12:38 PM
thx
 
with random access iterators you can just subtract the begin() iterator from the current one to get the offset
 
however, if by "list" you mean an array (as a Python programmer may), then it's different
 
@CheersandhthAlf This is 3D, z is facing "in the screen" but Y goes up
 
bob
no I meant list
 
with bidirectional ones (such as std::list::iterator), that can't be done in constant time, so you have to track it yourself
 
12:39 PM
i nead cåffeee
 
@bob std::distance, but it's O(n)
 
bob
it's ok I'll create another variable. thanks.
 
Okay so the end effect of inverting sings is just inverting the rotation so it's not really that bad
 
@bob use boost::counting_iterator and boost::zip_iterator
 
You're all wrong!!!
Sorry, force of habit.
 
12:43 PM
didn't realize habits could have a force
could you give a measurement in newtons plix?
 
@Cicada sounds plausible
 
@DeadMG force of habit = weight_of_difficulty*acceleration_of_habit
 
user784668
@Cicada This is 3D, it depends on how you set your matrices.
 
0
A: (C++) Reading digits from text file

refpThere are several ways to accomplish what you are looking for, in this post I'll describe three different methods. All three of them assume that you open your file using an std::ifstream ifs ("filename.txt") and that your vector is declared as std::vector<int> v. I'd like to keep it simp...

 
Good hello.
 
12:46 PM
posts like that are a definite sign of me being bored.. at work.
though this MUA is taking forever working on one of the other models.. so I guess I got nothing better to do anyhow
(MUA is an abbreviation for Make-Up Artist, btw)
 
@CheersandhthAlf @ecatmur thx
 
@refp how about a range for example?
 
@Fanael I use left-hand coordinates (for no particular reason)
 
do we have istream_range?
 
@ecatmur No.
those silly Standard monkeys did not provide ranges, which is le silly IMO
 
12:50 PM
^ i thought, reasonable downvote
 
@ecatmur std::istream_iterators don't have .begin, and cannot be used with std::begin either
 
@refp The whitespace placement in this answer’s code irritates me
 
@refp hm, we need an as_range adaptor for iterators whose end sentinel is T()
 
@KonradRudolph I have a perticular way of writing code.. I've had things thrown at me in the past :/
 
@CheersandhthAlf I didn't.
 
user784668
12:51 PM
@KonradRudolph +1
 
it's completely reasonable to infer the return type as Collection*.
 
@ecatmur there is probably a proposal somewhere, though it wouldn't be that hard to write one
 
@refp Like, compliments? (@sbi)
 
@DeadMG i don't think so. if it was just Collection* then no reason to omit it.
 
@CheersandhthAlf He probably omitted it because there's no reason to include it.
 
12:53 PM
@KonradRudolph fixed some whitespaces, better?
 
he returns a value of type Collection* and assigns the return value to a variable of type Collection*.
 
@DeadMG there is a very good reason to include it. it specifies the ownership that he's asking about.
 
@refp Irony?
 
@CheersandhthAlf There is no type which could possibly have an impact on ownership in the above sample.
 
@KonradRudolph I actually changed the last snippet! ;-)
 
12:55 PM
I know you did
be that as it may, I had upvoted anyway
and now I need to go get some (late) lunch
 
@DeadMG there are many such types. like, auto_ptr, unique_ptr, shared_ptr etc. you can't argue that the code would fail to compile with them, since the fucking code does not compile anyway
 
I'm so proud of my self, I hand wrote some notes yesterday, and I can still read them :D
 
@CheersandhthAlf I can completely argue that, since you cannot do T* var = smart_ptr<T>();
 
user784668
@CheersandhthAlf Do you really think that a person who asks about object ownership would use a smart pointer? Or are you just trolling?
 
and even if you did, an rvalue of that type could never own the object longer than the full expression.
which is obviously shorter than the intended use of the object
 
12:58 PM
@DeadMG it's an invalid argument. the code is not compileable. it's pseudocode.
 
which is why no T can ever exist in that situation that has ownership
 
@Fanael yes. it's not the OP's own code. and the OP has demonstrated lack of insight into what matters.
 
he says it has the same meaning
so unless you can show the real code, then that code has exactly the same meaning as his real code
 
@DeadMG you think you can rely on the judgment of the one who's asking because he fails to understand?
is that dumb or not
i say, it's dumb
 

« first day (613 days earlier)      last day (4332 days later) »