HN user

jwmerrill

1,598 karma

Physicist, probability and geometry enthusiast, and software developer at https://www.desmos.com.

You can reach me at jwmerrill@gmail.com

Posts49
Comments218
View on HN
people.eecs.berkeley.edu 1y ago

Personal Calculator Has Key to Solve Any Equation (1979) [pdf]

jwmerrill
3pts1
whyy.org 3y ago

‘the Zeen’: Steadicam inventor creates wheelchair-walker hybrid

jwmerrill
2pts0
www.scattered-thoughts.net 4y ago

Reflections on a decade of coding, part 7: Coding

jwmerrill
1pts0
raphlinus.github.io 6y ago

Flattening Quadratic Béziers

jwmerrill
100pts6
engineering.desmos.com 6y ago

More Intuitive Calculator Arithmetic (2018)

jwmerrill
50pts21
arxiv.org 7y ago

Extending the Algebraic Manipulability of Differentials

jwmerrill
2pts0
engineering.desmos.com 7y ago

More Intuitive Calculator Arithmetic

jwmerrill
1pts0
engineering.desmos.com 7y ago

How Desmos uses Pratt Parsers

jwmerrill
51pts6
engineering.desmos.com 7y ago

More Intuitive Calculator Arithmetic

jwmerrill
1pts0
nytimes.com 8y ago

California Passes Sweeping Law to Protect Online Privacy

jwmerrill
1pts0
www.quantamagazine.org 8y ago

Inside the Knotty World of ‘Anyon’ Particles

jwmerrill
1pts0
www.shapeoperator.com 9y ago

Geometry, Algebra, and Intuition

jwmerrill
3pts0
www.shapeoperator.com 9y ago

Sunset geometry

jwmerrill
27pts0
blog.desmos.com 9y ago

Video and multiple choice: what took us so long?

jwmerrill
2pts0
www.edsurge.com 9y ago

Why we don't need a 'Netflix for Education'

jwmerrill
1pts1
www.newyorker.com 9y ago

Discovering Planet Nine

jwmerrill
54pts43
www.johnmyleswhite.com 10y ago

Understanding the Pseudo-Truth as an Optimal Approximation

jwmerrill
1pts0
money.cnn.com 10y ago

95% of bank ATMs face end of security support

jwmerrill
1pts0
perl.plover.com 10y ago

Continued Fraction Arithmetic (1972)

jwmerrill
15pts7
www.drmaciver.com 10y ago

On criticizing programming languages (without criticizing their users)

jwmerrill
1pts0
elm-lang.org 10y ago

Making Elm faster and friendlier in 0.16

jwmerrill
243pts90
squishythinking.com 10y ago

Bisecting Floating Point Numbers

jwmerrill
65pts26
pointersgonewild.com 10y ago

There's too many programming languages

jwmerrill
1pts1
hacks.mozilla.org 10y ago

Inspecting the Content Security Policy of a Website in Firefox

jwmerrill
1pts0
research.google.com 10y ago

Machine Learning: The High Interest Credit Card of Technical Debt (2014)

jwmerrill
132pts11
www.youtube.com 10y ago

Apparatus: A hybrid graphics editor and programming environment [video]

jwmerrill
3pts0
research.google.com 10y ago

Machine Learning: The High Interest Credit Card of Technical Debt (2014)

jwmerrill
3pts0
gittup.org 10y ago

Fixing missing dependencies in build systems (2014)

jwmerrill
18pts2
gittup.org 10y ago

Fixing missing dependencies in build systems (2014)

jwmerrill
1pts0
gafferongames.com 11y ago

Snapshot Compression

jwmerrill
71pts2

“Passive voice” is a grammatical term.

“Amazon confirms 14,000 job losses,” is not an example of the passive voice.

“14,000 workers were fired by Amazon,” is an example of the passive voice.

There is not a 1:1 relationship between being vague about agency and using the passive voice.

For problems in the plane, it's natural to pick two coordinate functions and treat other quantities as functions of these. For example, you might pick x and y, or r and θ, or the distances from two different points, or...

