« first day (629 days earlier)      last day (4337 days later) » 

Xeo
4:08 PM
@Xeo: haha, you were supposed to test it, not use. ideone.com/hgLHjAgent_L 2 mins ago
Okay, whatever.
Wtf.
 
@0xSina Apparently you were the one having fun with ugly, low level C++.
 
Weak troll.
 
Xeo
@0xSina Show us the original C++ code and the new and shiny Ruby code, let's see how much we can improve the C++ version.
 
No, really don't.
I can imagine the quality of both.
 
Xeo
Heh
Sorry, but I'm in a "feeding the troll" mood right now.
 
4:12 PM
Also congratulations on discovering the notion of language expressiveness.
Would you like a medal? Maybe it will help you grow up.
If you want to feed the troll, then don't ban him with flags, eh.
Really, it's so hilariously inept attempt, he might be fun to keep around.
Also have fun with your abomination-fueled Objective-C.
 
:4416706 Also, congratulations on getting yourself suspended.
 
0
Q: Simple bool switching not working?

0xSinaI am flipping the value of a simple BOOL like this: active = !active; NSLog(@"%@", active? @"active" : @"not active"); I've done this numerous times but right now, for some reason it's not working and it's really pissing me off. When ever the flow hits here, it always prints "active". It's not...

Lol.
 
Apr 21 at 23:40, by 0xSina
I have concluded that i was utterly wrong. Next time I will think twice before saying something that offends other people. Especially something in which I have very little to no experience (other than just a 2nd yr beginners class)
lol
 
lol
 
4:17 PM
THE BOOL IS NOT SWITCHING GUYS WHAT DO I DO
 
We should have flagged for mod. 30 minutes is not enough.
Check how many times he came in here with similar statements.
 
Incompetent idiots are so funny.
Apr 21 at 23:22, by 0xSina
@Xeo Nice...how much do you enjoy dealing with raw buffers and sockets when making a simple web API call...was this sent off to neverland too?
Lol.
Apr 21 at 23:16, by 0xSina
LOL just goes to show how much you hate what you program in. C++ originated from C and is 99% compatible
 
If you troll the lounge, get ready to be laughed at.
Because that's what I'm doing right now.
 
You can't troll the trolls.
 
in JavaScript, Jul 1 at 5:51, by 0xSina
hey guys, quick question. I am getting syntax here in this snippet, can someone take a quick look please:
 
4:22 PM
That is not the point. The point is, that if a function gets passed a shared_ptr there is no guarantee, that it is not null. If you really want to write correct code you would have to check for nullptr before using the ptr. Given, that 95% of all coders don't give a damn. — LCID Fire 3 mins ago
 
hehe.
"I am getting syntax here"
 
That's why they invented that worst form of hell-banning.
Where trolls can only see each other.
 
"I can't even spot a syntax error without asking Internet for help."
 
Imagine putting a troll up against an Eliza bot that says nothing but mom-insults.
 
It'd be like putting him against DeadMG, but requiring a server with Eliza running.
2
 
4:23 PM
what? this is not stack overflow?
3
 
No. It's this way -> Stack Overflow.
room topic changed to Lounge<C++>: Not accepting questions, too busy laughing at inept trolls. [c++] [c++11] [c++-faq]
I mean, did he actually think we'd care?
Oooh, some random person said C++ is low-level, I'm gonna go cry myself to sleep.
 
@CatPlusPlus If we didn't care, we wouldn't have laughed.
 
Just... wat.
@RMartinhoFernandes No, see, that's the wrong reaction to that ICE BURN.
We should've cried.
Or something.
I don't get it either.
 
@CatPlusPlus he, lol
 
He's still hanging around, maybe waiting for suspension to wear off for next round.
Making notes and trying to come up with ultimate BURN.
THAT'LL SHOW THEM C++ PROGRAMMERS.
 
4:28 PM
We'll just laugh.
 
We know that.
He doesn't seem to get it.
 
sbi
Well, you have been talking about the guy for almost half an hour now. "I do not care" does look different in my book.
 
Laughing at him, to be precise. I don't care about that UBER INSULT.
 
I can totally imagine this conversation:

Troll: PLEEEEESZZE!!! Help! I can't get this stupid C++ thing to work.
Eliza: You suck.
Troll: C++ sucks and you know it. It takes 200 lines to do anything.
Eliza: Your mom sucks.
Troll: Why do you use C++, it's such a shit language.
Eliza: Your grandma sucks.
 
Oh, squared mom-insults.
 
4:30 PM
Coincidentally, this is the only way you can talk to PHP users.
 
@CatPlusPlus PHP users only talk using varying levels of suckage.
 
Ohhh, ahahaha
Apr 21 at 23:26, by 0xSina
Ruby has state of the art GC
STATE OF THE ART.
 
We should build a troll bot. Eliza Squared - Special Troll Edition
 
eliza is a bit old
 
@Mysticial Put some smarts in it, fallback to generic mom insults when all else fails. Sounds like a plan.
 
4:33 PM
Must be sad to know you could be replaced with a very simple AI script.
 
Well, that guy certainly could. Just go into chat every two months and say that C++ sucks.
 
Anyone here have experience with DirectX. I'm encountering a very annoying culling issue.
 
Alternate with quoting Linus about it.
 
I have two triangles that I want to display next to each-other, but one is being culled out.
 
Debugging obi-wans is so much fun. Not.
 
4:38 PM
Obi-wans?
 
So I disabled culling (D3D11_CULL_NONE), and now the triangles on my 3D meshes are not being depth-tested properly
 
I end up getting an image like that
Depth testing at the rasterizer stage seems to be having issues
 
did anyone post this here yet?
 
Any ideas on what could be happening?
 
Depth test == fail
TRUE
 
@linuxios: exceptions + smart pointers = slow and buggy. — Rafael Baptista 1 min ago
Anyone care to weigh in?
 
Those guys are exhausting for zero benefit.
 
my computer fan sounds like a lawn mower atm
 
I want to apologize for my behaviour.
 
sbi
4:46 PM
@0xSina You did that before, and yet you came back trolling.
 
Do you guys not want me to come back?
 
You're incurable. Now get out and never come back.
 
@TonyTheLion Try blowing it out with compressed air
 
Oh
I feel not wanted
 
Bye bye.
 
4:46 PM
You'll have a very hard time convincing us your apologies are sincere.
 
Yes, that's the right vibe.
 
Young children that lie often learn that one day or another.
 
The internet is not very forgiving
 
And we're worse than Internet.
 
4:48 PM
I just wanted to express my opinion and was dealt ban hammer. I guess that's what the world has come to.
 
we're a naughty bunch :P
 
Okay, now time to do something fun.
Weeeeeeeekend.
 
You can't even express how you feel
 
Just one sentence.
 
sbi
4:48 PM
@0xSina I have just looked through your chat history here and found that you've been here for the third time, and you have been trolling worse every time you came. This time you got high enough to hit the radar. The next time I see you trolling here, I'm not only going to flag a mod, but I will also start a discussion on meta about what to do with you.
 
Lol excuses for trolling.
 
(i'm hopelessly outdated. never had a game console.)
 
You can't spin this your way, sorry.
 
@CatPlusPlus They always try.
 
@CheersandhthAlf Me neither, waste of monies.
 
4:49 PM
@sbi wow! someone pissed off the Gorilla
I have an XBox I have never used
 
@TonyTheLion Yeah, you, by calling it "Gorilla".
 
"it"
lol :-)
 
@RMartinhoFernandes "it" has a name, @sbi, last time I checked :P
 
I bet Orangutan won't be happy.
 
threats of meta involvement should not be taken lightly
 
4:50 PM
afaik animals and other things should be referred as "it"
 
That's not a rule.
 
If robots are it, animals are too.
 
Ships are female, everyone knows that.
 
No, ships are male.
 
sbi
@0xSina So, since you seem to so much dislike C++, why don't you just pack and move to the Ruby room? You aren't wanted here anymore, nor do you have anything constructive to contribute or are you trying to get help here. Your only intention, each and every time, was to wreak havoc. So fuck off and see that you give this room a wide berth from now.
 
4:51 PM
Only starships are female.
 
sbi
@RMartinhoFernandes Not in English.
 
What other ships there are?
 
I am sorry, I won't ever come back. Hope you guys forgive me. Bye now.
 
@CatPlusPlus ships are male.
 
@sbi As usual, English is wrong.
 
sbi
4:51 PM
@RMartinhoFernandes What are you even talking about?
 
they are female only in English
 
sbi
@0xSina No, we won't.
 
@sbi About you being a bonobo.
 
Guess what we're talking in.
 
sbi
4:53 PM
@RMartinhoFernandes Shrug. This whole attaching sex to things is mostly arbitrary in all languages doing this. We're (mostly) talking English here, so the statement "ships are female" is correct.
 
@RMartinhoFernandes I always get ranted at for calling him a Bonobo
 
That's because you're a lion. Duh.
 
sbi
@RMartinhoFernandes Really, I wish I had never brought this up. You are a robot FFS! — you of all of us here you be able to remember that.
 
@sbi I'm not trying to be rational, dammit.
 
