Bram Moolenaar wrote:

> I wrote:
>
> > Patch 8.1.2342
> > Problem:    Random number generator in Vim script is slow.
> > Solution:   Add rand() and srand(). (Yasuhiro Matsumoto, closes #1277)
> > Files:            runtime/doc/eval.txt, src/evalfunc.c, 
> > src/testdir/Make_all.mak,
> >             src/testdir/test_random.vim
>
> I would appreciate it if someone with knowledge of statistics would give
> this a try and check that it's sufficiently random.
>
> I also wonder if there is something better to seed with than time().

srand() we could read from /dev/urandom, on platforms that
support it. According to https://en.wikipedia.org/wiki/dev/random,
it's available on at least Linux, macOs, OpenBSD, FreeBSD.

Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAON-T_hyvVq1M8RXMf32t_xWN4SGM27myvsf_oe7pVn_Otvz-Q%40mail.gmail.com.

Raspunde prin e-mail lui