HNHacker News
TopNewBestAskShowJobs

jwmerrill

1,598 karma · joined April 5, 2012

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

You can reach me at jwmerrill@gmail.com

submissionscomments
jwmerrill··on A Quirky Function
Yes, the results are the same for 0^f(x) where f(x) is any monotonic function with f(0)=0.
jwmerrill··on Drop jQuery as a dependency from Rails
> The XHR wrapper can easily be replaced with the fetch API.

Browser support for fetch is still pretty weak, so you'll need some kind of polyfill to use it today.

http://caniuse.com/#feat=fetch

jwmerrill··on Charge, a phone company with features for nerds
I think Charge meant to use it to show you what happens when you visit an unregistered domain.

This being the Internet, someone registered it and pointed it at Rick Astley.

jwmerrill··on JavaScript async/await implemented in V8
At the time that the request resolves, it has received and processed the response headers, but it may still be receiving the response body (which is represented as a stream). All the body representations (like .text() or .json()) need to wait until the body has arrived before they can resolve.

https://fetch.spec.whatwg.org/#concept-body-consume-body

jwmerrill··on MathML is a failed web standard
Since we're discussing various math rendering technologies for the web, I'd like to plug MathQuill [1]. The big advantage MathQuill has over other solutions is that the math is live editable in the browser in typeset form. We use it for input on the Desmos graphing calculator [2], and MathQuill is definitely the best WYSIWYG math editor that I have used anywhere, on the web or elsewhere.

[1] http://mathquill.com/

[2] https://www.desmos.com/calculator

jwmerrill··on Amazon bans the sale of rogue USB-C cables
FedEx and UPS. Maybe also DHL sometimes? I've had much better experiences with these than USPS. Package tracking with USPS is a fiction, and they have claimed to have attempted to deliver a package that they never attempted to deliver on multiple occasions.
jwmerrill··on Desmos Graphing Calculator – HTML5 with LaTeX editor
> How do you guys pay the bills with no premium features like all the other calculators on the app store?

We license our calculator API to people who want to use it to make math content, or integrate it as a tool for students into their books, exercises, assessments, etc.

https://www.desmos.com/api

jwmerrill··on Desmos Graphing Calculator – HTML5 with LaTeX editor
> What are you guys planning on doing next?

One of the big things that we've been working on is building interactive lessons that a whole classroom can do together:

https://teacher.desmos.com/

Some of these use the calculator as a tool, and they all generally keep with the spirit of trying to make it cheap to try out an idea and see what it implies.

jwmerrill··on Desmos Graphing Calculator – HTML5 with LaTeX editor
We just use canvas for drawing. SVG is tempting because it would help with things like figuring out which curve a user clicked on, but we've been disappointed by SVG performance and cross browser differences every time we've tried it.
jwmerrill··on Desmos Graphing Calculator – HTML5 with LaTeX editor
You can already plot bivariate equations as implicit plots; e.g. things like "x^2 + y^2 < 9" or `sin(x) + sin(y) = 0.2` already work.

Are you asking about numerically solving systems of equations? Or 3D plotting? We might do one or both of those at some point, but they aren't on the near term road map.

jwmerrill··on Desmos Graphing Calculator – HTML5 with LaTeX editor
> 1. Is there a way to do integrals? Are there plans to add that support?

We don't do integrals right now, but I hope we'll be able to add them at some point. It can be pretty tricky to do integrals accurately for non-smooth or highly oscillatory functions. Here's a graph I made recently exploring an interesting numerical integration technique called tanh-sinh quadrature:

https://www.desmos.com/calculator/jg4wamuwde

2. ... If I change the equation, it seems like it has to complete the first calculation to get to the new calculation.

Right, we currently wait for existing calculations to finish before starting new ones. We've experimented with strategies for killing calculations that look like they're hung, but we don't do anything like that right now. Killing and respawning webworkers is expensive and has been crashy in various browsers at various times, and short of that, it's hard to stop calculations midway through.

jwmerrill··on Desmos Graphing Calculator – HTML5 with LaTeX editor
Lead calculator engineer here. I'm happy and a little surprised to see our work on the HN front page this morning. We've been at it since 2011.

Our biggest goal with the calculator has been to make it easy to immediately see the consequences of changing part of an expression, or changing a parameter in an expression. When you remove the friction, this feels like exploring.

Happy to answer any questions.

Edit: For the tech crowd, I'll play the "what happens when you type a key on google.com?" game, only for Desmos:

1. Your keystroke is interpreted and typeset by the awesome, open source math typesetting library MathQuill: http://mathquill.com/

2. Mathquill notifies us that an expression has changed, and gives us a new LaTeX representation of it.

3. We send this new expression to a webworker, where we do all of our math processing. This lets us avoid blocking the UI thread, even if the user asks us to do something like a sum from one to a billion.

4. In the webworker, the expression LaTeX is parsed and analyzed for dependencies, variable assignments, and function definitions. We mark any other expressions that depend on symbols it exports as dirty, so that we can also reanalyze and replot them.

5. We compile the parsed expression (and any other expressions that need to be updated) to javascript by calling "new Function()" on a string representation. Since we need to evaluate these functions at thousands of points for plotting, we've found this to be much more efficient than an interpreter.

6. We plot all plottable functions (explicit functions of one variable, implicit functions of two variables, parametric equations, polar equations, inequalities, etc.), and analyze them for discontinuities and points of interest like minima, maxima, and zeros.

7. We send a representation of the plotted curves back from the webworker to the frontend, and they are plotted on the graph paper using the HTML5 canvas API.

jwmerrill··on Study finds negative association between empathizing and calculation ability
> Moral of the story: higher N is always better.

This is true in a way, but finding and studying larger effects is often a better strategy. To some extent, why talk about something that needs huge N to get above the noise?

jwmerrill··on Virtual Femto Photography
As far as I can tell, this "buckshot theory of photons" is a heuristic that is never actually formalized or used in serious calculations. In actual quantum optics calculations I have seen, a photon is a quantized excitation of a mode of an optical system, and it is definitely not localized to a moving point in space. There are "wave packets" that are somewhat localized in space and move together, but these are not the same as "photons".
jwmerrill··on When doctors, psychologists, and drug makers can't rely on each other's research
> The model he has in mind is the e-print distribution platform arXive.

> Other disciplines are emulating the arXive pre-print model

> ...something like a gigantic open-source version of arXive for all scientific research

That's not how you spell arXiv.

jwmerrill··on Number of legal Go positions computed
Hacker News' charter (from the guidelines): "anything that gratifies one's intellectual curiosity."
jwmerrill··on Probability, Paradox, and the Reasonable Person Principle
I think the gap between what a person would be willing to pay to play this game and what a casino would be willing to charge is the reason that no one plays it.
jwmerrill··on The Navigation Bar Is an Affordance, Stop Removing It
I'd like to call out the google analytics splash page as an example that makes me feel this way. Why is it there at all? Why is there a giant image of some irrelevant face on it?
jwmerrill··on TrendMicro Node.js HTTP server listening on localhost can execute commands
So what technologies do you actually like for writing web servers?

I think this comment is a good example of "contempt culture," which we've probably all been guilty of, and which we should do less.

http://blog.aurynn.com/86/contempt-culture

jwmerrill··on CEmu – TI-84 Plus/TI-83 Premium Calculator Emulator
I love Jupyter for working on research problems, but I think it's helpful to have something simpler for learning about the concept of functions.

Of course, I would think that because I work on one: https://www.desmos.com

jwmerrill··on Bayes's Theorem: What's the Big Deal?
Fitting distributions is a little bit different than the usual model fitting scenario where least squares is appropriate. Sometimes people do things like construct a histogram and then do a least squares fit to the bin heights, but that procedure doesn't satisfy the usual assumptions that justify least squares (observations with independent, equal variance, Gaussian errors).

