« first day (790 days earlier)      last day (4163 days later) » 

12:00 AM
@GamErix well, idk, but the first one looks like it would allow other keys to be pressed at the same time
 
Xeo
& checks if it's one of the pressed keys, == checks if it's the only one.
 
user1182183
@Xeo well ye then it's exactly the same as in pawn ;d
 
Xeo
As in what?
 
user142019
@ScottW use libuv or Boost.Asio or something similar. :P
 
user1182183
@Xeo pawn
 
12:01 AM
Pawn? Isn't that also the name of an erotic web comic?
Don't ask me how I know that.
 
user142019
In my vocabulary, “pawn” is a synonym of “porn”.
 
user142019
@ScottW oh okay.
 
Hm. I guess I'll just have to wrangle how to make it pick the right constructor...
 
user142019
Me too.
 
@ScottW Hav fun!
 
user142019
12:02 AM
Später.
 
@Xeo I doubt that. There are a hundred VK codes. They can't all be individual bits.
 
@ScottW I don't remember it being much more painful than regular sockets
 
@Zoidberg'-- Have fun wherever you're going!
 
user142019
@ThePhD I’M GOING TO SLEEP
 
user142019
IT’S 1:03!
 
12:03 AM
I just got up :p
 
Well then have some kick-ass bitchin' dreams, yo.
 
and it's 1:03
 
Xeo
@DeadMG Hm.. true.
So yeah, it's the same then.
No, wait.
If those are not all individual bits, & is just wrong.
Since it may give false positives.
@GamErix Use ==.
 
Ugh.
 
hence why & can't possibly be correct
 
12:05 AM
Is there a way to force the compiler to recognize/use a specific constructor, rather than just try to mismatch and horribly misappropriate like 20 constuctors?
 
@DeadMG wparam is just a DWORD, or something, right?
 
user1182183
@Xeo somehow & AND == don't work for VK_NUMPAD5 ;o
 
user1182183
it's a LONG_PTR
 
@ThePhD probably, yes
 
user1182183
i mean UINT_PTR
 
Xeo
12:06 AM
Welp, what do I know what you're trying to do. :P
 
user1182183
#define HK_IS_PRESSED ((DWORD)lParam & 0x40000000)
#define HK_IS_HELD ((DWORD)lParam & 0x40000000)
#define HK_IS_RELEASED (!((DWORD)lParam & 0x40000000))

