« first day (1025 days earlier)      last day (3940 days later) » 

4:10 AM
-1
Q: Custody two part question

user230503It just recently came to my attention, a weekend dad, that my 7 year old daughter's mother and her fiancé have been arrested for trafficking synthetic marijuana to the tune of 170lbs confiscated. They posted bail and the mom was arrested again for the same offense. Both arrest records show over 1...

 
@Mysticial What the... could you please get a screenshot of that?
 
Thanks!
That is the most off-topic or whatever you call that question on meta I've seen so far. Also the most extensive.
 
what are the release dates on those compilers?
 
4:16 AM
Stone age, mostly.
VC++ 7 is VS2002 or VS2003.
GCC 3.2.3 is from 2003.
You get the picture.
 
The Stone Age is a broad prehistoric period during which stone was widely used to make implements with a sharp edge, a point, or a percussion surface. The period lasted roughly 3.4 million years, and ended between 4500 BC and 2000 BC with the advent of metalworking. Stone Age artifacts include tools used by humans and by their predecessor species in the genus Homo, as well as the earlier partly Australopithecus and Paranthropus. Bone tools were used during this period as well, but are more rarely preserved in the archaeological record. The Stone Age is further subdivided by the types ...
I love onebox
 
Dinosaurs used GCC 3.2.3
 
@Mysticial interesting story
 
@Rapptz To be expected IMO
@CatPlusPlus This might be just me derping, but I went from system A to system B to do the missions from the career agent. and now i plotted a way back to from System B to system A and the map tells me it's unreachable.
 
this might be a stupid question but why would someone still be using these compilers?
 
4:26 AM
Because C++ ecosystem is full of dinosaurs and shitty, legacy codebases.
@Borgleader vOv
 
Because C++ is full of dinosaurs and shitty legacy.
lol
 
@MohammadAliBaydoun God I feel old, remembering when egcs was shiny and new.
 
@Borgleader eve?
 
yes
 
just started?
 
4:31 AM
Just resubbed
I briefly played 2 years ago, but did nothing interesting and before that it was back in '08
 
@JerryCoffin At least you still have good hair :D
 
@MohammadAliBaydoun Well, I'm not bald anyway. Even when I was in my 20's, I don't think anybody thought of my hair as particularly good though...
 
Oh apparently I checked "Avoid system where recent pod kills occured"
 
@Borgleader are you doing mining/industry lowsec/null/high
 
I spent the last 2 days in the station abusing the ship spin counter, and I just finished the career missions xD That's all I did since I resubbed
 
4:37 AM
heeh
 
I'm in high-sec (Youl, Deepari, >=0.8)
 
@JerryCoffin I still can't cope with the fact that I'm going to lose parts of my hair in 20 years.
 
meta seems to be having a troll infestation lately
 
Genetics, you are the bane of my existence ;_;!
 
@MohammadAliBaydoun And entropy!
 
4:39 AM
@MarkGarcia And taxes!
 
death is the only certainty
 
Hi All..
 
Can anybody help me with .net C# issue?
 
@Borgleader well I am unsubed atm but I am usually around bosena Molden Heath
 
4:43 AM
@MohammadAliBaydoun Based on my uncles, chances are pretty good I'll keep my hair for at least another 20 years and probably longer. Most of my dad's brothers are still alive, and none of them is even close to bald...
 
my mother's mother is 101 year old and alive, if I am like her, I would be alive for a long long long time
 
@Telkitty猫咪咪 If you follow her lifestyle, which is most probably lots of exercise and a vegetarian diet. Also lots of sleep, which, sadly, is hard to fit in our line of work.
 
I don't see where the vegetarian diet comes in
 
@JerryCoffin My dad started losing parts of his hair at 35, I'm doomed ;_;
My hair is one of the only things in my body that's not terrible.
 
@MarkGarcia I do exercise a lot ... and I love my sleep (used to trade social life for sleep ins). As for diet, I loved my grandma's cooking while she still had the energy to do so (which is a lot of different veges and some meat or fish/crab etc).
 
4:54 AM
@Telkitty猫咪咪 If you account for pollution and radiation... most likely you'll have 7/8 of her life-span. :)
 
@MarkGarcia You forgot I am in Sydney ... so unless some accident happens, I am far far away from potential war zone/pollution sources :p
with that said, my adventure seeking personality could get me killed very soon
 
@MarkGarcia There have been lots of studies done on this, and virtually none has ever supported a conclusion that vegetarianism increases life span. They do point to vegetarians having longer lives than average, but when adjusted for other factors (e.g., most vegetarians also don't smoke) that advantage disappears. It's very similar to a study that showed the people who floss their teeth regularly live longer (in fact, it's an even stronger indicator for longer life than vegetarianism).
 
@Telkitty猫咪咪 I didn't realize Sydney had no pollution :p
 
@jalf it does ... I used to work on the 34th floor, somedays I could see the haze covering the city
 
I wonder how much bullshit would be out of this world when people learn the difference between causation and correlation
 
5:03 AM
My grandfather died a month ago, his older sister is 23 years older than him and she's still alive and relatively strong for her age
 
@nightcracker Quite a bit, to put it mildly.
 
@JerryCoffin I still believe, based on my own observations of old people in our locality (mostly farmers, the poor ones doing the manual work), that vegetarianism is one very important factor in longevity. Of course they also eat meat, though mostly only on special occasions and celebration. Though I have observed that this must be coupled with exercise, one which these people do everyday in their work.
They mostly drink "tuba", one very common and accessible beverage in here.
 
@MarkGarcia did you read what I say?
 
@MohammadAliBaydoun While 20+ years is more than normal, I'm pretty sure it really is quite typical for women to live longer than men. When I was in high-school, I worked in an old-folks home one summer. In the 90+ age range, women outnumbered men by at least 5:1 (and probably closer to 10:1).
 
@nightcracker I haven't, yet. Sorry.
 
5:09 AM
Correlation does not imply causation is a phrase used in science and statistics to emphasize that a correlation between two variables does not necessarily imply that one causes the other. Many statistical tests calculate correlation between variables. A few go further and calculate the likelihood of a true causal relationship; examples are the Granger causality test and convergent cross mapping. The counter assumption, that correlation proves causation, is considered a questionable cause logical fallacy in that two events occurring together are taken to have a cause-and-effect relatio...
 
@nightcracker I get what you mean.
 
@JerryCoffin I was born with the wrong genitalia!
 
@MohammadAliBaydoun That's nearly all of us here.
 
@JerryCoffin I was once at a gathering of programmers in my country in this nice hackerspace and the man to woman ratio was literally 25:1
 
@MohammadAliBaydoun Sounds about typical, I'm afraid.
 
5:21 AM
Would be nicer if more women were interested in programming
 
So if we have an aged hacker nursing home, we would have 1:1 ratio :p
 
Down and also down. Nice one hackerz.
 
@Telkitty猫咪咪 To the nursing homes!
 
My mother's father passed away last year at the age of 99
 
@MarkGarcia I like the title
 
@A.H. Too bad there aren't any toilets of that kind here. :P
 
5:55 AM
WTF. I just got the shit scared out of me with an iPhone amber alert.
 
@Mysticial, moving data between a __m128i and general purpose registers has to go via memory, right? So there'd be some latency in moving data back and forth
 
@jalf Not necessarily.
 
oh?
 
movd can be used to move from general purpose register to the bottom component of an SSE register.
 
5:57 AM
hmmm cool
 
And SSE4.1 provides direct access to and from any component of the SIMD register.
 
@StackedCrooked "2 A.M. in the morning"
 
that's not so bad
 
I love southern accents.
 
6:02 AM
@Mysticial Cool. Looking at Agner Fog's latency listing now.
 
There's a 1 - 2 cycle latency in addition to the execution latency.
So you're talking 2 - 3 cycles.
 
yeah
 
The 1 - 2 comes from changing execution domains.
 
So next question, you can't branch directly based on a value in an XMM register, can you? You'd have to load (part of it) into a GP register and test it there, right?
 
@jalf Correct. You can't branch from XMM register.
There are compare operations on XMM registers that will set the carry flags for branching.
But it's usually best (if possible) to just use conditional move logic within the XMM registers.
 
6:06 AM
Is it hard to pronounce a rolling r if your native language is English?
 
yes
 
lol try pronounce the dutch G
 
I can pronounce the Dutch G.
 
The Japanese r sound is bad enough, but I'll never be able to roll Rs.
 
Or the Cantonese 我.
 
6:07 AM
@Mysticial Yep, I can't pronounce that :P
 
that would sound like goose (鹅)
 
@Mysticial thanks! I'm messing around with a coding test/challenge I got from some guys who want to hire me
 
And the thing is, 我 = I/me. It's usually the first word you learn in any language - and is among the hardest to pronounce in Cantonese.
 
Except Japanese. There are like 10 things for I there.
 
omg didn't realise in chinese a goose(鹅) is the bird me (我 + 鸟)
 
6:09 AM
@jalf oh cool where?
 
I can do the rolling R, it's not hard
 
sounds like 'errr'
 
For me the English R and TH where hard to learn.
 
ach ja? wieso?
 
6:15 AM
@Mysticial huh, which ones are those?
@Mysticial small startup aiming to revolutionize the world :D
 
@jalf neat. I'm at Google. It's already saturated. :(
 
@Mysticial ooh thanks. I only knew about the compare ones which just set bits in the xmm register
 
@jalf Yeah. So you combine the compares with those test instructions to set the carry flags.
 
@Mysticial yeah, looks good. Pretty much what I needed
 
Yeah. SSE was very carefully designed to do all sorts of things. Things that only a human is smart enough to do. :(
 
6:20 AM
@nightcracker Hey, you there again?
 
Good stuff! So, can you help me with this stuff?
 
my sleep/awake time schedule is kind off... off
(I woke up at 0:00 AM)
but sure
 
Haha, yeahI know how that feels
 
you'll have to remind me with your problem again though
 
6:22 AM
wow vodafone sucks
 
Alright, so basically, I'm communicating with a Halo: Combat Evolved LAN server using external sources
I've already developed this project in C# and it works.
Basically, when you send "\\status\\" to a Halo server on UDP port 2302, it will return a whole lot of information about that server
Now, I set the socket up, bind it, that all works.
Here is my sending code:
std::string str = "\\status\\";
char* packet_data = new char [str.size() + 1];
std::strcpy(packet_data, str.c_str());

int sent_bytes = sendto( handle, packet_data,strlen(packet_data), 0, (sockaddr*)&address, sizeof(sockaddr_in) );
delete [] packet_data;
Can you identity any errors here?
 
why not just use str.c_str
 
it's unclear to me why you're first copying into packet_data
 
So should I just declare it straight up? Forget about the strcpy?
 
sendto(handle, str.c_str(), str.length(), 0, (sockaddr*) &address, sizeof(sockaddr_in));
 
6:25 AM
Oh
 
you might not want to send the null terminator
depends on protocol
 
@A.H. both snippets (his and mine) do not send the null terminator
 
Alright, I made the changes, now, here is the variables for receiving:
unsigned char packet_dataR[256];
unsigned int maximum_packet_size = sizeof( packet_data );
 
oh my bad I thought his did because str.size() + 1
 
And finally, the actual recvfrom
int received_bytes = recvfrom( handle, (char*)packet_dataR, maximum_packet_size, 0, (sockaddr*)&from, &fromLength);
Can I receive a string from this?
Because when I cout the packet_dataR, it basically looks like...
"|||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
 
6:27 AM
sure, but I'm not sure whether the data received is textual
 
But a character that's different to that one, that just looks like them
It is
I've tested this with C#
I get back something like this
 
try printing std::string(packet_dataR, packet_dataR + fromLength)
 
\server_name\NAME\\ver\1.04\\
But there's a ton more infoo
And alright, thanks, I'll make these changes
 
so just std::cout << std::string(packet_dataR, packet_dataR + fromLength);
ergh
my bad my bad
std::cout << std::string(packet_dataR, packet_dataR + received_bytes);
not fromLength, but received_bytes
 
Alright, sweet
Alright, it all works up until the last print command.
cout << white << string(packet_dataR, packet_dataR + received_bytes) << endl;

It's an unhandled exception with 'invalid iterator range'
the 'white' is a small header file I downloaded that can colour text
I'm sure that's not the cause
 
6:36 AM
Try removing it, but it is indeed unlikely
also the using namespace std; is hurting my eyes
could you print received_bytes?
 
Yes, that's not the cause. And what do you mean? Shouldn't I use 'using namespace std;' at the top? And I'll change it back to received_bytes and see what happens
When I printed the integer: received_bytes, it's -1
 
thought so
 
Doesn't that mean there isn't anything to print?
 
no, it means there was an error
in recvfrom
 
Hmmm
How can I get the error message?
C++ is quite the challenge compared to C#
 
6:39 AM
are you on linux or windows?
 
Windows
 
Testing out a new gravatar...
I may or may not stick with it.
 
2
A: How do I retrieve an error string from WSAGetLastError()?

mxclwchar_t *s = NULL; FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, WSAGetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &s, 0, NULL); fprintf(stderr, "%S\n", s); LocalFree(s);

try copy pasting that answer into your code right after the recvfrom
 
So must I print s?
Oh it will do it itself
 
@Mysticial you watch a lot of anime?
 
6:41 AM
@nightcracker yes
 
I had my Asuna gravatar for almost 8 months.
 
wchar_t ** is incompatable with parameter of type "LPWSTR"
On the
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &s, 0, NULL)
&s here
 
try removing the &
I've had my avatar for like 2 years
someone custom-made it for me
 
Right that worked, I'll test it out
 
6:46 AM
Mine is custom made as well
 
Xeo
I recommend reading the documentation if LPWSTR isn't wchar_t const**
 
Had it for about half a year (more than half)
 
Well, now C++ is just coming up with excuses. Basically, it printed '(null)'
 
Xeo
No, you're highly likely just doing it wrong.
 
@Xeo I'm scared a bit now
"The LPWSTR type is a 32-bit pointer to a string of 16-bit Unicode characters"
 
6:48 AM
@Xeo Probably
 
This type is declared as follows: typedef wchar_t* LPWSTR, *PWSTR;
that seems rather contradictionary
 
Xeo
Not really
 
@Daaksin try adding back in the & and casting to (LPWSTR)
 
LPWSTR is not the same as LPWSTR *.
 
Xeo
On x86, a pointer is 32bit, and wchar_t on Windows is 16bit
 
6:49 AM
Ok, I'll paste the entire receive code
unsigned char packet_dataR[256];
unsigned int maximum_packet_size = sizeof( packet_data );

#if PLATFORM == PLATFORM_WINDOWS
typedef int socklen_t;
#endif

sockaddr_in from;
socklen_t fromLength = sizeof( from );

int received_bytes = recvfrom( handle, (char*)packet_dataR, maximum_packet_size, 0, (sockaddr*)&from, &fromLength);
wchar_t *s = NULL; FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, WSAGetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), s, 0, NULL); fprintf(stderr, "%S\n", s); LocalFree(s);
 
Xeo
Please paste it on pastebin or sth
 
Whoops
 
Xeo
And edit your message out.
 
@Xeo the contradictionary part is between the declaration and the text
 
Or bin it out. :)
 
6:50 AM
How do you expect it to store the message at NULL?
 
@Xeo the declaration is simply wchar_t* while I would expect wchar_t** from the text
 
Xeo
... did you change your gravatar again?
 
@Xeo It's been freaking like 8 months since I've last done so...
 
Misty, your old avatar was cuter ;_;
 
6:52 AM
But my current avatar is tsundere. Wut now?!? :D:D
 
@Daaksin try this: pastebin.com/0hDBjt2r
 
Xeo
@nightcracker Ah, that. True. Also from the name.
 
@Xeo so that's what's really scaring me, seeing how it's also present in the header itself (at least on Daaksin's compiler)
 
Xeo
weird
@Mysticial So hard to see...
WAIT, THAT'S HAQUA
 
ahahahaha
 
6:55 AM
@Mysticial aw, but the old one was far more recognizable. Now you're just another nearly-black rectangle
 
Does exactly the same stuff, haha, just prints out (null)
Followed by the received_bytes print which is still -1
 
@jalf lol. I've got plenty of AVs to try out. I might get bored of this one after a week. :)
 
Is it possible that actually, it can't find the host in the first place?
 
