News for hackers. Stuff that matters.
Re:How random is xkcd? (2015) by bumby on Thursday December 28, 2023 @11:50AM (#38795382)
I believe this issue is pre-dated even further, back when iPod users didn't like that occasionally a random shuffle would play the same song back-to-back. So the 'random' shuffle was made a bit less random.
Re:How random is xkcd? (2015) by saalweachter on Thursday December 28, 2023 @12:00PM (#38795501)
CD players inspired the same discussion.

Probably doesn't go back further than that, unless jukeboxes has a random play option.

Re:How random is xkcd? (2015) by antiterra on Thursday December 28, 2023 @01:09PM (#38796427)
I think the issue was playing the same artist or album back-to-back. So they made ‘smart shuffle’ in 2005. (https://www.wired.com/story/requiem-for-the-ipod-shuffle/)

A shuffle already implies shuffling like a deck of cards, so you wouldn’t get duplicates unless you had two of the same card, and I that’s how it was described in the manual.

Re:How random is xkcd? (2015) by jimbobthrowawy on Friday December 29, 2023 @02:43PM (#38809329)
Is there any algorithm that would do that without actually storing a list of indices, or track IDs?

I can't think of why someone would prefer a truly random song being played from a playlist rather than the "deck of cards" method.

Re:How random is xkcd? (2015) by hgomersall on Thursday December 28, 2023 @01:35PM (#38796800)
It can be biased and still random.
Re:How random is xkcd? (2015) by lostlogin on Thursday December 28, 2023 @02:22PM (#38797402)
Can you explain that?
Re:How random is xkcd? (2015) by drdeca on Thursday December 28, 2023 @03:09PM (#38797995)
A non-uniform probability distribution is still a probability distribution, and, as long as it doesn’t assign probability 1 to any particular outcome, is still “random”.
Re:How random is xkcd? (2015) by Dylan16807 on Thursday December 28, 2023 @01:41PM (#38796892)
You don't need to make it less random to achieve that. A 100% random shuffle won't have that issue, you just have to make sure it's actually a shuffle and not something else.
Re:How random is xkcd? (2015) by xtagon on Thursday December 28, 2023 @02:28PM (#38797458)
Given a set of songs or albums {a, b, c}

Suppose shuffling results in ordered set [b, a, c]

Suppose user plays through the entire set. Now it's shuffled again before repating.

Suppose the new shuffle results in ordered set [c, a, b]

The user now hears c play after c

Re:How random is xkcd? (2015) by Dylan16807 on Thursday December 28, 2023 @02:50PM (#38797765)
I'm going to ignore the other ways to handle that and just point out that that is multiple shuffles and won't be a problem if the user initiates all shuffles.
Re:How random is xkcd? (2015) by xtagon on Friday December 29, 2023 @12:31AM (#38802059)
If the user has to initiate all shuffles, it won't play continuously. If you handle it another way, that demonstrates that it doesn't "just" work with a pure shuffle without using those tricks.
Re:How random is xkcd? (2015) by Dylan16807 on Friday December 29, 2023 @02:23AM (#38802496)
1. Without a clearer spec, we should not assume the user wants any repeats at all.

2. Your claim is not even true as written.

3. I'm tempted to assume the user has a reasonable amount of music, so it will last as long as necessary. And you can't force me not to assume that.