Slide 1

Slide 1 text

Raku, the Big
 The Perl and Raku Conference
 
 2021-06-09

Slide 2

Slide 2 text

Raku, the Big http://speakerdeck.com/util
 
 <<< >>> >>> <<<

Slide 3

Slide 3 text

Raku, the Big


Slide 4

Slide 4 text

Raku, the Big
 in Stories, Musings, and Song

Slide 5

Slide 5 text

Raku, the Big
 in Stories, Musings, and Song

Slide 6

Slide 6 text

Raku, the Big
 in Stories, Musings, and Code

Slide 7

Slide 7 text

Raku, the Big
 in Stories, Musings, and Code COVID Edition

Slide 8

Slide 8 text

/me
 
 Bruce Gray
 
 'Util'

Slide 9

Slide 9 text

Raku, the Big

Slide 10

Slide 10 text

big... what?

Slide 11

Slide 11 text

Big Deal?

Slide 12

Slide 12 text

Big Change?

Slide 13

Slide 13 text

Big Problem?

Slide 14

Slide 14 text

Next Big Thing?

Slide 15

Slide 15 text

Big Impact

Slide 16

Slide 16 text

Big Impact Big Grammar Footprint

Slide 17

Slide 17 text

YAPC::NA::2015

Slide 18

Slide 18 text

10% 80% 10% Changed Old Removed Perl ==> Raku

Slide 19

Slide 19 text

Boomeringue

Slide 20

Slide 20 text

LTA

Slide 21

Slide 21 text

Less Than Awesome

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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 ⏏

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

multi sub pretzel ( $dough ) { ... } multi sub pretzel ( $dough, $size ) { ... } sub pretzel ( $dough, $size? ) { if $size { ... } else { ... } }

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

my $apple_count = 3; my $apple_name1 = 'Red Delicious'; my $apple_name2 = 'Granny Smith'; say chars($apple_name1, $apple_name2);

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

https://www.ozonehouse.com/mark/ periodic/

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

^..^ ^ff^

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

Yo trabajo duro Como en madera y yeso

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

...

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

All your paradigms are belong to Perl

Slide 56

Slide 56 text

All your paradigms are belong to Raku

Slide 57

Slide 57 text

All your paradigms are belong to Raku Trans-paradigm Programming

Slide 58

Slide 58 text

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

Slide 59

Slide 59 text

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

Slide 60

Slide 60 text

???

Slide 61

Slide 61 text

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

Slide 62

Slide 62 text

TIMTOWTDI BSCINABTE

Slide 63

Slide 63 text

There’s more than one way to do it, but sometimes consistency is not a bad thing either.

Slide 64

Slide 64 text

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 }

Slide 65

Slide 65 text

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 }

Slide 66

Slide 66 text

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 }

Slide 67

Slide 67 text

Procedural OO Functional Arrow sub parameter list placeholders say put print rand .pick .roll

Slide 68

Slide 68 text

Procedural OO Functional Arrow sub parameter list placeholders say put print rand .pick .roll

Slide 69

Slide 69 text

Procedural OO Functional Arrow sub parameter list placeholders say put print rand .pick .roll

Slide 70

Slide 70 text

Procedural OO Functional Arrow sub parameter list placeholders say put print rand .pick .roll

Slide 71

Slide 71 text

Procedural OO Functional Arrow sub parameter list placeholders say put print rand .pick .roll

Slide 72

Slide 72 text

If we provide more than one way to do it, we should provide guidance on which way. -- Util

Slide 73

Slide 73 text

Disney Animal Kingdom Lodge

Slide 74

Slide 74 text

Set, Bag, Mix

Slide 75

Slide 75 text

lismat == Elizabeth Mattijsen Raku - Sets without Borders https://fosdem.org/2021/schedule/event/ raku_sets_without_borders/

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

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

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

S S S

Slide 82

Slide 82 text

S S S Shakespearean Solar System

Slide 83

Slide 83 text

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; }

Slide 84

Slide 84 text

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; }

Slide 85

Slide 85 text

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; }

Slide 86

Slide 86 text

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; }

Slide 87

Slide 87 text

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; }

Slide 88

Slide 88 text

sub was_planet_before_1700 ($planet) { my @p = qw; for my $p17 (@p) { return 1 if $planet eq $p17; } return 0; }

Slide 89

Slide 89 text

sub was_planet_before_1700 ($planet) { state @p = qw; for my $p17 (@p) { return 1 if $planet eq $p17; } return 0; }

Slide 90

Slide 90 text

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; }

Slide 91

Slide 91 text

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; }

Slide 92

Slide 92 text

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; }

Slide 93

Slide 93 text

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; }

Slide 94

Slide 94 text

sub was_planet_before_1700 ($planet) { state %p; $p{$_} = 1 for qw; return 1 if $p{$planet}; return 0; }

Slide 95

Slide 95 text

sub was_planet_before_1700 ($planet) { state %p = map { $_ => 1 } qw; return 1 if $p{$planet}; return 0; }

Slide 96

Slide 96 text

sub was_planet_before_1700 ($planet) { state %p = map { $_ => 1 }, qw; return 1 if %p{$planet}; return 0; }

Slide 97

Slide 97 text

sub was_planet_before_1700 ($planet) { state %p = map { $_ => 1 }, ; return 1 if %p{$planet}; return 0; }

Slide 98

Slide 98 text

sub was_planet_before_1700 ($planet) { state %p = map { $_ => 1 }, ; return True if %p{$planet}; return False; }

Slide 99

