« first day (607 days earlier)      last day (4324 days later) » 

7:00 PM
Will it expand to {ar & get<I>(t) & get<I + 1> & ...) ?
Seems a little to good to be true..
 
7:11 PM
huh, 25K exactly
 
Hi ... please help i can't chat in chat.stackoverflow.com/rooms/12562/kyrostat
 
Chat here.
 
;)
 
this is the C++ room
the other is something diffferent
 
@TonyTheLion ...different, yeah. That's it. Different.
 
7:15 PM
@Ahsan why do you want to chat there?
 
@rubenvb Hey man, your mingw64 works epic, nice work.
 
@ScarletAmaranth thanks. I do my best :)
 
@ScarletAmaranth did you get his clang package?
 
@StackedCrooked No, that's exactly what it should expand to
 
let me know if you have any trouble
GCC 4.7.1 is coming up btw
or has been released
 
7:16 PM
@rubenvb did you fix clang's <type_traits>?
 
fuck
@MooingDuck no idea. I mostly don't fix. The only thing I could fix was some ext/concurrency thing, but that caused crashes in apps :/
 
How am I supposed to enjoy my meal when every swallow hurts? Stupid common cold.
 
@rubenvb Very nice, do you also work on the integral parts of the compiler ? (Do you actually do optimization and code generation ?)
 
@FredOverflow with painkillers.
 
After doing 10 hour of job now i think now i can't discuss C++ :( i just want to relax myself
 
7:17 PM
Ibuprofen!
 
This room is not for discussing c++ :D
 
@ScarletAmaranth I build GCC toolchains. I help n00bs set up with my build.
In the case of Clang, I submit bug reports.
 
@Ahsan This room is perfect for relaxing.
 
@rubenvb Epic, keep the good work up :)
 
We're the bestest room.
9
 
7:18 PM
And if possible, small-patch some libstdc++ headers.
2 mins ago, by rubenvb
fuck
I need to update my build scripts to exclude LLVM source if I don't build it anymore XD
Maybe I just move src/LLVM to LLVM and then build
 
@Ahsan C++ is used more as a way of communicating and bringing us together, not explicitly "What is a unique_ptr guyths?!?"
 
easy, simple, works.
 
@Ahsan Don't worry, we rarely discuss C++ in here.
 
@rubenvb alright, if I get bored I may look at it, and if I find a workaround, I'll let you know. Odds: very low.
 
@MooingDuck What would be cool is you fixing dllexport for C++ classes in Clang.
prevents me from testing Qt.
or any other C++ project in the wild really.
 
7:22 PM
@FredOverflow hmm .. i think am on right place, right guys?
 
if (line.find("*ELEMENT") != string::npos)
{
  pSurface = new Surface();
  pSurface->id = iSurface++;
  pAbaqus->mapSurfaces[pSurface->id] = pSurface;
  pAbaqus->surfaceList.push_back(pSurface);
  continue;
}
What is the purpose of continue;?
 
@Ahsan Sure. Kick back and relax.
 
Is it just clarity?
 
@Ahsan right place for what? Probably
 
7:23 PM
for relaxing :D
 
^ he looks relaxed
 
@Drise continue skips what's left in a loop and jumps to the next "pass" of a loop. break jumps out of the loop altogeather.
 
@FredOverflow Say something funny, so we can all star it like a bunch of noobs.
 
so I'm relaxing, but what's next?
 
something funny
 
7:23 PM
@MooingDuck I see.
 
@Drise there's an enclosing loop you're not showing.
 
@rubenvb Yeah, there is.
 
@FredOverflow Chill dude.
 
my int32_t constructor ain't working like my int16_t one does :(
 
@FredOverflow are you on a job?
 
7:25 PM
@rubenvb How so?
 
I think my endianness is wrongly coded in
it's backwards isn't it?
 
@RMartinhoFernandes Thanks a lot! =) I owe you one!
 
oh wait. One element too little
 
