Branch: refs/heads/tonyc/24105-modern_rand
Home: https://github.com/Perl/perl5
Commit: 1bc3c765885fb0de37f1e6afb2e5ab6574fbc1b6
https://github.com/Perl/perl5/commit/1bc3c765885fb0de37f1e6afb2e5ab6574fbc1b6
Author: Scott Baker <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M Configure
M MANIFEST
M embed.fnc
A prng.h
M proto.h
M util.c
M win32/config.gc
M win32/config.vc
Log Message:
-----------
First pass at PCG64 as PRNG for rand()
Commit: 9e8fd10b15f7ae87a42a3b01eb737d047758ea74
https://github.com/Perl/perl5/commit/9e8fd10b15f7ae87a42a3b01eb737d047758ea74
Author: Scott Baker <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M t/op/rand.t
M t/run/runenv_randseed.t
Log Message:
-----------
Update rand() unit tests for PCG64
Commit: 7c5298a951e685c85ec23d26b91cebfd7c3c35df
https://github.com/Perl/perl5/commit/7c5298a951e685c85ec23d26b91cebfd7c3c35df
Author: Tony Cook <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M util.c
M util.h
Log Message:
-----------
internal random state: rename Perl_internal_drand48
since we may not be using drand48, just something that returns
double (at least for now)
Commit: aee9b4426bb9b351f6f8112af9656619a342b62d
https://github.com/Perl/perl5/commit/aee9b4426bb9b351f6f8112af9656619a342b62d
Author: Tony Cook <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M MANIFEST
M embed.fnc
M embed.h
M perl.c
R prng.h
M proto.h
M util.c
M util.h
Log Message:
-----------
new RNG: add threading support
Some of this will be further changed:
- moved the pcg64_random_t type to util.h so it's visible to intrpvar.h
- changed the PL_RANDOM_STATE_TYPE to pcg64_random_t
- changed the internal RNG to reference the new RNG and changed the
macro names to something more generic (without "drand48")
- added pcg64_random_t * parameters to the seed and RNG generation
functions (and rename with _r) so we can make them thread safe and
eliminate the global non-thread-safe random state
- Needed to move the functions out of prng.h so porting/args_assert
could find the function definitions and eliminate prng.h
- re-define the original non-thread-safe functions as macro wrappers
that pass in the state to the _r versions of the functions
I plan to move all of the random stuff out of util.h/util.c into
perlrand.h and random.c.
Compare: https://github.com/Perl/perl5/compare/1bc3c765885f%5E...aee9b4426bb9
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications