Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
logancapaldo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
logancapaldo
13y ago
I see. What I was worried about was a version of the code you didn't actually write (casting the ptrdiff_t result to a [u]intptr_t, not casting the pointers first).
2.
▲
by
logancapaldo
13y ago
What if it's not a DWIM compiler? I'm pretty sure (happy to be corrected) pointer <-> integer conversions are implementation defined. Therefore casting between could perform some reversible operation that ensured round tripp
3.
▲
by
logancapaldo
15y ago
That is not a "similar" implementation, and it's not in the "library". It exposes the OS/ABI level exception functionality (which C++ exceptions are also built atop of) to the compiler.
4.
▲
by
logancapaldo
15y ago
This article is pretty terrifying: #import <pthread.h> #import <stdlib.h> // Globals pthread_mutex_t *gLck; int gSum; int main (int argc, const char * argv[]) { p
5.
▲
by
logancapaldo
15y ago
And this is why, any cache without an eviction policy and/or size limitation is bad (and memoization _is_ a cache). I shudder every time I see a "magical" memoization function whose interface is just memo function-to-memoize