News for hackers. Stuff that matters.
Re:The Skip list by camccann on Saturday March 06, 2010 @02:40PM (#1171988)
For stochastic algorithms you will probably use the same trick as with monadic I/O --- you can make the description of the algorithm purely functional, but not its execution.

Certainly possible, but how well this works depends on how, and to what extent, referential transparency is enforced by the language.

For instance, in Haskell, there really isn't a satisfying solution that I'm aware of. Threading a PRNG (as with the state monad) keeps the code "pure", but enforces a strict sequencing on use of the structure, wrecking laziness. On the other hand, any nondeterminism without threading a PRNG probably requires unsafePerformIO.

Re:The Skip list by chancho on Saturday March 06, 2010 @03:04PM (#1172040)
'Probabilistic' doesn't have to mean 'nondeterministic'. Hash tables are deterministic and probabilistic. You could probably do the same with a skip list: hash the key to see what level of the skip list it gets promoted to.
Re:The Skip list by eru on Sunday March 07, 2010 @12:36PM (#1173664)
If you split your PRNG, you can 'tree' it through your algorithm instead of threading it. That should help with lazyness.