sbi
4:54 PM
@RMartinhoFernandes You mean you are "trying to not to be rational", right? You are a robot, after all.
 
I'm trying to be imaginary.
 
@CatPlusPlus We had that punfest yesterday.
 
Every day is bad pun Friday.
 
@sbi I was trying to make emotion-based statements :(
 
4:56 PM
Guys
 
I've been tasked by my boss to settle down some answers to code-style related questions
With good references and all
 
@kbok just take something like llvm code style guide
 
Code style with references? What.
 
(with enabled exceptions, of course)
 
Xeo
4:58 PM
@kbok Take the Google coding style guide! /ducks
 
Well actually we have a style guide
but those are very specific questions
 
@kbok well what are they?
 
There's a bunch of 'em, but a few are worth mentionning
 
sbi
@RMartinhoFernandes One more time. This is a gorilla:
 
Such as "Should we use clone methods for polymorph copying" ?
 
sbi
4:59 PM
This is a bonobo:
 
ah... the first rule should be "four spaces"
 
"Should we use init() method to factor constructor code ?"
 
@kbok No.
 
@kbok no.
 
@kbok That's a possibility, but couple it with a smart pointer that is aware of it and lets you keep using normal copy semantics. plug
 
sbi
5:01 PM
@kbok Given you are using runtime-polymorphism, what would be the alternative?
 
@kbok is there any other way to do it?
 
Magic.
 
@kbok never
 
sbi
@kbok If one of your cow-workers really asked that question, get him fired.
 
Well I think polymorphic copying is rarely needed and indicates an issue with the design
 
5:01 PM
Sometimes it's needed.
And then you do clone. But really, use value_ptr or something.
 
@CatPlusPlus Why not ?
 
Two-phase construction doesn't play nice with RAII.
 
It's been discussed to death.
The intermediate state between construction and init() can only be a source of bugs.
 
sbi
@kbok What about Exceptional C++ Style? :b
 
When ctor finishes, the object has to be in a valid state.
Everything else is wrong.
 
5:04 PM
@kbok construction == initialization. after object was constructed, it should be fully functional
 
@sbi I's actually on my reading list
 
Either object exists or not.
 
If you think you need init(), you may be pining for optional instead.
 
sbi
@kbok For the same reason you do not poke yourself in the eye with a fork: It only brings disadvantages, no advantages.
 
you use init only when exceptions are forbidden
 
5:05 PM
I hate how the blue flag circle stays on my avatar even if there's no flags I can act on.
 
When exceptions are forbidden, run for the hills.
5
 
@sbi it does have one advantage, in that it's simple and obvious how to create two mutually referencing objects. (It can be done without init, but how is less obvious)
 
@CatPlusPlus yep.. but I really like llvm, even though it's without exceptions
 
sbi
@MooingDuck Must be a bug. For me, it sometimes takes a while until it disappears, but it never stays.
@MooingDuck If you need this, you will need two-phase construction for at least one of those types, yeah.
 
Ok. Next : "Should we use references for output arguments ?"
 
5:08 PM
@sbi Provide a private backdoor for that and use a friend factory function that makes both together?
 
@kbok yes, and pointers only if they are optional
 
This one is badly formulated
 
@kbok Avoid output arguments in the first place.
 
@kbok If you really want output arguments.
 
What about NRVO ? Shouldn't it take priority ?
Right
 
5:09 PM
My favourite counter-example is std::align: it's a mess with output arguments.
 
But yeah, pointers only when out can be nullptr.
 
sbi
@RMartinhoFernandes Yeah, of course you would put this somewhere behind the scenes. However, that doesn't change the fact that you will have to deal with it, if only behind the scenes.
 
If it took two arguments, and returned two values it would be sooooo much better.
 
"Should we use NVI ?"
 
The what?
 
5:09 PM
wut?
 
Non Virtual Interface
 
@sbi Ok, I was just asking if that was the simplest fix. I never had to deal with it in C++, so I have no experience.
 
dunno, if you really need it, maybe
 
GotW says yes. Make of that what you want.
Personally, I don't care about that.
Aw, I gotta go to the shop.
 
just catch a mouse, if you need some food
 
5:12 PM
lol
 
lol, this one is stupid : "Is there a level limit for inheritance graphs ?"
 
Yes. But a fuzzy one.
 
@kbok no, but you shouldn't use deep graph if you really don't need it
 
If you're asking the question, then it's probably too much.
 
@kbok assume the answer is no unless dealing with "recursive" template magic.
@kbok now that we have rvalues, return tuples instead of having output arguments.
 
5:16 PM
@MooingDuck or optionals... ah, wait, we don't have std::optional
 
That's cool, thanks everyone
Well I still kinda need to find references to back this stuff up
 
@kbok you always can refer to me =)
 
