Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
orlp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
211.
▲
by
orlp
2y ago
> Do you have a different parsing algorithm in mind? Yes, since I specified a PEG grammar I assumed a PEG parsing algorithm. You can try the grammar yourself in a PEG parser, e.g. https://shamansir.github.io/pegjs-fn/
212.
▲
by
orlp
2y ago
I'm sorry that is not correct at all. It does not match the string "aaaaa" for example.
213.
▲
by
orlp
2y ago
Great! Someone who's brain is on team PEG. You are just the person I need. Can you explain in plain English what strings match the following PEG grammar? Str = "a" Str "a" / "a"
214.
▲
by
orlp
2y ago
I'm not saying to throw away the rest of the hash, just to ignore it for the bucket calculation. You can utilize the full 128-bit hash for other parts.
215.
▲
by
orlp
2y ago
But if you are then mapping the elements to (most likely vastly fewer than 2^32) buckets... why do the hash collisions matter? Just use the top 64 bits of the hash to compute a bucket, using ((hash >> 64) * buckets as u128) >> 6
216.
▲
by
orlp
2y ago
$20 per attempt. A paper typically comes after trying hundreds of things. That said, the final version of your idea could certainly try it.
217.
▲
by
orlp
2y ago
Perhaps in the future we will see MsoTriState neural networks: https://learn.microsoft.com/en-us/dotnet/api/microsoft.offic... For those unaware, the MsoTriState is fairly self-explanatory: it is a tri-state
218.
▲
by
orlp
2y ago
The optical signal repeaters that are part of the cable every N kilometers need power to do their job.
219.
▲
by
orlp
2y ago
Yes, although to be fair I did discard the c values for the final reduction I perhaps should've incorporated somehow. The code from the blog post is all on Github, feel free to try and add/benchmark it yourself: https://
220.
▲
by
orlp
2y ago
Numpy also uses blocked pairwise summation, with a block size of 128: https://github.com/numpy/numpy/blob/a6e9dc7152098182b45ecd6e... .
221.
▲
by
orlp
2y ago
vec![1.0; 1_000_000_000] is Rust notation for an array that contains 1.0 one billion times. I can understand it's a bit confusing/frustrating if you're unfamiliar with Rust syntax, sorry.
222.
▲
by
orlp
2y ago
I tried this, it was the same speed as orlp_sum with worse accuracy.
223.
▲
by
orlp
2y ago
I omitted this because you only have this option for f32, not for f64. I only really chose f32 as the focus point of my article because it makes the numbers a bit more readable. That said, I should have included it, because it is on the Par
224.
▲
by
orlp
2y ago
I don't follow. Why is 15_000_000 less distracting? What problems unrelated to what we're trying to solve? And what 'default options' are you referring to?
225.
▲
by
orlp
2y ago
Interesting, I haven't seen that before in the context of numerics. It is used all the time however in audio and image processing, where it is called dithering.
226.
▲
The "Bear's Grip" hitch, a new kind of kamikaze knot [video]
(youtube.com)
1 points
by
orlp
2y ago
|
0 comments
227.
▲
by
orlp
2y ago
I suspect compound words are a major component of it. In English "car factory" are two words. In Dutch an "autofabriek" is one word. A dictionary might choose to list the most common compound words which quickly adds up.
228.
▲
by
orlp
2y ago
A very recent game that also captures this in a unique way is Balatro. The cards that you play are ordinary playing cards, but the way you modify how they score and what cards you have in your deck is a cool discovery process.
229.
▲
by
orlp
2y ago
As a low-level performance-oriented engineer I use the Compiler Explorer almost every day. It is a great tool, give it a try.
230.
▲
by
orlp
2y ago
That's a square root in real arithmetic. In finite fields you don't operate over the real numbers, but the numbers within the field. An example of a finite field is the numbers modulo a prime, like p = 2^127 - 1. Now, please find
231.
▲
by
orlp
2y ago
> As for formulas: no, there is no GENERAL formula for the quintic polynomial or higher. Note that there is no general formula for quintics (and higher) in radicals . But it is a bit arbitrary to draw the line there. There is also no &#
232.
▲
by
orlp
2y ago
Not for me.
233.
▲
by
orlp
2y ago
> It would require a reverse lookup structure from address to buffer handle, e.g. red-black tree. Maintaining it would no longer be O(1). Well, another solution is enlarging each allocation by 8 bytes and storing the buffer handle in fro
234.
▲
by
orlp
2y ago
> It just makes it O(n) where n := 64 That's O(1). > The LZCNT operation itself is a loop over all bits That's not how circuits work. You can easily make a circuit of O(log n) depth that returns base-2 encoded index of the f
235.
▲
by
orlp
2y ago
And if you assume that death rate is age agnostic between 15 and 60 (it's not of course, but bear with me), then this allows you to calculate the yearly chance of death as a US male adult as 1 - ((1000 - 163) / 1000)^(1/(60 -
236.
▲
by
orlp
2y ago
The only way I can think of it making sense is if @syklep is from a country with a currency that has inflated 10% every year with respect to the dollar for the past 60 years, and that they assumed you'd buy local currency with the $30m
237.
▲
by
orlp
2y ago
Worse than the round-trip is that there's no second chances in some scenarios. If you mess up the wrong part(s) of the system, it's bricked with no way to recover it.
238.
▲
by
orlp
2y ago
> KABAS: If I understand correctly, some of the 28 people fired were not actually involved in the sit in. Is that right? > IBRAHEEM: Yeah, this was retaliation, like completely indiscriminate—people who had just walked by just to say
239.
▲
by
orlp
2y ago
Not exactly reading but I would recommend the database engineering courses by Andy Pavlo that are freely available on YouTube.
240.
▲
by
orlp
3y ago
It's not possible in general, e.g. [3, 2, 1] can't be reversed.
More ›