Xeo
@Mysticial You can't forget that most people here recognize people by their avatars, not their names :/
 
Or that the error is at the declaration of the socket itself? Or the binding?
 
6:56 AM
@Daaksin could you std::cout << WSAGetLastError() << "\n" instead of the FormatMessageW call?
 
@Xeo ahahahahahahahahahahahaahahahahahaaaha
 
I'll give it a go
 
epic tag
 
Xeo
@Mysticial You seem slightly crazy today.
 
@Mysticial it's not entirely wrong. Makes it much easier to follow a discussion when you can visually tell people apart
 
Xeo
6:57 AM
Did you get a sunstroke or so?
 
Alright, it returned 10040
 
MESSAGE TOO LONG ERROR!
Meaning that
 
Message too long.
A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram was smaller than the datagram itself.
 
The received buffer is too large
 
6:58 AM
no, too small
 
Yes! So I must just increase the amount of buffer
Oh..
 
Wait so, the received string is bigger than what I can hold?
 
you should be able to receive any udp packet with a buffer size of 65536
@Daaksin yes
 
So I must change..
unsigned char packet_dataR[512];
That, right?
I tried 512, and it returns the same error
How big is this bloody message
 
7:00 AM
I just told you
65536
you aren't programming a frigging microcontroller with 4kb of memory here
 
