Hacker Newsnew | past | comments | ask | show | jobs | submit | gbonc2's commentslogin

I wrote this one, I tested with PostgresDB and Oracle , at time:

https://github.com/gbonacini/dbfs


Hi, I'm the author of this one ( I lost the other account password). I'm happy I found someone else doing this stuff to be able to talk about it. I discarded time related algorithms because I thought they could introduce sneaky bugs related to event dependencies. So, having had to work in the gamble industry, I opted for a simpler algorithm: roulette. I have a loop increasing a register from 0 to 15, when a particle is detected the value present in that registry is returned and it's used as an half of a 8 bits ( 1 byte ) random number and, after every extraction, the counter is restarted from zero. If anyone think the algorithm is unreliable, any suggestion to improve it's welcome.


It's pretty similar to mine, you could improve yours by relying on an hardware timer/counter that can go faster and thus provide more entropy.

Also you should not reset the counter at every event, this would lead to a poisson distribution if event ever became of comparable time scale to the timer


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

Search: