Tải bản đầy đủ

OReilly perl 6 essentials jun 2003 ISBN 0596004990









TableofContents
Index
Reviews
ReaderReviews
Errata

Perl6Essentials
ByAllisonRandal,DanSugalski,

LeopoldTötsch

Publisher :O'Reilly
PubDate :June2003

ISBN :0-596-00499-0
Pages :208
Slots :1



Perl6Essentialsisthefirstbookthatoffersa
peekintothenextmajorversionofthePerl
language.WrittenbymembersofthePerl6
coredevelopmentteam,thebookcoversthe
developmentnotonlyofPerl6syntaxbut
alsoParrot,thelanguage-independent
interpreterdevelopedaspartofthePerl6
designstrategy.Thisbookisessential
readingforanyoneinterestedinthefutureof
Perl.Itwillsatisfytheircuriosityandshow


howchangesinthelanguagewillmakeit
morepowerfulandeasiertouse.










TableofContents
Index
Reviews
ReaderReviews
Errata

Perl6Essentials
ByAllisonRandal,DanSugalski,

LeopoldTötsch

Publisher :O'Reilly
PubDate :June2003
ISBN :0-596-00499-0
Pages :208
Slots :1

Copyright

Preface
HowThisBookIsOrganized

FontConventions




We'dLiketoHearfromYou
Acknowledgments


Chapter1.ProjectOverview
Section1.1.TheBirthofPerl6

Section1.2.IntheBeginning...



Section1.3.TheContinuingMission


Chapter2.ProjectDevelopment
Section2.1.LanguageDevelopment

Section2.2.ParrotDevelopment


Chapter3.DesignPhilosophy
Section3.1.LinguisticandCognitiveConsiderations

Section3.2.ArchitecturalConsiderations






Chapter4.Syntax
Section4.1.Variables

Section4.2.Operators




Section4.3.ControlStructures




Section4.5.ClassesandObjects

Section4.4.Subroutines
Section4.6.GrammarsandRules


Chapter5.ParrotInternals
Section5.1.CoreDesignPrinciples

Section5.2.Parrot'sArchitecture




Section5.3.TheInterpreter




Section5.5.Objects



Section5.7.Conclusion

Section5.4.I/O,Events,Signals,andThreads
Section5.6.AdvancedFeatures


Chapter6.ParrotAssemblyLanguage
Section6.1.GettingStarted

Section6.2.Basics




Section6.3.WorkingwithPMCs




Section6.5.StacksandRegisterFrames




Section6.7.Subroutines



Section6.9.PASMQuickReference

Section6.4.FlowControl
Section6.6.LexicalsandGlobals
Section6.8.WritingTests


Chapter7.TheIntermediateCodeCompiler
Section7.1.GettingStarted

Section7.2.Basics




Section7.3.FlowControl




Section7.5.IMCCCommand-LineOptions




Section7.4.Subroutines
Section7.6.IMCCQuickReference
Colophon
Index