@Ahsan You mean in general, or right now?
 
I FIXED ALL THE THINGS!
 
7:26 PM
the old definitions of like, mainframe is a computer you can walk around in, still hold
 
@rubenvb Both endiannesses are backwards from the opposite point of view ;)
 
@FredOverflow See, do what @rubenvb did, and say something funny.
 
@rubenvb Can you fix your uppercase as your final step?
 
@FredOverflow ugh. Most. Unhelpful. Comment. Ever. Not that I can be helped at this point. I'm just rambling.
 
@rubenvb Ramble on ;)
 
7:28 PM
@rubenvb You can invent your own endianness like |x3|x1|x0|x2|. Then you'll love big and little endian forever.
 
@FredOverflow right now?
 
@Ahsan Right now, I am at home, eating noodles, watching historical news replays, chatting in the Lounge.
 
@FredOverflow NOODLES!
 
@FredOverflow wow, nice
 
Oodles of noodles ?
 
7:30 PM
@Drise I am eating noodles, and I have trouble swallowing. Is that funny enough?
 
@FredOverflow It'd probably be more funny if I was at a lecture about UML use cases. Regardless, funny == yes.
 
The smart people are silent. The room has deranged.
 
@Drise Where are you instead?
 
Endianness isn't that bad
trial, error, fixed.
 
Doesn't x86 have a byteswap instruction for endianness conversions?
 
7:31 PM
@rubenvb what? i object. i know, johannes is a bit smarter than me, but i ain't dumb
 
@FredOverflow Work. Using @MooingDuck 's istream overloads to rewrite come prone to failure C code.
 
@CheersandhthAlf in all honesty, you were silent for a while. I know you know a lot.
 
@CheersandhthAlf You object? I function!
 
that is so
he he
 
7:32 PM
@Ahsan See, c++ is used a secondary means of communication most others wouldn't understand.
 
hmm, I didn't see this one though
5 mins ago, by Cheers and hth. - Alf
the old definitions of like, mainframe is a computer you can walk around in, still hold
5 mins does not count as "a while".
@CheersandhthAlf I formally apologize for what I said.
@EtiennedeMartel see? That's how you do it :P
 
