Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Document deterministic rand/srand sequence compatibility

Đang mở Phù hợp với người mới
#1,579 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
perl
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu bằng cách xem lại tài liệu hiện có về srand, rand và List::Util::shuffle, sau đó so sánh với ranh giới tương thích được mô tả trong issue này. Ghi lại rằng các chuỗi được seed có thể lặp lại trong PerlOnJava, nhưng không nhất thiết phải khớp với các lựa chọn chính xác của system Perl hoặc CPAN; chỉ xem chế độ tương thích là công việc trong tương lai được hỗ trợ bởi bằng chứng từ hệ sinh thái.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Perl
Star
64
Fork
7
Merge trung bình
5 giờ 6 phút
Pull request đã merge (30 ngày)
200

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fglock/PerlOnJava

Tất cả issue của fglock/PerlOnJava

Issue tương tự

Thêm issue về Perl

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.