Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not sure why, but reasons.json is mostly duplicates (as many as 50!) of the same 25 responses: https://gist.github.com/deanputney/4143ca30f7823ce53d894d3ed...

It'd be easier to add new ones if they were in there a single time each. Maybe the duplication is meant to handle distribution?



ah, yes, the "memory is no object" way of obtaining a weighted distribution. If you need that sweet sweet O(1) selection time, maybe check out the Alias Method :)


Knowing that there are only 25 responses, it makes it all the more funny that rate limiting is mentioned.

And you can host the service yourself! Hard pass. I'll read the 25 responses from your gist. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: