[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: random doesn't feel very random, random doesn't feel very random, Re
From: |
Ivan Kanis |
Subject: |
Re: random doesn't feel very random, random doesn't feel very random, Re: random doesn't feel very random |
Date: |
Sat, 25 Aug 2012 09:46:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
"Stephen J. Turnbull" <address@hidden> wrote:
> Ivan Kanis writes:
> > "Stephen J. Turnbull" <address@hidden> wrote:
>
> > > To avoid this behavior, use `(random t)'
> >
> > I do.
>
> Where? I don't see it in your `ivan-emms-pick-album' function
I call it once in the callee function ivan-emms-random-album. I attached
the source again.
> this will only help across Emacs sessions; within one session the
> random function should maintain state across calls to your function,
> so it should give different sequences every time as long as you never
> exist Emacs.
I exit emacs everyday, would that have an effect on the randomness?
Should I save the seed somewhere to have better result?
> Unfortunately the attachment seems to have been stripped so I don't
> know what might be going wrong in `ivan-emms-list-subdir' or the code
> that calls `ivan-emms-pick-album'. (Probably nothing, but I can't
> review it.)
I have put the code source on my web site in case the attachment gets
stripped again:
http://ivan.kanis.fr/ivan-emms.el
> If you do `M-x (ivan-emms-list-subdir (concat ivan-emms-dir "FOO")) RET'
> (with some value for FOO that actually exists and contains albums),
> does the answer look right?
It looks good:
(length (ivan-emms-list-subdir (concat ivan-emms-dir "music"))) => 769
--
Ivan Kanis
http://ivan.kanis.fr
An open foe may prove a curse,
But a pretended friend is worse.
-- John Gay
ivan-emms.el
Description: application/emacs-lisp
- random doesn't feel very random, Ivan Kanis, 2012/08/24
- Re: random doesn't feel very random, Leo, 2012/08/24
- Re: random doesn't feel very random, Richard Stallman, 2012/08/24
- Re: random doesn't feel very random, Andreas Schwab, 2012/08/24
- Re: random doesn't feel very random, Richard Stallman, 2012/08/25
- Re: random doesn't feel very random, Leo, 2012/08/25
- Re: random doesn't feel very random, Richard Stallman, 2012/08/26
- Re: random doesn't feel very random, Achim Gratz, 2012/08/26
- Re: random doesn't feel very random, Leo, 2012/08/26
- Re: random doesn't feel very random, Stefan Monnier, 2012/08/26
- Re: random doesn't feel very random, Simon Leinen, 2012/08/27