Originally Posted By: argv0
Originally Posted By: drum
but it won't give you a uniform distribution.


How is this any different from any use of $rand in mIRC? You're pointing out a flaw with mIRC's random number generator, not with the methodology.


No, it's not an issue with $rand. It's because sorting algorithms work on the assumption that if A comes before B, and B comes before C, then A must come before C. However that isn't true with $filtersort.rand. I can't really get into more detail that than without knowing the exact algorithm that mIRC uses for sorting with /filter, but I ran a trial with your method and there was a clear bias.

Quote:
Do you have a better solution?


Deega's method (or any method not relying on a sorting algorithm) is fine.