4,792 reputation
1023
bio website
location
age
visits member for 3 years, 5 months
seen yesterday

Apr
16
comment Handling source code table alignment
What is the actual problem with having the whitespace changes in your changeset alongside the functional changes, if you don't see them anyway? You don't have more patches/changesets, and they aren't less clear AFAICS.
Apr
15
revised How to share memory between applications written in C/C++
added 685 characters in body
Apr
15
answered How to share memory between applications written in C/C++
Apr
15
comment Difference between a socket and a port
The problem here is that your analogy is wrong. Forget what a socket means in the physical world - it's not a metaphor for something else, just a technical term for a specific technical software concept. It isn't even strongly related to physical network ports or sockets - you just have to understand it, in this domain, as a concept on its own terms.
Mar
24
comment Alternative to goto-statement in this case?
Which also gets you a hard-to-reason about chain of negatives, nowhere to put any condition-specific logic or logging, and some free indentation. It's fine in the case shown, but IMO scales poorly as the number (or complexity) of conditions grows.
Mar
12
comment in C++, how to call an 'init' routine as a class is loaded?
Sure, but stuff like the layout of STL types isn't specified as part of the ABI, which is problematic when STL code expecting different layouts is inlined in different modules.
Mar
10
awarded  c++
Mar
9
revised Why aren't `void *`'s implicitly cast in C++?
added 684 characters in body
Mar
9
answered Why aren't `void *`'s implicitly cast in C++?
Feb
27
comment How to avoid violating one definition rule in this case?
Well, only one of the two will link successfully, but you can't control their build system.
Feb
23
comment Question on RC4 algorithm
Your original quote doesn't seem to contain the word character, so where did that come from? Just stick with byte, or use octet for perfect clarity.
Feb
23
comment Question on RC4 algorithm
Each of the 256 elements of the array contains a (different) value also in the range [0,255]. So, the array provides a bijective map from [0,255] onto itself. Any bijection from a set onto itself must also describe a reordering, or permutation, of that set.
Jan
24
comment Situations when O(n^2) better than O(n*log(n))
Yes, but naive pivot selection means you're more likely to get worst-case performance
Jan
13
answered Facing MemoryError in Python
Jan
8
answered How to make max-heap stable with counter and account for counter overflow?
Jan
8
awarded  Pundit
Jan
7
comment Why would a program require a specific minimum number of CPU cores?
But any game has a fragile dependence on being able to complete all the computation for the next frame in time to render it with reasonable frequency. Even if your 4 threads are synchronized correctly, it may be impossible to render in a timely fashion, and there's no benefit in a game which is computationally correct but unplayable due to lag and stutter.
Jan
5
comment How to make max-heap stable with counter and account for counter overflow?
That is exactly the relevant information I interested in, and could helpfully be added to the question.
Jan
5
comment How to make max-heap stable with counter and account for counter overflow?
So one million inserts per second is a realistic scenario for you, then? Some information about the number of entries, and their lifetime, would be useful.
Jan
4
comment How to make max-heap stable with counter and account for counter overflow?
The linked doc suggests 500,000 years, at one million inserts per second. Is that a real problem? If so, do you actually have to deal with very long-lived objects? If you only need to deal with overflows, but not objects more than one overflow old, you can probably just provide a new boost::heap::stability_counter_type that doesn't throw.