Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce loadable pseudo-random number generators. #200

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

Don-Ward
Copy link
Collaborator

@Don-Ward Don-Ward commented Mar 6, 2021

N.B. The PRNG interface introduced here is subject to review and may change.

PRNGs are per-thread and may be changed with the new loadrng() standard
function. Two PRNGs are present:
IconEx A reimplementation of the traditional generator
as a loadable library.
Rabbit A cryptographically strong PRNG from the eSTREAM project.
Other PRNGs -- probably RanLux and the Mersenne Twister -- will follow.

Copy link

@etherx-dev etherx-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My head hurts... but i know that stumbling upon this project just made it worthwhile lol.

@Don-Ward
Copy link
Collaborator Author

After initial feedback, it was decided to split up the PR into several smaller commits

Don-Ward and others added 18 commits November 14, 2024 14:52
Add runtime routines callable by a rnglib:
   getRngState
   getInitialBits
   putErrorCode
Add rnglib routines callable by the runtime:
   startRng
   putSeed
   getRandomFpt
   getErrorText
   getRandomBits  -- optional
   getRandomInt   -- optional

Add new standard functions:
   loadrng
   rngbits
   rngbitstring
   rngval
Add "loadable RNGs" to &features.
Add _RNG_LIBRARY to the preprocessor predefined symbols.
RngIconEx is a reimplemtation of the (Icon) built-in generator
as a loadable rnglib. It serves as an example for how implement a
loadable rng library.
Rabbit is a cryptographically secure random number generator from the
ESTREAM project. rngRbt implements it as a loadable rng library.
rngRlx++ is a reimplementation in C of the RanLux++ generator.
rngGSL isn't a random number generator as such; it provides an interface
to the generators in the GNU Scientific Library, if that is installed.
Add a new argument --enable-rnglibs to configure.
Detect the presence (or otherwise) of the GNU Scientific Library.
Add a test for --enable-rnglibs
…araibeh]

This is a slight rework of commit 27b385c. It is needed because the
PRNG code uses unicon_getrandom() in fmisc.r as well as init.r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants