Perl6
1 program
Added 2026-02-27T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Perl 6, Raku
Provenance: commit b508641264 · authored 2026-02-27T21:13:59+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
8 sources · pl_id:
pl/rakuWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | multi-paradigm |
|---|---|
| Typing | dynamic, gradual |
| Designed by | Raku community · Larry Wall |
| First appeared | 2015 |
| Influenced by | Perl · Ruby · Smalltalk · Haskell · JavaScript |
| License | GNU General Public or Artistic 2 |
| Homepage | https://raku.org/ |
Extensions claimed by this language
34 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.6pl | linguist | primary | 10 files |
.pl | pygments | primary | 6.3M files |
.raku | wikidata | primary | 44.6K files |
.rakudoc | wikidata | primary | 5.2K files |
.rakumod | wikidata | primary | 56.2K files |
.rakutest | wikidata | primary | 11.7K files |
.t | wikidata | primary | 3.1M files |
.6pl | pygments | secondary | 10 files |
.6pm | linguist | secondary | 4 files |
.6pm | pygments | secondary | 4 files |
.nqp | linguist | secondary | 23.2K files |
.nqp | pygments | secondary | 23.2K files |
.p6 | linguist | secondary | 28.8K files |
.p6 | pygments | secondary | 28.8K files |
.p6l | linguist | secondary | 2 files |
.p6l | pygments | secondary | 2 files |
.p6m | linguist | secondary | 6 files |
.p6m | pygments | secondary | 6 files |
.pl | linguist | secondary | 6.3M files |
.pl6 | linguist | secondary | 13.6K files |
.pl6 | pygments | secondary | 13.6K files |
.pm | linguist | secondary | 11.0M files |
.pm | pygments | secondary | 11.0M files |
.pm6 | linguist | secondary | 139.3K files |
.pm6 | pygments | secondary | 139.3K files |
.raku | linguist | secondary | 44.6K files |
.raku | pygments | secondary | 44.6K files |
.rakudoc | pygments | secondary | 5.2K files |
.rakumod | linguist | secondary | 56.2K files |
.rakumod | pygments | secondary | 56.2K files |
.rakutest | pygments | secondary | 11.7K files |
.t | linguist | secondary | 3.1M files |
.t | pygments | secondary | 3.1M files |
.nqp | wikipedia | proposed | 23.2K files |
Related languages
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Hailstone Sequence
Provenance: commit b508641264 · authored 2026-02-27T21:13:59+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
use v6;
=begin pod
=TITLE Hailstone sequence
=AUTHOR TimToady
The Hailstone sequence of numbers can be generated from a starting positive
integer, n by:
* If n is 1 then the sequence ends.
* If n is even then the next n of the sequence = n/2
* If n is odd then the next n of the sequence = (3 * n) + 1
The (unproven), Collatz conjecture is that the hailstone sequence for any
starting number always terminates.
=head1 Task
Create a routine to generate the hailstone sequence for a number.
Use the routine to show that the hailstone sequence for the number 27 has 112
elements starting with 27, 82, 41, 124 and ending with 8, 4, 2, 1
Show the number less than 100,000 which has the longest hailstone sequence
together with that sequence's length.
(But don't show the actual sequence)!
=head1 More
U<http://rosettacode.org/wiki/Hailstone_sequence#Raku>
=end pod
sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }
my @h = hailstone(27);
say "Length of hailstone(27) = {+@h}";
say ~@h;
my $m max= +hailstone($_) => $_ for 1..99_999;
say "Max length $m.key() was found for hailstone($m.value()) for numbers < 100_000";
# vim: expandtab shiftwidth=4 ft=perl6
Disambiguation rules
Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
| Rule | Ext | Kind | Predicates (truncated) |
|---|---|---|---|
h/linguist/.pl/2 | .pl | predicates | [{"kind": "any", "regexes": ["^\\s*(?:use\\s+v6\\b|\\bmodule\\b|\\b(?:my\\s+)?class\\b)"]}] |
h/linguist/.t/1 | .t | predicates | [{"kind": "any", "regexes": ["^\\s*(?:use\\s+v6\\b|\\bmodule\\b|\\bmy\\s+class\\b)"]}] |
h/linguist/.pm/1 | .pm | predicates | [{"kind": "any", "regexes": ["^\\s*(?:use\\s+v6\\b|\\bmodule\\b|\\b(?:my\\s+)?class\\b)"]}] |