Branch: refs/heads/yves/caret_rng_hook
  Home:   https://github.com/Perl/perl5
  Commit: ed2b350d945102ffd542eb6738a5001f3422bfbd
      
https://github.com/Perl/perl5/commit/ed2b350d945102ffd542eb6738a5001f3422bfbd
  Author: Yves Orton <[email protected]>
  Date:   2026-09-27 (Sun, 27 Sep 2026)

  Changed paths:
    M MANIFEST
    M Makefile.SH
    M Porting/Maintainers.pl
    M Porting/config.sh
    A dist/RNG/Changes
    A dist/RNG/MANIFEST
    A dist/RNG/Makefile.PL
    A dist/RNG/README
    A dist/RNG/RNG.xs
    A dist/RNG/lib/RNG.pm
    A dist/RNG/lib/RNG/Drand48.pm
    A dist/RNG/lib/RNG/HMAC_DRBG.pm
    A dist/RNG/lib/RNG/PCG.pm
    A dist/RNG/lib/RNG/Provider.pm
    A dist/RNG/lib/RNG/Seed.pm
    A dist/RNG/lib/RNG/SeedBase.pm
    A dist/RNG/lib/RNG/Wyrand.pm
    A dist/RNG/lib/RNG/Xoshiro.pm
    A dist/RNG/t/compat.t
    A dist/RNG/t/distributions.t
    A dist/RNG/t/drand48.t
    A dist/RNG/t/hmac_drbg.t
    A dist/RNG/t/pcg.t
    A dist/RNG/t/seed.t
    A dist/RNG/t/wyrand.t
    A dist/RNG/t/xoshiro.t
    M lib/.gitignore
    M win32/GNUmakefile
    M win32/Makefile

  Log Message:
  -----------
  dist/RNG: add random providers and distributions

Add RNG as the common layer for byte-oriented random generators and the
distribution helpers built on top of them. A provider supplies rand_bytes()
and srand(). The helpers use those octets for bounded integers, dice, and
weighted choices without knowing a provider state format.

RNG::SeedBase identifies exact raw state material. Ordinary seed values stay
UTF-8 strings, while a SeedBase object lets a caller replay a provider state
without deriving it again. This keeps the portable interface separate from
each generator implementation.

Bundle Drand48, PCG, Wyrand, Xoshiro, and HMAC_DRBG. Their XS code keeps state
in scalar storage and may publish a native U64 callback. That callback is
optional. rand_bytes() is the portable contract.

The module shim supports the same contract on supported older Perls without
requiring the later core ${^RNG} hook.


  Commit: 89064b60d777c2f2b560d4b33131a6931fbc56c1
      
https://github.com/Perl/perl5/commit/89064b60d777c2f2b560d4b33131a6931fbc56c1
  Author: Yves Orton <[email protected]>
  Date:   2026-09-27 (Sun, 27 Sep 2026)

  Changed paths:
    M MANIFEST
    M builtin.c
    M embed.fnc
    M embed.h
    M embedvar.h
    M gv.c
    M intrpvar.h
    M lib/builtin.pm
    M mg.c
    M perl.c
    M perl.h
    M pod/perl.pod
    M pod/perldelta.pod
    M pod/perldiag.pod
    M pod/perlfunc.pod
    A pod/perlrng.pod
    M pod/perlvar.pod
    M pp.c
    M proto.h
    M sv.c
    M t/harness
    M t/lib/warnings/9uninit
    M t/lib/warnings/pp
    A t/op/rng/contract.t
    M t/op/srand.t
    M t/perf/benchmarks
    A t/perf/rng-benchmarks
    M t/porting/known_pod_issues.dat
    M util.h
    M win32/pod.mak

  Log Message:
  -----------
  rng: let rand use selected providers

Make ${^RNG} select the generator used by rand(), srand(), and
builtin::rand_bytes(). The variable accepts an RNG::Provider object or undef.
It is dynamically scoped, but selecting a provider does not copy its state.

The core calls rand_bytes() for the portable path. XS providers can publish a
U64 callback and state pointer for rand() so the common case does not pay for
method dispatch. Assignment to ${^RNG}, and provider srand(), refresh the
cache before it is used again.

srand() now turns ordinary defined arguments into UTF-8 strings. Built-in
Drand48 retains its historical numeric handling and reports when it discards
bits above 32. SeedBase supplies exact raw state material. Redacted seeds fail
before their material is requested.

Add diagnostics, documentation, and core tests for the protocol, seed rules,
callback cache, and byte-count validation.


  Commit: 89abf44b0023d22b211da209b64e7a961c31b3ef
      
https://github.com/Perl/perl5/commit/89abf44b0023d22b211da209b64e7a961c31b3ef
  Author: Yves Orton <[email protected]>
  Date:   2026-09-27 (Sun, 27 Sep 2026)

  Changed paths:
    M .github/workflows/testsuite.yml
    M Porting/test-dist-modules.pl

  Log Message:
  -----------
  Porting: test RNG on supported older Perls

RNG supports Perl 5.24 and later, but the List::Util bundled with 5.24 is
older than RNG requires. Let the external-distribution test runner skip RNG
below that floor.

For the 5.24 test job, install a current List::Util and put its site
directories before the core library paths which MakeMaker prepends. Check the
installed version before running the distribution tests so this compatibility
requirement cannot silently regress.


Compare: https://github.com/Perl/perl5/compare/ce6270bea2ad...89abf44b0023

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to