Copyright©2003O'Reilly&Associates,Inc.
PrintedintheUnitedStatesofAmerica.
PublishedbyO'Reilly&Associates,Inc.,1005Gravenstein
HighwayNorth,Sebastopol,CA95472.
O'Reilly&Associatesbooksmaybepurchasedforeducational,
business,orsalespromotionaluse.Onlineeditionsarealso
availableformosttitles(http://safari.oreilly.com).Formore
information,contactourcorporate/institutionalsales
department:(800)998-9938orcorporate@oreilly.com.
NutshellHandbook,theNutshellHandbooklogo,andthe
O'ReillylogoareregisteredtrademarksofO'Reilly&Associates,
Inc.Manyofthedesignationsusedbymanufacturersand
sellerstodistinguishtheirproductsareclaimedastrademarks.
Wherethosedesignationsappearinthisbook,andO'Reilly&
Associates,Inc.wasawareofatrademarkclaim,the
designationshavebeenprintedincapsorinitialcaps.The
associationbetweentheimageofanaoudadandthetopicof
PerlisatrademarkofO'Reilly&Associates,Inc.
Whileeveryprecautionhasbeentakeninthepreparationofthis
book,thepublisherandauthorsassumenoresponsibilityfor
errorsoromissions,orfordamagesresultingfromtheuseof
theinformationcontainedherein.


Preface
Thereisnothingasscarytotheaverageprogrammer(tothe
averagehuman,really)asthesingleword"change."Change
meanstakingthetimetolearnanewwayofdoingthings.
Changescanbeannoying:movingtoanewhome,findingthe
shelvesreorganizedatyourneighborhoodcomputerstore,or
orderingyourfavoritebeeratyourfavoritepubonlytobetold
theydon'tmakeitanymore.Butchangescanalsobegood:a
vacationonthebeach,apromotion,araise,findingtheperfect
shortcuttoworkthatshaves20minutesoffyourcommute.This
bookisallaboutchange...thegoodkind.
Perl6isn'tfarenoughalongtosupportabookonthelevelof
ProgrammingPerl.Asdevelopmentgoeson,though,we've
foundthattheaccumulatedloreofthepastfewyearsisquite
anentrybarrierfornewpeople.Thisbookisasnapshotofthe
currentstatus,designedtoeasethatfirststep.Itcoversthe
projectthroughApocalypse6andthe0.0.10releaseofParrot.
BecausePerl6israpidlychanging,we'llpublisharevised
editionofthebookeveryyearuntilPerl6.0.0isreleased.


HowThisBookIsOrganized
Thisbookhassevenchapters:
Chapter1isahigh-leveloverviewoftheproject,withsome
historyofhowandwhytheprojectwasstarted.
Chapter2providesmoredetailonlifecycleswithinthe
projectandhowtogetinvolved.
Chapter3explainssomeoftheprinciplesbehindPerl6
designwork.
Chapter4isanintroductiontoPerl6syntax.
Chapter5explainstheoverallarchitectureofParrot(the
virtualmachinethatrunsPerl6).
Chapter6isanintroductiontoParrotassemblylanguage.
Chapter7isanintroductiontoParrot'sIntermediateCode
Compiler.
Ifyou'reaPerlprogrammerwhoiscompletelynewtoPerl6,
you'llbeinterestedinthisbooktogetanideaofwhatit'llbe
liketoworkwithPerl6,whywe'remakingthechangeswe're
making,andhowtheprojectisgoing.You'llwanttoreadthe
firstfourchapters.Ifyouthinkyoumightbeinterestedin
gettinginvolvedinimplementation,readtherestaswell.
Ifyou'realreadyinvolvedinthePerl6project,you'llbe
interestedinthisbooktoseehowallthepiecesfittogether,and
youmaywanttouseitasareferencewhileyou'reworking.If


you'vebeeninvolvedonlyonthelanguagesideortheinternals
side,you'llalsogetachancetoseewhattheotherhalfis
doing.Inthisway,theentirebookisrelevanttoyou.
Ifyou'reinterestedinimplementinganotherlanguageontopof
Parrot,you'llwanttoskimthroughtheParrotinformationin
Chapter2,andthenskipstraighttoChapter5andreadfrom
there.
Ifyou'renotinvolvedinPerlbutjustwanttoseewhatthe"Perl
6"buzzisallabout,you'llwanttoreadChapter1,Chapter3,
andChapter5.You'llgetanoverviewofwhatwe'redoingand
why,withoutallthenitty-grittydetails.


FontConventions
Thefollowingfontconventionsareusedinthisbook:
Italicisusedforfilenames,URLs,andemailaddresses
Constantwidthisusedincodelistingsandforfunction
names,variablenames,andotherliteraltext
Constantwidthitalicisusedtoindicatereplaceable
itemsincode


We'dLiketoHearfromYou
Pleaseaddresscommentsandquestionsconcerningthisbookto
thepublisher:
O'Reilly&Associates,Inc.
1005GravensteinHighwayNorth
Sebastopol,CA95472
(800)998-9938(intheUnitedStatesorCanada)
(707)829-0515(internationalorlocal)
(707)829-0104(fax)
Wehaveawebpageforthisbook,wherewelisterrata,
examples,oranyadditionalinformation.Youcanaccessthis
pageat:
http://www.oreilly.com/catalog/perl6es
Tocommentorasktechnicalquestionsaboutthisbook,send
emailto:
bookquestions@oreilly.com
Formoreinformationaboutourbooks,conferences,Resource
Centers,andtheO'ReillyNetwork,seeourwebsiteat:
http://www.oreilly.com


Acknowledgments
We'dliketothankthereviewerswhohelpedwhipthisbookinto
shape:DamianConway,DavidHand,LukePalmer,JosephRyan,
andRandalSchwartz.Allisonwouldalsoliketothankthe
UniversityofPortlandforitssupportofherworkonthisbook
andonPerl6.
ThisbookisdedicatedtothePerlcommunity,becauseit
wouldn'texistwithoutthem.


Chapter1.ProjectOverview
Conceptualintegrityinturndictatesthatthedesignmust
proceedfromonemind,orfromaverysmallnumberof
agreeingresonantminds.
FrederickBrooksJr.,TheMythicalManMonth
Perl6isthenextmajorversionofPerl.It'sacompleterewrite
oftheinterpreter,andasignificantupdateofthelanguage
itself.ThegoalofPerl6istoaddsupportformuch-needednew
features,andstillbecleaner,faster,andeasiertouse.
ThePerl6projectisvastandcomplex,butitisn'tcomplicated.
Theprojectrunsonasimplestructurewithverylittle
managementoverhead.That'sreallytheonlywayitcouldrun.
Theprojectdoesn'thavehugecashortimeresources.Itsonly
resourceisthepeoplewhobelieveintheprojectenoughto
spendtheiroff-hourstheir"relaxation"timeworkingtoseeit
completed.Thischapterisasmuchaboutpeopleasitisabout
Perl.


1.1TheBirthofPerl6
BackonJuly18,2000,theseconddayofthefourthPerl
Conference(TPC4),asmallbandofPerlgeeksgatheredto
prepareforameetingofthePerl5Porterslaterthatday.The
topicathandwasthecurrentstateofthePerlcommunity.Four
monthshadpassedsincethe5.6.0releaseofPerl,andalthough
itintroducedsomeimportantfeatures,nonewererevolutionary.
Therehadbeenverylittleforwardmovementintheprevious
year.ItwasgenerallyacknowledgedthatthePerl5codebase
hadgrowndifficulttomaintain.Atthesametime,infightingon
theperl5-porterslisthadgrownsointensethatsomeofthe
bestdevelopersdecidedtoleave.Itwastimeforachange,but
noonewasquitesurewhattodo.Theystartedconservatively
withplanstochangetheorganizationofPerldevelopment.
Anhourintothediscussion,aroundthetimemostpeoplenod
offinanymeeting,JonOrwant(thereserved,universally
respectededitorofthePerlJournal)steppedquietlyintothe
roomandsnappedeveryonetoattentionwithanentirely
uncharacteristicandwell-plannedgesture.Smash!Acoffee
mughitthewall."Weare*@$!-ed(Crash!)unlesswecan
comeupwithsomethingthatwillexcitethecommunity(Pow!),
becauseeveryone'sgettingboredandgoingoffanddoingother
things!(Bam!)"(Atleast,that'sbasicallyhowLarrytellsit.Asis
usuallythecasewitheventslikethis,nooneremembers
exactlywhatJonsaid.)
Awakenedbythisdisplay,thegroupstartedtosearchforareal
solution.Thelanguageneededroomtogrow.Itneededthe
freedomtoevaluatenewfeatureswithouttheobscuringweight
oflegacycode.Thecommunityneededsomethingtobelievein,
somethingtogetexcitedabout.
WithinafewhoursthegroupsettledonPerl6,acomplete


rewriteofPerl.Theplanwasn'tjustalanguagechange,justan
implementationchange,orjustasocialchange.Itwasa
paradigmshift.Perl6wouldbethecommunity'srewriteofPerl,
andthecommunity'srewriteofitself.
WouldPerl6,particularlyPerl6asacompleterewrite,have
happenedwithoutthismeeting?Almostcertainly.Thesigns
appearedonthelists,inconferences,andinjournalsmonthsin
advance.Ifithadn'tstartedthatday,itwouldhavehappeneda
weeklater,orperhapsafewmonthslater,butitwouldhave
happened.Itwasastepthecommunityneededtotake.


1.2IntheBeginning...
Let'spauseandconsiderPerldevelopmentuptothatfateful
meeting.Perl6isjustanotherlinkinthechain.Themotivations
behinditandthedirectionsitwilltakearepartiallyguidedby
history.
Perlwasfirstdevelopedin1987byLarryWallwhilehewas
workingasaprogrammerforUnisys.Aftercreatinga
configurationandmonitoringsystemforanetworkthat
spannedthetwoAmericancoasts,hewasfacedwiththetaskof
assemblingusablereportsfromlogfilesscatteredacrossthe
network.Theavailabletoolssimplyweren'tuptothejob.A
linguistatheart,Larrysetouttocreatehisownprogramming
language,whichhecalledperl.Hereleasedthefirstversionof
PerlonDecember18,1987.Hemadeitfreelyavailableon
Usenet(thiswasbeforetheInternettookovertheworld,
remember),andquicklyacommunityofPerlprogrammers
grew.
TheearlyadoptersofPerlweresystemadministratorswhohad
hitthewallwithshellscripting,awk,andsed.However,inthe
mid-1990sPerl'saudienceexplodedwiththeadventoftheWeb,
asPerlwastailor-madeforCGIscriptingandotherweb-related
programming.
Meantime,thePerllanguageitselfkeptgrowing,asLarryand
otherskeptaddingnewfeatures.Probablythemost
revolutionarychangeinPerl(untilPerl6,ofcourse)wasthe
additionofpackages,modules,andobject-oriented
programmingwithPerl5.Whilethismadethetransitionperiod
fromPerl4toPerl5unusuallylong,itbreathednewlifeintothe
languagebyprovidingamodern,modularinterface.BeforePerl
5,Perlwasconsideredsimplyascriptinglanguage;afterPerl5,
itwasconsideredafull-fledgedprogramminglanguage.