Slide 99 text

sub was_planet_before_1700 ($planet) { state %p = map { $_ => 1 }, ; return ? %p{$planet}; }

Slide 100

Slide 100 text

sub was_planet_before_1700 ($planet) { state %p = X=> 1; return ? %p{$planet}; }

Slide 101

Slide 101 text

sub was_planet_before_1700 ($planet) { state %p = X=> 1; return ? %p{$planet}; }

Slide 102

Slide 102 text

sub was_planet_before_1700 ($planet) { state $p = .Set; return $planet (elem) $p; }

Slide 103

Slide 103 text

sub was_planet_before_1700 ($planet) { constant $p = .Set; return $planet (elem) $p; }

Slide 104

Slide 104 text

sub was_planet_before_1700 ($planet) { constant $p = .Set; return $planet ∈ $p; }

Slide 105

Slide 105 text

sub was_planet_before_1700 ($planet) { constant $p = .Set; return $planet ∈ $p; }

Slide 106

Slide 106 text

sub was_planet_before_1700 ($planet) { constant $p = .Set; return $planet ∈ $p; }

Slide 107

Slide 107 text

say .Bag.raku; ("pear" => 1, "apple" => 3).Bag

Slide 108

Slide 108 text

say .Bag.raku; ("pear" => 1, "apple" => 3).Bag my %h; %h{$_}++ for ;

Slide 109

Slide 109 text

my %a = apple => 3; my %b = apple => 2, pear => 2;

Slide 110

Slide 110 text

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

Slide 111

Slide 111 text

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

Slide 112

Slide 112 text

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

Slide 113

Slide 113 text

Fractal Ferns

Slide 114

Slide 114 text

Fractal Ferns at Georgia Tech !

Slide 115

Slide 115 text

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

Slide 116

Slide 116 text

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');

Slide 117

Slide 117 text

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';

Slide 118

Slide 118 text

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';

Slide 119

Slide 119 text

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) } };

Slide 120

Slide 120 text

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) } };

Slide 121

Slide 121 text

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) } };

Slide 122

Slide 122 text

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) } };

Slide 123

Slide 123 text

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 ;

Slide 124

Slide 124 text

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 ), ;

Slide 125

Slide 125 text

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 ;

Slide 126

Slide 126 text

Wikipedia
 (You can tell from the footnote)

Slide 127

Slide 127 text

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

Slide 128

Slide 128 text

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

Slide 129

Slide 129 text

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) });

Slide 130

Slide 130 text

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) });

Slide 131

Slide 131 text

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

Slide 132

Slide 132 text

my $which_f = ($r <= 1) ?? 0 !! ($r <= 8) ?? 1 !! ($r <= 15) ?? 2 !! 3 ;

Slide 133

Slide 133 text

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) } };

Slide 134

Slide 134 text

say .Bag.raku; ("pear" => 1, "apple" => 3).Bag

Slide 135

Slide 135 text

my $r = 100.rand; my $which_f = ($r <= 1) ?? 0 !! ($r <= 8) ?? 1 !! ($r <= 15) ?? 2 !! 3 ;

Slide 136

Slide 136 text

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) });

Slide 137

Slide 137 text

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;

Slide 138

Slide 138 text

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 ); }

Slide 139

Slide 139 text

sf.pm.org

Slide 140

Slide 140 text

sf.pm.org doomvox == Joseph Brenner

Slide 141

Slide 141 text

2000-07-18 Coffee Mug Incident Now

Slide 142

Slide 142 text

2000-07-18 Coffee Mug Incident Now 21 years

Slide 143

Slide 143 text

Experts

Slide 144

Slide 144 text

Super-Experts

Slide 145

Slide 145 text

2000-07-18 Coffee Mug Incident Now 21 years

Slide 146

Slide 146 text

No content

Slide 147

Slide 147 text

No content

Slide 148

Slide 148 text

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

Slide 149

Slide 149 text

Curse of Knowledge

Slide 150

Slide 150 text

Curse of Knowledge https://en.wikipedia.org/wiki/Cognitive_bias https://en.wikipedia.org/wiki/List_of_cognitive_biases https://en.wikipedia.org/wiki/Curse_of_knowledge

Slide 151

Slide 151 text

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

Slide 152

Slide 152 text

The Sum of All Fears

Slide 153

Slide 153 text

The Sums of All Cubes

Slide 154

Slide 154 text

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

Slide 155

Slide 155 text

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

Slide 156

Slide 156 text

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…

Slide 157

Slide 157 text

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… X~

Slide 158

Slide 158 text

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

Slide 159

Slide 159 text

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…

Slide 160

Slide 160 text

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… [~] produces 'ABCD' [\~] produces [*] 1..5 = 120; [\*] 1..5 = 1, 2, 6, 24, 120; table of factorials

Slide 161

Slide 161 text

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…

Slide 162

Slide 162 text

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);

Slide 163

Slide 163 text

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);

Slide 164

Slide 164 text

"bigfile.txt".IO.lines.grep(/^a/).head(3);

Slide 165

Slide 165 text

Q&A

Slide 166

Slide 166 text

Raku, the Big http://speakerdeck.com/util
 
 <<< >>> >>> <<<

Slide 167

Slide 167 text

Raku, the Big http://speakerdeck.com/util
 
 <<< >>> >>> <<<

Slide 168

Slide 168 text

Thanks!

Slide 169

Slide 169 text

Copyrights

Slide 170

Slide 170 text

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

Slide 171

Slide 171 text

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)

Slide 172

Slide 172 text

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