HNHacker News
TopNewBestAskShowJobs

Rayhem

450 karma · joined April 27, 2019

submissionscomments
Rayhem··on Donkey code
I'm no fan of inheritance either, but I'm not sure it's that cut-and-dry. As a rust example, it's not uncommon to see

    struct Horse {...}

    enum Quadruped {
        Horse(Horse),
        ...
    };
possibly alongside a Horse or Horse-like trait (perhaps `HorseImpl`, in which case you'd see `impl HorseImpl for Horse` which, at best, parses...strangely to human beings. "The implementation of the HorseImpl(ementation) for Horses" -- what??). Then, to what `Horse` do you refer when you say the word without a ton of heavy formality?
Rayhem··on Bay Area nonprofit Signal shows how bloated tech companies have become
I wish English[1] had a word to describe the enjoyment felt from using a well-designed tool like this. "Ergonomic" comes close, but I think it's a little too utilitarian - it doesn't quite capture the "this is nice" feeling for me.

[1]: Or other languages, but I only know English. Please let me know if other languages have such a word.

Rayhem··on Cubic spline interpolation
It's by no means rigorous, but the gist of it is that

1. You're integrating the polynomial that best approximates the function over the interval. This is why quadrature is exact for polynomials up to some order: the best approximating polynomial is the polynomial itself.

2. Polynomials are good approximations when the function is smooth. Most useful functions are.

3. Because of the smoothness, the behavior in the middle of the interval is largely affected by the behavior at the edges, so you need more densely sample the edges. Think of it like wiggling a string. You're only allowed to wiggle the end, but that very specifically defines the behavior in the middle.

4. There are lots of polynomial sets - Legendre, Chebyshev, Hermite, etc. They're each useful because they're orthogonal to a special weight function, and Legendre polynomials are kind of the default set because they have the simplest weight function: 1.

Rayhem··on Cubic spline interpolation
Polynomials, sampling theory, signal processing, Fourier series, etc. are all so closely related that learning even a little bit of one of these things opens up such a wealth of other things to think about and explore. Splines like this basically answer the question "what polynomial fits these points the best?" which, it turns out, is the same question you need to pose to begin formulating gaussian quadrature. And gaussian quadrature is super cool because it approximates integrals about a billion times better than riemann summation[1] for the same amount of computational effort.

[1]: https://www.youtube.com/watch?v=k-yUdqRXijo

Rayhem··on Ask HN: What are the best / most accessible languages for blind programmers?
I realize the rust evangelism strike force is a thing, but I can't help but think

    5 |     let scores = inputs().iter().map(|(a, b)| {
      |                  ^^^^^^^^ creates a temporary which is freed while still in use
is easier to make accessibility tools for than

    In file included from /usr/include/c++/4.6/algorithm:63:0,
                     from error_code.cpp:2:
    /usr/include/c++/4.6/bits/stl_algo.h: In function ‘_RandomAccessIterator std::__find(_RandomAccessIterator, _RandomAccessIterator, const _Tp&,...
Rayhem··on Metric Time
Do the physicist thing and just define all your constants to be one.

"How long is a day? 1 day."

"I slept for .37 days."

This nicely unifies things with the tao manifesto[1] people since 1 day = 1 turn = 1 tau = 2 * pi radians and reinforces the periodic nature of these things.

[1]: https://tauday.com/tau-manifesto

Rayhem··on Show HN: I built a virtual tabletop for playing Dungeons and Dragons
The #1 important thing I've found for collaborative online gaming (and collaborative online work in general) is *have a good mic*. Having three people in a room around one mic doing the THIS SPEAKER IS SMALL SO YOU SOUND FAR AWAY AND I'M GOING TO TALK LOUD SO YOU CAN HEAR just kills any momentum, as does "What? I...........hear.......run the........18" connection interruptions. Video, maps, everything else is pretty much optional, but audio is critical.
Rayhem··on Organization probably doesn't want to improve things
> You can organize things in a way that they support these requirements or you can just let them figure out how to adapt their needs around some existing hierarchy. Now which one do you think is more efficient?

I think this is a pretty great statement of the converse of Conway's Law[1].

[1]: https://en.wikipedia.org/wiki/Conway%27s_law

Rayhem··on Questions I ask during 1:1 with my direct reports
Yeah, I had a similar head-tilt at leading with "How are you doing on a personal level?" I'm not outright opposed to the question -- managers are human (gasp) and it is true that we tend to work better with humans when we connect with them as such -- but it's going to take a lot of prior work for anyone with professional power over me to convince me that question is for my benefit and not simply to extract more value.
Rayhem··on What scientists must know about hardware to write fast code (2020)
Similar story - a PI had written some code to from (row, column) indices of the upper triangle of a matrix (made somewhat tricky by excluding the main diagonal) to a linear index. He used a for loop to start from the beginning and count up for an O(n^2) algorithm - I was able to give him an O(1) constant time formula to do the same thing for a rather dramatic speedup.
Rayhem··on Inside the Matrix: Visualizing Matrix Multiplication, Attention and Beyond
> This gets to the why perfectly.

Respectfully disagree. A matrix has basically nothing to do with "living on the surface of a cuboid". It's like saying FOIL is the "why" of binomial multiplication -- the "why" is the distributive and associative properties of the things involved, FOIL is just a useful mnemonic that falls out.

Rayhem··on Inside the Matrix: Visualizing Matrix Multiplication, Attention and Beyond
I agree, and I think this reeks of the Monad Burrito Tutorial Fallacy[1]. Once you know what the manipulations are you can start to visualize doing them in these weird 3d ways, but the understanding came through the struggle to make a coherent picture and not the resulting coherent picture itself. The claim that "matrix multiplication is fundamentally a three-dimensional operation" is ultimately very confusing because it conflates the row & column dimensions of the matrix with the dimensions of the underlying vector space.

Colorized Math Equations[2] has the same problem where people see it and go "Colors! English language! This must be so much more easy to grasp than math! I feel enlightened for having seen this!" But feeling enlightened is very different from being enlightened and it just doesn't hold up. I've found people retain very little understanding if they aren't already familiar with the concept.

[1]: https://byorgey.wordpress.com/2009/01/12/abstraction-intuiti...

[2]: https://betterexplained.com/articles/colorized-math-equation...

EDIT: The "three-dimensional operation" perspective no doubt comes from writing matrices as rectangles, but this is far from the only representation of them. If the vector v = [a, b, c] is shorthand for v = a x_hat + b y_hat + c z_hat (explicitly a sum of basis vectors), then we can write a matrix with a similar set of basis vectors: m = [[a, b, c], [d, e, f], ...] = a x_hat x_hat + b x_hat y_hat + c x_hat z_hat + ... . There's nothing "rectangular" about this any more than a polynomial (as a sum of monomials) is "rectangular". The details then shake out of how (x_hat y_hat) multiplies with (y_hat z_hat). The rectangle is just a mnemonic.

DOUBLE EDIT: In the above sense, multiplying two matrices is more like a convolution -- the x_hat x_hat term of the first matrix multiplies every term of the second, we just know most of those terms will be zero (the product with any term that doesn't start with an x_hat (e.g. y_hat z_hat).

Rayhem··on Dirty downside of 'return to office'; ending WFH could make climate crisis worse
Every apartment I've ever rented has had a barebones, one-temperature, set it and forget it thermostat.

I would fully support legislation requiring a minimally-programmable thermostat in rental housing.

Rayhem··on Jira can’t stop people from using it incorrectly
> You don't hate jira, you hate that it's a mirror

Is this just a restatement of Conway's Law[1]?

[1]: https://en.wikipedia.org/wiki/Conway%27s_law

Rayhem··on GNU Units
I had a lot of fun working with the maintainers of this utility to better support Gaussian units[1]. This is usually done (incorrectly) by multiplying, say, some number of SI coulombs by a dimensionless constant (actually 2_997_924_580) to produce some number of statcoulombs that represents the same charge. It's very subtle, though, that statcoulombs and coulombs have different dimensions (which is the point of Gaussian units) despite representing the same physical quantity[2], so the conversion is much more involved. I learned a lot about the nature of units and software development working with them.

[1]: https://en.wikipedia.org/wiki/Gaussian_units

[2]: A consequence of this is that electromagnetic equations formulated in terms of Gaussian units have goofy things like sqrt(grams) as "base" units. That was the tricky part to handle.

Rayhem··on Welcome to Wikifunctions
Interesting philosophical question: is awesomeness intrinsic or extrinsic (a matter of perception)? Can anything be intrinsic?

If it's intrinsic, then yes, the probability that it is awesome should not be zero if you've never heard of it. It's awesomeness exists independently of any measurement. But, by definition, you can't know it's awesomeness until you measure it, so awesomeness quotients only matter after they've been measured. And a measured value value must be expressible/observable outside the system (i.e. extrinsic).

Rayhem··on Krita: A professional free and open source painting program
> You’re welcome to fork it and try to sell it if you think that’s such a great idea.

Emphasis mine. Are you implying the OP shouldn't raise these ideas? Have you ever had a complaint about a user interface in your car? You are, after all, free to build your own and design it how you like. They saw something they thought could be improved, provided a rational explanation of why they think a change should at least be considered, and did so in a manner that's very respectful of both the software and the people who developed it. So this comment feels more than a little...reductive to me. Moreover, I don't read their commentary as suggesting the software shouldn't be free, merely that its price tag shouldn't be the loudest and most prominent selling point. It's a well-known psychological phenomenon that people want things they think are valuable, so putting a $5 sign on the furniture you're trying to give away makes it more likely to go.

Rayhem··on Lessons by 3blue1brown
I think this is just another manifestation of the "office hours phenomenon":

1. You don't understand a concept 2. You go to your professor's office hours with a question and ask them to explain. 3. They draw some squiggles on the board and walk you through the issue 4. You say "Aha! I get it! Thank you for explaining!" 5. Two steps out the door you've completely lost the idea and need help again.

You haven't internalized the idea, you're still just attached to someone else's idea. To understand something fully, you have to really take it in and play with it; find the holes and the limitations of the model.

Rayhem··on How to draw dotted lines on chalkboards, MIT style (2021)
> but there were definitely times when I distracted myself from proofs that wouldn’t work by learning how to make beautiful diagrams in latex + tikz.

I have never, ever, regretted coming to the table with eye candy like this. Were some of those investigations the most "profitable" thing to be working on at the time? Probably not, but a good, clean visualization buys you so much cred with both your audience and yourself.

Rayhem··on My thoughts on “bad code”
> instead focus on how easy it would be to change the behaviour of existing code.

This has been my principal design consideration for a while now. Not "the code should be short!" or "the code should be elegant!" but "it should be easy to change" because your requirements are always going to change. It just so happens that the latter usually means things like single responsibility and loose coupling that bring about the former as a matter of course.

Rayhem··on Problem solving with dimensional analysis
I think this analysis is great and I like it a lot, but it's not quite what I was going for. Here, the size of a cell works against an independent measurement of length like "one meter". But, at a much more fundamental level, I kind of meant why is a meter a meter? If everything in the universe doubled in length overnight, how would we know since our meter sticks would double, too, which admits two possibilities:

    1) If lengths are absolutely fixed, why are they fixed at that scale? Why *didn't* things end up doubled (assuming an external absolute to measure against).

    2) If they're *not* absolutely fixed, the "fundamental length" appears pretty fixed to us as humans because things kind of look the same day-to-day. Is there a variation we just don't perceive? Is the fixedness we see just us imposing part of our perception on the world?
It's sort of like this illustration of gauge fixing[1] -- just like "how do you know the cylinder is twisted?", you can ask "how do you know your fundamental lengths?"

[1]: https://en.wikipedia.org/wiki/Gauge_fixing#An_illustration

Rayhem··on Problem solving with dimensional analysis
I've done a lot of philosophizing on the nature of units and there's a bit of an interesting wriggle there. Most people think "length" and "time" are different things, such that 1m + 1s = garbage. Mathy physics people* say "Aha! They're really the same thing, just set c (the speed of light) to 1!" This, then, raises an interesting question: is there anywhere you can't do this? In other words, is there some irreducible set of dimensions by which the universe operates? I tend to think no, since the units always divide out like this article says. But then, why are lengths what they are? Why did the universe settle on this scale? What even is length, and is "this scale" just an artifact of human perception somehow?

* The same mathy physics people also do fun things like define Gaussian units where charge is proportional to fractional powers of length and mass.

Rayhem··on Academia’s culture of overwork almost broke me, so I’m working to undo it
I did not make the original claim, that more rules stifles progress. Please show me the experiments done to demonstrate this or the logic used in deducing it and I will attempt to devise a counterexample.
Rayhem··on Academia’s culture of overwork almost broke me, so I’m working to undo it
> By definition this ... stifles progress.

This conclusion does not at all follow from the premise. The myth that more competition means you get a better result absolutely does not hold and needs to die. There's a fundamental equilibrium shift when you spend more resources competing than you do on progressing.

Rayhem··on Ask HN: Please share tips and strategies for dealing with eye strain
> Curved monitors (reduces constant eye re-focusing on large monitors).

Isn't this a bad thing? I've been lead to believe one of the most useful techniques to alleviate eye-strain is frequent re-focusing at a variety of distances.

Rayhem··on Ask HN: What do you do to start and develop friendships?
> I don't really have many friends. For someone to be my "friend" they'd have to be a person I'd spend time with when I'm bored, and who I could reasonably count on to have my back when I need it.

A friend friend of mine with very similar thoughts as me (and, it sounds like, you) recently put it very well. The "workplace proximity associate" kind of friends, while kind of destined to remain shallow and not as deep a connection as any of us might want, are not unimportant. They ground us in a way and help us keep a connection to the world, but maybe not so much individuals.

Rayhem··on The Fourier Transform, explained in one sentence (2014)
This is very much called out in the Monad Burrito Tutorial Fallacy[1].

[1]: https://byorgey.wordpress.com/2009/01/12/abstraction-intuiti...

Rayhem··on It's time to stop texting
It's something of a clearly ridiculous example and I'm sure a lot of people (myself included) would prefer using more modern solutions 99% of the time. However, I suspect that when you tell most people that also means their 911 calls that basically cannot fail by law now also need to work on Discord or whatever they'll at least take a minute to think about the implications.
Rayhem··on It's time to stop texting
This basically happened to me when a friend was scheduling group videogames for the week. "If X and Y had Prime then they could order a switch and have it in time for Friday with free shipping!"*

Gosh, if only there were some sort of local Amazon warehouse that I could travel to to procure the items I require when I require them. They'd probably have a lot of items stored! In fact, some of these stores of items might even cater to one or two types of items only, perhaps necessitating multiple stores at different locations!

* This was a real conversation from a human being.

Rayhem··on It's time to stop texting
Yeah, this feels a lot like saying "My god, people, stop using telephones! Facetime has video! And the bitrate! It's a million times higher! It's 2023, why would anyone use a POTS call?!" Sure, nicer technical specs are...nice, but they're a far, far second to solving a problem.

In an sms world:

Problem: I need to contact a new acquaintance.

Solution: Exchange phone numbers because everyone has them. Text. Or call.

In a post-sms world:

Problem: I need to contact a new acquaintance.

Solution? Talk about messaging apps. Find the intersection of the ones you both use. Rank by favorite if it's not an empty set, then decide on the relative merits of choosing one in the middle of both your lists, otherwise attempt evangelism. Following evangelism, regress to "Yeah, admittedly the UI has some quirks -- here's how you do <thing you want to do>."

Unfortunately, tech bro progress-at-all-costs featurejerking very often leaves a very large number of people out of the party. The elderly. The impoverished. etc. Despite the corporate mantra of all features all the time, we can actually elect to take old things and make them better instead of inventing the new hot thing all the time.

← PreviousPage 2 of 6Next →