replace all "propmts"->"prompts": "13 replacements performed." :(
 
@MooingDuck Oh noes.
 
@rubenvb Stylish.
 
@StackedCrooked Expands to { ar & get<0>(t), ar & get<1>(t), ar & get<2>(t), ... }. Dunno what ar & get<0>(t) returns, so you may need some discardage to fake a usable return, like (ar & get<I>(t), void(), 0).
 
4
Q: Porting an existing class structure to smart pointers

betabandidoI know this question is rather long, but I was not sure how to explain my problem in a shorter way. The question itself is about class hierarchy design and, especially, how to port an existing hierarchy based on pointers to one using smart pointers. If anyone can come up with some way to simplify...

Oh look, UML.
 
@StackedCrooked srsly
 
@CatPlusPlus UML + wall of code. That's the bestest.
 
I voted to close
That's a hell of a question
 
@StackedCrooked it's hard to measure by volume rather than considering pitch :/
 
7:43 PM
why doesn't he just T*->std::unique_ptr<T> or shared_ptr<T>?
 
gasp My program is running!
 
@MooingDuck Away from you?
 
I had to RAII our company's "compiler", because I realized it leaks all resources if a compilation error occurs, until you restart the "IDE". File handles and everything
 
Ow. Ow. Ow. Ow.
 
holy crap, that's gotta hurt
 
7:47 PM
And the first thing it does is allocate a block of memory 3x as big as the input file >.<
 
Stop!
Hammer time!
 
Stop!
Collaborate and listen!
 
@Pubby I don't understand what you're telling me
 
Hey, Listen!
 
7:55 PM
@MooingDuck ICE is back with my my brand new invention
Something grabs a hold of me tightly
then I flow that harpoon daily and nightly
 
@DeadMG I preferred Tatl's jingles to Navi's "Hey! Listen!"
 
NO YOU LISTEN
 
silently steps backward out of the room
 
Let's have a rap battle
 
7:56 PM
sweet, it works fine, and now it's only leaking 4 bytes on a compiler error, and 8 on success. Better!
 
It leaks more on success?
WTF.
 
@RMartinhoFernandes I'm using windows task manager, it's not the most reliable of measurements. I'm sure it's fine
 
@RMartinhoFernandes Though I wish the company used MSVC10 so I could use unique_ptr. That'd help a lot. So would boost.
I still don't understand why we don't have a deep_ptr. unique_ptr is like vector but uncopyable. Why would you want that? If I say to copy it, I want a copy of it.
 
@MooingDuck Uh, and points to only one object?
 
8:05 PM
 
@MooingDuck Because T t; does that job?
 
@MooingDuck Our favorite robot has a value_ptr class as part of wheels.
 
Yeah, that if you need special copy semantics, like with polymorphic classes.
 
@RMartinhoFernandes Right, I knew there was a reason I wanted it. Your T t; stumped me for a second
@DeadMG obviously
 
I'm going to try and set up standalone headers for each of the things in wheels. People have asked me for it before.
Any ideas how I could automate that?
I can't just $ g++ -E because that would include stdlib crap.
 
8:12 PM
hello guys , good afternoon, can you tell me how to see how much time has been elapsed for a while-loop to run?
at least what library to use
 
@RMartinhoFernandes i thought i had to use the time.h or the ctime....
 
@georgemano that's the old way. chrono is better
 
To be honest, I really don't know how to use the old things.
 
What are the benefits of std::move compared to a usual reference?
http://ideone.com/MZM3j
 
8:18 PM
#include <ctime>
clock_t begin = clock();
//do stuff
double dur = double(clock()-begin)/CLOCKS_PER_SEC;
 
@ManofOneWay std::move is pretty worthless with int.
 
When is it worth using? =)
And why?
 
I drew a "comic" once about this. Lemme dig it up.
user image
5
 
@ManofOneWay on types that may contain pointers
Can anyone briefly explain why this object is size 3? Apparently I don't understand how the empty base class optimization works.
 
@MooingDuck thanks for this piece of code . I will search for it . But why do you used ctime since you said that chrono is the new staff that and the old staff sucks?
 
8:24 PM
@MooingDuck Try printing the sizes of the two bases.
 
@georgemano I was showing RMartinho the old way, you should use chrono
 
@MooingDuck ok
@MooingDuck why is chrono better than ctime?
 
@RMartinhoFernandes still doesn't make sense
 
@RMartinhoFernandes It's not simple.
 
By definition, does an expression always yield a result?
 
8:34 PM
void()
 
Is that an expression?
 
Yes, it can work as one (it can also pass for a type).
void(0) is probably a better example.
 
I thought void was a keyword, what exactly does void() mean?
 
Make a void expression. It's quirky.
@MooingDuck You can't EBCO two objects of the same type on the same address.
 
@RMartinhoFernandes ah, that makes sense. Oh well. I really dislike the rules that types can't have 0 size.
 
8:43 PM
It's because of arrays.
 
@RMartinhoFernandes I suppose
 
empty x[10];
auto distance = &x[4] - &x[2];
assert(distance == 2);
That reminds me... My tuple isn't yet quite optimal!
I am not exploiting EBCO to the max.
 
@RMartinhoFernandes That's awesome
 
Thanks.
I need to add "shuffling" to make sure there are as few as possible empty classes of the same type next to each other.
Pretty niche case, but I can't claim it's optimal without it.
 
EBCO?
 
8:48 PM
Empty base class optimization.
 
Since when did people talk about C++ in the C++ chat?
Quit it. I don't understand any of it.
 
@TomW Its k. I don't either.
@Pubby What the hell is that all about?
 
@Drise it's art
 
Oh. It seems std::tuple already does all that heavy lifting.
Woot.
 