Cosma Shalizi has written some interesting posts on this subject, and also published papers in statistics journals:

http://bactra.org/weblog/491.html

jwmerrill··on How Completely Messed Up Practices Become Normal
The paper on "normalization of deviance" that this post links to is also really good. It's written from a medicine perspective, but its observations and conclusions are pretty generalizable.

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2821100/

jwmerrill··on 2016 will be the year of concurrency on the web
I think "X is the year of Y" headlines are wrong about as often as the answer to "Is Z?" headlines is "no".
jwmerrill··on 2016 will be the year of concurrency on the web
The rise of web apps and app stores show that distribution is everything.

You can complain that this isn't what a browser is for, but it won't really matter until you can distribute your favorite kind of software in a way that requires (nearly) zero effort and zero risk for your end users to get started with.

jwmerrill··on What We Can Learn From Aviation, Civil Engineering, Other Safety-critical Fields
A lot of the problematic behavior described here can be seen as examples of people optimizing for the most common/most likely scenario, and ignoring the potentially very large costs of unlikely but possible scenarios.

Nassim Taleb has written extensively about this subject (and the converse, where people fail to account for potentially very large rewards of unlikely but possible scenarios):

http://www.fooledbyrandomness.com/

jwmerrill··on The Kolmogorov-Smirnov Test
Nice summary. I think it's worth noting that all of these criticisms generalize from the K-S test to any kind of Null Hypothesis Significance Test.
jwmerrill··on I thought all anti-vaxxers were idiots. Then I married one
Diarrhea kills more than a million people each year. In 2012, it was the second most common cause of deaths in children younger than five (0.76 million or 11%).

Be thankful that you live in a time and place that allow you to not take it very seriously. I know I'm thankful for this.

Source: https://en.m.wikipedia.org/wiki/Diarrhea

jwmerrill··on Factorizer
I don't work for the NSA—I just have a laptop, and a copy of Mathematica. The factorization took about 10 seconds.

Mathematica is really a pretty remarkable piece of software. I doubt it's world class for factorization, but it gives you easy access to a lot of pretty darn good algorithms for a wide range of problems.

There's 1 sentence on the implementation of FactorInteger in the docs, FWIW:

http://reference.wolfram.com/language/tutorial/SomeNotesOnIn...

jwmerrill··on Factorizer
Sure thing!

651651626268416641641703*983764598769387649827639876407 = 641071800653367850802176606120792275422168080497001121

jwmerrill··on Physicists and Philosophers Debate the Boundaries of Science
Here's an argument that runs completely parallel:

jwmerrill's razor: points in the plane should be considered to be close to the origin unless there is evidence otherwise.

Is this a reasonable law? As reasonable as Occam's razor? I think probably not, but I don't have a strong opinion. One interesting thing to note is that the law doesn't say where the origin is (similarly, Occam's razor is vague about what exactly is meant by "simple" and "complex").

Finite asymptotic form: for any finite point set, there is a distance D such that no point in the set is further from the origin than D.

Continuous asymptotic form: given any function from points in the plane to non-negative numbers which has a finite integral, there is a distance D such that the integral of the function over the region that is further from the origin than D is less than any epsilon_1, and such that the function is everywhere less than any epsilon_2 on this region except perhaps on a set of measure 0.

The asymptotic forms are provable mathematical statements, but I think it would be a mistake to say that either of them is a very compelling argument for the original statement of "jwmerrill's razor."

Without intending to call you out in particular (I don't know what opinions you hold), I think people sometimes accept some odd logic in probability theory that they would be less likely to accept in other contexts. Bayesian probability theory provides practical solutions to a lot of interesting problems, and I personally wish people would emphasize those cases more, and make fewer sweeping statements about it being a consistent theory of all of the scientific method.

← PreviousPage 3 of 8Next →