Charming miscellany

I collect gems from math, programming, and science for my own pleasure. Sometimes I just follow a thread in a weird direction and find something charming at the end.

You can transpile Python functions on the fly into other languages (in this case, JavaScript).

Some probability distributions have heavier tails than others, and there’s an obscure way to measure that.

The naive way to calculate the Golden ratio is slow. You can do it way more efficiently.

When you show a pagination bar on a web page, calculating the bounds is actually not trivial unless you look at it the right way.

When I was doing microscopy, I needed to calculate an affine transform from three points to interpolate a grid.

How apothecary’s balances work is not actually obvious.

Most classical mechanics books show how to get conservation of energy from Lagrangian mechanics, but I haven’t seen it done from Newton’s laws.

The material derivative—the derivative used when calculating changes in a thing when that thing is also flowing—can be forced from type-level considerations.

In a fit of pique about trying to type commutative diagrams from category theory into a computer, I threw together a way to flatten them. John Baez referred to it as “like drying roses.”

Lockless and Ranganathan published an interesting way of thinking about pairwise correlations in ensembles of related proteins.

The unit circle in p-norms looks less and less like a circle. It turns out you can do interesting things with that, like estimate the number of components of a vector that are significantly different from zero.

There’s a cute decomposition to separate measured noise in gene expression into what was inherited and what was is locally random.

Luria and Delbrück found a way to differentiate random mutation from responding to the environment in populations.

Koch developed postulates for deciding if something caused a disease or not.

When you’re trying to approximate functions, it helps to be able to measuring their pointiness.

explore programming or everything