@RMartinhoFernandes of rearranging empty classes?
 
8:55 PM
@MooingDuck You don't need to actually rearrange them. Just tag 'em.
I think.
All I know is that sizeof(wheels::tuple<size8, empty0, empty0, empty0, size8>) == 2*sizeof(size8) without me fixing anything.
 
@RMartinhoFernandes nice
 
How do I get rid of the (1) without clicking on it?
And besides talking.
 
How do I solve a problem without using the solution?
 
@Drise Put a sticker over that part of your monitor.
 
Btw, @MooingDuck Your overloads work with sstream
 
9:01 PM
Could you give an example of a type that doesn't have a name? Seems a bit contradictory.
 
Simply put: Its awesome.
 
@Drise I figured they would. They should work on any type that derives from basic_istream
 
@ManofOneWay Lambda but isnt that functions only?
 
@ManofOneWay struct {char a;} b; //variable b is of a nameless type
 
@MooingDuck Great, thanks
 
9:02 PM
@RMartinhoFernandes I love that question template on StackOverflow
and by love, I mean despise
 
What question?
Oh, I get it.
 
similarly "How do I do reflection without using reflection?"
 
@RMartinhoFernandes linky?
 
13 mins ago, by Drise
How do I get rid of the (1) without clicking on it?
Erm.
 
lol
 
9:11 PM
Btw, Lame Pun Friday starts in 3 hours!
So exciting.
 
@MooingDuck What did you mean by:
@JasonR: Actually that's what I set out to do, but I was wondering how to bypass the string parsing, and realized I could split the strings... which eventually led to this very simple solution. As you say, formatting things a specific way is still tricky. I wonder if I can address that. If I think of something I'll comment again. — Mooing Duck Mar 23 at 16:21
The last part..
Can I getline into a stringstream?
 
@Drise what if the comma is optional, or might be a colon instead?
 
@MooingDuck Oh, well, I'm used to a format spit out by a program, so its all the same
 
in f(2) + g(2), order of evaluation?
 
Unspecified?
 
9:15 PM
@RMartinhoFernandes What's that? =)
 
@ManofOneWay Sorry, what's what?
 
@RMartinhoFernandes I bet you got the email reminder :)
 
how about f(2) + g(2) + h(2) ?
 
Still unspecified.
 
@Drise I don't know a way
 
9:17 PM
getline into a string and move it into the stringstream.
 
@RMartinhoFernandes I'm trying to avoid a temp string.
 
@RMartinhoFernandes Lame Pun Friday?
 
@Drise you move it, don't copy it. The overhead of a temporary becomes almost nothing when you do that.
 
@RMartinhoFernandes f before h?
 
9:18 PM
std::string line;
getline(inFile, line);
stringstream tempStream;
tempStream << line;
 
@CaptainGiraffe I don't see why that would be required.
 
@CaptainGiraffe sometimes
 
std::string line;
getline(inFile, line);
stringstream tempStream(std::move(line));
 
What do I #include for move?
 
@Drise do you know about std::move?
@Drise <utility>
 
9:20 PM
@MooingDuck Not much. Not really current with 11 stuff
 
@RMartinhoFernandes thats a nice move.
 
@RadekSlupik awesome. And, you are actually from Schijf? That's considerable amounts of cycling IIRC
 
I just hope when my other dev goes to compile this, it doesn't take a shit in his face. He will be quite angry.
 
@Drise move basically means "take this object's internal data as your own", so that way you avoid copies.
@Drise what compilers?
 
@MooingDuck I don't know, that's the thing.
@MooingDuck I got that from @RMartinhoFernandes 's comic.
 
9:23 PM
@Drise watcom 11.6 is not going to make it
 
@MooingDuck I mean, he is on GCC, and I think its up to date, but.
 
@Drise ah, requires MSVC10 or better, dunno about GCC
 
And up to date in terms of apt-get for ubuntu 11.04/10
 
@MooingDuck GCC had moves since at least 4.5.
 
