Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
psykotic
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
271.
▲
by
psykotic
14y ago
> reverse a list without mutation using a foldLeft This is maybe a little too obvious if you understand left folding at all. A less trivial exercise in the same vein is to implement right folding via left folding. It's just a one-liner,
272.
▲
by
psykotic
14y ago
Hey, it could have been worse. A friend of a friend had the rotten luck of getting hired at a company, moving across the country, and getting laid off within the first week due to the company shutting its doors, not once but on two separate
273.
▲
by
psykotic
14y ago
That's a shitty situation. I'm glad you had a soft landing! What made you accept the offer on such short notice? I get that startups move faster than other companies, but if someone wanted to hire me right now or not at all, I'd take it as
274.
▲
by
psykotic
14y ago
Yeah. There should be a similar conceptual explanation for Strassen's algorithm, but I haven't seen one. The 2x2 block matrix decomposition corresponds to viewing a (2n)x(2n) matrix as a 2x2 matrix over the ring of nxn matrices. There isn't
275.
▲
by
psykotic
14y ago
Daniel J. Bernstein has a nice survey paper covering all the major multidigit multiplication algorithms: http://cr.yp.to/papers/m3.pdf What I like about it beyond the comprehensive coverage is that it explains the mathematical structure t
276.
▲
by
psykotic
14y ago
What do you do with a basic understanding of limited-slip differentials, frequency modulation, the Maillard reaction, or any other number of subjects? If you're anything like me, what you do is take joy in understanding a little more about
277.
▲
by
psykotic
14y ago
Hopefully you kept reading since that part was just the nomenclature for those interested in looking up this stuff.
278.
▲
by
psykotic
14y ago
For those who find the above so-called Grothendieck construction somewhat puzzling, here's a little motivation and background. It is the group completion of a monoid. The simplest case is the group completion of the free monoid on one gener
279.
▲
by
psykotic
14y ago
> Another example of misleading mathematical terminology is "random variable", which are not random or variable but instead are well-defined mappings. Indeed. Kolmogorov's random variables are a special case of observables in mathematic
280.
▲
by
psykotic
14y ago
Fenwick trees were invented for context modeling with arithmetic coding. Reads and writes are perfectly balanced. For every symbol, there's one write to update the model and one read to determine the cumulative probability.
281.
▲
by
psykotic
14y ago
I remember re-deriving this a few years ago. Short answer: If x = 2^n then rsqrt(x) = 2^(-n/2), so the exponent just gets negated and divided by 2. If x = (1 + m) 2^n where |m| < 1 is the fractional part of the mantissa, then rsqrt(1 +
282.
▲
Productivity, Uncertainty and Apathy
(bookofhook.blogspot.com)
1 points
by
psykotic
14y ago
|
0 comments
283.
▲
by
psykotic
14y ago
I can't resist mentioning a favorite algorithm of mine for solving a related problem. It generalizes the algorithm for the classic problem of finding the majority element (one which occurs at least 50% of the time) with a single pass over a
284.
▲
by
psykotic
14y ago
> I wonder what proportion of "pure" CS algorithms can be conceptualized as an application of one of the fixed point theorems and/or properties of monotone operators. You might enjoy http://www.amazon.com/Graphs-Dioids-Semirings-Algori
285.
▲
by
psykotic
14y ago
I hope you don't expect me to respond to every statement of yours in that mountain of text. This response of mine has already grown too long. You don't have to convince me that mathematics is important--my background is in pure mathematics.
286.
▲
by
psykotic
14y ago
It's an article from SIAM. Of course it's heavily biased towards applied mathematics. It's not only biased against computer science, it's biased against pure mathematics. Do you doubt that Buchberger's algorithm will reverberate down throug
287.
▲
by
psykotic
14y ago
In my Danish high school we covered the algebra and geometry of vectors in two and three dimensions in our second year. The high school mathematics curriculum in Denmark is ridiculously unambitious; I'm certain my American friends covered m
288.
▲
by
psykotic
14y ago
Not if you use Horner's method. Evaluating a(x-p)(x-q) takes two additions and two multiplications. Evaluating ax^2 + bx + c with Horner's method as (ax + b)x + c takes two additions and two multiplications as well. Factoring a polynomial t
289.
▲
by
psykotic
14y ago
> I got overzealous with x^5, some (not all) can be factored All polynomials can be factored but only some of the fifth or higher degree are solvable by radicals--a crucial distinction. Here's a fun puzzle that also serves as a gentle i
290.
▲
by
psykotic
14y ago
Here's the relevant chapter in one of Julius Smith's books: https://ccrma.stanford.edu/~jos/filters/Transfer_Function_An... It might not make total sense if you don't have any background in this area, but it's hopefully enough to give you
291.
▲
by
psykotic
14y ago
Tons. The whole theory of IIR filter design is predicated on understanding the effects of the transfer's function poles and zeroes (generally complex numbers) on the behavior of the filter. Pick up any book on signals and systems like Oppen
292.
▲
by
psykotic
14y ago
The bigger picture is that factorization is decomposition. Depending on the domain, that can mean different things. In geometry, factoring a polynomial in x and y decomposes its curve into a union of subcurves. The curve of xy = 0 is the un
293.
▲
by
psykotic
14y ago
I'd say he's likely best known for this very website on game programming. It's been around for a long time by Internet reckoning. In the olden days, it was where you went to learn about A* path finding for games.
294.
▲
by
psykotic
14y ago
What makes timsort fast is how it adapts to common patterns in the data (sorted runs, etc). Paul isn't trying to do any of that.
295.
▲
by
psykotic
14y ago
Companies with all-day interview affairs have no qualms about cutting the process short at lunch time. Why should an interviewee not be able to do the same? It must be handled delicately and gracefully, but that hopefully goes without sayin
296.
▲
by
psykotic
14y ago
> books and papers about algorithms are often dry and unmotivating. If you don't like standard textbook treatments like CLRS, you might like these: Introduction to Algorithms - A Creative Approach by Udi Manber (out of print but worth g
297.
▲
by
psykotic
14y ago
If I'm understanding the application correctly, this would also work with Tillich-Zemor-style hashing based on matrix groups. The idea is to map the 0 and 1 message bits onto a pair of generators of a subgroup of the invertible 2x2 matrices
298.
▲
by
psykotic
14y ago
Never tried it but that sounds like it could work great.
299.
▲
by
psykotic
14y ago
GDB tip #1: gdb -tui (or cgdb if you're on Mac).
300.
▲
by
psykotic
14y ago
Typing code is very bursty. It might not account for a large fraction of your programming time. But when you have to code up a function, waiting for hunt-and-peck to finish the job is infuriating for the same reason that waiting on your sna
More ›