« first day (2424 days earlier)      last day (2750 days later) » 
00:00 - 18:0018:00 - 00:00

18:00
@rubenvb The reason you get 1 is because operator<<(bool) gets used
@rubenvb They're very, very special.
@milleniumbug Right I got that now.
@Puppy That's why I just hid them behind a template parameter in my code :p
typename VerySpecialDoNotInspectType
Grmbl
@StackedCrooked I just noticed this. Didn't see it over the weekend. The date for this seems to be around 2009 - which is before I set it myself.
Wonder what that algorithm was.
It's on PDP-1 so it's very old.
Ah, so probably before the days of the sub-quadratic algorithms.
18:09
@JerryCoffin but, very cool :D
Hmm I do have a zero-args specialization of a variadic template. Maybe it's finding the wrong function in the wrong template and calling it with the wrong type
@rubenvb does it do anything right?
@LoïcFaure-Lacroix Well all I know is that it's crashing.
Segfaulting to be exact.
At the call site of the member function pointer I'm passing in.
In other cases it's working just fine.
Can't help much, but looks like you're passing something wrong.
SSCCE plix
18:14
I'd say you're biggest bet would be to check if the function pointer you're passing is the one you really want to pass
Here comes the code dump. It worked in all other cases before this one.
you don't really need a core dump if you don't call the pointer function
you could technically just add a breakpoint before it segfault (if you know which call fails)
hmm wait it seems the object pointer is 0x1
@LoïcFaure-Lacroix I'm running it under a debugger, don't worry.
can happen when printing an address to a volatile object
it's a const trackable*
But anyways, no more blabla before I get a code dump assembled.
18:16
good luck
Thanks :p
I think GDB may be having trouble with GCC 7
wouldn't be the first time
Either that or Qt Creator 4.3 broke something in that department.
Both got updates quite recently.
Hmm seems like some casting is destroying the addresses of the objects leading to nasty stuff.
18:32
@rubenvb That's fairly reasonable. A pointer to a member is basically an offset into a struct. Remember, to dereference a pointer to member, you need to put it together with a specific instance, so it's basically what you need to add (possibly with some scaling) to get from "address of struct" to "address of member of struct".
@JerryCoffin Yeah I know that. I build a whole signal/slot thing on top of that.
Now I'm trying to connect a signal to a signal.
Which is going horribly wrong.
@rubenvb Yeah, I should have read through more of the ensuing conversation before replying. Sorry.
@rubenvb why not boost::signals2?
connecting to object: 0x7ffd2a5208b8 <-- signal.connect(&receiving, &signal<>::emit);
signal address: 0x7ffd2a520968 <-- static_cast<trackable*>(&signal)
receiving address: 0x7ffd2a5208b8 <-- static_cast<trackable*>(&receiving)
signal connections: 1 // great!
receiving connections: 1 // perfect!
signal::emit for 0x7ffd2a520968 // signal.emit(), great!
emit object: 0x7ffd2a5208b8 // the receiving signal's emit function will now be called
signal::emit for 0x7ffd2a5208c0 // waddafuq?
oh dear.
the member function you're trying to point to, it's virtual ain't it?
18:52
@Morwenn Nice. Though the texts in the video are typeset with the annoying French spacing before interpunction even though the text is in English. :)
19:24
@Morwenn I wish I could use my touchpad instead of my mouse :/
@Puppy no, but that shouldn't make it not work, right? That's exactly the reason member function pointers are non-trivial types, no?
@rubenvb Depends on exactly how they're used. But, all the implementations differ significantly from the Standard in this area, I'm pretty sure
@Ell Actually a mouse click is a click because it makes this sound.
@Puppy I'm storing, copying, and calling them with the type of class type they're connected with originally (so that might be any class that has this function as virtual in its inheritance tree.
But in the case of keyboard, In french we do hit the keys
I'm pretty sure it's related to the fact that the first keyboards were actually small hammers hitting the paper with ink.
19:34
@rubenvb Recommend use typeid to guarantee that you are creating the PTMF and using the PTMF on statically the most derived type.
@Puppy will do! Thanks :)
But Inhoud be able to call a member function pointer on a pointer to base no?
I think that for some compiler flags and some implementations, that is not allowed.
this is merely one of the many reasons why PTMFs are shit and you should never use them
19:53
Well there's no other way to actually store and call a member function later except stuffing everything in a lambda.
But then I can't reseat it to another object
Which is useful if I want to meaningfully copy a connectee (with its connections)
Another thing Qt screwed up: copy semantics
"let's make everything a pointer because we need global state blablabla"
Anyway, if compiler flags undo that possibility, I bet they're nonstandard and my code will just not work in that case then.
20:11
@rubenvb Do you have an MCVE?
@Jerry sorry the code us quite big, but I'll post it here maybe tomorrow evening.
20:35
Hmm the code is really quite big :/
Maybe It's better to give the github link?
Nah, that's a bother I'm not willing to put you through.
20:49
Hmm I may be calling a virtual function of another class to call the connected member function.
21:01
Hmm dynamic_cast<const void*> at the right place solved this conundrum.
@Puppy thanks for the hint about "statically the most derived type".
This is still quite odd though.
And I feel like I'm talking to myself.
IT'S SO FRIGGIN' QUIET OUT HERE
yes
This problem appeared when I added another parent class.
So it does kind of make sense.
But it's still scary.
Probably if I switch the order of inherited classes it'll also work without the dynamic_cast
Yup.
Hmm this is why you normally don't use non-library things to do this stuff. Edge cases.
Millions of edge cases (or just one that bites you in the ass).
@rubenvb Just don't use PTMFs.
they're unreliable, under-specified, incorrectly-specified, implementations don't meet the specification, and implementation behaviour varies wildly given the right (or wrong) flags
@Puppy I'll be glad to use your alternative of a reseatable handle to a member function.
not to mention just really awkward
@rubenvb [](obj& o) { o.func(); }?
21:16
hmm
I must be very stupid or I tried this and it didn't cover some case.
PTMFs are just lambdas but shittier- there's no need to use them unless you're super-duper-microoptimizing and even then there's no guarantee you'll get the right result
You may have just made me write less code (well, actually delete written code).
Which makes me happy.
what you're describing sounds like half a re-implementation of std::function anyway
and arguably also boost::signals2 but I know less about that stuff so not sure if there are missing cases
21:57
Hmm I once thought disconnecting through comparing member function pointers was an option but it turned out quite undefined. I think my current implementation is a remnant of that. I'll prolly switch to ye olde std::function and lambda's now. Added bonus: throw away value_ptr and as a consequence have the Intel compiler compile my code (hopefully)
@Morwenn Does folk metal mean bronze or hwhat
22:21
@набиячлэвэли Includes not only bronze, but also the more primitive (but pure) versions--tin and copper. In the case of Belgian folk metal, those choices would be narrowed to Tin and Tin.
@JerryCoffin Good info, fam
@набиячлэвэли Somehow I have a feeling that my attempt at humor fell flat...
@JerryCoffin It did if it was humour ya
22:28
@набиячлэвэли My sense of humor is like a ship on Star Trek: fast, but warped.
(and the faster it goes, the more warped it gets, obviously).
nwp
nwp
that joke was warp 9
I didn't get the tin tin part, prolly too old for me
@nwp transwarp
@набиячлэвэли I'm not sure what ages of people follow TinTin...
@JerryCoffin I mean I knew of Tin Tin just not that it's Belgian
22:36
@набиячлэвэли Ah, yeah, that would kind of ruin it.
So I derived from that that Belgium has a lot of tin deposits and not many of copper ones
@набиячлэвэли Doing a quick look, it appears that rather the opposite is true: they do actually have some copper mining (not sure exactly how much), but no Tin mining.
@JerryCoffin Okay, so I'll make sure not to remember the untrue data you presented earlier
Are we spelunking?
@набиячлэвэли The only untrue part was the inference you drew, not anything I said.
22:50
@набиячлэвэли You're a brick, a rock solid brick. Founded in the greatest of foundations.
@CaptainGiraffe Not at the moment. In fact, not in a long time, now that you mention it.
@JerryCoffin Well yeah, first-level induction I still (subconsciously and otherwise) consider data :v
@CaptainGiraffe what.
@набиячлэвэли I just read this -"Okay, so I'll make sure not to remember the untrue data you presented earlier"
@CaptainGiraffe IOW "I'll mark previous data as invalid" yes
@набиячлэвэли It is intended to be demeaning, I suppose to get the upper hand. I personally find this evidence of stupid.
22:54
@CaptainGiraffe >I'll call this man thick as brick because he marked incorrect data as invalid
:thinking:
@набиячлэвэли No because of the demeaning nature of the statement.
@набиячлэвэли I think I called you solid btw.
I imagined I replied in kind.
well calling one "thick as brick" ain't as hell bloody kind lemme fucking tell ya
You're a brick, a rock solid brick. Founded in the greatest of foundations.
I'm now twice a brick
Not a thick in there, even with my spelunking tools, I can't find one thick brick. Sorry.
22:58
And my hair ain't even red
Isn't the saying "thick as a brick"
I even tried grepping it. All I got was grep: don't do that
I believe it is, yes.
The thick part is required, unless heavily implied.
The rest of the thing sounds like insult => implies completion of derogative saying
I'm not a native speaker so I might imply things I did not intend to.
Well neither am I
I don't think that's the case here though.
23:02
my hair is also blue sometimes so it's about as far away from brickred as possible
@набиячлэвэли At least at one time, calling somebody a brick was definitely a compliment--you were saying they were solid (dependable).
@JerryCoffin Interesting
Have we established that my "You're a brick, a rock solid brick. Founded in the greatest of foundations." was really a compliment?
@CaptainGiraffe Are bricks really rock solid? I thought they were rather weaker than (most kinds of) stone.
@JerryCoffin Indeed, I worked with fire bricks last summer, they had even more different properties. They were yellow too.
23:14
@CaptainGiraffe They all have the same property: they burn when they come in contact with ClF3.
Sandstone < bricks < firebricks < granite. I think the scale is called the Mohs scale or something stupid like that.
@JerryCoffin well yes, yes they do.
@CaptainGiraffe There is a Moh's scale (of hardness). Granite varies widely though (Pikes Peak granite, for example, decomposes fairly quickly when in contact with air).
@JerryCoffin I appreciate the correction.
@JerryCoffin Oh my, no wonder geologists are in supply for the Mars missions. neat.
@JerryCoffin Thanks for playing along. I had fun. I was just miffed by the "the untrue data you presented earlier".
@CaptainGiraffe Oh, I'm pretty sure he didn't really mean anything by that.
Some people, like myself, are idiots. Comes from upbringing.
My father was an idiot, my mother was an idiot too.
23:40
@CaptainGiraffe For a while when I was in grade school, I arrived at a rather strange conclusion. Instead of looking at the average in my class and assuming that was about average, I somehow decided that I was about average (or maybe even a bit below), and I'd somehow ended up in an entire class full of nearly nothing but idiots...
Sir
Sir
whats generally more efficient for calculating the intersecting point of 2 line segments. finding the intersecting point of 2 lines that are infinite then check if the intersecting point is between my 2 segments, or, calculate the point from the two segments instead which is a bit more math complicated?
@JerryCoffin I can relate...
@Sir are you sure you're at the right place here?
Sir
Sir
why do you ask
maths exchange won't know whats more performant on a computer
@Sir Neither do us here.
Sir
Sir
no one took computers science? or done math optimisations for any software?
i find that hard to believe
23:51
434
Q: How do you detect where two line segments intersect?

