Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Document deterministic rand/srand sequence compatibility

Open Beginner friendly
#1,579 0 comments 0 reactions 0 assignees View on GitHub

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

bug

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fglock/PerlOnJava

All issues in fglock/PerlOnJava

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.