Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Vitter's reservoir sampling algorithm D: randomly selecting unique items. Parent comment
U = random_double(); negSreal=-S; y1=exp(log(U*Nreal/qu1real)*nmin1inv); Vprime = y1 * (-X/Nreal+1.0)*(qu1real/(negSreal+qu1real)); if(Vprime <= 1.0) break; y2=1.0; top = -1.0+Nreal; if(-1+n > S){bottom=-nreal+Nreal;limit=-S+N;} else{bottom=-1.0+negSreal+Nreal; limit=qu1;}
It looks like it was copy-pasted from a pdf. Maybe it was.
It looks like it was copy-pasted from a pdf. Maybe it was.