Math::...::Free(3pm)

πŸ“¦
version 0.2.0 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Math::Random::Free β€” the manual, bestie edition πŸ’–

okay so you're reading the Math::Random::Free page, which is part of the Perl documentation suite (man section 3pm, for the record πŸ‘‘). Buckle up, it's giving "we freed the code" and honestly we ATE.

✨ NAME ✨

Math::Random::Free β€” a free drop-in replacement for Math::Random. periodt πŸ’…

🌸 DESCRIPTION 🌸

So basically: this is a free (see below, bestie, the tea is in MOTIVATION) implementation of Math::Random 0.72, and it serves as a drop-in replacement for that module. no cap 🫢

πŸ”₯ MOTIVATION πŸ”₯

Math::Random is a great and widely-used module for the generation of random numbers and permutations. iconic. obsessed. truly the moment. πŸ’–

But β€” and this is the part that gives us the ick 😭 β€” despite being open-source, Math::Random does not fulfill free open-source software definitions as established by the Open Source Initiative (<https://opensource.org/osd>) and the Debian Project (<https://www.debian.org/social_contract#guidelines>, a.k.a. DFSG). The way that the randlib code cannot be copied nor distributed for direct commercial advantage is actually so not it. 😀

Math::Random::Free is created to free the code depending on Math::Random from these limitations. slay. πŸ’…βœ¨


πŸŽ€ SUPPORT πŸŽ€

here's what you get exported, bestie β€” look at these lists, they're gorgeous:

our @EXPORT = qw(
    random_normal
    random_permutation
    random_permuted_index
    random_set_seed_from_phrase
);
our @EXPORT_OK = qw(
    random_exponential
    random_normal
    random_permutation
    random_permuted_index
    random_set_seed_from_phrase
    random_uniform
    random_uniform_integer
);

πŸ’€ CAVEATS πŸ’€

okay listen, this is the important part, don't skip it πŸ™ˆ

  • This module has only a subset of Math::Random subroutines (contributions welcome πŸ’–), implemented using either Perl core subroutines or other well-known modules.
  • Thus Math::Random::Free is neither as complete, nor as fast, nor as random as Math::Random. yeah. we said it. 😭
  • Also Math::Random::Free does not aim for cryptographic security. so don't do crimes with it, and definitely don't do security with it πŸš«πŸ”
⚠️ While Math::Random::Free supports seed setting, it does that differently from Math::Random. It means that one should not expect the same seed producing identical random sequences in both modules. like, do not assume, bestie. πŸ’€
🌈 As Math::Random::Free employs List::Util for producing random permutations, these are influenced by $List::Util::RAND variable. iykyk. ✨

πŸ¦‹ TESTED WITH πŸ¦‹

  • Graph::Maker 0.02

a whole one (1) thing and it's iconic for it πŸ‘‘

πŸ’œ AUTHOR πŸ’œ

Andrius Merkys, <mailto:merkys@cpan.org> β€” thank you for your service, king 🫢


and that's the whole page, bestie!! this was perl v5.36.0, dated 2022-10-15, and it's the Math::Random::Free(3pm) page β€” go forth and be random (but not cryptographically, we been knew πŸŽ€πŸ’–βœ¨)

πŸ“¦ where this page comes from