Document deterministic rand/srand sequence compatibility
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- perl
- Domain
- documentation
Research direction
Start by reviewing the existing documentation for srand, rand, and List::Util::shuffle, then compare it with the compatibility boundary described in this issue. Document that seeded sequences are repeatable within PerlOnJava but need not match system Perl or CPAN's exact selections; consider compatibility mode only as future work supported by ecosystem evidence.
Written by the indexing model from the issue text.
Description
Summary
PerlOnJava currently implements srand and rand with Java’s java.util.Random. A fixed integer seed therefore produces a deterministic sequence within PerlOnJava, but not the same sequence as the reference Perl executable.
Observed CPAN coverage
CPAN tester run 20260930-095822-89295 reported JSONL-Subset 0.05 as failing 6 of 29 assertions in t/basic.t. The only failures were exact expected line selections in random mode after srand(1337). Start and end modes passed.
System Perl 5.42.2 produced the distribution’s expected selections: shuffle(1..10) begins 9,6,7, and the streaming selection is 4,7,10. PerlOnJava selected different, repeatable values.
Expected behavior
Perl documentation permits PRNG implementation changes to alter the specific sequence produced by a seed. Code should rely on repeatability within a given executable, not on CPAN’s exact PRNG sequence. Document this compatibility boundary for srand, rand, and List::Util::shuffle; consider a compatibility mode only if ecosystem evidence later justifies it.
JSONL-Subset is pure Perl; this is not an XS/native-port blocker.
- Dominant language
- Perl
- Stars
- 64
- Forks
- 6
- Avg merge
- 4h 29m
- Merged PRs (30d)
- 185
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fglock/PerlOnJava
-
area:cpan-port area:database bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
fglock/PerlOnJava#1605 ·
Maintainers usually reply within 1 day
-
area:cpan-port area:database bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
fglock/PerlOnJava#1604 ·
Maintainers usually reply within 1 day
-
area:cpan-port area:unicode bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
fglock/PerlOnJava#1341 ·
Maintainers usually reply within 1 day
-
area:runtime bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
fglock/PerlOnJava#1610 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
fglock/PerlOnJava#1607 ·
Maintainers usually reply within 1 day
All issues in fglock/PerlOnJava
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
language/en needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kubernetes/website#57846 · 2 comments ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eolang.sty#184 ·