@kbok just link to chat. Nobody will look at the references anyway
 
@Abyx Did you wrote a book ? They want that stuff to be in a book
 
@kbok nope
 
5:18 PM
@kbok you could claim there's a book
 
@MooingDuck it rather looks like a toilet paper
 
@MooingDuck They asked for solid references, and I'm not sure if a bunch of animals and a robot are solid references
 
I believe the @robot is solid
 
Well, we ain't liquids.
 
5:21 PM
@MooingDuck um wut?
 
@kbok says the fox
 
@MooingDuck I's actually a dog
 
@kbok There are SO questions for most of those. You could link there.
 
Hey, me and robot even got job offers through SO, we're solid.
 
@kbok suuuure
 
5:24 PM
@CatPlusPlus Did you get good ones ?
 
@kbok No.
I think the Cat will readily agree.
 
I've been approached by Facebook last month, via Careers 2.0. We had 2 interviews and finally they told me something akin to "Well, turns out you suck. kthxbai"
 
I got a job offer from a friend of a friend who wanted to make a videogame. Does that count?
 
@MooingDuck Ow.
 
5:26 PM
@MooingDuck Ha, same thing happened to me last week.
 
Lemme guess, said friend of a friend knows next to nothing about computers.
 
@RMartinhoFernandes I dunno. I just play videogames with him. I have no idea if he can code.
 
@MooingDuck Maybe you misunderstood and your friend's friend actually wanted you to play video games
 
@kbok no, he wanted to know if I knew anything about programming. I should go back and find out if he wanted me to do it all, or if he actually has a base already.
 
Yeah, interview the hell out of that bastard.
 
5:31 PM
Interrogate him the Jack Bauer way.
 
I like when you think of something random and then realize that you could update one of your previous answer with an obvious method of doing the same thing, but much easier to implement "mindwise" (for a novice)
 
oh yea, if you ever want shitty advice: reddit.com/r/shittyadvice
and this is an entirely different subreddit, which I just discovered: reddit.com/r/ShittingAdvice
 
instead of explaining to novice programmers have they should implement operator< for a type which is meant to compare more than one member I'm (after giving them the short version for operator<) going to recommend them to use std::pair (or std::tuple) which already have operator< defined
such as return std::make_pair (lhs.field1, lhs.field2) < std::make_pair (rhs.field1, rhs.field2);
I'm prepared to have someone shouting at me in a sec, but it's okay.. go a head.
 
std::tie (i.e., no need for copies).
 
@RMartinhoFernandes it's c++11
though yeah, that should be recommended if it's available
 
5:40 PM
Copies are bad.
 
Don't hide the C++11 from people. Show it. With time they will move to it on their own.
 
I updated my answer with info about the "c++11 way"
 
sbi
Another PS question, @RMartinho?
 
Fire away.
 
sbi
I have a PS function with one parameter:
function ProcessExternal($external)
{
  $idx = $external.IndexOf(" ")
  $extPath = $external.Remove($idx)
  $extName = $external.Substring($idx+1)
  echo "`"$extName`" => `"$extPath`""
}
 
5:42 PM
@refp I think for that part the text should be bigger.
 
sbi
I call it thus:
$externals = $(svn propget --strict svn:externals $thePath.FullName)
$externals | foreach-object -process {ProcessExternal $_}
All fine.
When I add another parameter, all blows up.
 
Xeo
16
Q: Implementing comparision operators via 'tuple' and 'tie', a good idea?

Xeo(Note: tuple and tie can be taken from Boost or C++11.) When writing small structs with only two elements, I sometimes tend to choose a std::pair, as all important stuff is already done for that datatype, like operator< for strict-weak-ordering. The downsides though are the pretty much useless...

 
@sbi Can't you just use the Path class instead of raw string manipulations?
 
@sbi Well, what do you pass to it?
@EtiennedeMartel There are no paths involved.
 
@Xeo are you saying I should link to that question instead of writing my own answer, or what are you implying?
 
5:44 PM
@EtiennedeMartel It's a string with a URL, a space, and some raw text.
 
@EtiennedeMartel Yeah, maybe it should..
 
@RMartinhoFernandes Oooh. Alright.
 
sbi
@RMartinhoFernandes Oh. Forget it. It's now working.
 
@refp Because now it looks like you're ashamed of talking about C++11.
 
sbi
Damned if I knew why it didn't work!
 
5:45 PM
wait, I got it, nevermind
 
Xeo
@refp I didn't read the text before that, sorry. It was basically an answer to "I'm prepared to have someone shouting at me in a sec, but it's okay.. go a head."
 
@MooingDuck lot's of (removed) messages from you, which were previously responses to my previous messages. anything you'd like to tell me?
 
@sbi I'm so awesome the problems just disappear when you threaten to ask me for a solution.
At least I like to think that.
 
@MooingDuck I mean.. it's easier just sending a note with Yes [ ], No [ ] Maybe [ ] then to come up with me saying something which I cannot comprehend.
 
@EtiennedeMartel And it should be the other way around :)
 
sbi
5:47 PM
@RMartinhoFernandes Yeah, of course. And don't you dare to not to be available tonight!
 
Actually, I will be unavailable tonight :S
Have dinner schedule with my gang.
This is our get-together for June.
 
@EtiennedeMartel actually I was ashamed of talking about c++11 about 6 months ago.. compiler support wasn't that spread out and giving people c++11 solutions would most often give me questions such as "it's not working, why are you such a lier?"
 
@refp I was accusing you of making a mistake. But you were right. >.<
 
@refp I think the best would be to give the C++11 answer first, then follow with the C++03 solution along with a "If your compiler doesn't support this, use this instead".
 
@MooingDuck three times? haha, I love when I do the same thing.. "this person is so wrong", "or wait no, that's correct..", "no it's not, it's fucking wrong", "or wait erhm.. maybe..", "ah fuck it"..
 
5:49 PM
How do I create a pointer to a std::array with unknown size?
 
@EtiennedeMartel alright, but you owe me an up-vote after that.. I kinda need to rewrite the whole thing ;-)
 
@RMartinhoFernandes you have a gang?
 
Xeo
@ManofOneWay You don't.
 
@refp Earn your upvotes.
 
5:50 PM
@ManofOneWay auto* p = &array;
 
@Xeo Is it not possible, bad practice or both?
 
Not possible.
 
Xeo
@refp heh, no need for auto*, just auto would work too.
 
You need type erasure, which is available through the data() member function.
 
@ManofOneWay If you don't know the size, then it can't possibly be an array.
 
5:50 PM
@Xeo I prefer auto* too.
 
@ManofOneWay std::vector, or T*
 
or.. decltype (your_array)* p = array;
 
anyone want to come on Mumble?
 
hmm, my radio is playing a dial tone...
 
So I need to create a C array basically
 
5:51 PM
@TonyTheLion I'm at werk.
 
@MooingDuck I'm at werk.
 
@ManofOneWay What are you trying to do?
@RMartinhoFernandes Arhem.
 
@ManofOneWay no, just use T*
 
@EtiennedeMartel I was going to say "work", but then your reply popped up and I changed my mind :P
 
5:52 PM
lol
 
Oh, you.
 
werk is Dutch for Work
so made sense to me
 
std::array<thing, 14> cont;
thing* data = cont.data();
 
@ManofOneWay You can't create a pointer to a C array of unknown size either.
 
Woa, my great grandfather lives through me, it seems.
 
5:52 PM
how so?
 
In both cases, all you can do is get a pointer to the first element.
 
He was Dutch.
 
@RMartinhoFernandes That's what I meant
 
So there's no reason to use a C array.
@ManofOneWay Then use data().
 
5:55 PM
@EtiennedeMartel there we have it, I bet I screwed up somewhere though but I wanna smoke so bad right now..
 
@refp What kind of smoke?
 
am I the only one that often writes std::typle instead of std::tuple? something must have misfired in my brain when reading it the first time
 
@EtiennedeMartel I'm black, of course I'm gonna hit me up with some of that green shit..
not really though, just a regular smoke/fag/cigarette.
 
Ok.
Awww.
 
5:56 PM
Another thing.. If I do std::unique_ptr<int> a = {1,2,3};. Will {1,2,3} be moved to the heap or what happens when the current scope has ended?
 
That doesn't compile.
 
I had a shoot today with the sexiest photographer I've ever worked with.. like the typical "girl next door" material
 
@refp Pics plz. Har har.
(I'm not serious)
 
Ah I need to MakeUnique sorry
 
@EtiennedeMartel of course you are serious..
 
5:58 PM
Tututu.
 
@ManofOneWay even with make_unique it won't compile. Can't construct an int from a {1, 2, 3}
 
I was standing there in briefs the whole shoot, I got certain looks from her which must have been more like "ey, I like that" and not.. "ey, I'm a photographer.. what am I going to shoot next"
 
@refp But, yeah, your answer is good.
 

« first day (629 days earlier)      last day (4337 days later) »