« first day (522 days earlier)      last day (4419 days later) » 

5:00 PM
Oh, no, it isn't.
That std::move into a local variable thing confused me.
 
yeah, I'm fairly certain that logic's good
now
do I insert a bounding box for every bone... or just one for the root?
ah, one for every bone would get very silly very fast, as they're guaranteed to be contained within the root anyways
 
return std::move(results); // Thanks Visual Studio for improper implementation of this case.
 
so now I need to think about the coupling between my sim and renderer
 
5:03 PM
does polymorphic unique_ptr<Base> require a virtual destructor in Base?
 
@KonradRudolph Yes.
 
so
 
@DeadMG Fuck. What happened to the temporary-bind-to-const-ref trick to figure out the correct destructor?
 
unique_ptr<Base, default_deleter<Derived>> doesn't, but it just sounds silly.
 
5:04 PM
Does that only work on shared_ptr?
 
@KonradRudolph What?
 
@KonradRudolph Yes, because shared_ptr erases the type of the deleter.
unique_ptr carries it around.
 
shared_ptr has a run-time decided destructor, so that's pretty safe to use without polymorphic
but unique_ptr isn't
 
@DeadMG Well, Base const& b = Derived(); does not require a virtual destructor and I thought the C++11 smart pointers used this trick internally
ah, ok
 
which is why it's not OK to destruct a unique_ptr<T> if T is an incomplete type, but shared_ptr is
 
5:05 PM
There's also unique_ptr<Base, std::function<void(Base*)>>, using std::function for the type erasure.
 
@KonradRudolph That... cannot possibly be applied in any other case except a stack variable.
for which you wouldn't need a smart pointer anyway
there's no possible way in which a smart pointer could use that trick to determine the correct destructor
 
@KonradRudolph No, what they do is store the deleter at the point of construction (where the type of the argument is known).
 
@RMartinhoFernandes Yes … so shared_ptr does this but unique_ptr doesn’t?
 
especially since the unique_ptr has a fixed-type destructor, so even if it knew you gave it a Derived*, there's still jack all it can do about it, because default_deleter<Base> is already it's destructor
@KonradRudolph Yes.
 
5:07 PM
unique_ptr<T, Del> has a fixed destructor in it's type. shared_ptr<T> has a type-erased deleter determined at construction time.
 
@KonradRudolph Remember that unique_ptr<T> is actually unique_ptr<T, default_deleter<T>>.
 
All these non-parallel semantics between shared/unique make it quite confusing since their names suggest that the only difference is their ownership semantic
yes
 
unique_ptr is different for lightweightness.
 
unique_ptr is designed with minimal overhead.
 
yeah
for shared_ptr, it's not a big difference at all, because they have to heap allocate in addition anyway
 
5:08 PM
Don't pay for what you don't use. Type-erasing a deleter doesn't come for free.
 
but for unique_ptr, it would be quite a bit extra
 
You can write unique_ptr with deleter trick if you want.
Not like it's terribly complicated.
 
template <typename T>
using exclusive_ptr = std::unique_ptr<T, std::function<void(T*)>>;
Fixed.
 
or unique_ptr<T, std::function<void(T*>> as Martinho said
 
we really need a make_unique_ptr then, to be used with auto to infer all this shit ;)
Well, not really
but it would be convenient
 
5:10 PM
You don't have your own make_unique? Shame on you.
 
Btw mine's the best. And chromiest.
 
everybody here writes make_unique
that reminds me, I need to finally set up my code so I can start re-using my application-independent libraries
 
I need to finish X11 code, so I can release glskel 0.1.
 
@RMartinhoFernandes lol.
 
5:12 PM
so
 
You need docs.
 
A) Both renderer and sim need access to the world octree. B) They need to store different types. C) End result should minimize coupling.
 
@CatPlusPlus The code is the docs!
@DeadMG Is this one of those "pick two" games?
 
Variants!
 
dunno
thinking about it for now
 
