Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
a-priori
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
46 ms
·
421.
▲
by
a-priori
13y ago
You're right, it should word-align the addresses, but I didn't want to complicate things. This was just supposed to be a 'minimum viable allocator' to shove into a kernel temporarily then move onto other more interesting
422.
▲
by
a-priori
13y ago
It's not unusual. I did some work in civil avionics, and we were not permitted to use dynamic memory allocation due to concerns over heap fragmentation.
423.
▲
by
a-priori
13y ago
The simplest allocator ever is this: void *malloc(int size) { static long nextAddress = BASE_ADDRESS; void *ptr = (void *)nextAddress; nextAddress += size; return ptr; } void free(void *ptr) {
424.
▲
by
a-priori
13y ago
Good point... I confused the terms there. I was referring to an investor whenever I said 'trader' in my previous comment.
425.
▲
by
a-priori
13y ago
Stock markets are all about aggregating information about the state of the economy to discover its 'true' state at the current time. A trader makes money, on average, when they have knowledge that the market doesn't about a s
426.
▲
by
a-priori
13y ago
I agree that introducing randomness would probably make it more fair to new posts. One idea I had, rather than an algorithm based on Bayesian prior probability estimates, would be one based on a Kalman filter (or similar) confidence interva
427.
▲
by
a-priori
13y ago
One thing it depends on, that I don't think anyone has mentioned, is the compiler's register allocation logic and how that interacts with the rest of the code in the calling function. If, at the point you call the function, all re
428.
▲
by
a-priori
13y ago
The only way for it to be fair is for everyone to receive it. Naturally, there will be an inflection point where at some income level a person starts paying out more than they receive. I once calculated, based on what amounts to a back-of-t
429.
▲
by
a-priori
13y ago
Great example! Wish I'd included it in my original list.
430.
▲
by
a-priori
13y ago
I'm not really familiar with Go, but according to their documentation, the Go runtime currently uses a mark-and-sweep collector. So, at the level of detail this article is talking about, it's similar to the Ruby one. The details m
431.
▲
by
a-priori
13y ago
I agree. There are a few other pieces of software I'd put in the same class... here's two examples I can think of now: * Varnish (the "Notes from the architect" are a great read: https://www.varnish-cache.org&
432.
▲
by
a-priori
13y ago
Instead of aiming for a 'market rate', aim for a target utilization rate (# of billable hours / # of working hours) of something like 70%. The remaining time should be spent pursuing new work. If your utilization rate is high
433.
▲
by
a-priori
13y ago
Lossy compression always uses heuristics to guide compression and decompression. In this case, the heuristic is 'my brain works similarly; why would I have written this?'
434.
▲
by
a-priori
13y ago
I think partnering with a handful of other ex-freelancers would be a better route to creating an agency than building one single-handed. That's how a consulting firm I used to work for got started, as a partnership of 5 (I think) devel
435.
▲
by
a-priori
13y ago
Yes, but only to separate ports. A connection in TCP is uniquely identified by a tuple of {source IP, source port, destination IP, destination port}. Usually the source port is automatically assigned by the source system, and it picks an un
436.
▲
by
a-priori
13y ago
I just ran it on myself and a friend of mine (who's far more prolific than I am on Twitter). It said we're both parents, but neither of us are. It didn't get that I'm married (I guess I haven't ever mentioned my wif
437.
▲
by
a-priori
13y ago
The same is true in Canada. You can't call yourself any kind of engineer, software or otherwise, unless you're a licensed and accredited engineer.
438.
▲
by
a-priori
13y ago
I'm surprised Google didn't aqui-hire these folks and turn LiveNinja into Google Helpouts.
439.
▲
by
a-priori
13y ago
In this case it was a distributed team with most the members in Romania (GMT+2) and Armenia (GMT+4) with myself in Ottawa, Canada (GMT-4/5). So our normal working day only overlapped for an hour or two in the morning. So, we didn'
440.
▲
by
a-priori
13y ago
It's a trade-off. Stakeholders want to be able to discuss upcoming work and course corrections, but developers need uninterrupted time to get current work done. When I worked as a team lead I created a rule that there could be no meeti
441.
▲
by
a-priori
13y ago
That only proves that their analysis is right. It doesn't rule out the possibility that their results are caused by a quirk of their implementation. To really validate a paper you have to be able to recreate their code from a high-leve
442.
▲
by
a-priori
13y ago
Depends where you are and your definition of 'green'. In Ontario, right now we're running on: - 57% nuclear - 25% hydro - 14% gas - 3% wind - 1% coal - <1% other (mostly natural gas, apparently) If you consider nuclear, hy
443.
▲
by
a-priori
13y ago
Perhaps, but my fear is that Soylent's cavalier attitude is how you cause the next asbestos or thalidomide: things that seemed great, were rolled out extensively, and ended up being huge health disasters.
444.
▲
by
a-priori
13y ago
One thing that Taiwan (i.e, the Republic of China) and China (i.e, the People's Republic of China) can agree on is that the island of Taiwan is part of China.
445.
▲
by
a-priori
13y ago
From the article: "It's a so-called wet submarine, meaning that it fills with water when submerged, so the driver has to wear a wetsuit and breathe air from a tank. (The dry passenger compartment shown in the movie was a set.)&quo
446.
▲
by
a-priori
13y ago
Because it's a very strange and harsh instrument to put a hard limit on the amount of debt. Why is taking on $X of debt okay, but $X+1 is illegal? In every other country, public debt is kept in control the same way everything else is:
447.
▲
by
a-priori
13y ago
Then read it as "I run faster than I should and tire myself out prematurely".
448.
▲
by
a-priori
13y ago
I use a standing desk full-time and find that two anti-fatigue mats stacked on top of each other are better than one. But one is far better than none. Haven't tried three yet. :)
449.
▲
by
a-priori
13y ago
I don't follow...
450.
▲
by
a-priori
13y ago
I am aware, and that's something I've voiced my concerns about with my MP, but I don't see anything changing under our current government. But even if we weren't, it would be possible for American agencies to intercept C
More ›