@MooingDuck I built it on gcc (make) just fine. Just don't know if he is up to date enough.
 
9:26 PM
Why can't you take the discussion with your partner?
 
@CaptainGiraffe He is my boss, and I have enough screw ups as it is.
He also gets frustrated easily.
 
Oh god, don't you get fired with my code.
 
@Drise oh sry to hear that.
 
@RMartinhoFernandes No its cool. We have SVN for a reason, so if any issues arise, its simple to fix. I'm just tired of using unsafe C code.
 
Or if you do get fired, don't tell me. I don't care about your job, but I don't want to feel bad. :P
 
9:28 PM
@Drise GCC 4.5 was released roughly Apr 21, 2010
 
I get way too many segfaults
 
part of the reponsibilities of being called 'boss' is to put on the big girl panties and deal with it
 
Does your boss produce good code or is he just another fashionable critique?
 
@sehe 20 minutes
 
@CaptainGiraffe He does great code, but it can be outdated (well back in my day we didn't have std::string) type.
 
9:29 PM
@Drise ah. A dinosaur?
 
He also does very mathy code, like integrated equations in c++ and some reallly reallly complex math.
 
@Drise Thats just no good. Tom tells it: Yep a dinosaur.
@Drise Does your project reek of math?
 
I also like playing with new toys, he'd prefer to take the safer route and use what he knows.
@CaptainGiraffe We work on two projects. He works on a simulator, I work on the post processing display gui.
 
@Drise you know how to calculate a distance from x1,y1 to x2 y2?
 
Not too bad. I lived at 5 minutes.
Walking distance :)
 
9:32 PM
@CaptainGiraffe Yes....
 
@RadekSlupik Is that road still called Burgemeester Schneider(Snijder?)laan? Or is it back to 'gordelweg'?
 
@sehe It's called Achtmaalsebaan.
 
@Drise Then you're good.
 
There is a Burgemeester Snijderlaan though, but I don't know where that is. Also see Google Maps.
 
@CaptainGiraffe See also:
1
Q: Rotation of a point about the z-axis

DriseI have 3 vectors in 3D space. Let's call them xaxis, yaxis, and zaxis. These vectors are centered about an arbitrary point somewhere in 3D space. I am interested in rotating the xaxis and yaxis vectors about the zaxis vector a number of degrees θ. For the following code with values being arbitr...

 
9:34 PM
@RadekSlupik That too. That's where the avondvierdaagse always is. It is the season for that, actually
 
@Drise That's just for bonus. The euler angles are neat too.
 
@sehe I don't know. I don't participate.
 
Good. You might as well sleep.
It's a waste of time :)
 
@CaptainGiraffe You lost me. I am still in Cal 3.
 
@sehe I'm working on Kyrostat so I can't sleep.
 
9:37 PM
@Drise The equations governing 3d rotations are quite simple in the polar coordinate system
you have two angles, one distance r.
 
@CaptainGiraffe Yea, I'm working in Cartesian though...
 
the angles are pretty much what you'd expect them to be
it's an easy translation from the cartesian
 
Btw, I know I'm likely going to regret this, but I like points so upvotes are welcome :D
 
@Drise Downvotes it is!
 
Does anyone else notice this, or is it just me, that even though I take a lot of time and diligence to formulate a good clear question, I get nothing for it in return?
 
9:43 PM
Drownvotes it is :)
 
@Drise Yes all te time
 
@Drise Duh. it's stackoverflow
 
Yay! Downvotes!
 
Downvote EVERYTHING!
 
@Drise If there's no controversy, and you answer the question completely and well, then yes, it falls off the "active" page, and gets no votes
 
9:43 PM
@sehe @CaptainGiraffe Then what is stopping me from half assing my question?
 
@Drise morality and a sense of "right"
 
@Drise nothing, but we are a helpful bunch here
@MooingDuck is that morality?
I'm always curious about that word.
 
