an implementation of perl 6 · 2008. 10. 5. · “official perl 6” anything that passes the...

424
Pugs an implementation of Perl 6 Audrey Tang 1

Upload: others

Post on 27-Apr-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Pugsan implementation of

Perl6

AudreyTang1

Page 2: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

≝2

Page 3: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Pugs...

3

Page 4: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Pugs...

≝ Perl6Compiler

3

Page 5: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Pugs...

≝ Perl6Compiler

≝ Perl6Runtime

3

Page 6: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Pugs...

≝ Perl6Compiler

≝ Perl6Runtime

≝ Perl6TestSuite

3

Page 7: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

4

Page 8: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

5

Page 9: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6

Page 10: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

7

Page 11: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

✓8

Page 12: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Perl6Code

9

Page 13: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Perl6Code

✓ 120+Modules

9

Page 14: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Perl6Code

✓ 120+Modules

✓ 160+Examples

9

Page 15: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Perl6Code

✓ 120+Modules

✓ 160+Examples

✓ 18,000+UnitTests

9

Page 16: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“OfficialPerl6”

10

Page 17: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“OfficialPerl6”

✓ Anythingthatpassestheofficialtestsuite

10

Page 18: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“OfficialPerl6”

✓ Anythingthatpassestheofficialtestsuite

✓ Definedbysemantics,notbyaccidentsofhistory

10

Page 19: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Test⇔Spec

✓11

Page 20: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

⇚12

Page 21: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Perl,circa1995

13

Page 22: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use5.000;

Perl,circa1995

13

Page 23: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use5.000;• require'fastcwd.pl';

Perl,circa1995

13

Page 24: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use5.000;• require'fastcwd.pl';• require'newgetopt.pl';

Perl,circa1995

13

Page 25: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use5.000;• require'fastcwd.pl';• require'newgetopt.pl';• require'exceptions.pl';

Perl,circa1995

13

Page 26: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Perl,circa2005

14

Page 27: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use v6-alpha;

Perl,circa2005

14

Page 28: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use v6-alpha;• use perl5:DBI;

Perl,circa2005

14

Page 29: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use v6-alpha;• use perl5:DBI;• use perl5:Encode <encode decode>;

Perl,circa2005

14

Page 30: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use v6-alpha;• use perl5:DBI;• use perl5:Encode <encode decode>;• use perl5:Template;

Perl,circa2005

14

Page 31: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• use v6-alpha;• use perl5:DBI;• use perl5:Encode <encode decode>;• use perl5:Template;

• # Implementation of "fork"eval "fork()" :lang<perl5>;

Perl,circa2005

14

Page 32: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

DualCorePugs

Pugs::RuntimePugs::CompilerPugs::Grammar

Pugs.EvalPugs.Prim

Pugs.Types

Perl 5

Runtime

GHC

Runtime

15

Page 33: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

⇛16

Page 34: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PugsIntermediateLanguage

17

Page 35: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Backends

18

Page 36: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Backends

⇛ Perl5

18

Page 37: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Backends

⇛ Perl5

⇛ Parrot

18

Page 38: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Backends

⇛ Perl5

⇛ Parrot

⇛ JavaScript

18

Page 39: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

19

Page 40: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

䷗20

Page 41: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6.0Primitives

21

Page 42: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6.2Functions

22

Page 43: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6.28Objects

23

Page 44: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6.283Grammars

24

Page 45: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6.2831Types

25

Page 46: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6.28318Macros

26

Page 47: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

6.283185SelfHosting

27

Page 48: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2πPerl6!☯

28

Page 49: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

≠29

Page 50: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“FrivolousToyinterpreter”(asseenonSlashdot)

30

Page 51: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“FrivolousToyinterpreter”

31

Page 52: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“FrivolousToyinterpreter”

32

Page 53: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“Toyinterpreter”

33

Page 54: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“Toyinterpreter”

34

Page 55: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“Toy”35

Page 56: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

-Ofun36

Page 57: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

☺37

Page 58: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Arrowlength

Time

14400+commits

240+committers

38

Page 59: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

TestDriven

39

Page 60: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

TestDriven

☺Bugreport➟Test

39

Page 61: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

TestDriven

☺Bugreport➟Test

☺SmokeServer

39

Page 62: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

TestDriven

☺Bugreport➟Test

☺SmokeServer

☺:todo<unspecced>

39

Page 63: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Anarchistic

40

Page 64: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Anarchistic

☺10+languages

40

Page 65: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Anarchistic

☺10+languages

☺30+sub‐projects

40

Page 66: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Anarchistic

☺10+languages

☺30+sub‐projects

☺Fastfeedbackloop

40

Page 67: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PatchesWelcome?

41

Page 68: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

CommitsWelcome!

42

Page 69: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

✆43

Page 70: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

irc.freenode.net#perl6

44

Page 71: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

λCamels

45

Page 72: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

λCamels

✆ 200+People

45

Page 73: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

λCamels

✆ 200+People✆ 20+Regulars

45

Page 74: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

λCamels

✆ 200+People✆ 20+Regulars✆ TimToady++

45

Page 75: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

svnbot6

46

Page 76: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

evalbot6

47

Page 77: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

lambdabot

48

Page 78: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

IRC.pugscode.org

49

Page 79: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Blog.pugscode.org

50

Page 80: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Run.pugscode.org

51

Page 81: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Smoke.pugscode.org

52

Page 82: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Spec.pugscode.org

53

Page 83: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

MailingLists

54

Page 84: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

MailingLists

✆ perl6‐users

54

Page 85: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

MailingLists

✆ perl6‐users

✆ perl6‐language

54

Page 86: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

MailingLists

✆ perl6‐users

✆ perl6‐language

✆ perl6‐compiler

54

Page 87: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Repositories

55

Page 88: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

http://svn.openfoundry.org/pugs/

Repositories

55

Page 89: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

http://svn.openfoundry.org/pugs/

http://perlcabal.org/~audreyt/darcs/pugs/

Repositories

55

Page 90: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

http://svn.openfoundry.org/pugs/

http://perlcabal.org/~audreyt/darcs/pugs/

SVK

Repositories

55

Page 91: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♨56

Page 92: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Erdösing

57

Page 93: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Erdösing

♨ 2006..*

57

Page 94: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons

58

Page 95: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

58

Page 96: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

58

Page 97: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

58

Page 98: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

58

Page 99: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

58

Page 100: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

58

Page 101: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

58

Page 102: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

58

Page 103: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

♨ Tokyo

58

Page 104: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

♨ Tokyo

♨ Redmond

58

Page 105: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

♨ Tokyo

♨ Redmond

♨ Chicago

58

Page 106: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

♨ Tokyo

♨ Redmond

♨ Chicago

♨ Boston

58

Page 107: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

♨ Tokyo

♨ Redmond

♨ Chicago

♨ Boston

♨ Portland

58

Page 108: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

♨ Tokyo

♨ Redmond

♨ Chicago

♨ Boston

♨ Portland

♨ SaoPaulo

58

Page 109: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Hackathons♨ Taipei

♨ Vienna

♨ Toronto

♨ Amsterdam

♨ Echt

♨ Lismore

♨ Mt.Arbel

♨ Vienna2

♨ Tokyo

♨ Redmond

♨ Chicago

♨ Boston

♨ Portland

♨ SaoPaulo

♨ ...andmore!

58

Page 110: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ℙ59

Page 111: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Practical

60

Page 112: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

61

Page 113: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

62

Page 114: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

63

Page 115: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

64

Page 116: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

65

Page 117: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

66

Page 118: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

67

Page 119: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

68

Page 120: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

69

Page 121: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

∀70

Page 122: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Abstractions➥Sexy

71

Page 123: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Closuressubmake_counter{my$start=shift;returnsub{++$start};}my$from_ten=make_counter(10);my$from_three=make_counter(3);print$from_three‐>();#4print$from_three‐>();#5print$from_ten‐>();#11

72

Page 124: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

TieuseTie::Google;tiemy%search=>'Tie::Google';

for(@{$search{'PerlPugs'}}){print"*$_‐>{title}‐$_‐>{URL}\n";}

73

Page 125: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Abstractions++

74

Page 126: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Abstractions++

∀ bless()

74

Page 127: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Abstractions++

∀ bless()

∀ IOLayers

74

Page 128: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Abstractions++

∀ bless()

∀ IOLayers

∀ BEGIN{...}

74

Page 129: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

S75

Page 130: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shorthands➥Natural

76

Page 131: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

DeCSS

