Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
repsilat
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
repsilat
3y ago
Looks rad, I was going to look into some b-trees for a use-case where I need an ordered map of things similar to integers and this might be better. I couldn't immediately see, is there mention of whether insertions invalidate iterators
32.
▲
by
repsilat
3y ago
This is a radix tree (ordered, does more allocations), that is a hash table. Also TFA is C/C++, libgdx looks like Java.
33.
▲
by
repsilat
3y ago
Might be worth using values/copies even a bit bigger, so long as it's "simple" data. This[1] short post argues for passing `std::string_view` (~2 pointers) by value, for - Omitting pointer indirections (loads), - Not for
34.
▲
by
repsilat
3y ago
> useCallback ... returns a function. It returns something with the same type you gave it. If you give it a function it gives you a function back. In typescript it's declared to take a function but in practice it doesn't check,
35.
▲
by
repsilat
3y ago
> Bragging that you can't understand the difference between useMemo and useCallback after reading the docs (one is general memoization and the other is function-specific) Right, the first argument to useMemo must be a function, bu
36.
▲
by
repsilat
3y ago
One part of the philosophy of the language maintainers is that they're somewhat humble about their designs in the standard library, and very much against breaking changes. Some folks prefer absl's flat_hash_map over std::unordered
37.
▲
by
repsilat
3y ago
Sometimes the print statement is in untested sanity-checking error-case branches that don't have test coverage ("json parsing failed" or whatever). It's pretty annoying when those things throw, and not too uncommon. Anot
38.
▲
by
repsilat
3y ago
This is a wonderful thread. Which tricks in there are worth playing around with more widely? Is the uint8_t just "no point in using something bigger" or does it likely help the compiler? Does/can the signedness matter as well
39.
▲
by
repsilat
3y ago
My counter to the dismissal of the problem of "nuisance homelessness" was to insist that they're a problem. But argument aside, it sounds like we're agreed policy-wise: let's aggressively fix the problem of violent
40.
▲
by
repsilat
3y ago
Who says we can't help both groups? Why is my position (that we should help the "noisy" homeless) incompatible with the position that we should not help the "silent" homeless? Where did I even imply one was a higher
41.
▲
by
repsilat
3y ago
> Those are the homeless you can see. Those are the homeless that attack the elderly. Those are the homeless that shit on the street. Those are the homeless that lie naked sprawled across the sidewalk or at the end of a BART escalator.
42.
▲
by
repsilat
3y ago
The game theory isn't really winner take all. In a two-sided market like Uber (drivers and passengers) it's nearly impossible to bootstrap competition, but with autonomous fleets it's just a matter of capital. You can dump 10
43.
▲
by
repsilat
3y ago
> just a little late It fits with the article's explanation really. The media hate tech, propagandize against it, and they eventually win people over.
44.
▲
by
repsilat
3y ago
Reading again, I don't think the distribution in TFA ends up logarithmically spaced. The "first zero bit" function is biased low, so elements don't have an even half-life: elements towards one end are preferentially dele
45.
▲
by
repsilat
3y ago
I guess a funny randomized algorithm is just "if snapshots.size() > capacity delete random snapshot" (depending on complexity of random deletions.) If they're in a B-tree not bad. Snapshots have a half life so they fall of
46.
▲
by
repsilat
3y ago
TFA neglected to mention that floats have an "infinity" value, quite a bit larger than any 64 bit busy-beaver. (And before anyone says it's not a number, call `isnan` with an infinity and get back to me :)
47.
▲
by
repsilat
4y ago
It's a coordination mechanism in the prisoners dilemma. Building is defecting, zoning is legislating cooperation. In this scenario you and folks who want more building are the justice system: you want defection, you want building. You
48.
▲
by
repsilat
4y ago
You could argue it both ways. The essence of US antitrust is consumer harm. If Amazon were broken up the retail arm might die, and consumers would arguably suffer -- they wouldn't receive the subsidies they currently get from AWS, they
49.
▲
by
repsilat
4y ago
Would a simple example of this be something like, > In a traditional "merge" algorithm, the second comparison depends on the output of the first, so it can't be done at the same time. So it might make sense to merge "
50.
▲
by
repsilat
4y ago
For path finding heuristic methods give "sub-linear" time usually (if you have a pre-processed unchanging network with random access and amortize its construction over many queries). A-star is the old school one, but folks use fan
51.
▲
by
repsilat
4y ago
I generally agree, but there are better versions of the argument. One of them is the Braess network paradox[1]. In short, under a model with simple game-theoretic assumptions about behaviour ("people find the shortcuts") and traff
52.
▲
by
repsilat
4y ago
That's a different argument. The grandparent wasn't making a general case for the net benefit of added lanes, they were addressing the narrow argument of "induced demand" somehow proving that improvements are futile. And
53.
▲
by
repsilat
4y ago
It was edited by someone called Craven, possibly a nom de plume. Still looking for more info. Some evidence in a Gutenberg copy: 'Edited by "Craven"' (name in quotes in the original) and that name below the editor's
54.
▲
by
repsilat
4y ago
Real estate isn't bad in most places in the US. In most places it's easy and cheap to build, and houses are large and comfortable. The expensive places (San Francisco, Manhattan) are expensive because of government interference, a
55.
▲
by
repsilat
4y ago
The government does interfere with them, but to a much smaller extent than in other countries. Europe is famously protective of its food producers, Germany shut its nuclear power stations down. France's nuclear generation is a shining
56.
▲
by
repsilat
4y ago
> deregulated free market sucking people dry in the US over basic needs, forcing them to live with outrageous rents, childcare, healthcare, living costs. Hilarious. Those are all expensive because of government constraints -- the profi
57.
▲
by
repsilat
4y ago
Yeah. I think typescript has better predicate functions, maybe a slightly worse behavior in most places, and Flow is much much faster. But all of those differences get swamped by the "everyone is using it" effect. Typescript "
58.
▲
by
repsilat
4y ago
By Vim I will never abandon ye I swear to Havaianas I've never met her before With Amazon Prime as my witness I'll pay you back
59.
▲
by
repsilat
4y ago
Does Flow do a better job of the tuple examples? I feel like it inferred types on variables without annotations quite well -- `x=[1,2]` being something you could pass to a function expecting `$ReadonlyArray<number>` or `[1,2]` or `[an
60.
▲
by
repsilat
4y ago
> Do exchanges give us insight into what their order books actually look like, instead of just quoting the last price where a buyer and seller matched? They do. I haven't seen depth info past the best bid/offer (maybe exists?
More ›