Branch: refs/heads/yves/caret_rng_hook
Home: https://github.com/Perl/perl5
Commit: 0b83fb7b7897b477194a35c50ad0235c7ca73e6f
https://github.com/Perl/perl5/commit/0b83fb7b7897b477194a35c50ad0235c7ca73e6f
Author: Yves Orton <[email protected]>
Date: 2026-09-26 (Sat, 26 Sep 2026)
Changed paths:
M pod/perlfunc.pod
M pod/perlrun.pod
M t/run/runenv_randseed.t
Log Message:
-----------
PERL_RAND_SEED: document zero as automatic seeding
PERL_RAND_SEED only enables the deterministic no-argument srand() sequence
when its parsed seed is nonzero. A parsed zero leaves the override disabled,
so srand() obtains an automatic seed.
This is the existing implementation. Documenting it is less surprising than
changing zero into a special deterministic state, and avoids a new zero-state
rule for the xorshift sequence.
Add a regression test for the documented behaviour.
Commit: 6d75c11b65b5e80486828760473586f1284d994d
https://github.com/Perl/perl5/commit/6d75c11b65b5e80486828760473586f1284d994d
Author: Yves Orton <[email protected]>
Date: 2026-09-26 (Sat, 26 Sep 2026)
Changed paths:
M MANIFEST
M Porting/config_H
M config_h.SH
A t/porting/win32_config.t
M win32/config.gc
M win32/config.vc
M win32/config_H.gc
M win32/config_H.vc
M win32/config_sh.PL
Log Message:
-----------
config: expose the U64 unsigned decimal format
Configure already finds the printf conversion for an unsigned U64. Export it
as U64uf, next to UVuf, so code which stores a U64 does not have to assume
that UV is wide enough or that a particular C format spelling works.
Keep the definition conditional on d_PRIu64. Win32 records I64 conversions
when IV and UV are 32 bits because U64 is still a quad in that configuration.
Commit: d8bc3fb7a08c5f2d0399d56b095aeab7cce9ecda
https://github.com/Perl/perl5/commit/d8bc3fb7a08c5f2d0399d56b095aeab7cce9ecda
Author: Yves Orton <[email protected]>
Date: 2026-09-26 (Sat, 26 Sep 2026)
Changed paths:
M embed.fnc
M embed.h
M perl.c
M perl.h
M proto.h
M util.c
Log Message:
-----------
util: extract portable entropy acquisition
Make the operating-system entropy path available to callers that need more
than one U64. Perl_get_entropy_portable() fills an arbitrary number of octets
and makes the weak-versus-strong failure policy explicit.
The helper tries getentropy(), the configured random device, and
SystemFunction036. A weak caller falls back to mixed process state. A strong
caller gets its supplied error if no operating-system source succeeds.
Perl_seed() stays as the U64 compatibility wrapper for existing XS users.
Use the weak interface for Perl internal random initialization. This keeps its
previous fallback policy while giving new code one portable entry point.
Commit: fe0da46be5f22ea0f9fe349aa4c3575ed3f91fa0
https://github.com/Perl/perl5/commit/fe0da46be5f22ea0f9fe349aa4c3575ed3f91fa0
Author: Yves Orton <[email protected]>
Date: 2026-09-26 (Sat, 26 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: 65b96b6c09d6f71ef014e964e168f3002fe79ffd
https://github.com/Perl/perl5/commit/65b96b6c09d6f71ef014e964e168f3002fe79ffd
Author: Yves Orton <[email protected]>
Date: 2026-09-26 (Sat, 26 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.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/lib/warnings/9uninit
M t/lib/warnings/pp
M t/op/srand.t
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: ce6270bea2adae2443ee4790d901ab585e4a55f4
https://github.com/Perl/perl5/commit/ce6270bea2adae2443ee4790d901ab585e4a55f4
Author: Yves Orton <[email protected]>
Date: 2026-09-26 (Sat, 26 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/208c49314e21...ce6270bea2ad
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications