Random in Erlang processes

I'm sure the people at LShift don't need my help, but it was fun playing with Erlang and finding one possible solution for the Random in Erlang problem. Init the random process with random_p:start(). Then call random_p:uniform() instead of random:uniform() and you get different numbers, even when you use it from multiple, fresh spawned processes. %%% Solution for http://www.lshift.net/blog/2006/09/06/random-in-erlang %%% %%% 2006-09-13 Stefan Scholl <stesch@no-spoon.de> %%% %%% Public Domain (sic!) %%% -module(random_p)....

2006-09-13 13:48:00Z ยท Last edited: 2009-08-27 20:27:05Z