Larry,meanwhile,startedtakingabackseattoPerl
developmentandallowedotherstotakeresponsibilityfor
addingnewfeaturesandfixingbugsinPerl.ThePerl5Porters
(p5p)mailinglistbecamethecentralclearinghouseforbug
reportsorproposedchangestothePerllanguage,withthe
"pumpkinholder"(alsoknownasthe"pumpking")beingthe
programmerresponsibleforimplementingthepatchesand
distributingthemtotherestofthelistforreview.Larry
continuedtofollowPerldevelopment,butlikeaparent
determinednottosmotherhischildren,hestayedoutofthe
day-to-daydevelopment,limitinghisinvolvementtosituations
inwhichhewastrulyneeded.
AlthoughyoumightthinkthatthebirthofthePerl6project
wouldbethefirstnailinthecoffinforPerl5,that'sfarfromthe
case.Ifanything,Perl5hashadahugeresurgenceof
development,withPerl5.7.0releasedonlytwoweeksafterthe
initialdecisiontogoaheadwithPerl6.Perl5.8,spearheadedby
JarkkoHietaniemiandreleasedinJuly2002,includesusable
Unicodesupport,aworkingthreadsinterface,safesignals,and
asignificantimprovementoftheinternalswithcodecleanup,
bugfixes,betterdocumentation,andmorethanquadrupled
testcoverage.HugovanderSandenisthepumpkingfor5.95.10.Plansforthosereleasesincludeenhancementstothe
regularexpressionengine,furtherinternalscleanupanda"use
perl6ish"pragmathatwillintegratemanyofthefeaturesofPerl
6.Perl5isactiveandthriving,andwillcontinuetobesoeven
afterthereleaseofPerl6.0.


1.3TheContinuingMission
Muchhaschangedsincetheearlydaysoftheproject.New
peoplejointhegroupandothersleaveinaregular"changingof
theguard"pattern.Planschangeastheworkprogresses,and
thedemandsoftheworkandtheneedsofthecommunity
becomeclearer.TodaythePerl6projecthasthreemajorparts:
languagedesign,internals,anddocumentation.Eachbranchis
relativelyautonomous,thoughthereisahealthyamountof
coordinationbetweenthem.

