Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
a_e_k
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
211.
▲
by
a_e_k
3y ago
By that standard, I think that the new Reddit mobile UI must consider everyone a troll.
212.
▲
by
a_e_k
3y ago
This is one of my favorite things to see whenever I visit the British Museum. I just love the mental image of bored guards playing a game to pass the time on a slow afternoon at the city gates. Similarly, I enjoyed once seeing the preserve
213.
▲
by
a_e_k
3y ago
My rule of thumb is to use const references when the sizeof the type is larger than the sizeof a pointer or reference.
214.
▲
by
a_e_k
3y ago
I've long had the idea for trying to write a Valgrind tool to help with this by analyzing struct usage. Something to profile how hot and cold the various fields of my structs are, and also to correlate which fields in a struct are fre
215.
▲
by
a_e_k
3y ago
{fmt} certainly does this too. It works quite nicely with the clangd language server flagging a line as an error until the format string and arguments match.
216.
▲
by
a_e_k
3y ago
For extended docs beyond the minibuffer, I've found that M-x eldoc works very nicely with eglot and follows the Emacs way.
217.
▲
by
a_e_k
3y ago
Yep. The "tiny" model gave you a single 64KB segment shared by both code and data. And the "small" model was the one where there was one 64KB segment each for code and data. IIRC, with the tiny model you could often co
218.
▲
by
a_e_k
3y ago
I assume that's only possible in the general case for an odd number of vertices? A fully connected graph with an even number of vertices will have odd degrees for all of them, and so can't have an Eulerian path.
219.
▲
by
a_e_k
3y ago
Direct registering walking, too ( https://www.youtube.com/watch?v=8riT_b8xbxg ). Whiskers to feel air currents, sense prey close to their face, and estimate the dimension of holes. Swiveling ears to precisely locate faint s
220.
▲
by
a_e_k
3y ago
I have a lavender bush in my front yard. Besides smelling nice to people, bumblebees seem to love it. I often see half a dozen to a dozen at least as I go by. Other lavender bushes in the neighborhood always have bumblebees, too. (And
221.
▲
by
a_e_k
3y ago
See also the HN discussion from a year ago on "Good conversations have lots of doorknobs": https://news.ycombinator.com/item?id=32542260 The article discussed there sort of parallels this dichotomy, but applies it
222.
▲
by
a_e_k
3y ago
That's essentially how IEE 754 floating-point works. You can think of it as a piece-wise linear approximation of the base-2 logarithm. For non-negative values, the exponent (upper) bits give the integer part of the logarithm and the s
223.
▲
by
a_e_k
3y ago
Often, you can amortize a division or reciprocal by calculating it once and then reusing it. Frequently the divisor is dynamic, but reused locally. For example, if you want to normalize a 3D vector you could do: mag = sqrt(x*x + y*y
224.
▲
by
a_e_k
3y ago
I wasn't going to post that... but I certainly was thinking of it! (Sadly, that particular video misses Davos later correcting Jon in turn.) Weird Al, too: https://www.youtube.com/watch?v=RGWiTvYZR_w
225.
▲
by
a_e_k
3y ago
Fewer!
226.
▲
by
a_e_k
3y ago
I find that -ffast-math is not so bad, so long as I develop and test with it from the beginning. It's much like any of the other more aggressive optimizations in that sense. Plus, comparing against strict math as I go tends to highlig
227.
▲
by
a_e_k
3y ago
Back when I was at Pixar, I remember hearing a lot about the cloth sims for Brave (2012). The clothing was heavily layered, with each layer adding volume. Here's one public article: https://pixartimes.com/2012/04
228.
▲
by
a_e_k
3y ago
Robertson Davies' [0] lecture, "Reading" (1990), has a nice a answer to the intro of this post: > Our grandparents used to say that we must eat a peck of dirt before we die, and they were right. And you must read a lot of
229.
▲
by
a_e_k
3y ago
On the computer, I use Emacs' Calc [0]. Having such a powerful calculator right there and built into my editor is compelling. On the go, I use Droid48 [1]. As much as I love my real HP-48G, I find that it's similar to the saying
230.
▲
by
a_e_k
3y ago
Incidentally, On Basilisk Station is a free e-book at the publisher's website [0]. They also have an online HTML version [1]. So you can try the first book in the series to see how you like it before purchasing any of the others. [
231.
▲
by
a_e_k
3y ago
I had the same experience as a teen. I ended up working on software rendering (ray tracing) for film production for many years. Now I'm working for a hardware vendor, so I get to have fun with the machine way below the DirectX level.
232.
▲
by
a_e_k
3y ago
> I would probably appreciate those comments if I ever need to read branchless code, SIMD code, or similar performance-sensitve witchcraft. I've done this before in production code. One of my only exceptions to my policy against le
233.
▲
by
a_e_k
3y ago
IYMI: SNL had a pretty good skit about those two. https://www.youtube.com/watch?v=jVhlJNJopOQ (Wait till the tag at the end, too.)
234.
▲
by
a_e_k
3y ago
Do you have a preferred vendor? I've been thinking of doing the same for my next machine, for similar reasons, but I also see a lot of horror stories about messed up builds, poor shipping, etc.
235.
▲
by
a_e_k
3y ago
In the past, I've dealt with that by saying something like "I would ask you X, but I saw from [place] that the answer is Y. Can you confirm that this is correct / confirm that this still true / tell me more?" I p
236.
▲
by
a_e_k
3y ago
Yep. And C and C++ now have a hexfloat format that lets you write a float exactly in terms of the mantissa and exponent. For the value `8.0`, you can write it as `0x1p3`. (It's kind of weird in that the unbiased exponent is in decim
237.
▲
by
a_e_k
3y ago
I went over some of this with my wife earlier this year. She was a bit concerned about why I was bringing it up, but it was only because I'd already dragged half of this stuff out to review while preparing our tax return. :-)
238.
▲
by
a_e_k
3y ago
- Investment accounts and stock plan accounts - 401(k)s, IRAs, etc. - 529s - SSNs
239.
▲
by
a_e_k
3y ago
It shouldn't be too hard to extend this to a fairly efficient exact k-nearest neighbor search (at least for Euclidean distance). The classic approach is to keep your k candidates in a max heap ordered by distance (replacing the farthes
240.
▲
by
a_e_k
3y ago
It's a binary space partitioning (BSP) [0]. A kd-tree is a special case of a BSP with axis-aligned hyperplanes. [0] https://en.wikipedia.org/wiki/Binary_space_partitioning
More ›