Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Raku Next Steps 2: Hypersonic

Raku Next Steps 2: Hypersonic

Raku’s hyper-operators: a simple syntax granting us safe parallel processing, like Prometheus sneaking a flame from the heavens.

Shorten @B = map { $_ * 5 }, @A; to @B = @A »*» 5; boost performance!

Come learn how to cook with all your cores, with the fire that cannot burn down your house.

(Need to catch up? See the “Raku for Beginners class from 2023 at: https://youtu.be/eb-j1rxs7sc and https://youtu.be/2UO-LEhOkiM )

Presenting hyper-operators in a way that will move us from typical reactions of “Oh! Cool!” to actual adoption in everyday coding, by focusing on spotting the use-cases. For example, “When you see FOO, think BAR”, where FOO might be a index loop running an operation across two arrays, and BAR would be >>op<< .

Avatar for Bruce Gray

Bruce Gray

June 29, 2025
Tweet

More Decks by Bruce Gray

Other Decks in Technology

Transcript

  1. Raku Next Steps: Hypersonic ( Starting to think in Raku

    )
 
 { with Hyper-Operators } [ Part 2 of a "Intermediate Raku" class ] <ABRIDGED> *Again* The Perl and Raku Conference
 
 2025-06-29
  2. 6 • https://glot.io/new/raku for online coding
 • Mac: brew install

    rakudo-star • Windows/Linux: https://rakudo.org/downloads • Docker: • REPL on any system: • docker run --rm -it rakudo-star • Script on Mac or Unix: • docker run --rm -v "$(pwd):/script" rakudo-star raku /script/a.raku • Script on Windows: • docker run --rm -v "%cd%:/script" rakudo-star raku /script/a.raku Run online, or install locally
  3. Plan9! • Operator review • Meta-ops: • reduce [+] •

    produce [\+] • zip Z+ • cross X+ • hyper
  4. Plan9! • Operator review • Meta-ops: • reduce [+] •

    produce [\+] • zip Z+ • cross X+ • hyper ?????????
  5. In fi x, Pre fi x, Post fi x Operators

    say 5 ** 2; # power(5, 2) say 2 + 2; # add(2, 2) say +( '9' ~ '9' ); # make_numeric( # concat('9','9') # ) $z++; # $z = add($z, 1) 11
  6. 15 • High-level: • Promises • Supplies • Channels •

    react/whenever https://docs.raku.org/language/concurrency • Low-level: • Threads • Schedulers • Locks • Semaphores
  7. Today, on Dragonball Z Abridged »«>><<<<«»«»>><<««»»>><<«>>«<<>>»>>>>»> >>>>>«»>>«>><<«>>«>>>>»>>«>>>><<«>>«»>> >>>><<»<<»««>>>>>>««<<<<>>»«>>»<<«>>»>> »<<»»<<>>«»<<»«>>»»<<«»»»>>»<<<<««>><<» >>«»«<<<<>>>>»»<<<<«>><<>><<<<<<<<<<«<<

    «»>>«»»>>«»«»»<<>>«>><<>><<<<«<<»»««<<» >><<<<«>><<>>>>««««<<»«>><<»«<<««»»«»»» «»<<«>>»«»»>>»»>>>>«>>»»<<>><<>>>>«»>>« ««>>«>>«»>>»<<»>>»«<<<<«>>«>>»»<<>>>>«» 17
  8. Today, on Dragonball Z Abridged »«>><<<<«»«»>><<««»»>><<«>>«<<>>»>>>>»> >>>>>«»>>«>><<«>>«>>>>»>>«>>>><<«>>«»>> >>>><<»<<»««>>>>>>««<<<<>>»«>>»<<«>>»>> »<<»»<<>>«»<<»«>>»»<<«»»»>>»<<<<««>><<» >>«»«<<<<>>>>»»<<<<«>><<>><<<<<<<<<<«<<

    «»>>«»»>>«»«»»<<>>«>><<>><<<<«<<»»««<<» >><<<<«>><<>>>>««««<<»«>><<»«<<««»»«»»» «»<<«>>»«»»>>»»>>>>«>>»»<<>><<>>>>«»>>« ««>>«>>«»>>»<<»>>»«<<<<«>>«>>»»<<>>>>«» say Q:w{» « >> <<}.roll(500).join 18
  9. Sequential my $nick = "Util"; my $name = "Bruce Gray";

    my $badge = make_badge($name,$nick); say $badge; 27
  10. Sequential my $nick = "Util"; my $name = "Bruce Gray";

    my $badge = make_badge($name,$nick); say $badge; 28
  11. Sequential my $nick = "Util"; my $name = "Bruce Gray";

    my $badge = make_badge($name,$nick); say $badge; 29
  12. Sequential my $nick = "Util"; my $name = "Bruce Gray";

    my $badge = make_badge($name,$nick); say $badge; 30
  13. Sequential my $nick = "Util"; my $name = "Bruce Gray";

    my $badge = make_badge($name,$nick); say $badge; 31
  14. my ( $s, $v ); $s = './sins'.IO.slurp.lines(); $v =

    './virtues'.IO.slurp.lines(); Osiris_sits_in_judgement($s, $v); 39
  15. my ( $s, $v ); $a1 = async { $s

    = './sins'.IO.slurp.lines(); } $a2 = async { $v = './virtues'.IO.slurp.lines(); } await $a1, $a2; Osiris_sits_in_judgement($s, $v); 40
  16. my ( $s, $v ); $a1 = async { $s

    = './sins'.IO.slurp.lines(); } $a2 = async { $v = './virtues'.IO.slurp.lines(); } await $a1, $a2; Osiris_sits_in_judgement($s, $v); 41
  17. my ( $s, $v ); $a1 = async { $s

    = './sins'.IO.slurp.lines(); } $a2 = async { $v = './virtues'.IO.slurp.lines(); } await $a1, $a2; Osiris_sits_in_judgement($s, $v); 42
  18. my ( $s, $v ); $a1 = async { $s

    = './sins'.IO.slurp.lines(); } $a2 = async { $v = './virtues'.IO.slurp.lines(); } await $a1, $a2; Osiris_sits_in_judgement($s, $v); 43
  19. my @m = (4,0,0,0,2), (3,3,3,2,2), (1,4,1,0,4), (3,0,1,2,2), (2,3,3,2,1), ; my

    @n = (4,4,2,1,3), (2,2,3,2,2), (2,2,1,2,0), (4,4,1,1,3), (3,4,0,0,4), ; @o = @m »+« @n; .say for @o; # (8 4 2 1 5) # (5 5 6 4 4) # (3 6 2 2 4) # (7 4 2 3 5) # (5 7 3 2 5) 45
  20. my @m = (4,0,0,0,2), (3,3,3,2,2), (1,4,1,0,4), (3,0,1,2,2), (2,3,3,2,1), ; my

    @n = (4,4,2,1,3), (2,2,3,2,2), (2,2,1,2,0), (4,4,1,1,3), (3,4,0,0,4), ; @o = @m »+« @n; .say for @o; # (8 4 2 1 5) # (5 5 6 4 4) # (3 6 2 2 4) # (7 4 2 3 5) # (5 7 3 2 5) 46
  21. my @a = 8, 10, 12, 14; my @b =

    1 xx +@a; @a = @a »+« @b; 49
  22. my @a = 8, 10, 12, 14; my @b =

    1 xx +@a; @a = @a »+« @b; $age += 1; 50
  23. my @a = 8, 10, 12, 14; my @b =

    1 xx +@a; @a = @a »+« @b; $age += 1; @a »+=« @b; 51
  24. Pre fi x increment my @a = 8, 10, 12,

    14; ++@a[$_] for @a.keys; ++$_ for @a; $_++ for @a; 53
  25. Pre fi x increment my @a = 8, 10, 12,

    14; ++@a[$_] for @a.keys; ++$_ for @a; $_++ for @a; ++«@a ; # @a = 9, 11, 13, 15 @a»++ ; my @b = ++«@a ; # @b = 9, 11, 13, 15 my @b = @a»++ ; # @b = 8, 10, 12, 14 54
  26. Negations are Prefix operators ~ ~123, ~$foo + +"123", +$foo

    ? ?123, ?$foo - -123, -$foo ! !123, !$foo 56
  27. Postcircum fi x my @grid = ("A".."X").batch(8); # <A B

    C D E F G H>, # <I J K L M N O P>, # <Q R S T U V W X>, .say for @grid».[1]; # B # J # R 60
  28. Postcircum fi x my @grid = ("A".."X").batch(8); # <A B

    C D E F G H>, # <I J K L M N O P>, # <Q R S T U V W X>, .say for @grid».[1,3]; # <B D> # <J L> # <R T> 61
  29. Postcircum fi x my @AoH = {name => "A", rank

    => 5}, {name => "B", rank => 2}; say @AoH[0]{'name'}; say @AoH[0]<name>; say @AoH».<name>; # ("A", "B") say @AoH».<rank name>; # (5 A) (2 B) 62
  30. Postcircum fi x my @AoH = {name => "A", rank

    => 5}, {name => "B", rank => 2}; say @AoH[0]{'name'}; say @AoH[0].<name>; say @AoH».<name>; # ("A", "B") say @AoH».<rank name>; # (5 A) (2 B) 63
  31. 67 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  32. 68 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  33. 69 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  34. 70 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  35. 71 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  36. 72 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  37. 73 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  38. 74 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  39. 75 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  40. 76 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  41. 77 • Nail: There's a special ability our people share,

    forbidden, even among our most sacred clans.
 • Piccolo: And we're just going to abuse it?
 • Nail: Oh, maliciously!
 • Piccolo: Bitchin'. How we do? https://tvtropes.org/pmwiki/pmwiki.php/Quotes/ DangerousForbiddenTechnique
  42. https://glot.io/new/raku sub string-lengths (@w) { my @r; for @w ->

    Str $s { ... } return @r; } use Test; is string-lengths(<Otis Lee Crenshaw>), ( 4, 3, 8 ); 79
  43. sub string-lengths (@w) { my @r; for @w -> Str

    $s { push @r, $s.chars; } return @r; } use Test; is string-lengths(<Otis Lee Crenshaw>), ( 4, 3, 8 ); 80
  44. my @r; for @w -> Str $s { push @r,

    $s.chars; } my @r = @w.map( { .chars } ); my @r = @w.map: *.chars; my @r = @w».chars; 81
  45. my @r; for @w -> Str $s { push @r,

    $s.chars; } my @r = @w.map( { .chars } ); my @r = @w.map: *.chars; my @r = @w».chars; 82
  46. my @r; for @w -> Str $s { push @r,

    $s.chars; } my @r = @w.map( { .chars } ); my @r = @w.map: *.chars; my @r = @w».chars; 83
  47. my @r; for @w -> Str $s { push @r,

    $s.chars; } my @r = @w.map( { .chars } ); my @r = @w.map: *.chars; my @r = @w».chars; 84
  48. .& Syntax to call a sub like a method! say

    LookedUp( $name.chars ).uc; 87
  49. .& Syntax to call a sub like a method! say

    LookedUp( $name.chars ).uc; say $name.chars.&LookedUp.uc; 88
  50. https://en.wikipedia.org/wiki/Digital_root my @big = 12345, 999999999999999999991; sub dr (UInt $n)

    { $n ≤ 9 ?? $n !! dr( $n.comb.sum ) } my @roots = @big.map(&dr); my @roots = @big».&dr; say @roots; # [6 1] 91
  51. my @big = 12345, 999999999999999999991; sub dr (UInt $n) {

    $n ≤ 9 ?? $n !! dr( $n.comb.sum ) } #my @roots = @big.map(&dr); my @roots = @big».&dr; say @roots; # [6 1] 92
  52. my @big = 12345, 999999999999999999991; my @roots = @big».&{ $_

    ≤ 9 ?? $_ !! &?BLOCK( .comb.sum ) }; say @roots; # [6 1] 93
  53. my @big = 12345, 999999999999999999991; my @roots = @big».&{ $_

    ≤ 9 ?? $_ !! &?BLOCK( .comb.sum ) }; say @roots; # [6 1] 94
  54. my @big = 12345, 999999999999999999991; my @roots = @big».&{ $_

    ≤ 9 ?? $_ !! &?BLOCK( .comb.sum ) }; say @roots; # [6 1] 95
  55. https://oeis.org/A104101 my @A = <4 8 15 16 23 42>;

    my @B = 4,8,15,16,23,42 ; my @C = +«<4 8 15 16 23 42>; say .map({.WHAT}) for @A, @B, @C; ((IntStr) (IntStr) (IntStr) (IntStr) (IntStr) (IntStr)) ((Int) (Int) (Int) (Int) (Int) (Int)) ((Int) (Int) (Int) (Int) (Int) (Int)) 101
  56. Powers and Factorials 7⁴ == 7 * 7 * 7

    * 7 7! == 1 * 2 * 3 * 4 * 5 * 6 * 7 104
  57. Rising and Falling Factorials 7⁴ == 7 * 7 *

    7 * 7 7! == 1 * 2 * 3 * 4 * 5 * 6 * 7 7⁴ == 7 * 8 * 9 * 10 == 5040 7⁴ == 7 * 6 * 5 * 4 == 840 105
  58. Rising and Falling Factorials sub rise($n,$p){ [*] $n .. ($n+$p-1)}

    sub rise($n,$p){ [*] $n ..^ ($n+$p)} sub fall($n,$p){ [*] ($n-$p) ^.. $n } sub rise($n,$p){ [*] ^$p + $n } sub fall($n,$p){ [*] ^(-$p) + $n } 7⁴ == 7 * 8 * 9 * 10 == 5040 7⁴ == 7 * 6 * 5 * 4 == 840 106
  59. Rising and Falling Factorials sub infix:<**^> ($x, $pow) { [*]

    $x «+« ^$pow } sub infix:<**v> ($x, $pow) { [*] $x «-« ^$pow } [*] 7 «-« ^$pow [*] 7 «-« ^4 [*] 7 «-« 0..3 [*] 7-0,7-1,7-2,7-3 [*] 7, 6, 5, 4 7 * 6 * 5 * 4 say 7 **^ 4; # 5040 say 7 **v 4; # 840 107
  60. https://glot.io/new/raku sub sqrt-of-sum-of-squares (@a) { my $sum = 0; for

    @a -> $n { ... } return $sum.sqrt; } use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; # Yes, exactly 9; What are the odds?! 110
  61. Exercise sub sqrt-of-sum-of-squares (@a) { my $sum = 0; for

    @a -> $n { $sum += $n * $n; } return $sum.sqrt; } use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; # Yes, exactly 9; What are the odds?! 111
  62. Exercise sub sqrt-of-sum-of-squares (@a) { my @squares; for @a ->

    $n { push @squares, $n * $n; } return @squares.sum.sqrt; } use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; 112
  63. Exercise sub sqrt-of-sum-of-squares (@a) { my @squares = gather for

    @a -> $n { take $n * $n; } return @squares.sum.sqrt; } use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; 113
  64. Exercise sub sqrt-of-sum-of-squares (@a) { my @squares = gather for

    @a { take $_ * $_; } return @squares.sum.sqrt; } use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; 114
  65. Exercise sub sqrt-of-sum-of-squares (@a) { my @squares = @a.map: {$_

    * $_}; return @squares.sum.sqrt; } use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; 115
  66. Exercise sub sqrt-of-sum-of-squares (@a) { return (@a X** 2).sum.sqrt; }

    use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; 116
  67. Exercise sub sqrt-of-sum-of-squares (@a) { return (@a »**» 2).sum.sqrt; }

    use Test; is sqrt-of-sum-of-squares([2, 4, 5, 6]), 9; 117
  68. Which when? 120 Code Depth Associative action Dup structure Magic

    Size Adjustments Sequential / Concurrent map 1 Whole item Seq No Sequential nodemap 1 Value only Yes (but itemizes?) No Sequential duckmap ???XXX Value only Yes No Sequential deepmap Max Value only Yes No Sequential hyper-ops .nodal ?? 1 !! Max Value only Yes Yes (In fi x and not Inward) Concurrent
  69. Which when? 121 Hyper Variant Op Examples Can shorten Can

    lengthen Method >>.method @a».uc @a>>.chars Post fi x, Postcircum fi x >>op @a»³ @a»++
 @a>>[5] Pre fi x op<< +«@a ~«@a ?<<@a Inward (Zip) >>op<< @a »+« @b No No Right (Scale) >>op>> @a »/« 10 * * Left
 (Scale) <<op<< 1 «/« (1..100) * * Outward <<op>> CENSORED No (List) Yes (Hash intersection) Yes (List) No (Hash intersection)
  70. my @a = ( (11,12), [13,14], (15,16) ), ( (21,22),

    [23,24], (25,26) ); .say for @a».rotate; .say for @a »+» 1; ([13 14] (15 16) (11 12)) ([23 24] (25 26) (21 22)) .rotate is nodal, so hyper only goes down 1 level ((12 13) [14 15] (16 17)) ((22 23) [24 25] (26 27)) `+` is not nodal, so every element incremented 123
  71. https://docs.raku.org/language/typesystem#trait_is_nodal trait is nodal Marks a List method to indicate

    to hyperoperator to not descend into inner Iterables to call this method. This trait generally isn't something end users would be using, unless they're subclassing or augmenting core List type. 124
  72. method `elems` is nodal method `Int` is not nodal my

    @a = (1.0, "2", 3e0), [^4], '5'; say @a».elems; # (3, 4, 1) say @a».Int; # ((1 2 3) [0 1 2 3] 5) 125
  73. for Str, Int, List, Array, Seq -> $type { my

    $b = $type.^methods.map(*.?nodal.so).Bag; say $type.^name.fmt("%-7s: "), $b.sort; } Str : (False => 79) Int : (False => 88) List : (False => 34 True => 39) Array : (False => 59 True => 55) Seq : (False => 24 True => 21) 126
  74. Subs default to max depth (not nodal) sub foo ()

    is nodal { … } sub bar () { … } say &foo.?nodal.so; # True say &bar.?nodal.so; # False 129
  75. sub case ($_) { $_ eq .uc ?? 1 !!

    $_ eq .lc ?? 3 !! 2 } sub print_methods_by_nodality ( Any:U $type ) { say "# Type: ", $type.^name; my %h = $type.^methods().classify: *.?nodal.so, :as{.name}; for %h.sort -> ( :key($nodal), :value(@names) ) { say "\n### ", $nodal; .say for @names.sort({ .&case, $_ }).squish; } } print_methods_by_nodality(List); # Output on next 2 pages 130
  76. True == Nodal Array Bag BagHash List Mix MixHash Set

    SetHash combinations permutations flat invert join list sum elems end sort reverse rotate pop push shift unshift head tail 132
  77. https://rosettacode.org/wiki/ Chebyshev_coef fi cients#Raku sub chebft ( Code $func, Real

    \a, Real \b, Int \n ) { my \bma = ½ * (b - a); my \bpa = ½ * (b + a); my @pi-n = ( ^n »+» ½ ) »*» (π/n); my @f = ( @pi-n».cos »*» bma »+» bpa )».&$func; my @sums = map { [+] @f »*« (@pi-n »*» $_)».cos }, ^n; return @sums »*» (2/n); } say chebft(&cos, 0, 1, 10).fmt: '%+13.7e'; 134
  78. https://rosettacode.org/wiki/ Chebyshev_coef fi cients#Raku sub chebft ( Code $func, Real

    $a, Real $b, Int $n ) { my @pi_n = ^$n »+» ½ »*» ( pi / $n ); my @C = ( @pi_n».cos »*» (½ * ( $b - $a )) »+» (½ * ( $b + $a )) )».$func; return (map { [+] @C »*« ( @pi_n »*» $_ )».cos }, ^$n) »*» ( 2 / $n ); } 135
  79. https://rosettacode.org/wiki/ Chebyshev_coef fi cients#Raku sub chebft ( Code $func, Real

    $a, Real $b, Int $n ) { my @pi_n = ^$n »+» ½ »*» ( pi / $n ); my \bma = ½ × (b - a); my \bpa = ½ × (b + a); my @C = ( @pi_n».cos »*» bma »+» bpa )».$func; return (map { [+] @C »*« ( @pi_n »*» $_ )».cos }, ^$n) »*» ( 2 / $n ); } 136
  80. https://en.wikipedia.org/wiki/ ISBN#ISBN-13_check_digit_calculation x₁ + 3x₂ + x₃ + 3x₄ +

    x₅ + 3x₆ + x₇ + 3x₈ + x₉ + 3x₁₀ + x₁₁ + 3x₁₂ + x₁₃ ≡ 0 (mod 10) (@digits Z* <1 3 1 3 1 3 1 3 1 3 1 3>).sum (@digits Z* |( (1,3) xx * ) ).sum (@digits »*» (1,3) ).sum 137
  81. https://en.wikipedia.org/wiki/ ISBN#ISBN-13_check_digit_calculation x₁ + 3x₂ + x₃ + 3x₄ +

    x₅ + 3x₆ + x₇ + 3x₈ + x₉ + 3x₁₀ + x₁₁ + 3x₁₂ + x₁₃ ≡ 0 (mod 10) [+] @digits Z* <1 3 1 3 1 3 1 3 1 3 1 3> [+] @digits Z* ( |(1,3) xx * ) [+] @digits »*» (1,3) 138
  82. my ( $s, $v ); $s = './sins'.IO.slurp.lines(); $v =

    './virtues'.IO.slurp.lines(); Osiris_sits_in_judgement($s, $v); 140
  83. my ( $s, $v ); $a1 = async { $s

    = './sins'.IO.slurp.lines(); } $a2 = async { $v = './virtues'.IO.slurp.lines(); } await $a1, $a2; Osiris_sits_in_judgement($s, $v); 141
  84. my ($s, $v) = await start { 'sins'.IO.slurp.lines() }, start

    { 'virtues'.IO.slurp.lines() }, ; my ($s, $v) = <sins virtues>.map: *.IO.slurp.lines(); Osiris_sits_in_judgement($s, $v); 142
  85. my ($s, $v) = await start { 'sins'.IO.slurp.lines() }, start

    { 'virtues'.IO.slurp.lines() }, ; my ($s, $v) = <sins virtues>.hyper.map: *.IO.slurp.lines(); Osiris_sits_in_judgement($s, $v); 143
  86. my ($s, $v) = await start { 'sins'.IO.slurp.lines() }, start

    { 'virtues'.IO.slurp.lines() }, ; my ($s, $v) = <sins virtues>.hyper( :degree(4), :batch(250) ).map: *.IO.slurp.lines(); Osiris_sits_in_judgement($s, $v); 144
  87. Copyright Information: Images • Camelia • © 2009 by Larry

    Wall
 http://github.com/perl6/mu/raw/master/misc/camelia.txt • Periodic Table of the Operators • © 2004, 2009 by Mark Lentczner
 https://www.ozonehouse.com/mark/periodic/ • Beer Barrel Keg Cask • by Steve Buissinne ; Free for use under the Pixabay Content License
 https://pixabay.com/photos/beer-barrel-keg-cask-oak-barrel-956322/
 https://pixabay.com/users/stevepb-282134/
 https://pixabay.com/service/terms/
  88. LICENSE • © 2025 Bruce Gray <[email protected]>
 This work is

    openly licensed under CC BY 4.0.
 https://creativecommons.org/licenses/by/4.0/
  89. Z

  90. my @a = "A".."D"; my @n = 1 .. 4;

    my @z = "W".."Z"; say [Z~] @a,@n,@z; say [»~«] @a,@n,@z; (A1W B2X C3Y D4Z) [A1W B2X C3Y D4Z] 151
  91. my @a = "A".."D"; my @n = 1 .. 3;

    my @z = "W".."Z"; say [Z~] @a,@n,@z; say [»~«] @a,@n,@z; (A1W B2X C3Y) 152
  92. my @a = "A".."D"; my @n = 1 .. 3;

    my @z = "W".."Z"; say [Z~] @a,@n,@z; say [»~«] @a,@n,@z; (A1W B2X C3Y) Lists on either side of non-dwimmy 153
  93. my @a = "A".."D"; my @n = 1 .. 3;

    my @z = "W".."Z"; say [Z~] @a,@n,@z; say [»~«] @a,@n,@z; (A1W B2X C3Y) Lists on either side of non-dwimmy hyperop of infix:<~> are not of the same length while recursing left: 4 elements, right: 3 elements 154
  94. my @a = 6, 9, 11, 13; my @diffs =

    @a.keys.skip .map({ [-] @a[$_, $_-1] }); @a.skip == 9, 11, 13 @a == 6, 9, 11, 13 subtract 3 2 2 . 156
  95. my @a = 6, 9, 11, 13; my @diffs =

    @a.skip Z- @a; @a.skip == 9, 11, 13 @a == 6, 9, 11, 13 subtract 3 2 2 . 157
  96. .say for <A B> X 1..3; (A 1) (A 2)

    (A 3) (B 1) (B 2) (B 3) 159