s''$/=\2048;while(<>){G=29;R=142;if((@a=unqT="C*",_)[20]&48){D=89;_=unqb24,qT,@b=map{ordqB8,unqb8,qT,_^$a[‐‐D]}@INC;s/...$/1$&/;Q=unqV,qb25,_;H=73;O=$b[4]<<9|256|$b[3];Q=Q>>8^(P=(E=255)&(Q>>12^Q>>4^Q/8^Q))<<17,O=O>>8^(E&(F=(S=O>>14&7^O)^S*8^S<<6))<<9,_=(map{U=_%16orE^=R^=110&(S=(unqT,"\xb\ntd\xbz\x14d")[_/16%8]);E^=(72,@z=(64,72,G^=12*(U‐2?0:S&17)),H^=_%64?12:0,@z)[_%8]}(16..271))[_]^((D>>=8)+=P+(~F&E))for@a[128..$#a]}print+qT,@a}';s/[D‐HO‐U_]/\$$&/g;s/q/pack+/g;eval

77

Page 132: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shorthands++

78

Page 133: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shorthands++

S Regex

78

Page 134: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shorthands++

S Regex

S Context

78

Page 135: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shorthands++

S Regex

S Context

S Topical$_

78

Page 136: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡79

Page 137: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Bestcoding➥Nocoding

80

Page 138: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

81

Page 139: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

CPAN

82

Page 140: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡ 11years

CPAN

82

Page 141: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡ 11years

♡ 5000+authors

CPAN

82

Page 142: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡ 11years

♡ 5000+authors

♡ 10000+modules

CPAN

82

Page 143: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Services

83

Page 144: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡ PackageManagement

Services

83

Page 145: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡ PackageManagement

♡ Rating&Discussion

Services

83

Page 146: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡ PackageManagement

♡ Rating&Discussion

♡ SmokeTesting

Services

83

Page 147: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♡ PackageManagement

♡ Rating&Discussion

♡ SmokeTesting

♡ IssueTracking

Services

83

Page 148: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Vocabulary≩Syntax

84

Page 149: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“TheBestthinghappenedtoPerl”

85

Page 150: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

But...

86

Page 151: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Perl5isnotthebestthing

forCPAN

87

Page 152: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

☣88

Page 153: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SyntaxRedundancy

☣89

Page 154: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

90

Page 155: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;

90

Page 156: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• subrender{

90

Page 157: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• subrender{• my$self=shift;

90

Page 158: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• subrender{• my$self=shift;• my%opts=(x=>1,y=>1,z=>0,%{$_[0]});

90

Page 159: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• subrender{• my$self=shift;• my%opts=(x=>1,y=>1,z=>0,%{$_[0]});• formy$item($self‐>filter(@{$self‐>{items}})){

90

Page 160: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• subrender{• my$self=shift;• my%opts=(x=>1,y=>1,z=>0,%{$_[0]});• formy$item($self‐>filter(@{$self‐>{items}})){• print$item‐>draw({

x=>$opts{x},y=>$opts{y},z=>$opts{z},}),"\n";

90

Page 161: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• subrender{• my$self=shift;• my%opts=(x=>1,y=>1,z=>0,%{$_[0]});• formy$item($self‐>filter(@{$self‐>{items}})){• print$item‐>draw({

x=>$opts{x},y=>$opts{y},z=>$opts{z},}),"\n";

• }}

90

Page 162: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

91

Page 163: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;

91

Page 164: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;• methodrender($x=1,$y=1,$z=0){

91

Page 165: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;• methodrender($x=1,$y=1,$z=0){•[email protected](@.items){

91

Page 166: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;• methodrender($x=1,$y=1,$z=0){•[email protected](@.items){•say.draw(:$x,:$y,:$z);

}}

91

Page 167: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JengaInternals☣

92

Page 168: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

93

Page 169: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Bug‐for‐bugcompatibility

☣94

Page 170: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

BestPracticetakesdiscipline

95

Page 171: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

96

Page 172: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

BestPracticeshouldbeNatural!

97

Page 173: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

⑥98

Page 174: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2000RFCs

99

Page 175: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2001Parrot

100

Page 176: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2002Apocalypses

101

Page 177: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2003Ponie

(late,asinthelateArthurDent)

102

Page 178: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2004Synopses

103

Page 179: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2005Pugs

104

Page 180: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

2006v6‐alpha

105

Page 181: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

106

Page 182: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

☯107

Page 183: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ReconciletheIrreconcilable

108

Page 184: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Staticvs

Dynamic109

Page 185: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Types☺

110

Page 186: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Typing☹

111

Page 187: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•usev5;•subf{•sqrt($_[0]**2+$_[1]**2)•}•my$five=f(3,4);

112

Page 188: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•usev6‐alpha;•subf{•sqrt(@_[0]**2+@_[1]**2)•}•my$five=f(3,4);

113

Page 189: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

GradualTypingwithAnnotations

114

Page 190: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• subf(Num$x,Num$y){• sqrt($x**2+$y**2);• }• myNum$five=f(3,4);

115

Page 191: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

116

Page 192: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• subsetPositiveofNumwhere{$_>0}

116

Page 193: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• subsetPositiveofNumwhere{$_>0}

• subf(Positive$x,Positive$y‐‐>Positivewhere{$_>=($x&$y)}){

116

Page 194: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• subsetPositiveofNumwhere{$_>0}

• subf(Positive$x,Positive$y‐‐>Positivewhere{$_>=($x&$y)}){

• sqrt($x**2+$y**2);}

116

Page 195: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• subsetPositiveofNumwhere{$_>0}

• subf(Positive$x,Positive$y‐‐>Positivewhere{$_>=($x&$y)}){

• sqrt($x**2+$y**2);}

•my$five:=f(3,4);#inferredasPositive

116

Page 196: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Compilervs

Runtime117

Page 197: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

BEGIN{...}

118

Page 198: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

BEGIN{...}• CompilerisaREPL

118

Page 199: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

BEGIN{...}• CompilerisaREPL

• Exposetheentirecompiler

118

Page 200: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

BEGIN{...}• CompilerisaREPL

• Exposetheentirecompiler

• Allpartsareswappable

118

Page 201: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

BEGIN{...}• CompilerisaREPL

• Exposetheentirecompiler

• Allpartsareswappable

• Eventhelexer!

118

Page 202: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• macrocircumfix:</**/>($x)• isparsed/.*?/• {''}• • /*ThisisaC‐stylecomment*/

119

Page 203: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• subpostfix:<!>($x){• [*]1..$x• }• • say10!;#3628800

120

Page 204: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• macroGREETING(){• #Alate‐boundmacro• q:code(:COMPILING){"Hello,$s"};• }

• my$s="world";• sayGREETING;#Hello,world

121

Page 205: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Lazyvs

Eager122

Page 206: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

123

Page 207: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #"cat"for=<>{.say}

123

Page 208: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #"cat"for=<>{.say}

• #"cat",annotatedwithlinenumbersforeach(1..*;=<>){say"Line$^num:$^text";}

123

Page 209: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

124

Page 210: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Listsarelazystreams!my@fib=(

124

Page 211: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Listsarelazystreams!my@fib=(

• 0,1,

124

Page 212: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Listsarelazystreams!my@fib=(

• 0,1,• each(@fib;@fib[1..*]).map(&infix:<+>)

);

124

Page 213: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Listsarelazystreams!my@fib=(

• 0,1,• each(@fib;@fib[1..*]).map(&infix:<+>)

);•

say"Thefirsttennumbersare:@fib[^10]";

124

Page 214: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

125

Page 215: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Itemsareeagervalues.However...

125

Page 216: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Itemsareeagervalues.However...• my$ignored=lazy{9**9**9};

125

Page 217: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Itemsareeagervalues.However...• my$ignored=lazy{9**9**9};• my$unused=lazy{say[1..$ignored]};

125

Page 218: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Itemsareeagervalues.However...• my$ignored=lazy{9**9**9};• my$unused=lazy{say[1..$ignored]};

• say"Hello,world!";

125

Page 219: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Classesvs

Prototypes126

Page 220: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

127

Page 221: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• classDogisMammaldoesPet{

127

Page 222: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• classDogisMammaldoesPet{•

my$.countwhere0..100;

127

Page 223: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• classDogisMammaldoesPet{•

my$.countwhere0..100;•

has$!brain;

127

Page 224: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• classDogisMammaldoesPet{•

my$.countwhere0..100;•

has$!brain;

• has&.vocalize=&say;has$.nameisrw="fido";

127

Page 225: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• classDogisMammaldoesPet{•

my$.countwhere0..100;•

has$!brain;

• has&.vocalize=&say;has$.nameisrw="fido";

• has$.furhandlesGroomable;has$.tailhandles<waghang>;

127

Page 226: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• classDogisMammaldoesPet{•

my$.countwhere0..100;•

has$!brain;

• has&.vocalize=&say;has$.nameisrw="fido";

• has$.furhandlesGroomable;has$.tailhandles<waghang>;

•methodowner()handless/^owner_//{...}

}

127

Page 227: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

128

Page 228: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• myDog$fido.=new;

128

Page 229: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• myDog$fido.=new;•

$fido.HOW;#themetaobjectforDog

128

Page 230: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• myDog$fido.=new;•

$fido.HOW;#themetaobjectforDog• $fido.WHAT;#theDogprototypeobject

128

Page 231: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• myDog$fido.=new;•

$fido.HOW;#themetaobjectforDog• $fido.WHAT;#theDogprototypeobject• $fido.WHICH;#$fido’sObjectID

128

Page 232: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• myDog$fido.=new;•

$fido.HOW;#themetaobjectforDog• $fido.WHAT;#theDogprototypeobject• $fido.WHICH;#$fido’sObjectID

• Dog.isa(Dog);$fido.isa(Dog);

128

Page 233: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

129

Page 234: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• $fido.HOW.add_method('bark',method(){$.vocalize('Woof!')});

129

Page 235: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• $fido.HOW.add_method('bark',method(){$.vocalize('Woof!')});

• Dog.can('bark');$fido.can('bark');

129

Page 236: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Parallelismvs

Sanity130

Page 237: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

131

Page 238: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #HyperOperator(SSE/GPUfriendly)[1,1,2,3,5]»+«[1,2,3,5,8];

131

Page 239: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #HyperOperator(SSE/GPUfriendly)[1,1,2,3,5]»+«[1,2,3,5,8];

• #===[2,3,5,8,13]

131

Page 240: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

132

Page 241: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•#RecursiveVisits‐«[[1,2],3];

132

Page 242: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•#RecursiveVisits‐«[[1,2],3];

•#===[[‐1,‐2],‐3]

132

Page 243: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

133

Page 244: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•#HyperMethods[1,4,9,16]».sqrt;

133

Page 245: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•#HyperMethods[1,4,9,16]».sqrt;

•#===[1,2,3,4]

133

Page 246: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

134

Page 247: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• %timepugs‐e'(1..100000)>>.sqrt'real9.387suser9.219s

134

Page 248: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• %timepugs‐e'(1..100000)>>.sqrt'real9.387suser9.219s

•%timeenvGHCRTS=‐N2pugs‐e'(1..100000)>>.sqrt'real5.807suser6.959s

134

Page 249: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

135

Page 250: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Junctionssubis_prime(Int$n‐‐>Bool){$n%all(2..$n.sqrt+1);}

135

Page 251: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Junctionssubis_prime(Int$n‐‐>Bool){$n%all(2..$n.sqrt+1);}

•subhas_twin_prime(Int$n‐‐>Bool){is_prime($n&($n±2));}

135

Page 252: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Junctionssubis_prime(Int$n‐‐>Bool){$n%all(2..$n.sqrt+1);}

•subhas_twin_prime(Int$n‐‐>Bool){is_prime($n&($n±2));}

•subinfix:<±>($x,$y){($x+$y)|($x‐$y);}

135

Page 253: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Junctionssubis_prime(Int$n‐‐>Bool){$n%all(2..$n.sqrt+1);}

•subhas_twin_prime(Int$n‐‐>Bool){is_prime($n&($n±2));}

•subinfix:<±>($x,$y){($x+$y)|($x‐$y);}

•135

Page 254: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Concurrency☺☺☺

136

Page 255: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Locking☹ ☹ ☹

137

Page 256: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

138

Page 257: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•async{$x.withdraw(3);

$y.deposit(3);}

138

Page 258: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•async{$x.withdraw(3);

$y.deposit(3);}

☣RaceCondition☣

138

Page 259: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

139

Page 260: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• async{$x.lock;$y.lock;

139

Page 261: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• async{$x.lock;$y.lock;

• $x.withdraw(3);$y.deposit(3);}

139

Page 262: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• async{$x.lock;$y.lock;

• $x.withdraw(3);$y.deposit(3);}

• async{$y.lock;$x.lock;}

139

Page 263: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• async{$x.lock;$y.lock;

• $x.withdraw(3);$y.deposit(3);}

• async{$y.lock;$x.lock;}

☣Deadlock☣

139

Page 264: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoftwareTransactional

Memory

140

Page 265: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

141

Page 266: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•#Nolocks,noraces!contend{$x.withdraw(3);$y.deposit(3);}

141

Page 267: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

142

Page 268: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Retrywith"defer"methodwithdraw($n){deferif$.balance<$n;$.balance‐=$n;}

142

Page 269: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Retrywith"defer"methodwithdraw($n){deferif$.balance<$n;$.balance‐=$n;}

•#Choicewith"maybe"subtransfer($x1,$x2,$y){maybe{$x1.withdraw(3)}maybe{$x2.withdraw(3)}$y.deposit(3);}

142

Page 270: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Retrywith"defer"methodwithdraw($n){deferif$.balance<$n;$.balance‐=$n;}

•#Choicewith"maybe"subtransfer($x1,$x2,$y){maybe{$x1.withdraw(3)}maybe{$x2.withdraw(3)}$y.deposit(3);}

•#Composablewithnested"maybe"contend{maybe{transfer($x1,$x2,$y)}maybe{transfer($x3,$x4,$y)}}

142

Page 271: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

My Languagevs

Your Language

143

Page 272: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

144

Page 273: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•usejsan:DOM;

144

Page 274: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•usejsan:DOM;•useperl5:DBI;

144

Page 275: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

•usejsan:DOM;•useperl5:DBI;•usehaskell:Numeric;

144

Page 276: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Pugs

JavaScript

Haskell Perl 5

145

Page 277: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Pugs

JavaScript

Haskell Perl 5

YARV?JVM?

CLR? PyPy?

146

Page 278: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

يژ147

Page 279: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PopularTargetLanguage

148

Page 280: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

GeneratingJS

149

Page 281: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

GeneratingJSژ Java:GoogleWebToolkit

149

Page 282: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

GeneratingJSژ Java:GoogleWebToolkit

ژ Perl:Jifty

149

Page 283: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

GeneratingJSژ Java:GoogleWebToolkit

ژ Perl:Jifty

ژ Ruby:Rails/JS

149

Page 284: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

GeneratingJSژ Java:GoogleWebToolkit

ژ Perl:Jifty

ژ Ruby:Rails/JS

ژ Python:Pyjamas

149

Page 285: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

GeneratingJSژ Java:GoogleWebToolkit

ژ Perl:Jifty

ژ Ruby:Rails/JS

ژ Python:Pyjamas

ژ C#:Script#

149

Page 286: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Samelanguageforbothsides

✓150

Page 287: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Client‐sidejustatinysubset

✗151

Page 288: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

CompilingtoJS

152

Page 289: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

CompilingtoJS

ژ HOP/Scheme2JS

152

Page 290: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

CompilingtoJS

ژ HOP/Scheme2JS

ژ Links

152

Page 291: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

CompilingtoJS

ژ HOP/Scheme2JS

ژ Links

ژ HaXe

152

Page 292: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

CompilingtoJS

ژ HOP/Scheme2JS

ژ Links

ژ HaXe

ژ Pugs!

152

Page 293: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PIL2JS

153

Page 294: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

pugs‐CJS

154

Page 295: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

pugs‐CJS

ژ WritteninPerl5

154

Page 296: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

pugs‐CJS

ژ WritteninPerl5

ژ Passes90%oftests

154

Page 297: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

pugs‐CJS

ژ WritteninPerl5

ژ Passes90%oftests

ژ ~30kRuntime

154

Page 298: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PIL2JSRuntime

155

Page 299: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PIL2JSRuntime

ژ Primitives&Autoboxing

155

Page 300: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PIL2JSRuntime

ژ Primitives&Autoboxing

ژ Meta‐objectprotocol

155

Page 301: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

PIL2JSRuntime

ژ Primitives&Autoboxing

ژ Meta‐objectprotocol

ژ SupportsJSANlibraries

155

Page 302: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JSAN

156

Page 303: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JSAN

ژ "CPAN".replace(/CP/,"JS")

156

Page 304: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JSAN

ژ "CPAN".replace(/CP/,"JS")

ژ ModulesystemwithPrototype.js

156

Page 305: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JSAN

ژ "CPAN".replace(/CP/,"JS")

ژ ModulesystemwithPrototype.js

ژ Test.Simple,Jemplate,etc.

156

Page 306: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shortcomings

157

Page 307: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shortcomings

ژ Callingconventiontoocomplex

157

Page 308: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shortcomings

ژ Callingconventiontoocomplex

ژ CPSrunloopisslow

157

Page 309: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shortcomings

ژ Callingconventiontoocomplex

ژ CPSrunloopisslow

ژ Notailrecursionnorgoto

157

Page 310: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Shortcomings

ژ Callingconventiontoocomplex

ژ CPSrunloopisslow

ژ Notailrecursionnorgoto

ژ Butthere'shope!

157

Page 311: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JS2.0

158

Page 312: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JS2.0

ژ Selfhosting

158

Page 313: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JS2.0

ژ Selfhosting

ژ BacktranslatetoJS1

158

Page 314: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JS2.0

ژ Selfhosting

ژ BacktranslatetoJS1

ژ Types,Modules,Continuations

158

Page 315: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

JS2.0

ژ Selfhosting

ژ BacktranslatetoJS1

ژ Types,Modules,Continuations

ژ PartofFirefox3.0(nextyear)

158

Page 316: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

⌛159

Page 317: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Feb1TaPLarrived

asanexercise…

160

Page 318: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Feb6Junctions

(1|2)+(3|4)➥(4|5|6)

161

Page 319: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Feb16Input/Output

say"Hello,world"

162

Page 320: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

❀163

Page 321: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Mar19PCRERegex

s:P5:g/5/6/;

164

Page 322: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

May8svnbot.p6

r2851|iblech++

165

Page 323: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

May25Prelude.pm

subsprintf($fmt,*@args)

166

Page 324: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

May29EmbeddedPerl5

useperl5:DBI;

167

Page 325: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

☀168

Page 326: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Jun2evalbot.p6

[#perl6]?eval1+1

169

Page 327: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Jun24Perl6→PIL→Parrot

makesmoke‐pir170

Page 328: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Jul14PIL→Perl5

makesmoke‐perl5

171

Page 329: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Jul17PIL→JavaScript

makesmoke‐js

172

Page 330: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Aug3KontentWiki

useperl5:Template;

173

Page 331: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

☁174

Page 332: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Nov2RuntimeAPI

Perl6::ObjectSpace

175

Page 333: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Nov3ConcurrencyAPI

subfisthrottled(:limit(3)){…}

176

Page 334: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Nov4PackagingAPI

perl5‐Foo‐1.0‐cpan+KANE.jib

177

Page 335: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Nov7Coroutines

coro{yield1}

178

Page 336: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Nov231stcommitfromLarry(stillwaitingforGuido☺)

179

Page 337: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

❅180

Page 338: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Jan6YAMLSerialization

say$x.yaml;

181

Page 339: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Feb3Self‐parsingGrammar

grammarGrammar;

182

Page 340: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Feb22Larryjoins#perl6

<fglock>TimToady:welcome<Juerd>Justtrytonotgetaddicted:)<TimToady>Juerd:toolate…

183

Page 341: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Feb25CodeDOM

$AST=q:code/say"hi"/;

184

Page 342: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

❀185

Page 343: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Mar11EvaluatorinPerl5

Pugs::Runtime

186

Page 344: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Mar16BootstrappedonPerl5

lrep.p6lrep.p6

187

Page 345: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Apr1CallingConventionAPI

$tree=\($obj:attr=>1,$child);

188

Page 346: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Apr21MITLicense

189

Page 347: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

May8PredictiveParsing

<TimToady>"do,ordonot.thereisnotry..."

190

Page 348: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

☼191

Page 349: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

June1SummerofCode

192

Page 350: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoC:Perl.org

193

Page 351: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoC:Perl.org

☼ Perl6DBIModule

193

Page 352: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoC:Perl.org

☼ Perl6DBIModule

☼ Perl5toPerl6Translator

193

Page 353: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoC:Perl.org

☼ Perl6DBIModule

☼ Perl5toPerl6Translator

☼ PugsBootstrapFromPerl5andRules

193

Page 354: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoC:Haskell.org

194

Page 355: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoC:Haskell.org

☼ FastMutableCollectionTypes

194

Page 356: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SoC:Haskell.org

☼ FastMutableCollectionTypes

☼ UnicodeByteStringandData.Rope

194

Page 357: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

June4SoftwareTransactionalMemory

async{contend{...}}

195

Page 358: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

June26v6.pm

usev6‐alpha;

196

Page 359: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

August17Smartlinks.pl

#L<S02/"bidirectionalmirrorings">isq《123》,123,"anglebrackets";

197

Page 360: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

☁198

Page 361: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

September16NativeGrammarEngineviaEmbeddedPerl5

s:g/PGE/PCR/;

199

Page 362: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

October9Fullyreentrantcontinuations

subcallcc(Code&c){&c(&?CALLER_CONTINUATION)}

200

Page 363: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

October11GHC6.6

<TimToady>Iupgradedandmy$jobprogramran60timesfaster...

201

Page 364: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

October20SMPDataParallelism

[(1|2),(3|4)].>>sqrt

202

Page 365: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

⇪203

Page 366: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

204

Page 367: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“CPANisthelanguagePerlisjustsyntax”

205

Page 368: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Production

206

Page 369: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Production

⇪ ExistingPerl5codebase

206

Page 370: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Production

⇪ ExistingPerl5codebase

⇪ GHCmaybeunavailable

206

Page 371: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Production

⇪ ExistingPerl5codebase

⇪ GHCmaybeunavailable

⇪ Can’trewritefromscratch

206

Page 372: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ThePerl5VM

207

Page 373: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ThePerl5VM

⇪ Activelydeveloped

207

Page 374: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ThePerl5VM

⇪ Activelydeveloped

⇪ 5.10ismuchmorev6ish

207

Page 375: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ThePerl5VM

⇪ Activelydeveloped

⇪ 5.10ismuchmorev6ish

⇪ UnifiedPerlRuntime

207

Page 376: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Augmentation (XS)PadWalker, Devel::Caller

autobox, re::override ...

SemanticsData::Bind, Class::MOP

Pugs::Runtime, Pugs::Compiler::Rule ...

Perl 5 SugarMoose, Moose::Autobox ...

Syntaxv6.pm

Pugs::Compiler::Perl6 ...

Core

perl

Tool SupportCPAN, PAUSE

Perldoc, Perl::Tidy ...

!"#$%&

'()&*+,&-"#%

.&*%!/01!2.34!1"#56

InfrastructureParse::Yapp

Module::Compile ...

208

Page 377: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Moose♘

209

Page 378: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ObjectswithClass

210

Page 379: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;• classPoint;• • • has$.xisrw;#instanceattributes• has$.y;#default"isreadonly"• • methodclear(){• • • $.x=0;#accessiblewithintheclass• $.y=0;• }•

211

Page 380: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• packagePoint;• useMoose;• • hasx=>(is=>'rw');• hasy=>(is=>'ro');• • subclear{• my$self=shift;• • $self‐>{x}=0;• $self‐>y(0);• }•

212

Page 381: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Subclassing

213

Page 382: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;• classPoint3D;• • • isPoint;• • has$.z;• • methodclear(){• • call;• $.z=0;• };•

214

Page 383: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• packagePoint3D;• useMoose;• • extends'Point';• • hasz=>(isa=>'Int');• • overrideclear=>sub{• my$self=shift;• super;• $self‐>{z}=0;• };•

215

Page 384: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• packagePoint3D;• useMoose;• • extends'Point';• • hasz=>(isa=>'Int');• • afterclear=>sub{• my$self=shift;• • $self‐>{z}=0;• };•

216

Page 385: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SubsetTypes

217

Page 386: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;• classAddress;• useperl5:Locale::US;• useperl5:Regexp::Common<zip$RE>;• • my$STATES=Locale::US.new;• subsetUS_StateofStrwhere{• $STATES{any(<code2statestate2code>)}{.uc};• };• • hasUS_State$.stateisrw;• hasStr$.zip_codeisrwwhere{• $_~~$RE<zip><<US>{'‐extended'=>'allow'}• };•

218

Page 387: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• packageAddress;• useMoose;• useMoose::Util::TypeConstraints;• useLocale::US;• useRegexp::Common'zip';• • my$STATES=Locale::US‐>new;• subtypeUSState=>asStr=>where{• $STATES‐>{code2state}{uc($_)}• or$STATES‐>{state2code}{uc($_)};• }• • hasstate=>(is=>'rw',isa=>'USState');• haszip_code=>(• is=>'rw',• isa=>subtypeStr=>where{• /$RE{zip}{US}{‐extended=>'allow'}/• },• );•

219

Page 388: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Morefeatures

220

Page 389: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♘ Roles(DynamicTraits)

Morefeatures

220

Page 390: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♘ Roles(DynamicTraits)

♘ Coercion

Morefeatures

220

Page 391: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

♘ Roles(DynamicTraits)

♘ Coercion

♘ MetaObjects

Morefeatures

220

Page 392: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Module::Compile※

221

Page 393: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

SourceFilter

222

Page 394: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• useFilter::Simplesub{• s{(^sub\s+\w+\s+\{)}• {$1\nmy$self=shift;\n}mgx;• }•

223

Page 395: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Filter::SimpleBad

224

Page 396: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Extradependency

Filter::SimpleBad

224

Page 397: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Extradependency

※ Slowsdownstartup

Filter::SimpleBad

224

Page 398: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Extradependency

※ Slowsdownstartup

※Breaksthedebugger

Filter::SimpleBad

224

Page 399: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Extradependency

※ Slowsdownstartup

※Breaksthedebugger

※WrecksotherSourceFilters

Filter::SimpleBad

224

Page 400: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Wecanfixit!

225

Page 401: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• useFilter::Simplesub{• s{(^sub\s+\w+\s+\{)}• {$1\nmy$self=shift;\n}mgx;• }

226

Page 402: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev5;• useFilter::Simple::Compilesub{• s{(^sub\s+\w+\s+\{)}• {$1\nmy$self=shift;\n}mgx;• }

227

Page 403: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

How?

228

Page 404: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Little‐knownfact:

229

Page 405: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

“useFoo”looksforFoo.pmcbeforeFoo.pm

230

Page 406: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• %echo'print"Hello\n"'>Foo.pmc• %perl‐MFoo‐e1

Hello

231

Page 407: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Savefilteredresultsto.pmc...

232

Page 408: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

...nofilteringneedednexttime!

233

Page 409: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Module::CompileGood

234

Page 410: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Freeofdependenciesonuser’ssite

Module::CompileGood

234

Page 411: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Freeofdependenciesonuser’ssite

※ Faststartuptime

Module::CompileGood

234

Page 412: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Freeofdependenciesonuser’ssite

※ Faststartuptime

※Debuggablesourceisallin.pmc

Module::CompileGood

234

Page 413: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

※ Freeofdependenciesonuser’ssite

※ Faststartuptime

※Debuggablesourceisallin.pmc

※ Composableprecompilers

Module::CompileGood

234

Page 414: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

v6.pm⚅

235

Page 415: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Source:Rule.pm

236

Page 416: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• usev6‐alpha;• • grammarPugs::Grammar::Rule;

• tokenws{• [\s• |\#\N*• ]+• }• #...morerules...

237

Page 417: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Target:Rule.pmc

238

Page 418: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

• #Generatedfile‐donotedit!• ##################(((32‐bitChecksumValidator)))##################• BEGIN{use5.006;local(*F,$/);($F=__FILE__)=~s!c$!!;open(F)• ordie"Cannotopen$F:$!";binmode(F,':crlf');unpack('%32N*',<F>)• ==0x1D6399E1ordie"Checksumfailedforoutdated.pmcfile:${F}c"}• #####################################################################• packagePugs::Grammar::Rule;• *ws=sub{• my$grammar=shift;• #warn"ruleargumentisundefined"unlessdefined$_[0];• $_[0]=""unlessdefined$_[0];• my$bool=$_[0]=~/^((?:\s|\#(?‐s:.)*)+)(.*)$/sx;• return{• bool=>$bool,• match=>$1,• tail=>$2,• #capture=>$1,• }• };• #...morerules...

239

Page 419: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

WritePerl6compiletoPerl5

⇪240

Page 420: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

✈241

Page 421: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

WhenwillPerl6bereleased?

242

Page 422: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

ByChristmas!

243

Page 423: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

WhenPerl6arrives,everydaywillbelike

Christmas!❆

244

Page 424: an implementation of Perl 6 · 2008. 10. 5. · “Official Perl 6” Anything that passes the official test suite Defined by semantics, not by accidents of history 10

Fin.245