5:14 PM
@CatPlusPlus Who does?
 
2
Q: How do I call a childs method on a instance in a container holding parent class objects

slaytonLets say I have a parent Class: Class Parent{ public: virtual void doSomething(){} } and two children: Class Son: public Parent{ public: void doSomething(){ // Do one thing } } Class Daughter: public Parent{ public: void doSomething(){ // Do another thing } } If I setup an inst...

 
@LucDanton You.
 
@CatPlusPlus Eh. I really need both, not one or the other.
 
@CatPlusPlus Well, I rely on the unit tests a lot.
 
the renderer needs to get renderer objects out for frustrum culling, and the sim needs to get sim objects out for simming shit
 
5:16 PM
@DeadMG Tuples?
 
@CatPlusPlus Make sure to highlight make_unique, and would you say that this helps in documenting what usages of make_unique are in fact supported?
 
OK, next question … does C++11 have a RAII class for a memory buffer? Something akin to using buffer = unique_ptr<char[]> but with an appropriate interface?
 
Sorry if that makes no sense. My instinctive reaction to "variants won't work" is tuples, and vice-versa.
@KonradRudolph What's an appropriate interface?
 
@Konrad What is appropriate interface?
 
what I might do is simply add a small interface so that the renderer can ask the sim
so the renderer's primary state class can talk to the sim's primary state class
 
5:17 PM
FWIW unique_ptr<char[]> doesn't have operator-> and has operator[] instead.
 
but I'm not really a fan of breaking my previously 0 coupling
 
@KonradRudolph Nope. Doesn't get any better than output iterators I think.
 
@KonradRudolph I'm using std::vector<char>.
 
@RMartinhoFernandes Didn’t know that. I really need stop using MSDN as my C++11 reference. Not good …
 
@KonradRudolph MSDN lists this too, I think.
 
5:19 PM
@LucDanton … which doesn’t provide RAII for managing the memory …
@DeadMG Quite possible, but I don’t see it … msdn.microsoft.com/en-us/library/ee410601.aspx
 
ah
 
@KonradRudolph Wut. An output iterator is ownership agnostic (if that's a concept). So it doesn't help, but it doesn't interfere either.
 
it doesn't list the full interface of the partial specialization, which is a failure, IMO
it only mentions that it exists and that it has a special deleter
 
@KonradRudolph Yeah, doesn't list the specialization for arrays.
 
@LucDanton Ok, of course it doesn’t interfere but I was specifically interested by a the RAII coupled with a low-level memory buffer (essentially one level below std::vector<char>)
@RMartinhoFernandes It does, as far as the destructor is concerned. But that’s it
 
5:21 PM
What's one level below vector?
 
but unique_ptr<T[]> does possess operator[]
 
Why would std::vector<char> be one level too high?
 
It's as basic wrapper on an dynamically allocated array as you can get.
 
It doesn't hide any operations that unique_ptr<char[]> allows (well, it does: release).
 
I marked this question as C++faq. Let me know if you agree stackoverflow.com/questions/9808479/…
 
5:22 PM
hello everyone, i want to do programming for the aviation and robotics is it can be done in c++ ?
 
@RMartinhoFernandes Yes, since it provides buffering (capacity)
 
@RMartinhoFernandes shrink_to_fit! Almost! Not quite! Not really! Not at all!
 
0
Q: How close can we get C++ to C#'s ease of use?

user176168So I'm wanting to have C++'s speed ie no JIT but with C#'s ease of use. I'm wondering how close we can get C++ to C#'s basic method of working. What do I mean by this? Well for example C# never lets you dabble with pointers just references to objects which are garbage collected. Can we cr...

Lolol.
 
@LucDanton unique_ptr doesn't have a shrink_to_fit.
 
ok, I’m off. Thanks for the info guys
 
5:23 PM
What's wrong with vector having capacity?
 
what's hilarious is that C# is harder to use than C++
 
@RMartinhoFernandes I mixed up release and reset, I need to stop coding and start playing video games. For my own good.
 
@DeadMG Ok, that’s just bullshit, sorry
 
you're right
 
C# is easier?
 
5:26 PM
having shitty weak generics, no support for deterministic destruction, and needlessly shitting around with garbage collection and references and classes you just don't need, that's super-usable
I mean, every time I can't write a piece of generic code because generics aren't strong enough, I think, "Man, I'm so glad that this code I'm writing, where the ownership is clear anyway, that the garbage collector takes care of it for me!"
 
C# has support for deterministic destruction.
 
yeah, like C++ supports garbage collection
except it's even more of a joke
 
shared_ptr and unique_ptr are C++'s GC.
 
I mean, there's the Boehm GC and as far as I'm aware, it does actually work
 
@DeadMG It's too conservative sometimes.
 
5:28 PM
unlike C#'s IDisposable crap, which is beyond broken
 
using and Disposable works, too.
 
no, it doesn't
 
Because?
 
well, let me see
 
hello everyone, i want to do programming for the aviation and robotics is it can be done in c++ ?
 
5:29 PM
It worked.
Right. I've used it countless times.
 
No, you need Pidgeon++.
 
Change an interface to be disposable? Now all your clients have to manually update every use of that interface. I sure hope none of them ever miss one.
 
Stupid races.
 
Hey, no racism!
 
or how about "I need a Disposable class to be used from an interface which isn't Disposable, so the caller doesn't even know that it might have to be Disposed"?
 
5:30 PM
Changing interface usually forces users to update code that uses that interface.
 
changing interface usually forces users to update code that uses the part of it you changed
for Disposable, that's, say, every single reference, everywhere.
 
So?
Changing an interface is a breaking change. That's what breaking change means. It breaks things.
 
And adding Disposable means "I've redesigned this class to hold a resource which needs deterministic destruction". And, really, how often does that happen?
 
Disposable would be useful if using was automatic, Dispose() methods were generated automatically, and Dispose() was a part of Object
 
You don't need deterministic destruction for absolutely everything.
Who's playing with flags again.
 
5:32 PM
@Mayankswami well, frankly they still use C and ASM. that's what the PIA uses anyway.
 
but you do need it for all unmanaged resources, and every class which holds a class which uses an unmanaged resource, and every class which uses one of those
ad infinitum
 
2 hours ago, by Scott W
there needs to be more women programmers
seriously, has a woman programmer ever come into this lounge?
 
Yes, it's not perfect. But so isn't the Boehm GC.
 
16
Q: What race should I genocide?

ArkiveI just got a scroll of genocide monster. My initial reaction is to kill off vampires, because I hate losing levels to them. However, I'm not sure that this is the best monster to genocide. There are still mindflayers and wights, and loads of other nasties. What are some of the top creatures tha...

 
true
 
5:33 PM
Unmanaged resources aren't majority of managed applications.
@IntermediateHacker Yes.
 
There was some delphi lady in here a while ago
 
@CatPlusPlus who?
 
but as far as I'm aware, the Boehm GC's failings amount to inferior performance, not fundamentally broken semantics
 
Also, DON'T FUCKING PLAY WITH FLAGS. I don't want to get suspended for "stupid races."
 
Hell if I remember names of all people who dropped in here.
 
5:34 PM
and those are just the holes of Disposing that I remember off the top of my head
the managed crowd have more
 
Flags are fun. Like matches. And guns.
 
@IntermediateHacker could i know what is PIA
 
So let's set flaggers on fire and shoot them?
7
 
@CatPlusPlus I like that order.
 
It's very dorfy.
 
5:36 PM
@Mayankswami the PIA.
 
Oh, so the fire is from magma?
 
No, the fire is from imp's fat.
 
@Pubby Usually.
 
@IntermediateHacker man i am not pak* i m indian HINDU
 
@IntermediateHacker Long ago there was a person here fairly regularly who went by an apparently-female name, but there was controversy over his/her actual gender. While s/he talked some about programming, sufficient understanding to qualify as an actual programmer was open to a lot more question.
 
5:37 PM
@Mayankswami is that relevant?
 
I am Cat.
 
Pak Breeders and Pak Protectors are two forms of fictional life in Larry Niven's Known Space universe. The Pak first appeared in "The Adults," which appeared in Galaxy in 1967; this story was expanded into the novel Protector by Larry Niven (1973). The Pak also appear in several of Niven's later novels, notably those set in the Ringworld. Destroyer of Worlds depicts a confrontation between the Pak and the Puppeteers. Narrative purpose Niven has written that he invented the Protectors as a thought experiment to explain the common effects of aging on humans and to create a fiction...
 
anyway, got to go now.
 
I would say DeadMG has his feminine sides, dunno if he counts though.
 
5:37 PM
Hey, we've missed 3M message ID mark.
 
get some sleep.
 
@Pubby Nope. I've always been open about my massive penis and testicles.
 
We're so glad about that.
 
@CatPlusPlus It went by way faster than #2,000,000, I think.
 
@CatPlusPlus You didn't miss much.
 
5:38 PM
@IntermediateHacker Sleep is a disease caused by caffeine deficiency.
 
Oh, @JerryCoffin didn't loose his arms! He can still type!
 
@RMartinhoFernandes Well, sort of anyway. I'm now dynamically typed.
 
I suddenly got two -50% Assassin's Creed Revelations coupons on Steam.
 
Woot, you can now get it for 25% of the price!
 
Right.
Let's go all the way and say I can get it for free!
 
5:45 PM
Assassin's Creed is that game where you play someone playing in some in-game virtual reality, right?
 
It's actually DNA memory thingy.
But yeah, basically.
 
@RMartinhoFernandes yes
 
There's a lot of roof jumping, so it's cool.
And Revelations has multiplayer.
 
@RMartinhoFernandes though you might be thinking of dothack
 
Maybe I'll buy it.
 
5:47 PM
@CatPlusPlus It's quite entertaining to watch btw.
 
@LucDanton Yeah. Have you seen AuZZieGamer's Multiplayer Mayhem?
 
@CatPlusPlus Can't say I have.
 
@RMartinhoFernandes Well, it's virtual reality based on real reality extracted from protagonist's DNA, because he's an assassin or whatnot and his ancestors were too, and something.
Who cares, roof jumping and killing people.
 
@CatPlusPlus I'd rather have technobabble than 'DNA memory'.
 
5:50 PM
@CatPlusPlus Exactly what I said.
Stop trying to prove me wrong.
Apparently my dorfs fished this river dry.
 
@RMartinhoFernandes they'll do that a lot
@CatPlusPlus wait, there's a story?
 
@MooingDuck What do you mean? They can only do that once, no?
When I say they fished it dry, I don't mean they went fishing while there was no water. I mean that they fished everything there was to fish.
 
@RMartinhoFernandes Literally or metaphorically?
Oh okay.
 
I got a message saying "There is nothing to catch in the river".
 
Btw is it a bug that markdwarves can't hunt on their downtime?
 
5:55 PM
@RMartinhoFernandes When I played before, I would get the message about once a season. I assumed from this, that the river restocks about once a season. It could also be that it was permanent and the dwarves just tried about once a season.
 
-4
Q: How close can we get C++ to C#'s ease of use?

user176168So I'm wanting to have C++'s speed ie no JIT but with C#'s ease of use. I'm wondering how close we can get C++ to C#'s basic method of working. What do I mean by this? Well for example C# never lets you dabble with pointers just references to objects which are garbage collected. Can we cr...

^ Now reopened.
 
@LucDanton Mine seem to do that (in fact, that's the training they get).
 
@RMartinhoFernandes Oh yeah, we discussed that. I can't figure out if there's something I overlooked (although they do shoot arrows on invaders).
Most of the time there's only three ibex on the map, if that matters.
 
Oh, I embarked on Untamed Wilds, so there's plenty of game around.
 
> I just write the whole thing in perfect pseudo code, then port that.
 
6:04 PM
How can it not be perfect if there's no compiler for it? Although perhaps it should be called 'pseudo-perfect'.
 
0A0D is arguing hard that the "making C++ like C#" is "not constructive This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion".
 
Sorry, I'm not fighting this battle.
 
@CatPlusPlus I'm having a hard time getting to enjoy the self-commentary cum in-character narration from that AuZZieGamer :v
 
I think it's hilarious.
 
It sounds like he has outbursts sometimes.
lol, didn't notice the additional sound effects until now.
 
6:07 PM
K: I've relinked the question to a new room for it then
 
Argh, damn wpa supplicant keeps losing the Wi-Fi connection and failing to reconnect. If I kill it and start it again, it picks up again in no time. This is annoying.
 
Like zombies in DF.
 
Hmm, if Alf and 0A0D are still comment-debating the usefulness of the question after I posted a link to move to chat, with lots of ad-hominems (on both sides) am I justified in flagging everything after my "move to chat"?
 
DF undead are scary. You can chop them up as much as you like, all you get is more enemies.
 
It'll be fixed.
 
6:10 PM
@MooingDuck Yes.
 
But admit it, zombie hair is hilarious.
 
Have you ever tried a terrifying biome?
Even the rain kills dorfs.
 
No :(
 
And then they come back as undead.
 
Uh, what's that, death rain?
 
6:15 PM
The rain carries syndromes like those from beasts.
 
Is that spoiler-free?
 
@LucDanton I have no idea, I'm still reading it
@LucDanton what are you attempting to not-spoil?
 
Fun!
 
The wiki tends to mark spoiler sections.
It doesn't mention the circus, if that's what you're wondering about.
 
6:18 PM
@LucDanton no reference to "fun!"
 
It contains nothing you wouldn't learn soon enough after embarking.
 
@CatPlusPlus 37 comments, I'm surprised it hasn't been nuked already.
 
Okay.
 
@Cheers why do you put the # in C# in superscript?
 
^ I wonder the same thing.
 
6:27 PM
@RMartinhoFernandes because the language's creator did?
 
You mean C♯? No one uses that, but if you want to, that's not a superscript #, it's a musical sharp symbol: ♯ .
 
Did you run out of things to nag about :)
 
I need to do a report for physics lab. :<
It's so boring. Sooooooooo booooooooooooooooooring.
 
Don't you have that guy in the group that does nothing but that?
 
6:33 PM
We have to do them individually.
 
Hm, now I can only find that C<sup>#</sup> in one place, namely on the front page of the C# language spec. version 4. it's not there in the earlier spec version 0.17. But I think it was in the original.
 
I was happier when I didn't know thermocouple existed.
 
@MooingDuck I like how you carefully copy-pasted the whole discussion into chat. Bored much?
 
@RMartinhoFernandes and flagged everything after my chat link
 
6:39 PM
@Shog took care of it now.
I'm sad he killed my comment, though :(
 
@RMartinhoFernandes Which comment?
 
Something about how learning C++ makes C++ easier.
Not that important really.
@ScottW Mod.
 
Higher power.
 
6:41 PM
Oh gawd.
Lol, YT comments.
> @g2lm4l "FINALLY! AFTER 9 YEARS OF SEARCHING AND WONDERING - I HAVE FOUND THIS SONG"---9 years? 9 years and all you had to do was type BLUE into youtube its the first song that comes up...9 years of searching??? you sir have the IQ of a spoon!!!
 
@sbi tl;dr version: "kids these days! Get off my lawn!"
 
This song is so crappy and old.
 
What's the best way to move a library into a namespace?
 
@Pubby std::move
@CatPlusPlus lol, spoons have IQs?
 
sbi
@Shog9 Start reading here.
 
6:44 PM
Does anyone have knowledge on strings ? :)
 
@RMartinhoFernandes :(
 
room topic changed to Lounge<C++>: Baboon on a moon with an IQ of a spoon. [c++] [c++11] [c++-faq]
 
@ScottW Do u know about strcat ? (appends strings together)
 
sbi
@Beginnernato You want the C chat room.
 
Try duct tape.
Nothing that can't be fixed with enough duct tape.
 
6:47 PM
@sbi i want the C chat room ? lol
 
@sbi Oh, so y'all do know him. I was hoping that was the case :-P
 
Well i was trying to write my own strcat function and i got this ideone.com/OptEy ... But i get heap error's and i dont know why ? :(
 
sbi
@Beginnernato strcat is a function in the C std lib. This is the C++ chatroom. When we do strings and it's not about fastening clothes, we use std::string.
 
Because it's broken.
 
Do you know how to use a debugger?
(I need a button to post that)
 
6:49 PM
Tip: first line is wrong.
Compiler even tells you what's wrong.
 
sbi
@Beginnernato It's there, plain in sight: prog.cpp:4: warning: ‘i’ is used uninitialized in this function. Can't you read?
 
ugghh silly me ... sorry i feel stupid
 
how do I refer to std::string::npos?
 
std::string::npos.
Or static_cast<size_t>(-1).
 
@MooingDuck Is that rhetorical?
 
6:51 PM
@RMartinhoFernandes I was getting error messages. Apperently I was comparing it to a boolean with the same name as a size_t on accident, and gcc just gave me expected primary-expression before ‘npos’
 
@CatPlusPlus fromInteger is so awesome.
 
Yeah.
 
@MooingDuck Are you sure you're doing std::string::npos? It's a static constant.
 
@Beginnernato turn warnings up, and pay attention to them. They're really useful
 
6:52 PM
static const size_type npos = -1;
 
@sbi I was aware of that. And I can't say I'll miss him.
 
in my personal experience, the guy either couldn't or wouldn't communicate very well with me
 
@CatPlusPlus if (obrace!=std::string::npos) {
 
Well, is <string> included?
 
@DeadMG you have that problem with a lot of people I think
 
6:53 PM
heh
 
} else if (space!=std::string npos)
 
maybe the problem was on my end :P
 
sbi
@EtiennedeMartel I was aware of you being aware of that. I still had to link to your message, though, in order to make the others understand what I was about.
 
@sbi Heh... Yeah, that sounds like the guy.
 
@CatPlusPlus I'm... shocked and awed at my own stupidity
 
6:54 PM
@MooingDuck Turn errors up and pay attention to them!
 
@CatPlusPlus :(
 
@CatPlusPlus turn errors up, kek
 
Everyone has a derp moment once in a while.
 
sbi
@Shog9 The last time that happened, him and @jalf got into a row. Can you imaging the aftermath? :)
 
Shit got real.
 
sbi
6:55 PM
@MooingDuck In the best tradition of the room, I went and starred that.
 
@sbi fair enough
 
@sbi I bumped into him enough times to imagine. Always had to remind myself he wasn't the old Tomalak... And then he changed his name.
 
@sbi that reminded me about someone named keera, who was into astrology, and was a facebook friend. it must be years since she disappeared (killfiled me?), and i hadn't noticed. until now.
 
@EtiennedeMartel Someone multiplied something by its conjugate?
 
sbi
6:56 PM
The old Tomalak? Now that sounds interesting! Oh, please tell us a story, uncle @Shog!
 
@Shog is @sbi's uncle? Man, he must be old. Like, an homo habilis or something.
 
He's got an unicorn, he's legit.
How much do you pay?
 
> The main issue is here"
And then there's a shitpile of code.
 
1 message moved to bin
aaah
WinBin™
2
 
6:59 PM
Great Wall of code.
Lol.
 
I like my expression better.
@DeadMG It's full of Win!
 
I like WinBin.
 

« first day (522 days earlier)      last day (4419 days later) »