See https://news.ycombinator.com/item?id=48721551 and let us know if you have any questions.
(aftbit already mentioned this link downthread but perhaps it's helpful to say this explicitly.)
Edit: actually I should probably pin that to the top. Done now. Sorry for the confusion!