 All right, yay, finally. I get through all the technical issues. Good afternoon, everybody. My name is Patrick Michaud, and I'm here to present about Pearl 6. To give it a little overview of what I plan to cover, first of all, a little bit of the history of Pearl 6 and some of its design decisions, some of the highlights about Pearl 6, some information about the various Pearl 6 implementations that are available and a little bit about their status and how they work. A lot of detailed information about what we call Recudo Pearl, which is the Pearl 6 implementation for Parrot, and I'll explain what all of that is here in a little bit, the status of that, and then things that you can look forward to that are coming up next. First of all, I'd like to start my presentation by thanking my various sponsors. These are people who actually give me enough money so that I can work on this stuff, and my wife doesn't complain too loudly. So that includes the Mozilla Foundation, NLNet, and the Pearl Foundation. And there's a space for sale if anybody else would like to add for that. So, how many people in here know Pearl? All right. How many people in here know Pearl 6? So, just a bit of the history of Pearl. I made this for a somewhat general audience, although we will get into some technical stuff as well. Pearl, of course, is one of the most popular scripting languages. Used to be you could say it was the most popular scripting language, but there's a few others that are kind of catching up with that. It's created by Larry Walls, powerful and expressive, and when people ask me why I'm interested in Pearl, I go back to a quote that Larry... Oh, it's also known as the duct tape of the Internet. I always go back to a quote that Larry put together a long time ago. He asked rhetorically, he's very into Eastern philosophy, he said, what is the sound of Pearl? And Pearl is the sound of a wall that no longer has a head beating against it. So, if you're not an English speaker, you don't know what that means. You know how in your programming, you know, you sometimes just want to go... Pearl means you no longer have to do that. That's what's wonderful about Pearl. However, as wonderful as Pearl is, it does have some drawbacks. That's why other languages, other scripting languages, are becoming more popular. For one thing, it does have a fairly steep learning curve. For somebody who is new to programming, Pearl can be very intimidating. The syntax can be very difficult. Many people say that it looks like modem line noise. And some of the computing concepts that were added to the latest version of Pearl, they were just kind of stuck on to the language. The language was never really designed with those in mind. And that includes even things like classes and objects, which, of course, is not a new concept, but they were just kind of added into the Pearl language in a way that kind of made it work without destroying too much of what had gone before. So, Pearl 6 is basically a complete language redesign. And the idea behind Pearl 6 was to keep the basic principles of Pearl. The things that make Pearl great keep those in there, those basic design philosophies. But redesign a language such that you keep all of those wonderful philosophies but that it all makes sense. And secondly, or lastly, get rid of all the mistakes that may have been there. As the design team likes to say, this is what they call second system syndrome done right. Whenever you invent a system, there's always a tendency to want to go back and do it again. And when you go and do it again, you make even new mistakes. So this is our chance to try and do it again without making all the new mistakes. The Pearl 6 definition was a community based effort. Larry Wall said he wanted the community to provide a lot of the input about what needed to change in the language to create Pearl 6. A long process then ensued and the specification is now available at this particular website. You can go and see the specs and the design documents. They're commonly known as the synopses. And if you know Pearl, they're fairly readable. And they are somewhat amazing to look at. It's an evolving work and it's been worked on since 2001. And so everybody sits there and they say, man, seven years. Can't y'all get it done yet? I'll talk about that more in a little bit. So changes from Pearl 5. This is some of them. You can see the list scrolls off the bottom of the screen. So we'll have to kind of look at that. The major changes are it has a cleaner, more regular syntax to hopefully make it easier for people to read and understand and to use. Now that said, it still looks like Pearl. Nobody will mistake this for a Python program or a Ruby program. It still looks like Pearl, but it doesn't have a lot of the funny oddities that used to be there in Pearl 5. We get rid of the memorized lists. In Pearl 5, you had to remember certain situations where you would do one thing in one situation but you wouldn't do it in another situation. We try to get rid of those and make everything the same. Has explicit strong typing. Has Unicode support. Has parameter lists. Named arguments. Operator adverbs. Classes and prototype-based logic systems. Has an extensible grammar. Subroutine. Overloading. Operator overloading. User-definable operators. And you can use Unicode characters for your operators. Named regular expressions and grammars. Page 2. Multi-method dispatch. Macros that are actually written in Pearl. No more source filters. List comprehensions. Hyper operators. Blah blah blah blah blah. Now, to try and tell you all the differences between Pearl 6 and Pearl 5, I can't do in 45 minutes. In fact, every year at the open source, O'Reilly open source convention that's held in July in Portland, Oregon, Larry Wall and usually Damien Conway will get together to describe what has changed in Pearl 6 from Pearl 6 of the previous year. And they can't even do that part in 45 minutes. So to try and describe everything in Pearl 6 in 45 minutes, I can't do it. So I'm not even going to try. I'm just going to pick some of the highlights that I think will interest people. If you want to see the full details, look at the synopsis. First of all, I said it has a more consistent syntax. If you read Pearl 5 code, this should make real good sense to you. So, of course, at sign A, we're creating an array. But if you wanted to access the elements of an array in Pearl 5, then the at sign A is a $$ sign. And that always confuses people. In Pearl 6, we've gotten rid of that. Whatever your variable name is, it stays the same no matter how you use it. Okay? So that's much more consistent. Same thing is true for hashes. It's with the % sign. If you want to get it in a hash element, it's always % something. It's not changing to a $ sign. We have consistent data type prefixes. The plus squiggle, the tilde, and the question mark are consistently used to mean numeric, string, or boolean context. So anytime you put a plus sign in front of something, that means you want its numeric value. If you put a squiggle in front of it, that means you want its string value. And if you have a question mark in front of it, that means you're looking for a boolean of some sort. So, the bitwise or operators now have three different forms. You can have a numeric bitwise or string bitwise or or boolean bitwise or. In Perl 5, we had just a few basic data types. Hash, array, scalar, reference, few others, subroutine. These are some of the built-in data types in Perl 6 that are defined. Large set. So, some nice things about Perl 6 over Perl 5, just continuing on. We have what are called chained operators. In Perl 5, if you wanted to see if something was within a range of two numbers, this is true in most other languages. You had to break it up and repeat it twice. So, this test to make sure that $x is between 0 and 10. So, you would say 0 is less than or equal to $x and if $x is less than 10. And we've become so used to doing this as programmers that you often forget that for new people that's not the intuitive way to do it. So, in Perl 6, you actually write it this way. And it means exactly the same thing. So, this test simultaneously that $x is greater than or equal to 0 and is less than 10. And it only evaluates $x once. Now, this is kind of a simple example. We can go a little bit longer and unfortunately this one scrolls off from the side of my screen here because I'm not at full resolution. But if this is testing if 1 is less than or equal to 1 and roll 1 is less than or equal to 6 and roll 1 is equal to roll 2 then you roll doubles, like if you were rolling a pair of dice, right? In Perl 6, we write this as the following. If 1 is less than or equal to roll 1 and that's equal to roll 2 and that's less than or equal to 6, you do the same thing. So, you get rid of a lot of those ampersands that were there. Dunctions. How many people are familiar with Damien Conway's superpositions module physics module? Well, it's built into Perl 6. That's Damien's contribution, but we call them junctions. A junction is a value that actually consists of multiple values. Now, it's not an array. It's actually still a scalar, but that scalar simultaneously holds multiple values. So, the way that we one way to represent junctions is by using the vertical bar. So, this says we have a value that is 1 or 2 or 3 and it holds all 3 of those values at the same time. And if we add 4 to that then we get back a value that is 5 or 6 or 7. And we don't have to decide which one it is until we do something later. But what that allows us to do is to make our programs even shorter. So, instead of having to do our test earlier that a roll was between 1 and 6 we can say unless roll is any of the values 1 through 6 do this. Or we can say if the roll is a 1 or a 2 or a 3 do this. You just write it out that way directly. Or you can even do longer tests. If none of the elements in A are equal to this element do this. Previously in purl 5 you'd have to write a loop to go through that or a grab or something that would actually go through all of the elements and test them for you. In purl 6 it's just very natural. If none of the elements in A are equal to this element do something. That's pretty nice about junctions. One piece that I don't have in my slide here is that junctions are also or they can be automatically threading that it will do the operation in parallel and if you have a multi-processor type environment then it can actually fork it out. You haven't implemented that part but that's the idea is that it would automatically thread. Purl 6 has what are called hyper operators. Most of the operators have hyper forms of them. So, an example in purl 5 if you wanted to take a pair of elements of array A and B and add them together to pairwise to form C then you could write a little loop to do it. In purl 6 we have this thing called the hyper operator. It uses the French chevrons or the French quotes, the French angle brackets which are the double ones and you put those around an operator and that says you want it to be hyperized. You want it to do something on an array of elements instead of on a single element. And so if we want to pairwise a pair of elements of A with B and stick that in C you just write that line there. Or if you wanted to increment all of the elements of an array you can do it with increment. Take all of the elements in the array XYZ and add one to them. Cool. By the way, I should say my role in purl 6 is on what's called the purl 6 pumpkin. I'm the one that's in charge of writing a compiler. I do not do the language design. It's not my fault. I don't design the language. I'm just responsible for implementing it. Purl 6 has what are called reduction operators. These are kind of like the hyper operators but they do something different. Any infix operator an infix operator has two operands. Any infix operator can be turned into what's called a reduction operator where it works on an entire list. So this is saying working on infix plus that we want to take the elements one, two, and three and pairwise add them together and give me the result. So this is a shorthand for saying sum all the elements of a list. So here's a few more examples. This one here sum all the elements of a and stick it in sum. Or if you wanted to multiply them all together you can multiply them all together and put them in product. If you want to compute the factorial create a range from one to n and multiply all those together. If you want to make sure that all of the elements are in increasing order that is that they're sorted and that there are no duplicates then you can say pairwise test every element of a to make sure that the preceding element is less than the following element and it will be false if that's not true. If you want to find the minimum element of a list there's actually a min operator in purl 6. So you can say check all the elements of a and give me the smallest and do it that way. In purl 6 I mentioned you can define your own operators. So if you don't like the several hundred operators that purl 6 gives you you can create your own. So if you want to have that a exclamation point after a value means take or make the factorial of you can define it. This says define the exclamation point coming after a value, after an integer value and makes the factorial definition. That just adds it directly into the language. Similarly if you wanted to have the plus or minus operator that's a unicode character mean give me a value that is simultaneously the positive and negative version of the value then that will do that. You can use any sequence of characters as an operator token. It doesn't have to be just symbols. So here I've said create a new operator called parenthesis C closed parenthesis which is of course the way to designate copyright. And so if you have a copyright it takes two arguments and it will give you back a string that says the first argument is copyright by and then the second argument. You could actually write somebody's name, parent C, closed parent and then a date and it would give you back a string that is what I just put there. In purl 6 we actually have real formal parameters as opposed to signatures. So you can actually say I want to declare a function and it takes three parameters called x, y and z. So that's built in. Now if you want to do it the old way with the at sign underscore you can still do that. That's not hard to do but this allows us to do type checking and a variety of things. And so we also can do explicit typing. We can say I want to have a sub where the first argument has to be an animal the second argument has to be a dog and the third argument can be anything. We can also do optional parameters. Here we have a function the first parameter x is required the second parameter y is optional. The third parameter z is optional and defaults to 3 if it's not given. We can do named parameters in addition to positional parameters and that's done with the colons. So this says I want to create a sub routine called formalize. It's first required parameter is called text and there are two named parameters one called case and one called justify that can be passed in and they're optional. We don't have to give them but we can add them and that gives us a number of different ways to call this particular function. For example, we can call it and pass a pair and this says that when that function is called the dollar sign case variable will have the value upper or we can do it using a pair notation like this colon justify with the parentheses and do that or we can do it like this where we say we want case to be upper and we want justify to be left and there's only about 12 other ways to do it there and I think I'm underestimating at 12 there's just a ton of ways to be able to call that particular function and have all the arguments appear in the right place. Pearl 6 has something called a smart match. How many of you like regular expressions in pearl 5? How many of you like regular expressions in pearl 4? That's where I got started. When I first saw regular expressions they saw so many problems for me. And just to give an idea of what happened with pearl 6 the way I got involved in all of this is in 2004 the pearl 6 design team put out a call to the community and said we're looking for somebody to be the compiler pumpkin hopefully somebody who has a lot of time on their hands and I had just left my position as a professor to go on sabbatical and I didn't have anything planned for the sabbatical so I said I'll have a lot of time on my hands maybe I'll do this and they turned around and said great you're it and I went and looked at the regular expression syntax for pearl 6 and I said oh my god who's going to implement that and then I realized oh that's me anyway in pearl 5 what was the equal squiggle operator becomes tilde tilde what we use for regular expression matching right so this is checking to see if dollar sign x contains the letters msg followed by a sequence of digit followed by dot txt and I'll explain the syntax here in a little bit but that's just doing a good old regular expression match however you can use smart batch with things other than regular expressions so you can do a smart match between a scalar and a type and this basically doesn't is a test to spot a dog or you can do a smart match between two arrays and that makes sure that the two arrays are identical that they have identical values or you can do an array and a pattern and this says which of the elements in A match that pattern now I'm going to test that or you can test for a range you can say is this value inside of this range given by that and there's a whole bunch of other things if you go and look at the smart match operator you say man this thing does everything and that sounds a lot like pearl but the smart match is really really nice for being able to do all sorts of different comparisons it gives pearl 6 a lot of the do what I mean context that pearl 5 had pearl 6 has a switch statement but we don't call it switch it's now called given and when there's a reason for that there's a strong reason for that because it does more than what the traditional switch in case does so the typical syntax is given expression and then you say when expression, when expression default so what we're doing is we're take the first expression, test it against this one if so do this, otherwise test against this expression if so do this, otherwise do this however that when part is not just a simple comparison, it's a smart match so all of the different combinations of smart match that I just give gets there given sets a topic for the enclosing block and the when keyword smart matches its expression against the current topic and if it's true if the smart match actually matches then it executes the block and leaves the outer block and if it's not true it just continues on to the next statement so you can do something like this given a variable x, y, z when it is exactly the string spot do this otherwise if it contains the string spot in it somewhere but it's not exactly that do this otherwise if x, y, z is really a dog of some sort do this otherwise if x, y, z is one of the elements inside of the cat's array do this otherwise if x, y, z does not appear in the abc array do this otherwise do this so you can do all those tests as a given when statement switch statement how many people want to write that in pearl 5 that would take quite a bit of code the when statement is not limited to working inside of a given it will work inside of any construct that sets a topic so you can also do it inside of a loop so this is looping through all of the elements of an array and we'll print out what element we have and then we do this switch statement as part of the array and so for each element in this loop we're going to test it against each one of these conditions and do the appropriate thing so the regular expressions the regular expressions syntax is greatly improved I already mentioned that when I went through and looked at it I said wow this is really amazing and then I said oh gee I'm the one that gets to write this apparently but in order to get rid of a lot of the things that people had to memorize inside of regular expressions some things have been changed to make them more regular first of all punctuation inside of a regular expression is what we call medicine tactic which means anything that's not a letter or a digit has a special meaning either reserved or actual in a regular expression so if you want to match something that's not a letter or a digit then you have to use quotes around it or otherwise quote it with a backslash using quotes for our literals makes a lot of things easier now you only have to use quotes if you're going to use something that's not a letter so here where I said MSG I could omit the quotes there that mean the same thing but this says I want to match something that has the letters MSG followed by a sequence of one or more digits followed by .txt so that's how the regular expression works another change in regular expressions is that we have we've taken the brackets away from the character class match and we now use it for non capturing groups in pearl 5 many people don't know this but that used to be the parent question mark colon sequence and that's really a pain to write and so now we can do it in non capturing groups with just the brackets so this says we want to match either the word alex or a b followed by one or more e's or c one or more c's we can now name our regular expressions and you can name captures within a regular expression the way to do that is by using the keyword regex this says we want to define a new regular expression we want to call it number and we're going to define our numbers as being a set of one or more digits optionally followed by a decimal point and more digits after that and of course we could make that much more complex but then later whenever we want to use that regular expression inside of another expression we no longer have to repeat it we just put it in angle brackets and so this is saying I want to take dollar sign a and I want to extract a number out of it where number was that previously defined regular expression you can combine them so here I can say a sigil is any one of these characters an identifier is an alphabetic character or an underscore followed by one or more word characters that should be a zero a name is an identifier followed optionally by zero or more double colons and more identifiers and you can see each one refers to something else and so a variable is a sigil followed by a name in addition to regular expressions we have things called tokens and rules if you're familiar with compiler and language design then all of this starts to look really familiar because tokens and rules and stuff are the things we use to define languages so a token is a regular expression but it turns off all the backtracking and that makes it really fast for writing lexical analyzers because we're not going to try and backtracking the expression we just want to match whatever we can and stop and so a token is a special type of regex that turns off the backtracking and then a rule is a token which means no backtracking but now the spaces inside of the expression mean something and so this means this rule says we're looking for a keyword if followed by something that matches an expression followed by a block of spaces that are here actually correspond to spaces in the input so that it'll match zero or more or one or more spaces in a smart way so we don't have to worry about putting a lot of backslash s stars in there to say match spaces here if they show up it just does the right thing and then of course we can combine all of these and create what's called a grammar and this is actual purl 6 code grammar is a keyword it's just like a class of sixes and rules but this just kind of gives an idea of what a grammar might look like for a simple language some other features of purl 6 of note but due to time constraints I'm not going to try and cover them here we have things called feed operators gather and take, try and catch hyper is actually a keyword that means do the following in parallel cross and zip operators to combine lists, inline comments whole bunch more stuff okay so that's purl 6 I would take questions at this point but I'm going to run short on time and I'm sure there's tons of them so I'll push that to the end so purl 6 implementation great we have this wonderful language how can anybody actually use it if you look at purl 5 there's really just one major implementation of purl 5 and it's called purl 5 of all things in purl 6 the decision was made that purl 6 should be a language specification but not necessarily a single implementation and so there could be multiple implementations and there's good reasons for doing that and people say well why would you want to do that and the answer is well how many implementations of C compilers are there right there's lots of them and how many implementations of other language translators are there there's lots of them so having everything tied to a single implementation is not necessarily a good design principle so there's multiple implementations and any implementation that passes the official test suite is purl 6 can call itself purl 6 so the current implementations that are out there the one that I work on is purl 6 on parrot in January we decided to call this recudo purl I'll explain the name here a little bit the one that has the most features of purl 6 implemented is called pugs it's written in Haskell and so it's the one if you really want to play with a lot of the esoteric features then you'll want to use pugs but development on pugs has stalled quite a bit over the past year so we expect recudo purl to catch up pretty quickly there's also an implementation that was being done to try and implement purl 6 on top of purl 5 using the pugs translation and that's got some effort behind it but it seems to have stalled a little bit as well there's a version of purl 6 called kind of purl 6 which is an attempt to write a complete purl 6 system using only purl 6 and that's going along pretty well and then the most recent one by Daniel Grosso is a SMOP which has multiple meanings just like purl means lots of different things SMOP has multiple ones and it's an attempt to try and write a purl 6 engine purely in C without like a virtual machine underneath it so can I skip a slide no I got it so what is parrot parrot is a virtual machine that's designed to efficiently compile and execute bytecode for dynamic languages one of the things that early came out when purl 6 was being developed is they realized that they would probably need a new runtime engine underneath it but the purl 5 runtime engine wasn't really going to work to do and they said instead of writing one just for purl 6 let's do it for a whole host of dynamic languages things like python and tickle and nowadays of course ruby and javascript and the like let's try and come up with an engine that would do all of these and so that's what parrot is for it's the target for recoodle purl and it's already usable for a variety of languages such as purl 6 TCL purl 1 we have an implementation of purl 1 we passed the purl 1 test suite we have a implementation called piney it implements python it's still a bit new but we do have python programs running on top of parrot there's a php implementation there's a lua implementation there's lolcats code implementation we have list, apl a variety of other languages that are being implemented on top of parrot now one of the nice things about this and one of the goals of this effort is that when we have all of these languages sharing the same run time they can actually communicate with each other and you can have for example your python program call a purl library or vice versa or to be able to embed purl code within your python program or vice versa and so we're fairly confident that we're going to be able to achieve this the way that the system is designed I was skeptical at first when I first heard about it but I'll try and see where we go and like many things about purl 6 when I first look at them it's like there's no way this can work but as we keep plugging away at it it's like oh we can actually do this so some of the goals for parrot things that dynamic languages typically need memory management everybody's got to have a garbage collector why don't we all share the same really good garbage collector regular expression support how many languages don't have regular expressions these days the parrot has a regular expression engine built in that understands a lot of the different syntaxes and can actually do it object support is built into the runtime engine threads, native calling interface just-in-time compilation introspection, language operability and the big thing that parrot brings right now is some really powerful tools for implementing language translators so that's what I'm going to show briefly next collectively it's known as the parrot compiler toolkit it's a set of tools for creating compilers and programs in parrot and with this toolkit I'm going to show you how we actually create compilers under parrot and how the purl 6 compiler is being built there's a variety of components to it there's a thing called the parser grammar engine it builds parsers if you're used to thinking in terms of lex and yak in parrot we use the parrot grammar engine we have a parrot abstract syntax tree this is an abstract representation of the semantics of the program we have a special purpose language called not quite purl and what this is, it's a very simple form of purl 6 that you can use to write programs for parrot and then we have a generic HLL compiler object that provides a generic interface for high level language compilers now the interesting thing about most of these components is that to use them you write your code in purl 6 there's an assembly language that you can also use in parrot but most of the guts of the compiler is actually being written using purl 6 syntax and that includes the purl 6 compiler itself so to create a compiler you define a grammar, you define actions you create a HLL compiler object you create the functions in library specific for your particular language you debug and all is wonderful so let's look at parsing just to give a kind of detailed example of how this works for parsing we want to analyze an input sequence that's our source code program we want to determine the structure of the statements in that source code we want to figure out what the programmer wrote and we want to do it according to the rules for a language in other words we're looking for patterns inside of the source code and to a purl programmer pattern means regular expression and part of the genius of the language that Larry Wall, Damien Conway and others have designed is that this is a language that is infinitely suitable for writing compilers as you will see so what happens is the parrot compiler toolkit uses purl 6 regular expressions and grammars for parsers instead of tools like lex and yet here's an example let's say that we have a language where this is a valid source statement if some sort of condition then in a statement we want to when we're parsing when we're looking at the source code when a compiler is looking at the source code we want to break it out into its various parts an if keyword, an expression, a then keyword and a statement the general pattern for an if statement is if, expression, then statement if you've gone through various compiler design courses then you know that we have this thing called BNF grammars and as a BNF grammar you might write it this way if statement is the keyword if followed by an expression, followed by a statement in purl 6 you would write it like this rule, if statement is the keyword if followed by an expression, followed by a keyword then followed by a statement that's it that writes the parser for the if statement let me give an example of what a more complete grammar looks like just briefly so you can see it so this is a grammar for a version of the BC compiler from the BC tool in Unix so you can see there's a rule for the top there's a rule for a statement list it consists of a statement followed by semicolon and more statements a statement can be any of an if statement a while statement, a for statement or a string or an expression there's what an if statement looks like there's what a while statement looks like it's the keyword while, followed by a keyword followed by a token of a parenthesis, followed by an expression followed by a closed parenthesis, followed by a statement you can just read that that's what the language looks like so when you're done what happens is you can take a program now again this is a version of BC which is a calculator so it can take an expression like 3 plus 4 and it produces a parse tree and this is actually what the compiler toolkit does for you once you write the grammar you automatically get the parser and it automatically produces a parse tree for you once you have a parse tree we want to convert it to something called an abstract syntax tree and these are the things that represent the operations and the things the program is supposed to do so the compiler toolkit provides these generic abstract syntax tree nodes so to see what the abstract syntax tree representation of an if statement would be we need to create a past op node set it's type to be if set it's first child as the condition set the second child as the thing to do if the condition is true in pearl 6 we would write it like this this is the transformation for a if statement so here we say we want to create a new past op node the first child is the abstract syntax we have an expression the second one is of the statement and it's an if statement and we're done that's what our transformations look like for the compiler then we have the special purpose HLL compiler class it provides us lots of options for debugging and helping to build the compiler and to get an idea of how effective all of this is in 2007 I attended Python conference in Dallas, Texas I figured I had to go I figured as long as I was going to the conference I might as well be a speaker at the conference try being a pearl speaker at a Python conference but I wanted to go and talk about parrot so I went and talked about parrot and about the Python effort on parrot so I put in my proposal and said I'm going to present the Python compiler on parrot and one thing led to another and the night before my talk was due I still hadn't written the compiler actually hadn't started it yet so the night before I said I better get started and in six hours I was able to write a working compiler using these tools going straight from the language spec to having something that I could demonstrate at the Python conference and people applauded it was like that's an amazing toolset now that's not just my great programming ability that's how advanced the concepts are going into Pearl 6 and the tools that these other people have designed it's really amazing another example is LOL code how many of you have seen LOL code before it's incredibly funny right all right Simon Kozens and Will Colleta having never used the parrot compiler toolkit before wrote an implementation of LOL code in four hours so four hours they went from not really knowing much about the toolkit to actually having a basic LOL compiler LOL code compiler that worked we ended variables, did expressions and did stuff like that these are really powerful tools as Simon Kozens said it's really really true parrot lets you implement your own languages using Pearl 6 rules for the grammar and Pearl 6 for the compiler the compiler tools also support bottom up compilation I don't have much time so I'll skip it in Pearl 6 we're reserving the name Pearl 6 to mean the language only it never refers to a specific implementation and so Pearl 6 on parrot has got the name Rakudo Pearl Rakudo is short for Rakudado which means way of the camel it also means paradise in Japanese isn't that nice so Rakudo is paradise that's what we're aiming for things that work in Rakudo basic expressions as of today basic expressions in operator scalers, rays, hashes, a lot of the standard Pearl things that you expect to be there other things that exist and work classes, roles and objects we can do regular expressions using the Pearl 6 syntax fry blocks that's for exception handling lexical and package scope variables begin and end blocks, junctions work variety of things that have been put together that actually work some things that we fake there's a few things that we don't quite handle yet we don't handle list context because Larry hadn't defined it how it was supposed to work until three weeks ago so we're about to do that types is kind of faked so there's a few things that we fudge in there but for the most part it's a working Pearl 6 compiler if you want to get it yourself you can check it out from the SKN repository building it is pretty straightforward just get a copy of it, go to the parrot directory, run configure, run make make Pearl 6, you get a Pearl 6 binary okay why is Pearl 6 taking so long to develop? I only need about one more minute part of the reason is Pearl 6 is extremely ambitious if you go and look at everything that's going into this language it's huge in 2004 when I started people would say people were legitimately questioning whether we had designed a language that could not be implemented and I even wondered which is why I wanted to try it and I'm convinced it can be implemented now because we're doing it and all of the different features I think can be done but a lot of them take a lot of time to put together the design took longer than expected the language is constantly evolving and people say no we should pick a spec and stick with it and get it done but I disagree because the things that are changing in the language now are changing because we're finding problems as we're doing the implementation and so we need to improve that not only that but the scope has gone beyond just Pearl 6 we're looking at a full multi-language environment for things like parrot and the reason why it took so long is it took time to develop the tools that would let us create Pearl 6 and that's really happened here there's an increasing development curve now parrot releases are monthly people say parrot and Pearl 6 are dead they're not dead by any stretch of the imagination for the last year and a half we've been doing monthly releases every third Tuesday of the month except when I do it it ends up being the third Wednesday because I'm a procrastinator the parrot object model finally got implemented in November of 2007 the compiler toolkit followed after that in December 2007 everything else has been increasing since then I have a quick, oh no I lost my picture so I'll skip it if you want to learn more about Pearl 6 the main Wiki site is here you can of course do a Google search for Pearl 6 and it'll take you to the right places to begin with there are a number of mailing lists that you can join if you want to become an active developer you can focus on the compiler on parrot development on languages most of the Pearl 6 people tend to hang out on IRC those are very active channels you can either join Channel Parrot on IRC.pearl.org or Pearl 6 on IRC.frido.net so in conclusion Pearl 6 is a substantial redesigning improvement of the pearl language I think you can see some of that here when people think of Pearl 6 as being an incremental improvement I say no it's really kind of a new language it's still pearl but it's really a new language and it's a much better language everybody I know who has written programs in Pearl 6 doesn't want to go back to Pearl 5 which is the way I felt when I started writing programs in Pearl I didn't want to go back to C or Java or Kobol or anything like that Pearl 6 exists today in a variety of implementations at various levels of completion but there's enough to play with there's nothing that's production ready yet I suspect that'll happen within the year Parrot is an incredible machine for dynamic languages and the compiler toolkit is improving the development of all languages so with that how much time do I get for questions okay question right here that's good so what you said so far is the tilde operator is tilde tilde what about the compatibility with the older code with older pearl 5 programs the way that that's going to be handled the question is what do we do about compatibility with pearl 5 programs what we're going to do is actually embed pearl 5 as part of Parrot the compiler is scanning the program it will look for something that says this is definitely a pearl 6 program and if it sees it then it will go to a pearl 6 compilation otherwise it will go to a pearl 5 compilation and it will access it that way I have another question up front one of my primary worries about pearl 6 had been because it's been in development for so long although it's as you say an ambitious language it's not necessarily that ambitious because there's nothing that pearl 6 does that for example Haskell hasn't been doing in recent years a number of the functional languages do you think that maybe pearl 6 has now missed its window of opportunity okay so the question is has pearl 6 missed its window of opportunity it's a legitimate question and I personally I think no a lot of people say that it may have missed its window of opportunity however let me pose it in this particular way let's suppose that there was a brand new scripting language that came out that had all of these features but wasn't called pearl would people be interested in it and the answer is probably yes and the proof of that is that we still see new languages popping up such as Ruby and other things that have come about that there are features that appear in other languages that we would like for pearl to have as well and yet we don't say that all scripting language development should stop so if you think of pearl pearl 6 as being really kind of a new language that uses a lot of the things that we're familiar with then in that sense we haven't missed our window of opportunity it's a legitimate competitor in the scripting marketplace and I think my personal feeling is that it is such an improvement in terms of the totality of things that it incorporates that it'll be the standard for a long time to come I think I'm about out of time thank you very much