It was finally Christmas: Perl 6 is here!
-
Upload
wim-vanderbauwhede -
Category
Software
-
view
496 -
download
3
Transcript of It was finally Christmas: Perl 6 is here!
![Page 1: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/1.jpg)
ItwasfinallyChristmas: Perl6ishere! WimVanderbauwhede SchoolofCompu6ngScience UniversityofGlasgow
![Page 2: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/2.jpg)
“Languageisideology”
Kress,Gunther,etal."Languageasideology."(1982).
![Page 3: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/3.jpg)
Atripdownmemorylane
![Page 4: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/4.jpg)
2007
![Page 5: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/5.jpg)
• Perl6/PugsinvitedtalkatPOPL2007• AudreyTanghadcreatedPugs,aPerl6
implementa6oninHaskell• Perl6waspromisedfor"Christmas”• Andtherewassomedelay…
![Page 6: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/6.jpg)
Perl6meline
DowJonesindex,1985-2015
![Page 7: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/7.jpg)
Context
hZp://www.codeeval.com/
![Page 8: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/8.jpg)
Context
TIOBEIndexforFebruary2016,hZp://www.6obe.com/
Popularityofprogramminglanguages–TIOBE
![Page 9: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/9.jpg)
Context
TIOBEIndexforFebruary2016,hZp://www.6obe.com/
Popularityofprogramminglanguages–TIOBE
![Page 10: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/10.jpg)
Perl
NeilStephenson,“Cryptonomicon”,p480
![Page 11: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/11.jpg)
Perl5
• Interpreted• Dynamicallytyped• Garbagecollec6on• InthatsenseverysimilartoJavaScript,Python,Ruby,…
![Page 12: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/12.jpg)
Perl5
• Usesfunnycharactersfortyping:$:scalar@:array(list)%:hash(dic6onary,map)&:subrou6ne
• Incorporatesaseparatelanguage:regularexpressions(PCRE)
![Page 13: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/13.jpg)
Perl5
• Butalso:• Lexicalscoping• Higher-orderfunc6ons• Anonymousfunc6ons• Closures
![Page 14: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/14.jpg)
Perl6
• Isanewlanguage,notbackwardcompa6blewithPerl5.
• S6llmostlyPerl• Butamodernlanguage
![Page 15: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/15.jpg)
CompilerandVM
![Page 16: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/16.jpg)
Compiler(Rakudo)
hZps://github.com/rakudo/rakudo
![Page 17: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/17.jpg)
VM(MoarVM)
• Meta-objectprotocolbased• Precise,genera6onal,andparallelGC• First-classcodeobjects,closures,…• Excep6ons• Con6nua6ons• Threads,mutexes,…• JITcompila6onhZps://github.com/MoarVM/MoarVM
![Page 18: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/18.jpg)
Grammars
![Page 19: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/19.jpg)
Parsing
• Perl6hasGrammars,Rules,TokensandRegexesaspartofthelanguage• Similartoclassesbutusedtoorganizeparsers
• Rulesarelexemeparsers• Tokensaretokenparsers• RegexesarePCREs
• Perl6isparsedandexecutedusingaPerl6-stylegrammar.
![Page 20: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/20.jpg)
![Page 21: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/21.jpg)
Objects
![Page 22: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/22.jpg)
JavaScript
Python
Objects
![Page 23: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/23.jpg)
Perl6Objects
![Page 24: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/24.jpg)
Perl6Objects
Roles
![Page 25: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/25.jpg)
Perl6Objects
• Accessorsforfree
• Defaultconstructor • Inheritance• Roles(mixins) • BuiltonaMetaObjectProtocol• Fullintrospec6on• Sos6llnothingspecial…
![Page 26: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/26.jpg)
Butwait…
![Page 27: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/27.jpg)
Perl6Objects
![Page 28: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/28.jpg)
Perl6Objects
![Page 29: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/29.jpg)
Gradualtyping!
![Page 30: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/30.jpg)
Gradualtyping
• Bydefaultvariablesaredynamicallytyped.• Explicitlytypedvariablesaresta6callytyped.• Buttypecheckscanbedeferredtorun6me.• Underlyingtheory:
hZps://github.com/samth/gradual-typing-bib
![Page 31: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/31.jpg)
Gradualtyping:subsets
• Typeconstraintcheckedatrun6me
![Page 32: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/32.jpg)
Gradualtyping:typecapture
• Deferthespecifica6onofatypeconstrainttothe6methefunc6oniscalled.• Allowstorefertoatypebothinthesignatureandthefunc6onbody.
![Page 33: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/33.jpg)
Gradualtyping:typecapture • Deferthespecifica6onofatypeconstrainttothe6methefunc6oniscalled.• Allowstorefertoatypebothinthesignatureandthefunc6onbody.
![Page 34: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/34.jpg)
Roles
![Page 35: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/35.jpg)
Roles
• BasisforthePerl6typesystem• Usedforcomposi6onandmixins• InPerl6,the“funnycharacters”aresyntaxforasetofpredefinedroles:
@:Posi6onal(array)%:Associa6ve(hash)&:Callable(subrou6ne)
• So…
![Page 36: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/36.jpg)
Nomorefunnycharacters!
• Actually,the“funnycharacters”arenowop6onal:
![Page 37: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/37.jpg)
Polymorphicfunc6ons
• Alsoknownasmul6pledispatch
![Page 38: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/38.jpg)
Polymorphicfunc6ons
• Alsoknownasmul6pledispatch
![Page 39: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/39.jpg)
Polymorphicfunc6ons
• Looksfamiliar?
![Page 40: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/40.jpg)
Parametricroles
• Rolesthattakeoneormoretypevariables
![Page 41: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/41.jpg)
PossiblyMaybe
![Page 42: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/42.jpg)
FuncHonalprogramming
![Page 43: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/43.jpg)
Func6onalfeatures
• Higher-orderfunc6ons• Anonymousfunc6ons(lambdas)• Currying• Immutablelists,lazyevalua6on• Tailcallop6miza6on• Op6onalimmutablevariables
![Page 44: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/44.jpg)
Typecapturerevisited
• Typecapturealsoworkswithclosuresandlambdas
![Page 45: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/45.jpg)
Lazylists
• Perl6dis6nguishesbetweensequences,listsandarrays.
• Sequencesareimmutable,butareconsumedwheniterated.• Listsareimmutable• Arraysaremutable
• BydefaultsSeq,ListandArrayarelazy,butcanbemadeeager.
![Page 46: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/46.jpg)
SeqandList
![Page 47: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/47.jpg)
Array
![Page 48: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/48.jpg)
Promises
![Page 49: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/49.jpg)
Concurrency
• High-level• Promises(futures)• Channels• Supplies
• Low-level• Threads• Schedulers• Locks
![Page 50: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/50.jpg)
Promises
![Page 51: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/51.jpg)
Conclusion
•
![Page 52: It was finally Christmas: Perl 6 is here!](https://reader034.fdocuments.net/reader034/viewer/2022042706/58a06b811a28ab06528b5c7f/html5/thumbnails/52.jpg)
Thank you!