KingNestorHow do I determine whether or not two lines intersect, and if they do, at what x,y point?

Sir
Sir
i know "how" to do it
thats not my question
Even if you try this at SO proper you will find it is unfavorable.
Sir
Sir
at no point did i ask how to do it
i am asking if any one knows which would be more optimised
since i am doing this calculation every frame
@Sir you are asking the wrong question at a wrong place
Sir
Sir
right so you guys never talk about optimisations?
in a C++ subject o_0
23:53
>no one took computers science? or done math optimisations for any software?
@Sir At least assuming you can plan on doing it on the GPU, the vector-based method of computing it directly is probably more efficient (and unless you're doing it for an immense number of lines, plenty efficient to do every frame).
@Sir This is the Lounge. C++ coding questions generally belong elsewhere‌​.
Sir
Sir
well given the last message was 15 hours ago lol. but any way thank you for the advice ill go the direct route!
@Sir you're not trying to make friends here are you?
Sir
Sir
just knowledge.
@Sir so where do you get that?
23:56
@Sir No. But we do like to talk about this season's Anime, the quality of the pigeon poop in Intel's Skylake X processors, and the # of ads we can block on one page.
@Sir It's quiet because nobody's asking questions. Some of us (including me) keep in on eye on it most of the time, and answer questions when they arise.
Sir
Sir
@JerryCoffin fair point! :)
@Mysticial ain't watched it, low quality, ibm's 5nm cpu is more interesting news, and 7 adverts :P
@Mysticial Speaking of blocking ads and such, did you restart it after it crashed?
Sir
Sir
uBlock origin also blocks the "please turn off adblock to access this site" so make sure you have that :)
@JerryCoffin Yeah. There seems to be fewer ads now. Had the tab open for all of today and only 30 ads.
Two weeks ago, it was going at about 30/sec.
00:00 - 18:0018:00 - 00:00

« first day (2424 days earlier)      last day (2750 days later) »