@Drise Your conscience, mainly. Also, what questions, I can see a question with +2,+3 and answers with +4,+5,+6 - that's not half-assed!
 
@CaptainGiraffe Downvote ALL THE THINGS!
 
@SamDeHaan Thats an antonym of a reddit meme.
 
9:45 PM
@CaptainGiraffe ethics
 
@sehe But sometimes (a lot of times) I see half assed questions that get +10 or more, simply because of edits.
 
@Drise Because of edits? You mean because of page views? Edits only contribute very slightly to a post's rank on the SO main page
Yeah, the voting system doesn't work like I would want it. It's a popularity contest. Nothing more.
 
@sehe Maybe I'm naive to the way this all works, or maybe I just expect more for the effort. Idk.
 
To be honest, I don't think something else would work, as the general public likes to up/down ( ==> popularity poll) and anything else would be 'like' work. That'd immediately decimate the exposure of any SO material. There's wikipedia for that.
 
@sehe well put. SO is extremely high on google.
 
9:51 PM
Idk, I'm just finding getting rep somewhat difficult. I guess that's the idea of it though to some degree.
Also, I think my knowledge scope is too small to be truly an effective answerer.
 
it was easier back in 09
 
@sehe Tommoz chess per chance ?
 
Farming rep is eeeasy. Step 1: Learn C#, Step 2: ???, Step 3: Become Jon Skeet!
 
I hate 10k+ line source files :/
 
I just want to get enough rep to be more effective around the si OMG @MooingDuck wtf is wrong with you? Are you sadistic?
 
9:53 PM
@MooingDuck I get to deal with 10k+ line single-method source files.
 
@ScarletAmaranth I had to google that:
 
@MooingDuck I weep for you
 
@sehe Damn, you've blown my cover :(
 
@Drise The way is to start with answering lots and lots of questions.
 
9:54 PM
> Guys, do you care what size/shape a girl's p*ssy is?
Now I remember why I don't go to Yahoo answers
 
facepalm
 
@sehe The one's I can answer are usually eaten alive by the like of Luchian, @RMartinhoFernandes, or @MooingDuck.
 
I ask that on first date.
 
sbi
@Pubby (°)
 
@Drise Get a short gpu -> monitor cable, you're gonna need those extra milisecs.
 
9:55 PM
@Pubby I'm at work! noes! Hide the prons!
 
@Drise So? Just read them well. Frequently, they'll ace the answer but not take the time to explain. So, add explanation, extra handholding. Get points.
 
I haven't had my period in about a year, or atleast I'm pretty sure I haven't.
I have a pretty regular diet, I excersise sometimes, but not to the point I over-exert myself. I am really rather unstressed. My family does have a history of irregularity, not this bad though.
Everytime I think there may be an oncoming period, it is just...slightly brown discharge.
Why is everything on their front page about vaginas?
 
@sehe Anyway, Y U NO answer :) ?
 
@Drise from just reading the other answers you'll learn way more than from asking the questions you could come up with yourself. That's the way I picked it up
@ScarletAmaranth Y u ask too often?
 
@Pubby why are you asking about this in a c++ forum?
 
9:57 PM
@sehe Because you never give me an answer, you usually just troll me with something random :P
 
@Pubby you just went full retard, you never go full retard.
 
@CaptainGiraffe I didn't see anything against it in the newbie question hints :)
 
@ScarletAmaranth Not true. Until today I've always replied in ernest. Frankly, I don't see msyelf playing an online game any time soon. Regardless, I'd need to 're-learn' how to set up a chess client
 
@Pubby you just went full retard, you never go full retard.
 
And then there's these shitty rhetorical questions
Christians live in dread of an eternity of hell. Atheists know death is the end of their minds. Is a life of?
 
9:59 PM
@sehe Oki doke then, I shall refrain from asking ;)
 
sbi
> Making font jokes has to be the lowest point of my courier so far. — Charlie Brooker
 

« first day (607 days earlier)      last day (4324 days later) »