1.3.1LanguageDesign
AswithallthingsPerl,thecentralcommandofthelanguage
designprocessisLarryWall,thecreatorofthePerllanguage.
Larryissupportedbytherestofthedesignteam:Damian
Conway,AllisonRandal,DanSugalski,HugovanderSanden,
andchromatic.Wespeakinweeklyteleconferencesandalso
meetface-to-faceafewtimesayeartohashoutideasforthe
designdocuments,ortoworkthroughroadblocksstandingin
thewayofdesignorimplementation.Thegroupisdiverse,
includingprogrammers-for-hire,Perltrainers,andlinguistswith
abroadspectrumofinterestsandexperiences.Thisdiversity
hasprovedquitevaluableinthedesignprocess,aseach
memberisabletoseeproblemsinthedesignorpotential
solutionsthattheothermembersmissed.

1.3.1.1Requestsforcomments(RFCs)
ThefirststepindesigningthenewlanguagewastheRFC
(RequestForComments)process.Thisspurredaninitialburst
ofcommunityinvolvement.AnyonewasfreetosubmitanRFC


onanysubject,whetheritwasassmallasaddinganoperator,
orasbigasreworkingOOsyntax.Mostoftheproposalswere
reallyquiteconservative.TheRFCsfollowedastandardformat
sotheywouldbeeasiertoreadandeasiertocompare.
EachRFCwassubjecttopeerreview,carriedoutinanintense
fewweeksaroundOctober2000.OnethingtheRFCprocess
demonstratedwasthatthePerlcommunitystillwasn'tquite
readytomovebeyondtheinfightingthathadcharacterizedPerl
5Portersearlierthatyear.[1]
[1]Mark-JasonDominuswroteanexcellentcritiqueoftheRFCprocess
(http://www.perl.com/pub/a/2000/11/perl6rfc.html).Itmayseemharshtopeopleaccustomed
tothemoreopenandtolerantcommunityoftoday,butit'sanaccuraterepresentationofthetime
whenitwaswritten.

EventhoughfewRFCshavebeenacceptedwithout
modification,theprocessidentifiedalargenumberofirritants
inthelanguage.Thesehaveservedassignpostsforlaterdesign
efforts.

1.3.1.2ApocalypsesandExegeses
TheApocalypses[2]andExegeses[3]areanimportantpartofthe
designprocess.LarrystartedtheApocalypseseriesasa
systematicwayofansweringtheRFCs.EachApocalypse
correspondstoachapterinhisbookProgrammingPerl,and
addressesthefeaturesinthechapterthatarelikelytochange.
[2]An"apocalypse"inthesenseof"revelation,"not"endoftheworld."

[3]An"exegesis"isanexplanationorinterpretationofatext.

However,theApocalypseshavebecomemuchmorethana
simpleresponsetoRFCs.Larryhasastartlingknackforlooking
at12solutionstoaproblem,pullingoutthegoodbitsfrom
eachone,andcombiningthemintoasolutionthatis10times


betterthananyoftheproposalsalone.TheApocalypsesarean
excellentexampleofthis"LarryEffect."Headdresseseach
relevantRFC,andgivesreasonswhyheacceptedorrejected
variouspiecesofit.ButeachApocalypsealsogoesbeyonda
simple"yes"and"no"responsetoattacktherootsofthe
problemsidentifiedintheRFCs.
DamianConway'sExegesesareextensionsofeachApocalypse.
EachExegesisisbuiltaroundapracticalcodeexamplethat
appliesandexplainsthenewideas.

1.3.1.3Thep6lmailinglist
ThenextbodyofdesignworkisthePerl6Languagemailinglist
(perl6-language@perl.org),oftenfondlyreferredtoas"p6l."
LukePalmerhasbeendeputizedasunofficialrefereeofthelist.
Heanswersquestionsthatdon'trequirethedirectinvolvement
ofthedesignteamorthathavebeenansweredbefore.Healso
keepsaneyeoutforgoodsuggestionstomakesurethedesign
teamdoesn'tmissthemintheseaofmessages.Thelisthas
approximately40regularcontributorsinanygivenmonth,as
wellasalargenumberofoccasionalpostersandlurkers.Some
peoplehaveparticipatedsincetheverybeginning;others
appearforafewmonthsandmoveon.
Eventhoughtheindividualschange,thegeneraltoneofp6lis
thesame.It'sanopenforumforanyideasontheuser-visible
partsofPerl6.Inthetypicalpattern,onepersonpostsanidea
and5to10peoplerespondwithcriticismsorsuggestions.The
listperiodicallytravelsdownaspeculativethreadlikearunaway
train,buttheseeventuallyrunoutofsteam.ThenLarrypicks
outthegoldenbitsandgentlytellstherestthatno,henever
intendedPerl6tohavehyper-vulcanmechanoidscooby-doobydoos.EvenwhenLarrydoesn'tpost,hefollowsthelistandthe
trafficservesasavaluablecatalystforhisthoughts.


1.3.2Internals
Parrotisagrandioseideathatturnedouttobemorerealistic
thananyoneoriginallycouldhavebelieved:whynothavea
singleinterpreterforseverallanguages?UnliketheparentPerl
6project,whichwaslaunchedinasingleday,theplanfor
Parrotformedinbitsandpiecesoverthespaceofayear.
OnApril1,2001,SimonCozenspublishedanarticletitled
"ProgrammingParrot"asanAprilFools'joke
(http://www.perl.com/pub/a/2001/04/01/parrot.htm).Itwasa
contrivedinterviewwithLarryWallandGuidovanRossum
detailingtheirplanstomergePythonandPerlintoanew
languagecalledParrot.Afewmonthslater,whenPerl6
internalsbegantotakeanindependentpathwithinthelarger
project,theydubbedthesubproject"Parrot"inafittingturnof
lifeimitatingart.


EarlyStepsTowardPerl6Internals
TheearliestprogresstowardimplementingPerl6startedbeforethecurrent
incarnationofPerl6wasevenconceived.TheTopazproject,startedin1998,
wasspearheadedbyChipSalzenberg.ItwasareimplementationofPerl5
writteninC++.Theprojectwasabandoned,butmanyofthegoalsandintended
featuresforTopazwereadoptedforPerl6internals,andthedifficultiesTopaz
encounteredwerealsovaluableguides.
SapphirewasanotherearlyprototypethatinfluencedtheshapeofPerl6
internals.Itwasaone-weekprojectinSeptember2000.ThebrainchildofSimon
Cozens,SapphirewasanotherrewriteofPerl5internals.Itwasneverintended
forrelease,onlyasanexperimenttoseehowfartheideacouldgoinaweek,
andwhatlessonscouldbelearned.

TheplanforParrotwastobuildalanguage-neutralruntime
environment.Itwouldsupportallthefeaturesofdynamic
languagessuchasPython,Ruby,Scheme,Befunge,andothers.
ItwouldhavethreadingandUnicodesupport(twoofthemost
problematicfeaturestoaddintoPerl5code)builtinfromthe
start.Itwouldsupportexceptionsandcompilationtobytecode,
andhavecleanextensionandembeddingmechanisms.
Thelanguage-neutralinterpreterwasoriginallyjustasideeffect
ofgooddesign.Keepingtheimplementationindependentofthe
syntaxwouldmakethecodecleanerandeasiertomaintain.
OnepracticaladvantageofthisdesignwasthatParrot
developmentcouldbegineventhoughthePerl6language
specificationwasstillinflux.
Thebiggerwininthelongterm,though,wasthatsinceParrot
wouldsupportthefeaturesofthemajordynamiclanguagesand
wasn'tbiasedtoaparticularsyntax,itcouldrunallthese
languageswithlittleadditionaleffort.It'sgenerally
acknowledgedthatdifferentlanguagesaresuitedtodifferent
tasks.Pickingwhichlanguagewillbeusedinalargesoftware
projectisacommonplanningproblem.There'sneveraperfect
fit.Itusuallyboilsdowntopickingthelanguagewiththemost


advantagesandtheleastnoticeabledisadvantages.Theability
tocombinemultiplelanguageswithinaprojectcouldbeahuge
benefit.Usewell-testedlibrariesfromonelanguageforone
task.Takeadvantageofacleanwayofexpressingaparticular
problemdomaininasecond,withoutbeingforcedtouseitin
areaswhereit'sweak.
Themodulardesignalsobenefitsfuturelanguagedesigners.
Insteadoftargetinglex/yaccandreimplementinglow-level
featuressuchasgarbagecollectionanddynamictypes,
designerscanwriteaparserthattargetstheParrotvirtual
machine.
TheinternalsdevelopmentforPerl6fallstotheParrotproject.
DanSugalskileadstheprojectasinternalsdesigner,andSteve
Finkisthecurrentpumpking.TheParrotprojectislargely
autonomous.Dancoordinateswiththerestofthedesignteam
toensurethatParrotwillbeabletosupportthesemanticsPerl
6willrequire,butthelanguagedesignershaveverylittleinput
intothedetailsofimplementation.Parrotisn'tdevelopedsolely
forPerl,butPerl6isentirelydependentonParrotitistheonly
interpreterforPerl6.
ThecorecommunicationlinefortheParrotprojectisthe
mailinglist,perl6-internals@perl.org,otherwiseknownas"p6i."
It'samuchmorebusiness-likelistthanp6l.WorkflowinParrot
takestheformofsubmittedpatches.Anyoneisfreetosubmita
patch,andcontributorswhoconsistentlysubmitvaluable
patchesoveralongperiodoftimearegrantedcheck-inaccess
totheCVSrepository.

1.3.3Documentation
Thoughadequatedocumentationhasbeenagoalfromthevery
beginning,thePerl6documentationprojectisarelatively
recentaddition.ItoperatesundertheguidanceofMichael


Lazzaro.Thestatedgoalofthedocumentationprojectisto
systematicallywalkthrougheachApocalypseandproducefully
specifieddocumentationfromit.Theresultsoftheprojectare
eventuallyintendedtobethedocumentationreleasedwithPerl
6.0.
Thetaskofthedocumentersisadifficultone.Thespecification
forPerl6isstillindevelopmentandconstantlyshifting,so
they'reshootingatamovingtarget.Theprocessisimmensely
valuablethough,asithelpstoidentifyinconsistenciesor
problemsinthedesignthatthebroadbrushstrokesofthe
Apocalypsesmiss.Sometimesitisthedocumentationprocess
thatcausestheshiftinlanguagespecification,asidentified
problemsleadtosolutionsandthesolutions,inturn,trigger
changesthroughoutthesystem.

1.3.4SupportingStructure
Last,butnotleast,isthegluethatholdstheprojecttogether.
ThehighestpraisebelongstoAskBjörnHansenandRobert
Spier,whomanagetheemail,revisioncontrol,andbug-tracking
systems,aswellasthewebpagesforPerl6andParrot.
Withoutthesesystems,theprojectwouldgrindtoascreeching
halt.
NathanTorkingtonandAllisonRandalsharetheloadofproject
management.Nattendstohandleoutsideinterfacingwhile
Allisontendstohandlethenutsandboltsoftheproject,but
neitherroleissetinstone.Asistypicalofopensource
developmentprojects,managingthePerl6projectisquite
differentfrommanagingacommercialprojectofthesamesize
andcomplexity.Therearenoschedules,nodeadlines,nohiring
andfiring,andnosalaries,bonuses,orstockoptions.Thereare
noemployeesorbosses;thereisverylittlehierarchy
whatsoever.Managementinthiscontextisn'taboutgiving
orders,it'saboutmakingsureeveryonehaswhattheyneedto


keepmovingforward.
Intheend,itisthedevelopersthemselveswhoholdtheproject
together.Eachindividualbearstheirownshareofthe
responsibilityforfindingataskthatsuitstheirskills,
coordinatingwithotherstokeepduplicatedeffortminimal,and
makingsurethejobgetsdone.


Chapter2.ProjectDevelopment
Theculture's(andmyown)understandingoflarge
projectsthatdon'tfollowabenevolent-dictatormodelis
weak.Mostsuchprojectsfail.Afewbecomespectacularly
successfulandimportant(Perl,Apache,KDE).Nobody
reallyunderstandswherethedifferencelies.
EricS.Raymond,TheCathedralandTheBazaar
ThePerlcommunityisrichanddiverse.Thereareasmany
variationsinskillsetsandskilllevelsastherearepeople.Some
arecoders,somearetesters,somearewriters,someare
teachers,somearetheorists.Foreveryskill,thereisatask.It's
thecombinationofalltheskillsthatgetsthejobdone.Ateam
ofworkersallwieldinghammerscouldneverbuildahouse.
Someonehastocutthewood,sandit,applyplaster,paintit,
andinstallwindows,doors,electricalsystems,andplumbing.


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×

×