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

Raku, the Big

Raku, the Big

The Swiss-Army Chainsaw of Perl is now the full carpentry shop of Raku.
Which new tools are the Shiniest? Sharpest? Most-likely-to-cut-you-est?
Should other languages be inspired, or warned by its evolution?
Come see how the power of the 100-year language moved it from Perl 6.0 to First-of-its-Name.

Multiple paradigms, chained data flows, Types, Sets, Lazy Lists, Async.
Lurking among the many additions are a few key bits, that take Raku from Wow to Whoa!
Those bits also trigger most of the divergence from old mindsets and Perl solutions.

All the new moving parts fit like clockwork! Success!
But more tools, working together in new ways, means more to teach. Far more than was planned for.

Also relevant to Perl 7, and any other languages planning a growth phase.

Bruce Gray

June 08, 2021
Tweet

More Decks by Bruce Gray

Other Decks in Programming

Transcript

  1. LTA

  2. raku -e 'sub abcde {...}; say abbde(); '; ===SORRY!=== Error

    while compiling -e Undeclared routine: abbde used at line 2. Did you mean 'abcde'?
  3. raku -e 'sub abcde {...}; say abbde(); '; ===SORRY!=== Error

    while compiling -e Undeclared routine: abbde used at line 2. Did you mean 'abcde'?
  4. raku -e 'say 42 * ( 3 + 2 '

    ===SORRY!=== Error while compiling -e Unable to parse expression in parenthesized expression; couldn't find final ')'
 (corresponding starter was at line 1) at -e:1 ------> say 42 * ( 3 + 2 ⏏<EOL>
  5. multi sub pretzel ( $dough ) { ... } multi

    sub pretzel ( $dough, $size ) { ... }
  6. multi sub pretzel ( $dough ) { ... } multi

    sub pretzel ( $dough, $size ) { ... } sub pretzel ( $dough, $size? ) { if $size { ... } else { ... } }
  7. my Int $apple_count = 3; my Str $apple_name1 = 'Red

    Delicious'; my Str $apple_name2 = 'Granny Smith';
  8. my $apple_count = 3; my $apple_name1 = 'Red Delicious'; my

    $apple_name2 = 'Granny Smith'; say chars($apple_name1, $apple_name2);
  9. say chars($apple_name1, $apple_name2); Calling chars(Mu, Mu) will never work with

    any of these multi signatures: (Cool $x) (Str:D $x) (str $x --> int) at line 4
  10. say chars($apple_name1, $apple_name2); Calling chars(Mu, Mu) will never work with

    any of these multi signatures: (Cool $x) (Str:D $x) (str $x --> int) at line 4
  11. say chars($apple_name1, $apple_name2); Calling chars(Mu, Mu) will never work with

    any of these multi signatures: (Cool $x) (Str:D $x) (str $x --> int) at line 4
  12. <g fill="none" stroke="green" stroke-width="1"> <circle cx="500" cy="500" r="1" /> <circle

    cx="500" cy="500" r="2" /> ... <circle cx="500" cy="500" r="24" /> <circle cx="500" cy="500" r="25" />
  13. All your paradigms are belong to Raku You have no

    chance to survive make your time.
  14. All your paradigms are belong to Raku You have no

    chance to survive make your time.
  15. ???

  16. T I M T O W T D I h

    s o h n a o o t e r a e y r e n e
  17. There’s more than one way to do it, but sometimes

    consistency is not a bad thing either.
  18. my $variable versus my \variable @, %, $ (singular/plural) versus

    $ (everything is singular) if else versus ?? !! ternary >>. versus map | Slip versus flat Sort 1-arity versus Sort 2-arity >>op<< versus Zop >>op>> versus Xop .rotor versus .batch .subst( :g, $char, $char ) versus .trans( $char => $char ) .cache versus [] bar($foo,2,3) versus $foo.&bar(2,3) die versus fail $o.method($arg); versus $o.method: $arg; @a.first: * > 5 versus @a.first: { $_ > 5 }
  19. my $variable versus my \variable @, %, $ (singular/plural) versus

    $ (everything is singular) if else versus ?? !! ternary >>. versus map | Slip versus flat Sort 1-arity versus Sort 2-arity >>op<< versus Zop >>op>> versus Xop .rotor versus .batch .subst( :g, $char, $char ) versus .trans( $char => $char ) .cache versus [] bar($foo,2,3) versus $foo.&bar(2,3) die versus fail $o.method($arg); versus $o.method: $arg; @a.first: * > 5 versus @a.first: { $_ > 5 }
  20. my $variable versus my \variable @, %, $ (singular/plural) versus

    $ (everything is singular) if else versus ?? !! ternary >>. versus map | Slip versus flat Sort 1-arity versus Sort 2-arity >>op<< versus Zop >>op>> versus Xop .rotor versus .batch .subst( :g, $char, $char ) versus .trans( $char => $char ) .cache versus [] bar($foo,2,3) versus $foo.&bar(2,3) die versus fail $o.method($arg); versus $o.method: $arg; @a.first: * > 5 versus @a.first: { $_ > 5 }
  21. If we provide more than one way to do it,

    we should provide guidance on which way. -- Util
  22. Set Operators ∪ (|) Union ∩ (&) Intersection ∖ (-)

    Set difference ⊖ (^) Symmetric set difference ∈ ∉ (elem) $a is an element of $b ∋ ∌ (cont) $a contains $b ⊆ ⊈ (<=) $a is a subset of or is equal to $b ⊂ ⊄ (<) $a is a strict subset of $b ⊇ ⊉ (>=) $a is a superset of or is equal to $b ⊃ ⊅ (>) $a is a strict superset of $b ≡ ≢ (==) $a and $b are identical
  23. sub was_planet_before_1700 { my ($planet) = @_; return 1 if

    $planet eq 'Mercury' or $planet eq 'Venus' or $planet eq 'Earth' or $planet eq 'Mars' or $planet eq 'Jupiter' or $planet eq 'Saturn'; return 0; }
  24. sub was_planet_before_1700 { return 1 if $planet eq 'Mercury' or

    $planet eq 'Venus' or $planet eq 'Earth' or $planet eq 'Mars' or $planet eq 'Jupiter' or $planet eq 'Saturn'; return 0; }
  25. sub was_planet_before_1700 ($planet) { return 1 if $planet eq 'Mercury'

    or $planet eq 'Venus' or $planet eq 'Earth' or $planet eq 'Mars' or $planet eq 'Jupiter' or $planet eq 'Saturn'; return 0; }
  26. sub was_planet_before_1700 ($planet) { my @p = ('Mercury', 'Venus', 'Earth',

    'Mars', 'Jupiter', 'Saturn'); for my $p17 (@p) { return 1 if $planet eq $p17; } return 0; }
  27. sub was_planet_before_1700 ($planet) { my @p = qw( Mercury Venus

    Earth Mars Jupiter Saturn ); for my $p17 (@p) { return 1 if $planet eq $p17; } return 0; }
  28. sub was_planet_before_1700 ($planet) { my @p = qw<Mercury Venus Earth

    Mars Jupiter Saturn>; for my $p17 (@p) { return 1 if $planet eq $p17; } return 0; }
  29. sub was_planet_before_1700 ($planet) { state @p = qw<Mercury Venus Earth

    Mars Jupiter Saturn>; for my $p17 (@p) { return 1 if $planet eq $p17; } return 0; }
  30. sub was_planet_before_1700 ($planet) { state %p = ( 'Mercury' =>

    undef, 'Venus' => undef, 'Earth' => undef, 'Mars' => undef, 'Jupiter' => undef, 'Saturn' => undef, ); return 1 if exists $p{$planet}; return 0; }
  31. sub was_planet_before_1700 ($planet) { state %p = ( 'Mercury' =>

    1, 'Venus' => 1, 'Earth' => 1, 'Mars' => 1, 'Jupiter' => 1, 'Saturn' => 1, ); return 1 if exists $p{$planet}; return 0; }
  32. sub was_planet_before_1700 ($planet) { state %p = ( 'Mercury' =>

    1, 'Venus' => 1, 'Earth' => 1, 'Mars' => 1, 'Jupiter' => 1, 'Saturn' => 1, ); return 1 if $p{$planet}; return 0; }
  33. sub was_planet_before_1700 ($planet) { state %p = ( Mercury =>

    1, Venus => 1, Earth => 1, Mars => 1, Jupiter => 1, Saturn => 1, ); return 1 if $p{$planet}; return 0; }
  34. sub was_planet_before_1700 ($planet) { state %p; $p{$_} = 1 for

    qw<Mercury Venus Earth Mars Jupiter Saturn>; return 1 if $p{$planet}; return 0; }
  35. sub was_planet_before_1700 ($planet) { state %p = map { $_

    => 1 } qw<Mercury Venus Earth Mars Jupiter Saturn>; return 1 if $p{$planet}; return 0; }
  36. sub was_planet_before_1700 ($planet) { state %p = map { $_

    => 1 }, qw<Mercury Venus Earth Mars Jupiter Saturn>; return 1 if %p{$planet}; return 0; }
  37. sub was_planet_before_1700 ($planet) { state %p = map { $_

    => 1 }, <Mercury Venus Earth Mars Jupiter Saturn>; return 1 if %p{$planet}; return 0; }
  38. sub was_planet_before_1700 ($planet) { state %p = map { $_

    => 1 }, <Mercury Venus Earth Mars Jupiter Saturn>; return True if %p{$planet}; return False; }
  39. sub was_planet_before_1700 ($planet) { state %p = map { $_

    => 1 }, <Mercury Venus Earth Mars Jupiter Saturn>; return ? %p{$planet}; }
  40. sub was_planet_before_1700 ($planet) { state %p = <Mercury Venus Earth

    Mars Jupiter Saturn> X=> 1; return ? %p{$planet}; }
  41. sub was_planet_before_1700 ($planet) { state %p = <Mercury Venus Earth

    Mars Jupiter Saturn> X=> 1; return ? %p{$planet}; }
  42. sub was_planet_before_1700 ($planet) { state $p = <Mercury Venus Earth

    Mars Jupiter Saturn>.Set; return $planet (elem) $p; }
  43. sub was_planet_before_1700 ($planet) { constant $p = <Mercury Venus Earth

    Mars Jupiter Saturn>.Set; return $planet (elem) $p; }
  44. sub was_planet_before_1700 ($planet) { constant $p = <Mercury Venus Earth

    Mars Jupiter Saturn>.Set; return $planet ∈ $p; }
  45. sub was_planet_before_1700 ($planet) { constant $p = <Mercury Venus Earth

    Mars Jupiter Saturn>.Set; return $planet ∈ $p; }
  46. sub was_planet_before_1700 ($planet) { constant $p = <Mercury Venus Earth

    Mars Jupiter Saturn>.Set; return $planet ∈ $p; }
  47. say <apple apple apple pear>.Bag.raku; ("pear" => 1, "apple" =>

    3).Bag my %h; %h{$_}++ for <apple apple apple pear>;
  48. my %a = apple => 3; my %b = apple

    => 2, pear => 2; dd %a.Bag (+) %b.Bag; # ( "apple" => 5, "pear" => 2 ).Bag
  49. my %a = apple => 3; my %b = apple

    => 2, pear => 2; dd %a.Bag (+) %b.Bag; # ( "apple" => 5, "pear" => 2 ).Bag dd %a.Bag (&) %b.Bag; # ( "apple" => 2 ).Bag
  50. my %a = apple => 3; my %b = apple

    => 2, pear => 2; dd %a.Bag (+) %b.Bag; # ( "apple" => 5, "pear" => 2 ).Bag dd %a.Bag (&) %b.Bag; # ( "apple" => 2 ).Bag dd %a.Bag (|) %b.Bag; # ( "apple" => 3, "pear" => 2 ).Bag
  51. Barnsley fern ƒ1 (chosen 1% of the time) xn =

    0 yn = 0.16 y ƒ2 (chosen 85% of the time) xn = 0.85 x + 0.04 y yn = −0.04 x + 0.85 y + 1.6 ƒ3 (chosen 7% of the time) xn = 0.2 x − 0.26 y yn = 0.23 x + 0.22 y + 1.6 ƒ4 (chosen 7% of the time) xn = −0.15 x + 0.28 y yn = 0.26 x + 0.24 y + 0.44
  52. use Imager; my $w = 640; my $h = 640;

    my $img = Imager->new(xsize => $w, ysize => $h, channels => 3); my $green = Imager::Color->new('#00FF00'); my ($x, $y) = (0, 0); foreach (1 .. 2e5) { my $r = rand(100); ($x, $y) = do { if ($r <= 1) { ( 0.00 * $x - 0.00 * $y, 0.00 * $x + 0.16 * $y + 0.00) } elsif ($r <= 8) { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } elsif ($r <= 15) { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } else { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } }; $img->setpixel(x => $w / 2 + $x * 60, y => $y * 60, color => $green); } $img->flip(dir => 'v'); $img->write(file => 'barnsleyFern.png');
  53. use Image::PNG::Portable; my ($w, $h) = (640, 640); my $png

    = Image::PNG::Portable.new: :width($w), :height($h); my ($x, $y) = (0, 0); for ^2e5 { my $r = 100.rand; ($x, $y) = do given $r { when $r <= 1 { ( 0, 0.16 * $y ) } when $r <= 8 { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } when $r <= 15 { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } default { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } }; $png.set(($w / 2 + $x * 60).Int, $h - ($y * 60).Int, 0, 255, 0); } $png.write: 'Barnsley-fern-perl6.png';
  54. use Image::PNG::Portable; my ($w, $h) = 640, 640; my $png

    = Image::PNG::Portable.new: :width($w), :height($h); my ($x, $y) = 0, 0; for ^2e5 { my $r = 100.rand; ($x, $y) = do given $r { when $r <= 1 { ( 0, 0.16 * $y ) } when $r <= 8 { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } when $r <= 15 { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } default { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } }; $png.set(($w / 2 + $x * 60).Int, $h - ($y * 60).Int, 0, 255, 0); } $png.write: 'Barnsley-fern-perl6.png';
  55. my $r = 100.rand; ($x, $y) = do given $r

    { when $r <= 1 { ( 0, 0.16 * $y ) } when $r <= 8 { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } when $r <= 15 { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } default { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } };
  56. my $r = 100.rand; ($x, $y) = do given $r

    { when $r <= 1 { ( 0, 0.16 * $y ) } when $r <= 8 { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } when $r <= 15 { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } default { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } };
  57. my $r = 100.rand; ($x, $y) = do given $r

    { when $r <= 1 { ( 0, 0.16 * $y ) } when $r <= 8 { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } when $r <= 15 { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } default { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } };
  58. my $r = 100.rand; ($x, $y) = do given $r

    { when $r <= 1 { ( 0, 0.16 * $y ) } when $r <= 8 { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } when $r <= 15 { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } default { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } };
  59. my $r = 100.rand; my ($a, $b, $c, $d, $e)

    = do given $r { when $r <= 1 { ( 0 , 0 , 0 , 0.16, 0 ) } when $r <= 8 { ( 0.20, -0.26, 0.23, 0.22, 1.60) } when $r <= 15 { (-0.15, 0.28, 0.26, 0.24, 0.44) } default { ( 0.85, 0.04, -0.04, 0.85, 1.60) } }; ($x, $y) = $a * $x + $b * $y , $c * $x + $d * $y + $e ;
  60. constant @f = ( 0 , 0 , 0 ,

    0.16, 0 ), ( 0.20, -0.26, 0.23, 0.22, 1.60 ), ( -0.15, 0.28, 0.26, 0.24, 0.44 ), ( 0.85, 0.04, -0.04, 0.85, 1.60 ), ;
  61. my $r = 100.rand; my $which_f = ($r <= 1)

    ?? 0 !! ($r <= 8) ?? 1 !! ($r <= 15) ?? 2 !! 3 ; my ($a, $b, $c, $d, $e) = @f[$which_f]; ($x, $y) = $a * $x + $b * $y , $c * $x + $d * $y + $e ;
  62. my $wp_table = qq:to/END/; w a b c d e

    f p Portion generated ƒ1 0 0 0 0.16 0 0 0.01 Stem ƒ2 0.85 0.04 -0.04 0.85 0 1.60 0.85 Successively smaller leaflets ƒ3 0.20 -0.26 0.23 0.22 0 1.60 0.07 Largest left-hand leaflet ƒ4 -0.15 0.28 0.26 0.24 0 0.44 0.07 Largest right-hand leaflet END
  63. my $wp_table = qq:to/END/; w a b c d e

    f p Portion generated ƒ1 0 0 0 0.16 0 0 0.01 Stem ƒ2 0.85 0.04 -0.04 0.85 0 1.60 0.85 Successively smaller leaflets ƒ3 0.20 -0.26 0.23 0.22 0 1.60 0.07 Largest left-hand leaflet ƒ4 -0.15 0.28 0.26 0.24 0 0.44 0.07 Largest right-hand leaflet END
  64. my $wp_table = qq:to/END/; w a b c d e

    f p Portion generated ƒ1 0 0 0 0.16 0 0 0.01 Stem ƒ2 0.85 0.04 -0.04 0.85 0 1.60 0.85 Successively smaller leaflets ƒ3 0.20 -0.26 0.23 0.22 0 1.60 0.07 Largest left-hand leaflet ƒ4 -0.15 0.28 0.26 0.24 0 0.44 0.07 Largest right-hand leaflet END my @AoA = $wp_table.lines .map({ .trim.words(8) });
  65. my $wp_table = qq:to/END/; w a b c d e

    f p Portion generated ƒ1 0 0 0 0.16 0 0 0.01 Stem ƒ2 0.85 0.04 -0.04 0.85 0 1.60 0.85 Successively smaller leaflets ƒ3 0.20 -0.26 0.23 0.22 0 1.60 0.07 Largest left-hand leaflet ƒ4 -0.15 0.28 0.26 0.24 0 0.44 0.07 Largest right-hand leaflet END my @AoA = $wp_table.lines .map({ .trim.words(8) });
  66. Barnsley fern ƒ1 (chosen 1% of the time) xn =

    0 yn = 0.16 y ƒ2 (chosen 85% of the time) xn = 0.85 x + 0.04 y yn = −0.04 x + 0.85 y + 1.6 ƒ3 (chosen 7% of the time) xn = 0.2 x − 0.26 y yn = 0.23 x + 0.22 y + 1.6 ƒ4 (chosen 7% of the time) xn = −0.15 x + 0.28 y yn = 0.26 x + 0.24 y + 0.44
  67. my $which_f = ($r <= 1) ?? 0 !! ($r

    <= 8) ?? 1 !! ($r <= 15) ?? 2 !! 3 ;
  68. my $r = 100.rand; ($x, $y) = do given $r

    { when $r <= 1 { ( 0, 0.16 * $y ) } when $r <= 8 { ( 0.20 * $x - 0.26 * $y, 0.23 * $x + 0.22 * $y + 1.60) } when $r <= 15 { (-0.15 * $x + 0.28 * $y, 0.26 * $x + 0.24 * $y + 0.44) } default { ( 0.85 * $x + 0.04 * $y, -0.04 * $x + 0.85 * $y + 1.60) } };
  69. my $r = 100.rand; my $which_f = ($r <= 1)

    ?? 0 !! ($r <= 8) ?? 1 !! ($r <= 15) ?? 2 !! 3 ;
  70. my $wp_table = qq:to/END/; w a b c d e

    f p Portion generated ƒ1 0 0 0 0.16 0 0 0.01 Stem ƒ2 0.85 0.04 -0.04 0.85 0 1.60 0.85 Successively smaller leaflets ƒ3 0.20 -0.26 0.23 0.22 0 1.60 0.07 Largest left-hand leaflet ƒ4 -0.15 0.28 0.26 0.24 0 0.44 0.07 Largest right-hand leaflet END my @AoA = $wp_table.lines .map({ .trim.words(8) });
  71. my $wp_table = qq:to/END/; w a b c d e

    f p Portion generated ƒ1 0 0 0 0.16 0 0 0.01 Stem ƒ2 0.85 0.04 -0.04 0.85 0 1.60 0.85 Successively smaller leaflets ƒ3 0.20 -0.26 0.23 0.22 0 1.60 0.07 Largest left-hand leaflet ƒ4 -0.15 0.28 0.26 0.24 0 0.44 0.07 Largest right-hand leaflet END my @AoA = $wp_table.lines .map({ .trim.words(8) }); my Mix $weighted_table = @AoA.skip.map({ $_ => .[7] }).Mix;
  72. for ^2e5 { my (\w,\a,\b,\c,\d,\e,\f) = $weighted_table.roll.list; ($x, $y) =

    a * $x + b * $y + e, c * $x + d * $y + f; $png.set( ($width / 2 + $x * 60).floor, ($height - $y * 60).floor, 0, 255, 0 ); }
  73. say chars($apple_name1, $apple_name2); Calling chars(Mu, Mu) will never work with

    any of these multi signatures: (Cool $x) (Str:D $x) (str $x --> int) at line 4
  74. All I Really Need To Know About
 Cognitive Bias I

    Learned in HPMoR https://en.wikipedia.org/wiki/Cognitive_bias https://en.wikipedia.org/wiki/List_of_cognitive_biases https://en.wikipedia.org/wiki/Curse_of_knowledge
  75. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); 0 1 9 36 100 225 441 784 1296 2025 3025 4356 6084 8281 11025 14400 18496 23409 29241 36100 44100 53361 64009 76176 90000 105625 123201 142884 164836 189225 216225 246016 278784 314721 354025 396900 443556 494209 549081 608400 672400 741321 815409 894916 980100 1071225 1168561 1272384 1382976 1500625
  76. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); ^4 # 0, 1, 2, 3
  77. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5…
  78. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5… <Blue Red Green> X~ <Car Truck> <BlueCar BlueTruck RedCar RedTruck GreenCar GreenTruck>
  79. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5… (2, 3) X** 3 # 8, 27
  80. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5… my @all_cubes = @all_integers X** 3; # 0, 1, 8, 27, 64, 125…
  81. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5… my @all_cubes = @all_integers X** 3; # 0, 1, 8, 27, 64, 125… [~] <A B C D> produces 'ABCD' [\~] <A B C D> produces <A AB ABC ABCD> [*] 1..5 = 120; [\*] 1..5 = 1, 2, 6, 24, 120; table of factorials
  82. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5… my @all_cubes = @all_integers X** 3; # 0, 1, 8, 27, 64, 125… my @sums_of_all_cubes = [\+] @all_cubes; # 0, 1, 9, 36, 100, 225…
  83. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5… my @all_cubes = @all_integers X** 3; # 0, 1, 8, 27, 64, 125… my @sums_of_all_cubes = [\+] @all_cubes; # 0, 1, 9, 36, 100, 225… my @sums_of_fifty_cubes = @sums_of_all_cubes.head(50);
  84. my @sums_of_all_cubes = [\+] ^Inf X** 3; say .fmt('%7d') for

    @sums_of_all_cubes.head(50).batch(10); my @all_integers = ^Inf; # 0, 1, 2, 3, 4, 5… my @all_cubes = @all_integers X** 3; # 0, 1, 8, 27, 64, 125… my @sums_of_all_cubes = [\+] @all_cubes; # 0, 1, 9, 36, 100, 225… my @sums_of_fifty_cubes = @sums_of_all_cubes.head(50); say .fmt('%7d') for @sums_of_fifty_cubes.batch(10);
  85. Q&A

  86. Copyright Information: Images • Camelia • (c) 2009 by Larry

    Wall
 http://github.com/perl6/mu/raw/master/misc/ camelia.txt • Periodic Table of the Operators • (c) 2004, 2009 by Mark Lentczner
 https://www.ozonehouse.com/mark/periodic/ • Boomeringue • Dave Coverly
 http://speedbump.com/ • Zii and the Troublemakers • (In the style of Josie and the Pussycats)
 by @GiseleLagace (art)
 and @shourimajo (color)
 http://www.ma3comic.com/strips-ma3/ zii_and_the_troublemakers
  87. Copyright Information: This Talk This work is licensed under a

    Creative Commons Attribution 4.0 International License. CC BY https://creativecommons.org/licenses/by/4.0/ (email me for the original Apple Keynote .key file)
  88. History • v 1.00 2021-05-06
 Previewed at Atlanta PerlMongers
 •

    v 1.10 2021-06-08
 Presented final version to The Perl and Raku Conference in the Cloud