Brno Perl Mongers 28.5.2015 - Perl family by mj41

61
PERL FAMILY 15 YEARS OF PERL 6 AND PERL 5 by generated Michal Jurosz (mj41) 23.6.2015

Transcript of Brno Perl Mongers 28.5.2015 - Perl family by mj41

PERL FAMILY15 YEARS OF PERL 6 AND PERL 5

by generated

Michal Jurosz (mj41)23.6.2015

MICHAL "MJ41" JUROSZ, PMD 85, 2 MHz, 48 kB

Turbo Pascal, 386 SX 20 MHz, 2 MBLinux, Bash, Perl 5+6, Web/Wiki

(PHP, Perl 5), (Perl 5), ,

- brno.pm.org1.pivo 24.2.2011 (skim, mj41)

BASIC-G

CVIS VUT GoodDatagithub.com/mj41 TapTinder PadreBrno Perl Mongers

PERL 6 PROGRESSfollowing the day-to-day progressFree/OpenSource projecttaking a long time" != "not going to happen"

, rakudo.cz, 2011, >1500 changes

perl6.czPerl 6 and Parrot links

PERL 6 (OR P6), (Wikipedia)

, ... ( )

is anything that passes roast - repository of all spec tests

the break in compatibility was mandated fromthe start

perl6.org Perl 6learnXinYminutes.comRosetta Code >750

the official P6 test suite

PERL - EARLY VERSIONS1987 Perl 1: A general-purpose Unix scriptinglanguage to make report processing easier.1988 Perl 21989 Perl 31991 Perl 4 (Programming Perl/Camel Book)October 17, 1994 - Perl 5.000

PERL 6 - BEGINNINGOSCON 2000 (July 17-20)

Perl 6 started in a community sessionJon Orwant, Coffee Mugs

requests for comments

RFC1 (1 Aug 2000), RFC 361 (30 Sep 2000)361 RFCs

PERL 6, 2000And one of the very very high level

goals of Perl 6 is to keep Perl capableof evolving. Perl 5 was running into

some limits and we're going to figureout how to get around those limits.

-- Larry Wall, 10/2000

DYNAMIC LANGUAGES = PARROTApril 2001, Parrot = Py3K + Perl 610/9/2001 - release

a very, very early alpha - ,

virtual machine designed to run dynamiclanguages efficiently2004 - Pirate (Python on Parrot)The Parrot Foundation

prankParrot 0.0.1

test.pasmtest2.pasm

THE STATE OF THE ONION 6Let me put this bluntly. If we'd done

Perl 6 on a schedule, you'd have it bynow. And it would be crap. ... because

we don't have a schedule. We justhave a plan.

-- Larry Wall, 2002

SYNOPSES, 8/2004

Created: 10 Aug 2004Perl 6 - specification + test suite

(1140 files, spec 37600+79000)Perl 5 - interpreter + functional tests

The Synopsis documentsgithub.com/perl6/specs

roast

WHEN? TWO YEARSFinally, when ... Perl 6 beta will be available?

That's a tough question ... With thestate of Parrot and the design work

completed so far ... a good chance we'llsee one within the next two years.

-- Allison Randal, 5/2004

VOLUNTEERSJava has Sun. .NET has Microsoft.FreeSW has grants and volunteers

2005, 70k$ - NLNet grant2008, 200k$ - Ian Hague grant2015, 10k€ - Perl 6 Core Development Fund

volunteers will do what they want

PUNIE (PERL 1.000) ON PARROT20 years to the day Perl 1.000 was released2007 - Perl 5.10.0 is now out

(Perl 1) compiler on Parrot VMcapable of running almost the entire Perl 1 testsuite successfully

Punie

PUGS (AUDREY TANG), 2005>100 developers first month"-Ofun", commit bit policy, Synopses and >10k unit testsHaskell - many functional programminginfluencesHaskell/Perl 5/STD/JavaScript/Parrot/...Parrot - Python, TCL, Ruby, JavaScript, ...mod_parrot, mod_perl6, ...

IRC logs

PUGS (MJ41), 200521.3.2005 - my first Pugs commit

later testing "Perl 6"

mj41 -Ofun

TapTinder: , , , ...

2005­04­12 mj41: WinXP build failed2005­04­12 autrijus: yeah, mj41: try r1848

GitHub taptinder.orgGoodData Docker

WHY PERL 6 IS TAKING SO ... LONGWhen will Perl 6 be ready?

When it's done.

Seriously, when will it be done?

When the number of volunteersworking on it have completed the

amount of work remaining.

JNTHN'S OSCON BEERS2004 - Parrot

Java to Parrot bytecode2007 - Jonathan Worthington

JunctionsPerl 6 since that

JNTHNMy mission:

Eliminate the implementation issuesthat stand in the way of greatly

increased Perl 6 adoption.

-- Jonathan "jnthn" Worthington

PERL 6 - GLOSSARYlanguage: Perl 6 (or Perl 6.0.0)implementations: Rakudo (, Niecza, Pugs, ...)virtual machines: MoarVM, JVM (, Parrot, ...)

binary: perl6-m, perl6-j (, perl6-p)distribution: Rakudo Stargrammar: STD

PERL 6 - LANGUAGE/SPECspecified by its test suite

/specs - to test suite - repository of all spec tests

- standard grammarwhirlpool model

Synopsis linksroastSTD.pm6

IMPLEMENTATIONSRakudoNiecza...

NIECZAC#, CLR (.NET, Mono)one man show - sorear

2010.06.30 What's "Nie mamyczas"? =)

2010.06.30 it means "We don't havetime" in Czech.

VIRTUAL MACHINE (VM)execute instructions

interpreting, (JIT)memory managementbuild-in data structures

strings, arrays, objects, ...abstract OS

just-in-time

NQP - NOT QUITE PERL (6)[en-kjů-pí], Patrick R. Michaud, end of 2007a small, easier-to-optimize Perl 6 subsetideal for writing compilers, especially parse treeto AST mappingNQP compiler is implemented in NQP(bootstrapped)nearly all of Rakudo is NQP code (exceptCORE.setting)

PERL ?an easy thing easyor a hard thing possibleyou can get your work done efficiently... and have time to go for a beer

..., 4, 5, 6, ... ?backward compatibilityfinished/done?

PERL 4Perl 4 didn't have lexical (my) variables

and the package separator was ' (not ::)and really nobody used packages anywayand there was no object support whatsoever

PERL 5 + 6Perl 5

not a dead-end languagePerl 5 renaissance as development in parallel with Perl 6stealing featuresuse feature, use 5.xrelease cycle

Modern Perl

PERL 6 + 5"Perl 6 is Perl." -- Larry Wall

Rule 1: Whatever Larry says about Perl iscorrect.

sister languagesno intention to have Perl 6 replace Perl 5

PERL 6 KILLING PERL 5? NO.hugely expanded test suite (27k 2002, 93k 2009)refactored internal - fixes, speed, memory

8/2006 deadregex engine improvements, named capturessmart matching, given/when, state variables,defined-or, say, ...Moose, , CPAN modulesgit, rapid release cycle, cpants

Ponie

Pluggable keywords

THE STATE OF THE ONION, 2002 - DYINGBut two years ago Perl 5 had alreadystarted dying, because people were

starting to see it as a dead-endlanguage. ... when we announced

Perl 6, Perl 5 suddenly took on a newlife ...

-- Larry Wall, 2002

PERL 6 - FEATURES 1signatures

positional, named, slurpyis ro, is rw, is copy

- Buf, Uni, Strchained comparisonsmultiline comments, heredocsRat type, Complex, Big integers, Buf, native

references goneUnicode

PERL 6 - FEATURES 2scales better from script to applicationOO including roles and introspectionmultiple dispatchgradually typed - performancelazy evaluationconcurrency - Promises, Channels, Suppliesjunctions (autothreading)

PERL 6 - FEATURES 3, ...digest CPAN down into something morecoherentinstall more than one version of packagegrammars and regexesSTD.pm6 written in Perl 6 - overloadingmeta-operators, user-defined operatorsmacrossee features matrix

RAKUDO LEAVING THE PARROT NEST3/2009 1.0.0 "Haru Tatsu" released

the first "stable" release to developers1/2010 2.0.0 Production useone bytecode to rule them allseparated repositoriesthe deprecation policy (6 months, 3 months)people

RAKUDO TODAY"Rakudo" - a Perl 6 language implementationreference (or "official") Perl 6 implementationprimary backend is JVM is also supportedParrot VM abonded - at least for 2015

focus on "The Christmas" ToDo list,

MoarVM

rakudo.org github.com/rakudo

RAKUDO ★Rakudo Star - since 29.7.2010distribution - including VM, modules, ...a useful and usable distribution of Perl 6aimed at "early adopters" of Perl 6"... pretty near does exist, ..." even if it "... still runsvery slowly ... and has lots of bugs ..." -- lwall,OSCON 2010

6GUTS BY JNTHNTorment the implementers for the sake of theusers" isn't a joke!In my first couple of years, I learned rather a lotabout how not to implement Perl 6.

, 6guts.wordpress.com slides on jnthn.net

NOM/6MODEL/QREGEX - 2010..“nom” Rakudo branch – short for “new objectmodel”6model - design and implement a metamodelcoreNQP re-built to use 6model rather than theParrot object modela parallel effort to port the NQP language to the.Net CLR and the JVM

NOM/6MODEL/QREGEX - ..20121/2011 chromatic - stopped working on Parrot(contributor since late 2001)9/2011 - Rakudo itself is now mostly written inNQP and Perl 6 (90-95%),1/2012 - so, we made it, in many sense this is arevolution5/2012 - QRegex, QAST is AST design andimplementation, written in NQP

RAKUDO ON THE JVM - 2013invokedynamic instructionawful startup timeperl6-j instead of perl6-mconcurrency only provided on JVM so far

Thread, Promise, Supply, Channel, ...7/2013 92%, 10/2013 99.9%

MOARVM - 2013/2014lightweight and metamodel-focused runtime forNQP and Rakudosupports 6model and various other needsnatively (efficiently)enable the near-term exploration of JITcompilation in 6modelquick and easy build1/2014 99%, 3/2015 "100%"moarvm.com

MOARVM VS. PARROT 1Parrot

started as a great VM to run Perl 5.6performance - a 10+ year old codebasevisions of multiple architectsexperimental code, rush to finishthe deprecation policy

MOARVM VS. PARROT 2MoarVM

lower startup times and lower memory usespesh and JIT - sophisticated dynamicoptimizationperformanceprecise, generational GC...

PERL 6 - CHRISTMAS TODOGreat List Refactor (GLR)the Native, Shaped Arrays (NSA)the Normalization Form Grapheme (NFG)

PERL 6.0Feb 2015, FOSDEM - a 6.0 language

WenZPerl Donate 10,000 EUR4/2015 - jnthn:

May 2008, 200k$ - 4/2015 - Bart Wiegmans:

Perl 6 Core Development Fund

NFG, native arrays, ...Ian Hague grant

Advancing theMoarVM JIT

SLOW RAKUDOPerl 6 - lazy lists8/2013 - about 3,600x slower than Perl 58/2014 - is 34x slower

Better. But still sucks.

FAST RAKUDO8/2014 - loop_empty_native test/micro-benchmark

355x faster than 8/2013so 14x faster than Perl 5

PERL 6 - PICK TWO"Good, fast, cheap: pick two." Well, bydefinition our community has to do it

cheap, so the saying reduces to "Good,Fast: pick one." And we quite

intentionally picked good rather thanfast.

— Larry Wall (Feb 11 2015, )infoworld.com

VÝBORNĚ, DÍKY!

QUESTIONS?Michal "mj41" Jurosz

Perl 6 guy GoodData

Generated from sourceby inside .

Powered by .

github.com/mj41/perl6-history-mj41Presentation::Builder prbuilder Docker container

reveal.js