In thermodynamics, there often isn't really one "best" choice of two coordinate functions among the many possibilities (pressure, temperature, volume, energy, entropy... these are the must common but you could use arbitrarily many others in principle), and it's natural to switch between these coordinates even within a single problem.

Coming back to the more familiar x, y, r, and θ, you can visualize these 4 coordinate functions by plotting iso-contours for each of them in the plane. Holding one of these coordinate functions constant picks out a curve (its iso-contour) through a given point. Derivatives involving the other coordinates holding that coordinate constant are ratios of changes in the other coordinates along this iso-contour.

For example, you can think of evaluating dr/dx along a curve of constant y or along a curve of constant θ, and these are different.

I first really understood this way of thinking from an unpublished book chapter of Jaynes [1]. Gibbs "Graphical Methods In The Thermodynamics of Fluids" [2] is also a very interesting discussion of different ways of representing thermodynamic processes by diagrams in the plane. His companion paper, "A method of geometrical representation of the thermodynamic properties of substances by means of surfaces" describes an alternative representation as a surface embedded in a larger space, and these two different pictures are complimentary and both very useful.

[1] https://bayes.wustl.edu/etj/thermo/stat.mech.1.pdf

[2] https://www3.nd.edu/~powers/ame.20231/gibbs1873a.pdf

Instead of differentiating c^(-xn) w.r.t. x to pull down factors of n (and inconvenient logarithms of c), you can use (z d/dz) z^n = n z^n to pull down factors of n with no inconvenient logarithms. Then you can set z=1/2 at the end to get the desired summand here. This approach makes it more obvious that the answer will be rational.

This is effectively what OP does, but it is phrased there in terms of properties of the Li function, which makes it seem a little more exotic than thinking just in terms of differentiating power functions.

From later in [1]

Mind that all of this does not impose how we actually scale temperature.

How we scale temperature comes from practical applications such as thermal expansion being linear with temperature on small scales.

An absolute scale for temperature is determined (up to proportionality) by the maximal efficiency of a heat engine operating between two reservoirs: e = 1 - T2/T1.

This might seem like a practical application, but intellectually, it’s an important abstraction away from the properties of any particular system to a constraint on all possible physical systems. This was an important step on the historical path to a modern conception of entropy and the second law of thermodynamics [2].

[1] https://physics.stackexchange.com/a/727798/36360

[2] https://bayes.wustl.edu/etj/articles/ccarnot.pdf

KaTeX supports server side rendering to an html string. If you do this, the client only needs to load the css component of katex, and not the js component.

I believe MathJax has a similar capability.

Entropy in Statistical Mechanics is a quantity associated with a probability distribution over states of the system. In classical mechanics, this is a probability distribution over the phase space of the system.

Two probability distributions with different entropy can both assign finite probability density to the same state, so an increase in entropy does not preclude the possibility of the system returning to its initial state.

A great deal of confusion about entropy arises from imagining it as a function of the microstate of a system (in classical mechanics, a point in phase space) when it is actually a function of a probability distribution over possible states of a system.

A further wrinkle: Liouville's Theorem [0] shows that evolution under classical mechanics is _entropy preserving_ (because the evolution preserves local phase space density, and entropy is a function of this density). An analogous result applies to quantum mechanics. However, a simple probability distribution parametrized by a few macroscopic parameters rapidly becomes very complex as it evolves in time. When we imagine the entropy of an isolated classical system increasing over time, the meaning is that if we want to model the (very complicated) evolved probability distribution with a simple probability distribution (describable in terms of a few macroscopic parameters), the simple distribution must have entropy greater than or equal to the complex evolved distribution, which is equal to the original entropy before evolution.

It's difficult to reconcile the idea that entropy is a function of a probability distribution (not a function of a system's microstate) with the idea that Thermodynamical entropy is an experimentally measurable (kind of...) property of a system. Jaynes' "The Evolution of Carnot's Principle" [1] is the clearest description I've seen of the relationship between Thermodynamic entropy and Statistical Mechanical/Information Theoretical entropy. Many of Jaynes' other papers [2] on this topic are also illuminating.

[0] https://en.wikipedia.org/wiki/Liouville's_theorem_(Hamiltoni...

[1] https://bayes.wustl.edu/etj/articles/ccarnot.pdf

[2] https://bayes.wustl.edu/etj/node1.html

I’d recommend a language with automatic memory management for the AST walking interpreter in the first half of the book so you don’t have to worry about how everything gets allocated.

Either Zig or Rust would be great for the bytecode compiler/interpreter in the second half of the book, which is written with the expectation of manual memory management. I personally chose Zig and it was fun.

All you need to do is ensure that your calculations are in no danger of blowing past the max significant digits

If you have a lot of control of the scale of the numbers you’re computing with, you could use fixed point instead of floating point.

The situations that make it useful to have a floating point (rather than fixed point) are also the situations where addition isn’t associative.

Interesting that the author assumes that US equity dominance will continue.

The author does not assume this—rather this is held up as an assumption that might be wrong.

The article is structured as a list of 5 assumptions that would be tempting to make but could be incorrect, and this is one of them.

I don’t think they’re actually intending to refer to physics here—they could have said “as fast as theoretically possible” instead.

A square matrix with n rows and columns has n^2 entries, so if you need to look at all the entries in two matrices to compute their product, then you need to do O(n^2) work just to look at all the relevant entries.

The only way you could get around this is if you know many entries are 0, or identical, or have some other structure such that you don’t need to look at them separately.

Shouldn't 0-grade objects all have the same units?

No, and this is a really important point. Scalars can have any units. For example, you can have a scalar with units of time, or mass, and you can take the dot product of a force vector and a displacement vector to get a scalar with units of [force]·[distance] = [work].

If you instead form the wedge product of those vectors, you get a bivector with the same units: [force]·[distance] = [torque] (note that the units of [work], [torque], and [energy] are all the same).

If you take the geometric product of a force vector and a displacement vector, the result is the sum of a scalar and a bivector, both with the same units of [force]·[distance].

Everyone should consider making their own blog! Kind of like everyone should consider baking their own bread, at least once.

Having a blog that I built that is truly “mine,” with a domain name that I own, is one of the most rewarding things I’ve done. Even though I don’t write that often and don’t have that many readers.

I currently host it on github pages, but I could move it somewhere else in a weekend if I wanted to.

Depending on your motivations, discoverability by strangers may be overrated. I’ve had good success just telling people that I respect that I wrote something and getting feedback from them. I’m not selling anything on my blog, so that’s worth a lot more to me than anonymous attention.

Social media like HN, Reddit, Twitter, or Facebook may also help for getting the word out about your writing while still letting you own the space where your writing lives.

I sometimes wish there was a way to demand the same level of proof for claims of readability and productivity that we demand for claims about performance.

Measuring before optimizing is of course a good idea, but it's also time consuming. There's a lot of latitude to make different reasonable choices about how you write code down in the first place before you get to the measuring staging.

Should we criticize someone who reaches for a for loop because they know it doesn't allocate without proving that that matters more than someone who reaches for a map because they think it's more readable and productive without any great way of proving that that's true?

This is a lovely essay, but I think it goes a little too far in claiming that the electromagnetic field is intangible or immeasurable, in slightly forced analogy with quantum mechanics.

We now take it for granted that electric and magnetic fields are abstractions not reducible to mechanical models. To see that this is true, we need only look at the units in which the electric and magnetic fields are supposed to be measured. The conventional unit of electric field-strength is the square-root of a joule per cubic meter... This does not mean that an electric field-strength can be measured with the square-root of a calorimeter. It means that an electric field-strength is an abstract quantity, incommensurable with any quantities that we can measure directly.

A more conventional way to think of the dimensions of the electric field is [force]/[charge] (e.g. units of Newtons/Coulomb), and you can observe the electric field by observing the force it exerts on a charged particle through

f=qE

for example by observing the trajectory of an electron in a cloud chamber.

Dyson says that the square of the field is a measurable energy density, but it’s arguably harder to measure an energy density than it is to measure a force.

Dyson’s point is much more true for quantum mechanics, where the only measurable things seem to be quadratic combinations of the wave function, and I do like the analogy he points out with electromagnetism, but I think he oversimplifies a bit to make his point.