Hahahaha, true that
That surely can't be it... Still, the message is the same.
Is there a way to dynamically set the size of the buffer as the data is coming in?
 
wait a second, it still errors with unsigned char packet_dataR[65536]; ?
 
Alright
Yes
unsigned char packet_dataR[65536];
unsigned int maximum_packet_size = sizeof( packet_data );
 
try setting maximum_packet_size to 65536
 
Oh of course.. The sizeof( packet_data ) links back to the other sending buffer..
Oops
 
7:05 AM
... why are you messing about with raw arrays instead of a vector?
 
So this time, I received back from the server:
Error code of: 0
And the received_bytes is: 8
 
so, try printing the data itself
 
Yeah, it worked, I got \status\ echoed back to me. Which means that it's interacting with the server
 
well there you go
 
Yeah, thanks nightcracker!
Biggest help hahaha
 
7:09 AM
but jalf is right, you should really use std::vector<unsigned char> recv_buffer; recv_buffer.reserve(65536);`
 
Xeo
nononono
not .reserve
 
thats a lot of bytes
 
^
 
and are you saying windows won't allow you to receive a partial message ?
buffer has to be max size?
 
@Xeo why not?
 
7:10 AM
@nightcracker because that leaves you with a vector of size 0. You need to resize, not reserve.
 
@nightcracker not sure why xeo said but I would use the constructor here
 
woopsie
meant resize
and the constructor is even better yes
(my C++ is kind of rusty)
 
@nightcracker so for real windows won't let you use a smaller buffer? that doesn't sound right
 
let's just say it's complicated
 
Xeo
He used the wrong type / variable for setting maximum_buffer_size
 
7:14 AM
Sorry to interupt, but is it possible to encode a char* like in C#?
Like.. Encoding with ASCII
 
you'd probably would be able to receive every udp packet with smaller buffers, but this is just easy
 
maybe its just me but I wouldn't reserve that much unless I am using it
 
65 kb
unless you know that the server will NEVER send a packet larger than x size, don't use a buffer smaller than x size
and make sure you handle packet errors gracefully
 
@A.H. "that much" being 64 kilobyte?
less than a tenth of one of a 740KB floppy disk?
 
@jalf I guess I am just conservative
 
7:28 AM
@A.H. Presumably the buffer is just to receive the raw bytes, which will be processed into something more sensible right after those bytes are received.
In that case, the 64k buffer isn't such a big deal (especially since the stacks of threads are on the order of megabytes to begin with)
 
yeah I see your point but for some reason my reaction is I don't need that much :s but as @nightcracker it depends on the protocol and its message limit I guess.
 
@A.H. True. Some protocols are more amenable to reasonable buffer handling than others
 
Yeah, thanks champs for helping me with this program, it works now, but I still have to figure out why it's not sending the proper data back!
 
damn that unicorn!
oh great, now that octocat tells me down for maintenance ¬_¬
 
7:52 AM
I really need to learn netbeans automated swing thingy
 
posted on August 05, 2013 by Li Shao [MSFT]

My name is Li Shao. I am a Senior Software Design Engineer in Test on the VC++ team. In this blog, I would like to share the performance enhancements we've made in VS 2013 Preview to improve the C++ IDE and build system. Performance is a vital part of software quality. Over the last couple of releases we have made significant performance improvements in areas such as solution load, IntelliSens

 
oh thank god, Configuration Switching is such a pain in VS2010
 

« first day (1025 days earlier)      last day (3940 days later) »