Re: [m-users.] Random Number Generator

Volker Wysk <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
Hi

Am Mittwoch, dem 02.08.2023 um 13:08 +1000 schrieb Mark Brown:
> On Wed, Aug 2, 2023 at 2:55 AM Volker Wysk <[email protected]> wrote:
> > 
> > Hi, Mark
> > 
> > Am Dienstag, dem 01.08.2023 um 22:08 +1000 schrieb Mark Brown:
> > > > Yes, that's what I was wondering. And if it was possible to get rid of
> > > > that
> > > > extra argument.
> > > 
> > > You can use one of the submodules directly.
> > 
> > Unless if you want to attach the RNG to the IO state.
> 
> That's correct, we don't provide a global RNG of any sort. You can use
> get_globals and set_globals in the I/O module to implement this
> interface in a straightforward way, but we don't recommend this as it
> is a poor design. That is why those predicates are obsolete, and the
> user is advised to use a mutable instead (which is what I was
> suggesting above).

Using a mutable is what I've done. (See my post of yesterday). After Julien
made clear, that mutables are language feature and not something from a
library.

Cheers
Volker

_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmTKGGAACgkQ+K4ydFOs
HoXcExAAuQ+u92h7jd0YXoe1FWGizAy2damfoNs/PfrOBk854htNjUUovz8NdJiY
vEE+9V2zGL0mZkLHo9CQngqKdXdWyF7bT29X+a405/CzUE7czmKIcreo5n7sel5q
aQ6J/spgTZVzI5JL/a3AvurBG0FQAUuUB297FTdBs13XaYP+w45YbPBOKsa7UK51
Uh1bFSgls7TwGbL+XC8ccIc0WJX4w4c1CM0Pu02rCarTRQbKFxqjIkHe+DTucOZa
hGgjXrF2/9rgSa61Z7sxI8L01JM4Yicod3aR10wq4dsVs50PxWirP3oHYVX/EEhb
vcV2h+kUIIvJaUNB8MRM1hPIWSSf+dXyhqjGnKSl7fu3j9kSYzh6SySMa4yYBKS1
V+AZzbvIuz9V3zHgvAfdkPnXDzvRMgQgIMPQwtwreY+Q5XsQH8t4fE7xeVk0k091
uTF//8zQcF9zsZ7tN2DysESo8T5LE4tViyD34+4pLUEZ8Dl0CUW6Cu6B9kbuHRjR
kTu1RgzxRrOk8CN20y1damG8dekWzs/ox/34a+yhC6pOWZpTIdvsEbQU5nnSaUJc
H5IFPuDQpq0hhvHlKd3/VXDVxD4LE/WAMOxViH4FBxAYPkdwAxVvmiGJ95d7fVi8
ICuKRhEamAWVZQU66ugh+E5UHqYHOU4PKuENcMJw+fFqxgn+wB0=
=z8wZ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.