Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
vitus
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
481.
▲
by
vitus
4y ago
> you can have a mid-range one for the price of a meal Is that an expensive meal or a cheap CPU? A meal for a family? My mental model for a mid-range CPU is an i3 (don't forget Pentium / Celeron), and even for those Intel recom
482.
▲
by
vitus
4y ago
The actual bug was using .data() instead of .c_str() when the author needed a C-style string. But yes, avoiding error-prone functions is an equally effective approach.
483.
▲
by
vitus
4y ago
Indeed. I pulled the data and mostly reproduced the results when starting on Jan 1, 1990 (I got 1/20 of a penny for day trading, but "only" somewhere in the $600-650 range for overnight trading, depending on the choice of end
484.
▲
by
vitus
4y ago
Accurate. I'm not sure why I wrote they all have inverses, or the point I was trying to make -- phi(3) = 2, so your provided equation already demonstrates that for all even e, n^e = n^0 = 1 mod m (which is obviously not a bijection fo
485.
▲
by
vitus
4y ago
That's a solid explanation, but it's not quite complete -- consider Z/3Z = {0, 1, 2}, all of whom have multiplicative inverses. An easy way to look at this is that the numbers are equivalent to {0, 1, -1} mod 3, and so the po
486.
▲
by
vitus
4y ago
If you run all of your code in one datacenter, and it never talks to the outside world, sure. That is a fairly rare usage pattern for production systems at Google, though. Just like anyone else, we have packet drops and congestion within ou
487.
▲
by
vitus
4y ago
I might be misunderstanding the problem statement, but my take: My impression is that for N max trades and M days of data, the "obvious" DP solution should be 2*N entries and O(NM) time, by tracking best profit for n trades whethe
488.
▲
by
vitus
4y ago
Liquidity / diversification comes to mind. Let's say you own $10M in privately-held Stripe stock. You think that stock is probably worth $100M, but you'd like to buy a $2M house. The bank doesn't accept your privately-he
489.
▲
by
vitus
4y ago
The article notes T. indicum as the cheap scam. > There is also the notorious tuber indicum, the Chinese black truffle, which has flooded the European and American market. It has no taste or smell, and its price starts at less than ten e
490.
▲
by
vitus
4y ago
Exactly this. A modern sedan might get 40 miles to the gallon, but only has a tank of maybe 13 gallons (for a range of 500 miles / 800km). Meanwhile the bus gets "only" 6 mpg but has a 200-gallon tank to compensate.
491.
▲
by
vitus
4y ago
There have been YouTube outages that were exacerbated precisely because the SRE teams explicitly trained for the disaster scenario where everything is hard down and needs to be brought back as quickly as possible.
492.
▲
by
vitus
4y ago
> Now, how expensive - and how big - would an equivalent solar array be? Don't forget maintenance costs, including technicians. For an easy point of comparison, there actually is an 18MW solar array under development in western Aust
493.
▲
by
vitus
4y ago
Some can, and do, although not usually with privacy in mind. https://en.wikipedia.org/wiki/Carrier-grade_NAT for the main example, although even in cases where IPv4 exhaustion is not as imminent, you might be assigned
494.
▲
by
vitus
4y ago
I don't disagree that the US is an outlier even compared to other common law jurisdictions such as the UK, but I'd argue that the common law framework is a necessary (albeit insufficient) condition for what the US judiciary is doi
495.
▲
by
vitus
4y ago
> It ain't as pretty as just between straight integer multiples, but the fact that it exists in some shape at all is cool! Actually: the form that Larsen proved is stronger than "for sufficiently large X, there is at least one
496.
▲
by
vitus
4y ago
> The US Supreme Court is unusual in running roughshod over the political process as much as it does. This is in part because the US legal system is based on common law / case law, whereas most of Europe is based on civil law.
497.
▲
by
vitus
4y ago
One counterargument is that space is finite, and so your choice of n is greater than the volume of the universe. (And so sigma-additivity doesn't apply, since your choices of cubic inches are not disjoint.) But sure, if you're ass
498.
▲
by
vitus
4y ago
Perhaps the "obvious" answer: that's where their competition is. Azure (Johannesburg) and AWS (Cape Town) both have regions in South Africa. Google does have some presence on both the western / eastern coasts (Nigeria &#
499.
▲
by
vitus
4y ago
Most of those characteristics actually seem par for the course even in the US. For instance, Trader Joe's sells an in-house "Trader Joe's Reserve Merlot Sonoma Valley 2020" [0]. At a bare minimum, you'll get vintage
500.
▲
by
vitus
4y ago
Not entirely. Modern browsers / webservers will keep TCP connections alive for at least a few minutes. I ran a tcpdump and confirmed there's only one network round trip involved in the critical path (after the first request, anyho
501.
▲
by
vitus
4y ago
Aha. Thanks, that explains it. It's possible Gustafson's paper doesn't consider the scaling as you get to wider types, or the presence of NaR removes enough of the savings from killing off NaN that it's a wash.
502.
▲
by
vitus
4y ago
Hm. The article links to the posit paper [0]: > A posit processing unit takes less circuitry than an IEEE float FPU. With lower power use and smaller silicon footprint, the posit operations per second (POPS) supported by a chip can be si
503.
▲
by
vitus
4y ago
Next to lz or zstd, sure, when you don't care about compression ratio. But bzip2 -1 offers comparable compression to zstd -10, and bzip2 -9 is more like zstd -18 which is appreciably slower.
504.
▲
by
vitus
4y ago
bzip's compression ratio is hard to match without spending significantly more compute.
505.
▲
by
vitus
4y ago
Right, I figured that's probably what you meant. One thing that had moderate success for me was searching for "book about flies" in comments, since this story is more likely to get mentioned in stories that are related. (bemu
506.
▲
by
vitus
4y ago
HN search for "book about flies" turns up 8 threads as the top results. In addition to the current thread, these three, and one posted in a sibling comment: https://news.ycombinator.com/item?id=30683634 https:&#x
507.
▲
by
vitus
4y ago
> This data isn’t a statistical sampling, BTW, the Fed has data on all US citizens. Actually... that report leans very heavily on the Survey of Consumer Finances [0], which is absolutely a sampling (latest iteration was 6500 families out
508.
▲
by
vitus
4y ago
Is that not why functions like htonl exist: to convert between the host architecture's endianness and a platform-independent representation? Your binary isn't going to be portable. The only reason your memory layout should be is i
509.
▲
by
vitus
4y ago
To be clear: I'm not advocating for the use of `new` / `delete` over unique_ptr. But if you're creating a local object that never has to leave the current scope (or a member variable that's never moved in or out), there&
510.
▲
by
vitus
4y ago
> unique_ptr is pretty bad for performance as well. Do you mean in terms of cache locality because it's heap-allocated instead of stack-allocated, or are you actually commenting on the overhead of copying some extra ints and invokin
More ›