LRESULT CALLBACK KeyHit(int code,WPARAM wParam,LPARAM lParam)
{
	if(code != HC_ACTION)
		return CallNextHookEx(hHook,code,wParam,lParam);
	if(HK_IS_PRESSED)
	{
		hp = 1.0f;
		if(wParam == VK_NUMPAD5)
		{
			CVehicle *pVehicle = NULL;
			pVehicle = pGame->GetPools()->AddVehicle((eVehicleTypes)411,0,0);
			hp = 25.0f;
			if(pVehicle != NULL)
			{
 
user1182183
hp gets set to 1
 
user1182183
but not to 25
 
user1182183
nor 75..
 
@melak47 I think that WPARAM is 32bit and LPARAM is sizeof(void*).
but it could be that they're both sizeof(void*).
 
12:08 AM
wparam and lparam can also be converted to pointers,
 
@DeadMG right, either way not enough room for ~100 bits
 
so it has to be sizeof(void*)
 
@GamErix Holy shit, why the horrific macros?
 
user1182183
@DeadMG typedef long __w64 LONG_PTR
 
user1182183
@DeadMG copy pasted from internetz
 
12:08 AM
@ThePhD I know that LPARAM can be a pointer, but I've not seen WPARAM.
 
@GamErix Oh dear. Hungarian notation? Why?
 
@GamErix Irrelevant. That's only one platform.
 
user142019
lol WinAPI
 
user1182183
@EtiennedeMartel ask mta
 
user1182183
@Zoidberg'-- ye winapi ;F
 
user1182183
12:09 AM
@DeadMG WPARAM = typedef int __w64 UINT_PTR;
 
user1182183
anyway none of both work, & or == :/
 
1 min ago, by DeadMG
@GamErix Irrelevant. That's only one platform.
 
@GamErix what is the value of wParam?
 
only the documentation can say what WPARAM is.
 
user1182183
@MooingDuck I'll debug
 
user1182183
12:11 AM
is it possible that when you attach an debugger the keyboardhook stops?
 
@GamErix No. Just breakpoint after you get the message you want.
Blargh. Mother fuckign constructors. ;~;
All I want it to do is properly and cleanly handle char [512] . Is that too much to ask?
 
@ThePhD I can't imagine how that would even come up as a question. Are you being crazy again?
 
@MooingDuck No!.... Maybe a little ...
 
user1182183
eh It's fucked, I cannot attach the debugger -.-, Ok I'll use MessageBox()
 
user1182183
attach debugger = visual studio crash
 
12:14 AM
Need a couple more close votes (truly an exact dupe -- apparently pasted and posted twice):
0
Q: DVD Sorting Program for C++ Beginners (Help Needed)

Syre LancasterHello ladies and gentlemen. This is my first time on stackoverflow, having been referred here by the good folks at Extra credits. I am a beginning C++ programmer(aka total noob) working on a practice problem that is cumulative for the material I've covered so far. The question goes like this: Th...

 
@GamErix why do you need to attach the debugger, can't you start debugging from inside VS?
 
user1182183
I did have the vote to close option but it's gone..
 
user1182183
@melak47 VS can't start a process, the project is a DLL
 
@JerryCoffin How did it get past the duplicate title filter?
That's exactly the same, down to the letter.
 
@Mysticial You've got me -- I checked twice just to be sure each did have a unique ID number (and they do).
 
12:18 AM
two questions 2 minutes apart
 
@Mysticial Yeah -- looks almost like a hiccup on the server's part or something on that order.
 
How did he get past the rate-limit?
@JerryCoffin Yeah
 
> having been referred here by the good folks at Extra credits.
 
Impressive
 
Wooohooo my first gold badge
 
12:19 AM
Oh. Is he refering to that "So you want to be a developer" set of videos?
 
YES
AHAHAAAAA
Even with all my constructors I got it to compile.
I'm only a little bit of a genius?
 
@ThePhD ...
 
@Mysticial Looking more carefully, there is a minuscule difference: in the second, he put breaks between the three files (and labeled each) instead of pasting them as one giant blob of code.
 
user1182183
hm wParam == VK_NUMPAD5 == true
 
@MooingDuck I'm sorry. :c
 
12:23 AM
@GamErix ...
 
user1182183
@MooingDuck somehow the code stops without an exception or crash...
 
user1182183
WEIRD
 
@GamErix You can't really trust a single comparison to true (nor always trust true to really be true. I recommend wParam == VK_NUMPAD5 == true == true == true == (1==1) != (0==1);
5
 
user1182183
			hp = 100.0f;
			CVehicle *pVehicle = NULL;
			pVehicle = pGame->GetPools()->AddVehicle((eVehicleTypes)411,0,0);
			hp = 25.0f;
 
@GamErix it's valid C++
 
user1182183
12:24 AM
my hp is set to 100 but not 25
 
@JerryCoffin Oh god what have you done
 
@GamErix probably set elsewhere
 
user1182183
@MooingDuck nope :D
 
user1182183
it's a global I just made to debug
 
0
Q: How did this question bypass the dupe-title filter and the question rate-limit?

MysticialHere are the two questions: DVD Sorting Program for C++ Beginners (Help Needed) DVD Sorting Program for C++ Beginners (Help Needed) The titles are exactly the same - down to the letter. They were also posted two minutes apart. How did this user get past both the duplicate title filter and th...

 
user1182183
12:25 AM
and a timer which gets executed every 30ms applies the global health value
 
@GamErix exception? break? return? continue?
 
@Borgleader About what I usually do when I see ==true, != false, etc.
@Mysticial Should be good for at least a little meta-rep... :-) (...and you're already almost halfway to seeing deleted stuff on meta).
 
@JerryCoffin Yes, I want my meta rep. :)
 
@Mysticial meta-whore...
 
sbi
So I come home in the middle of the night (it's 1:30 here) and find my teenage daughter missing. A nice evening suddenly turned sour.
 
12:30 AM
@R.MartinhoFernandes So many new things in C++11. My head!
 
@sbi :(
 
Xeo
@sbi Uh-oh.
 
@sbi oh geez... call her?
 
sbi
@Mysticial Her phone is off.
 
Oh dear.
 
12:32 AM
I think most likely she's at a party or staying with a friend.
 
Xeo
Got the number of any friend?
 
@sbi Search time.
 
sbi
She was with some fellow for the evening preparing some oral presentation, and when I called her around 8:30 she said they are almost done and his parents are going to bring her home. That was the last I heard of her.
 
Get to the parents.
 
sbi
I first called her mother, in case they dropped her off there, because it's closer to him.
That was a mother waking up very quickly, I tell you.
 
12:33 AM
this is not the time to joke about "oral presentations", is it :/
 
Do you have the phone number of the friend she was with (or his parents?)
 
@melak47 crossed my mind as well, but I came to the same conclusion
 
sbi
Her mother is already on the phone trying to call his parents. But it's 1:30am, and they might not hear it.
 
@sbi This is when you kick down the door of their house.
 
sbi
@melak47 I didn't know how to translate "Vortrag" or "Referat" any better.
51 mins ago, by Zoidberg'--
Should I go to the police?
How fitting.
 
Xeo
12:35 AM
speech?
 
sbi
Whatever.
 
Xeo
Yeah, guess that's not the point here.
 
wow
 
sbi
I am now sitting by the phone waiting for that call. And I hope it won't say "they don't pick up their phone" or "they said they droped her at your doorstep".
 
@sbi could call the police and ask if they've seen her, and/or hospital I suppose
 
12:36 AM
Is it in her character to do things like this?
 
sbi
@StackedCrooked Not at all, actually.
 
@MooingDuck Sometimes they cant do shit before 24h
which is dumb imo
 
sbi
Well, it could happen to her that she forgot to leave a message with me that she's staying there because it's too late. But I wonder about his parents. If it was me, I'd make damn sure she'd told her parents had I invited her.
 
@Borgleader that's for a missing persons. If you're merely asking if they remember bringing her in in the last few hours, they can check that.
 
Xeo
@sbi Well, I'd rather hear "they dropped her at your doorstep" than "The dropped her some 100 meters away from your doorstep", to be honest.
 
12:37 AM
@Borgleader besides, he's in another country, who knows the laws there
 
@MooingDuck thats why i said sometimes
 
@Borgleader They may not be able to mount a search, but they undoubtedly can at least say whether they already know of unidentified people in hospital, etc.
 
sbi
@Xeo Well, you know where I live. I wouldn't expect anything bad to happen 100m around here. But if they dropped her here, and she isn't home, then the shit has hit the fan big time.
 
Xeo
True.
 
In any case, I hope nothing bad happened/happens.
 
Xeo
12:39 AM
But normally you'd never expect anything bad to happen. Or rather, you hope that's the case.
 
sbi
phone call
 
from her?
 
Are they asking for ransom?
 
Xeo
@StackedCrooked Should not laugh... should not laugh...
 
sbi
Nobody reached.
 
12:41 AM
:/
 
Xeo
Asleep, probably. Can't hear it depending on the flat layout.
What about mobile numbers?
 
Perhaps the other kids know anything? Did you ask them or are they asleep?
Anyway, iirc, police won't act until the person hasn't come back in 24 hrs or so.
 
even for kids?
 
Not for toddlers of course. But for teenagers, sure.
At least in Belgium.
 
hum. do teenagers go missing for 24h a lot?
 
12:46 AM
How should I know.
 
Xeo
@StackedCrooked Especially for teenagers, some might even say, since they tend to go "missing" a lot without telling anybody anything.
 
yeah I can see that, but a whole day? during the week?
 
I guess we'll hear more about it tomorrow.
 
Xeo
Aye, doubtful @sbi's gonna get back at us anytime soon now.
Unless his daughter shows up somewhere.
 
I guess he'll address her first.
Dammit, I wouldn't want him to be my dad if he's angry.
 
Xeo
12:51 AM
I think he'd be pretty reasonable when angry. Also, you do want your parents to get angry at something like this, since that shows concern (most of the time, atleast). If they're like "yeah, whatever, don't do it again, k?", there's a problem.
 
I guess that makes sense.
 
@R.MartinhoFernandes digging up history, I recoded a version that doesn't do the presep first (just moved it to an alternative way to find the RHS of a chunk), and it turns out it's faster this way. With GCC, It's actually 13% faster than a pure quicksort. (same speed with MSVC) No idea why. I seem to actually be using significantly fewer comparisons, though I'm not certain why. ideone.com/cv6VsT
wait... terminate called after throwing an instance of 'std::runtime_error' what(): random_device::random_device(const std::string&)
@StackedCrooked: your compiler does the same thing with std::random_device seed; Does the library not support that?
 
"My" compiler is just GCC 4.7.2.
 
you should upgrade from GCC to a real compiler like VC++.
 
Feel free to upload it to apt-get. Then I'll install it.
 
Xeo
1:04 AM
@StackedCrooked Cool, will you install Clang and libc++ then? :)
 
You want clang?
I could do that...
 
Xeo
Well, I don't really need it since I have Clang trunk on my vbox.
But some people might want to test GCC vs Clang
 
Hm...
I might add it. Depending on how often people ask me for that.
 
add MSVC :p
 
geez, when sorting 1048576 strings of 17 characters, my inplace-quicksort variant was almost twice as fast! O.o
this is, of course, comparing to "pure" quicksort, which nobody in their right mind would do.
I also calculated that a pure quicksort with 1 page already used of 1MB of stack space that is optimized to only recurse on the smaller half would be able to sort ~10e8696 elements before reaching stackoverflow. And there's only ~10e80 atoms in the universe.
going home now!
 
sbi
1:16 AM
@Xeo I just had the police here taking her down as missing.
This is gonna be one of those nights. Tries desperately to stay calm.
 
@sbi I'm sure she's alright
 
sbi
@StackedCrooked Her mother reached the father of a third pupil involved in the preparations, but his daughter was in bed with the flu today. He woke her up anyway, and got the mobile number of the boy where she was, but he doesn't pick up the phone.
The two guys from the police are now going back to their quarter, filling in the necessary papers, then call some other district's police quarter, so they would send a car to the house of the boy's parents... That can take another hour, they said. At the very least.
 
Did the police give any indication that this is a worrying situation?
Hm, I guess they wouldn't know...
 
Her phone being off tends to be a bit more concerning.
 
sbi
They made soothing noises.
 
1:22 AM
Heh.
 
Xeo
Not to be all pessimistic, but did you hear any news about car crashes or something?
 
@sbi Does she usually keep her phone on?
 
sbi
@Mysticial She does that at night.
 
@sbi Oh ok. That makes it a little better.
 
She could have stayed with a friend and assumed that you wouldn't notice her absence. Or is that not possible? Frankly it's the most likely situation IMO.
 
1:24 AM
My phone stays on 24/7. So when my parents call, and it goes straight to voicemail, they panic.
 
Xeo
Hm. I'm staying in Oberhausen for 4 days. What do I need to take with me?
(Just so I don't forget something again.)
 
Toothbrush. Swim trunks.
 
Xeo
Check and ... wait, what?
 
I don't even know what Oberhausen is.
 
Xeo
A town.
Where I'm going to move.
 
Xeo
And I'm staying there over the weekend because some stupid Jobcenter employee decided that I'll be in Oberhausen for sure on a Monday at 9 am.
@StackedCrooked Not quite that direction, but yeah, the Centro shopping mall is near.
 
Well, I guess you need money and Internet.
 
Xeo
Internetz will be out, I think.
Since I didn't contact the local media group there yet.
 
That's nightmarish.
 
sbi
@StackedCrooked As I said, she was with a friend doing something for school, but at 8:30pm, when i called here, she said they'd be done soon, and his parents are going to driver her home.
 
Xeo
1:30 AM
@StackedCrooked Well, atleast my buddy lent me his laptop for the train and the weekend, so I can play some VNs or watch anime.
It'd be really nightmarish without that.
 
@sbi What do you think happened?
 
sbi
@StackedCrooked Of course, it could have taken longer than they had expected, and she could have been invited to stay there overnight. But I cannot imagine his parents not making absolutely sure that she calls at home and leaves a message for me.
 
Did MooingDuck's gravatar just leave the users list on a sled?
 
@Insilico yes
 
Xeo
If I didn't have the laptop, I'd probably have packed up my PC and taken it with me.
 
sbi
1:31 AM
The cop said that, should they have been in an accident, the hospital would have long since called us, as they must do this.
That doesn't leave very many nice options. In fact, the only one I can think of is my answer machine having dropped a message.
And just how likely is that?
 
@Mysticial How long ago was that implemented?
 
@Insilico 2-3 days?
 
I'm surprised that a question about the sled hasn't been posted to Meta yet.
 
@sbi Here's another one, she left a message but she misdialed.
 
sbi
@Borgleader ...and didn't realize it wasn't her father on the answer machine. Yeah, sure.
 
1:35 AM
@sbi You should try to go to sleep. You'll hear her explanation tomorrow.
 
@sbi Damn... I didn't think about thata
 
Then who was phone?
 
sbi
@StackedCrooked I am waiting for the police to call me after they banged on the boy's parent's door. It will take an hour.
 
I see.
 
sbi
@StackedCrooked ??
 
1:36 AM
@sbi Do you have to work tomorrow?
@sbi Never mind that.
 
@StackedCrooked I don't think work matters at this point.
 
sbi
@StackedCrooked Worse. I have about 5hrs to buy xmas presents for the kids. Starting at 9am.
Work I could just call in and skip. But I cannot tell the small ones that her sister was gone for a few hours, and that Santa couldn't bring presents because of that.
 
no other chance to buy presents?
 
Just say Santa was late?
 
Xeo
"Santa went looking for your big sis, so he was a bit delayed in making the presents."
 
1:39 AM
Isn't it a bit early for Santa anyway?
 
@StackedCrooked Perhaps sbi is shopping for presents online? (And thus have to wait for shipping to do their job)
 
Xeo
> Starting at 9am.
Unlikely.
 
sbi
Never mind. If I get a call in an hour that she's asleep there, I'll pull myself together and go shopping after 4hrs of sleep. With so many kids, I definitely had worse nights. Well, regarding lack of sleep, that is.
 
Also you have to wrap them and stuff them under the tree.
 
How did you find out she wasn't home? Did you check her room? Or did you just happen to notice that her coat wasn't were it usually is. Just wondering, since you seem to have noticed only at around 1am.
 
Xeo
1:42 AM
@StackedCrooked He was likely only home at 1am.
 
Or at least that's when you first mentioned it here.
 
sbi
@StackedCrooked Beginning tomorrow afternoon, I'll have small kids until next Friday. That means I'll have to hurry home from work, pick them up at school/kindergarten, take them home, feed them, and tuck them in. This leaves no room for shopping presents, and I#d only have the two days before xmas Eve to do that.
1 hour ago, by sbi
So I come home in the middle of the night (it's 1:30 here) and find my teenage daughter missing. A nice evening suddenly turned sour.
The apartment was locked, and there was no sign of occupation (shoes, jackets, etc.), so I checked her bed.
Then I checked all the others. Just in case.
Then I called her mother.
 
The other kids didn't know anything? Or you let them sleep, I suppose.
 
sbi
And then the excrements hit the air conditioning.
@StackedCrooked She was the only one supposed to be here.
 
I remember coming home at 1 am after the last day of a student job. There was a little party because it was the last day. When I got home my mom turned out to be dead worried and had already called the cops and the hospital. (That was in 1999 before mobile phones were common.)
 
1:47 AM
@sbi I presume she doesn't have a cell phone that you can try contacting?
 
@Insilico Her phone is off. However, apparently she always turns it off at night.
 
@StackedCrooked Aw, fuck.
@StackedCrooked Why would someone turn the phone off nightly?
 
sbi
@StackedCrooked How old were you then?
 
@sbi 17 or 18 I think.
 
sbi
@Insilico So she won't be woken up by a stray call or text message in the middle of the night?
 
1:50 AM
@sbi Is it off as in "the battery is out" or off as in "I've turned off the ringer"?
 
sbi
@Insilico It's off as in "the mailbox picks up immediately".
 
@sbi That could mean either of those things. You can try to get the police to triangulate the phone via the cell towers, assuming she always have the phone with her.
 
He already talked with the cops.
They are visiting the house of the schoolmate she met up with this evening.
 
sbi
@Insilico She has the phone with her, but if she's asleep, she'll have put it into airplane mode. Nevertheless, if they haven't found her in the morning, I am sure they'll try to get a trail of her phone from her provider.
 
@sbi I wish you the best of luck.
 
sbi
1:54 AM
Thanks. Actually, I am sure some kind of weird explanation will clear this all up. But I can't be sure, and that's the bad part.
 
I concur.
 
@sbi If she came home before you, and found she had forgotten/lost her key, what would she have done?
 
sbi
@je4d Gone to her mother. It's only a 25mins walk.
phone call
 
@sbi so much for that explanation. I hope it all works out ok :/
 
sbi
Ok. All is fine.
 
sbi
Sigh.
 
@sbi What happened?
 
sbi
calling her mother first
She's asleep at her friend's. The police managed to knock the father out of bed, and he says she texted me.
I never got a message, but there's no guarantee that a message arrives, so she could indeed have not forgotten.
I think I just aged about half a decade in the last 90mins.
 

« first day (790 days earlier)      last day (4163 days later) »