in reply to Re: Music shuffling
in thread Music shuffling
That's close to what I did originally: a hash with the array indexes as keys and timestamps as values, plus a weighted sort. It just seemed too complicated for the job I was trying to do... not anything I could point to code-wise, just a sense of "dammit, I know there's got to be a more graceful way to do this - this is just too fiddly!"
Your idea, and what I did here - only using a portion of the array - would have worked better than my original implementation, though. That one still came up with occasional doubles, or "too-near"s.
-- Human history becomes more and more a race between education and catastrophe. -- HG Wells
|
|---|