Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
vitus
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
60 ms
·
691.
▲
by
vitus
6y ago
To expand on this further, and to plug the Kelly Criterion which the author mentions having written a former blog post on: Suppose instead of betting all your money every round, you instead decide to bet 10 cents each time. Now, instead of
692.
▲
by
vitus
6y ago
Not quite. > Everyone starts with $1, gets 50% profit if they win, and pays 40% of their bet if they lose. From the wealth-over-time graph, it looks like the bet is sized such that it's always 100% of what you have (per some traject
693.
▲
by
vitus
6y ago
You're exaggerating why people dislike cryptocurrency by focusing on a singular reason. I think the root cause is because it's conflated with bitcoin and the PoW system it's built on top of, which is generally considered to b
694.
▲
by
vitus
6y ago
> slightly higher prices for their high end gaming GPUs This is across the board, not just for high-end cards. Newegg has a total of one graphics card released in the past 5 years in stock that it sells directly ( https://www.n
695.
▲
by
vitus
6y ago
> Protocol Buffers implement default zero values ( https://developers.google.com/protocol-buffers/docs/proto3#d ...) and there's no way of discerning whether something is "false" or "unset&quo
696.
▲
by
vitus
6y ago
Signs point to yes: https://web.archive.org/web/20190308225112/https://waymo.com...
697.
▲
by
vitus
6y ago
I disagree, as there are lots of ways it can manifest in C++. To list a few examples: - Implicit lambda capture where you use & (admittedly often out of laziness). - A string_view constructed from an accidental string copy (e.g. if your
698.
▲
by
vitus
6y ago
A nit/bug re: the glob matching algorithm in use: '?' evidently represents "any character" per the !glob("h?i", "hi") test. But, if I add a test for glob("???", "hi"), that su
699.
▲
by
vitus
6y ago
Good point -- the minimum 3-month storage duration eliminates this edge case for one-offs (since 3 * $0.4 > $1). That said, it almost breaks even after the first month and pays off for itself a week into the second month. To eliminate th
700.
▲
by
vitus
6y ago
One thing that stands out to me is an unintended consequence of the pricing structure: Storing a 250GB backup and sending to 10 machines: $1 for storage, $22.5 for egress. Storing a 250 GB backup, 2250GB of /dev/zero, and sending
701.
▲
by
vitus
6y ago
Well, it also depends where in the US you come from. California is 11%, West Virginia is 25%. I'm sure the disparities are even greater when you look at smaller populations (e.g. county, metro, city, etc). https://www.cdc.go
702.
▲
by
vitus
6y ago
Well, how about this, if we use pow4' to be modular exponentiation, i.e. mod15 o pow4? (of course then changing mod15 to take Z -> Z so the types line up) Then the desired statement showing commutativity is pow4'(mod15(x)
703.
▲
by
vitus
6y ago
Well, not quite. You really want to say that mod15(pow4(x)) == mod15(pow4(mod15(x))). Example: (3 ** 4) % 15 = 81 % 15 = 6. But, (3 % 15) ** 4 = 3 ** 4 = 81. (That said, the two functions do commute when you restrict your domain and range t
704.
▲
by
vitus
6y ago
There, that runtime is roughly O(n^2) when dealing with bignums, since addition scales linearly with bit length of the operands, and bit length increases linearly with the number of iterations (~0.7 bits per iteration). Which is still not f
705.
▲
by
vitus
6y ago
Right. This is a consequence of compatibility with exponentiation. https://en.wikipedia.org/wiki/Modular_arithmetic#Properties It should be easy to see that n ≡ (n % 15) (mod 15) which, applying compatibility
706.
▲
by
vitus
6y ago
I think this is what you're looking for. time emacs --script fib-0b03fe9a-6b386e71.eln emacs --script fib-0b03fe9a-6b386e71.eln 22.47s user 0.09s system 99% cpu 22.664 total About 50% faster, which is nothing to sneez
707.
▲
by
vitus
6y ago
This was emacs 27.1 (which is the version in the Arch repo). I can install native-comp via AUR. It'll take some time.
708.
▲
by
vitus
6y ago
The speed of the naive recursive fib scales with the number it computes, which is roughly 1.6 ^ n (the eigenvalue of the matrix for the recurrence relation is the golden ratio, phi). Intuition: if you were to expand and flatten the recursiv
709.
▲
by
vitus
6y ago
Better, but still slower by about 1.5x. $ time guile3 fib.scm guile3 fib.scm 2.01s user 0.02s system 99% cpu 2.047 total edit: apparently my cpu was still being throttled post-build or something, as the initial runs were arou
710.
▲
by
vitus
6y ago
Ah. This is on Guile 2.2, apparently. Installing guile3 and rerunning...
711.
▲
by
vitus
6y ago
EDIT: as pointed out, this is run with Guile 2.2, which is pre-JIT. Results to be posted later in this thread... Okay. $ cat fib.scm (define (fibonacci n) (if (<= n 1) n (+ (fibonacci (- n 1)) (fibonacci
712.
▲
by
vitus
6y ago
Anyways, if anyone else wants to look at it: I've stripped the comments, clang-formatted both implementations, and uploaded the diff (sans newline differences) to pastebin. https://pastebin.com/T520dzWV It would be nic
713.
▲
by
vitus
6y ago
https://github.com/redis/redis/blob/unstable/src/hyperloglog... seems to be the starting point, given a number of identical comments (complete with typos, e.g. "Estimate cardinality form regist
714.
▲
by
vitus
6y ago
Aside: I'm admittedly grumpy about the commit history, which is filled with entries such as "Add files via upload" and "Update README.md". That, together with the lack of documentation, makes it much more difficult
715.
▲
by
vitus
6y ago
Ah. The difference is that you're trying partial matches, as opposed to full matches from the specified patterns. edit: and by full match (since this seems to be the source of some confusion in another subthread), I explicitly mean anc
716.
▲
by
vitus
6y ago
What solutions were you trying? As far as I can tell, the puzzle is fully constrained. From the start, the bottom-left cell as well as the right column can be solved just from the starting hints, and then you can derive the top-left cell pe
717.
▲
by
vitus
6y ago
That's because it's not empty string in the puzzle, it's 8 spaces. (and on top of that, we're doing a full match.)
718.
▲
by
vitus
6y ago
Actually, I agree with the sibling commenter that power consumption is not a good predictor of whether a chip is entry level. Estimate of TDP for the M1 silicon are about 20-24W [0]. The i7-1185G7E can be offered at anywhere within 12-28W T
719.
▲
by
vitus
6y ago
(I'd be interested to see an average-case running-time analysis of Simplex that yields O(n^2.332) additions/multiplications, where n is the number of variables. Or even O(n^3). Because that's what's claimed here.) That&#
720.
▲
by
vitus
6y ago
1. Simplex is used to solve linear programs, which are inequalities (not equations). While it's true that your solution will typically be on one of the vertices of your polytope, that just means that some (not necessarily all) of your
More ›