Wednesday, March 29, 2006

Interview with Audrey Tang

Perlcast is back in action with an interview with Audrey Tang, the creator of the Pugs project, maintainer of numerous CPAN modules, and general contributor to open source. In this interview we discuss Pugs, what it is and where it is going.

O'Reilly is also giving away ten editions of the upcoming book "Perl Hacks" through their new Rough Cuts system. To be entered in a drawing for "Rough Cuts", just send an email to perlcast+perlhacks at




Today is Tuesday March 28th 2006 and you're listening to another Perlcast interview. This is your host, Josh McAdams, here with an interview with Audery Tang. Audrey blasted onto the Perl scene with the Pugs project. Aside from that, she maintains over one hundred CPAN modules and is a contributor to numerous open source projects.

As an added bonus O'Reilly will be giving away ten electronic versions of Perl Hacks through their Rough Cuts program. To enter the contest, just send an email to perlcast plus perlhacks at gmail dot com. That is perlcast, the plus sign, perl hacks, the at sign, gmail dot com. Get those emails to me by April 10th for the drawing on April 11th.

And now, on to the interview.



Welcome to another Perlcast. Today on Perlcast I have Audrey Tang. Audrey is very well known for her Pugs fame here in the Perl world, but she also maintains many other modules. I think about a hundred on CPAN also. Well, welcome to Perlcast Audrey.

I guess we'll get started and I'll just ask, for those who don't know, what is Pugs?


Pugs is a project that works on everything related to Perl6 with, many sub-projects... one that parses Perl6, runs Perl6, translates Perl6 to other languages and runtimes. We also work on Perl6 examples, documentations, tests, and, well, everything else.

Currently Pugs is the only Perl6 implementation, but that may change in the future.


If somebody is really wanting to learn Perl6 then Pugs, would be the only way that they could go right now.


Yeah, I think is the case.


Whenever you say Pugs is a Perl6 implementation does it actually just parse the Perl6 language and get that into something that Parrot can run or does it go further than that?


Well, currently we have a reference implementation written in Haskell that runs Perl6. But we also have pretty comprehensive support for compiling Perl6 and turning it into JavaScript that runs in your browser.

And, besides that we have Parrot and Perl5 compilation targets that are coming along pretty well. But the most exciting thing by far is to write one more of these parts in Perl6 itself so that one day we will have a fully bootstrapped Perl6 compiler and also the implementation runtime already in Perl6 itself. And that will be the ultimate goal for the Pugs project.


So that was one thing that I was going to ask you about: bootstrapping the language. So at one time I think that Perl5 was gonna be used and then at another time C. And now, is it going to be Pugs that used, or Haskell, that's used to bootstrap the language?


Well, we are using Perl5 and Haskell and well basically everything at our disposal. But, I think the way to think about this is while in Perl5 all of the language features are hard coded into the runtime, into the interpreter, in the XS C-level macro language. In Perl6, actually, there is just a very minimal language inside and all the other sugars are just translated. We call it desugaring. Basically from complex macros and rules into this very simple language and then we can take this simple language and compile it to Parrot or to Javascript or to Perl5.

So this translation process, this the sugaring process, could be written in Perl6 or Perl5 or Haskell. So think of it as a scaffolding that we've already built in Haskell and we are taking it bit-by-bit off and replace it with pure-Perl equivalents so that one day it can bootstrap itself.


You actually announced this project in February of 2005 and so a little over a year has passed. Are you pleased with the progress?


It was quite unexpected. I mean I started this as my pet project, pun intended, to learn about junctions and multi-methods, the exciting Perl6 features that were at that time quite poorly understood. And then people started submitting patches and writing IRC bots in it and, gasp, deploying it in production. And, yeah, I totally didn't foresee it happen and my life haven't been the same since then. But overall I was very impressed and amazed by our 200 contributors and nearly 10000 revisions in the first year and with Larry Wall and Damian and other people becoming committers and hanging around IRC. I think the next year is going to be even more amazing and impressive.


I noticed that was mention in the Q&A of the Pugscode website that Pugs could be used kind of as a test for ideas in the Perl6 language. So, has that actually happened and has Pugs been used to shape some of what Perl6 will be as far as syntax?


Oh yes, definitely. In #perl6 IRC Freenode, we have Larry Wall and Chip of Parrot and Rafael of Perl5 and a lot of other people who care about the language evolution of Perl5 and Perl6. So I've been experimenting with the ghost writing procedure where we experiment with some Perl6 features in Pugs and discover what works and what doesn't work or make feature suggestions. And because Larry and other design team members are on IRC, so we make a decision right there and get other people to review and then I'll commit it into the synopsis that is the Perl6 language specification. So it is done in a very iterative and very very fast fashion, this feedback loop between the implementation and the language design.


Well after Perl6 does finally arrive, what is Pugs gonna be at that state? Will it still be useful, will it still be around?


I think the Perl6 design team makes a distinction that Perl6 is a language, while in Perl5 you know that it's a pun right? Depending on one bit, whether it's written upper case, where perl5 means the language or it's lower case where Perl5 means the implementation. No matter how you write Perl6, Perl6 is just a language. So, Pugs the project produces, depending on how you count, two or three Perl6 implementations already. And there will be no doubt be other Perl6 implementations in the future. Not necessarily from the Pugs project.

But, yeah, Perl6 will become like C or C++, a language with many implementations and I think that is a very good thing to drive innovations forward.


Why in the beginning did you choose Haskell to implement Pugs?


Because I was learning Haskell?

Well seriously, I think Perl6 and Haskell have many things in common. Perl6's major features such as power parsing with rules and grammar and infinite lists and streams and complex data structure matching and pipe system. All of those things are present in Haskell, if not in the very sweet and sugary and convenient Perl6 syntax. But, they share some very similar underlying semantics.

So by starting with something already resembles Perl6 somewhat, it's far easier to get something up and running very quickly instead of starting from something that is quiet apart from Perl6, which would make things much harder.


Pugs seems like an amazingly intimidating project to get started on, but I'm sure
you need quite a bit of help, so what types of help are you needing right now?


It is really not that hard to start jumping in and hacking because one of our newest and most exciting sub projects is the Perl5 runtime, where we taking pieces of Pugs, the rules parser and emitter and compiler and turn them into CPAN modules that you can use in your existing Perl5 programs.

So for example we just uploaded Pugs::Compiler::Rule, a rules engine written in Perl6 cross-compiled to Perl5 and you can use that in your Perl5 program now. And there will be more modules like that in the future, so if you know Perl5 its really easy and exiting to start hacking Perl5 and Perl6 interoperability. So that you can mix Perl6 and Perl5 in the same programming, running in the Perl5 interpreter.

But, we also very much need English hackers because the synopsis only specifies the look and feel of the language. But, we are writing real Perl6 programs now so we're also in need of specifying the various APIs, the methods of the building objects, and things like that. So we are collecting the various overviews and tutorials and things like that and turn them into a Perl6::Doc launched on CPAN so people can access it with the normal POD tools. So if you know English and/or POD, then that would be an exciting thing to get into.

But, in Pugs we're really language agnostic because our intermediary data structures are mostly in YAML now. And YAML can be loaded and manipulated in any language. So no matter what you are interested area is, like a refactoring browser or a syntax highlighter, you can write it in your favorite language.


Audrey, I really appreciate you coming on Perlcast and telling us a little bit about Pugs. is there anything else that you'd like to tell the audience.


Hmm, let me think about it. Well I think this podcasting is a wonderful idea so I'll probably convert my public talks about Perl6 and Pugs and turn them into MP3 and flash and upload them to That's the Pugs development journal. So, feel free to check it out.

So, Perl6 is fun and Pugs is fun and just join us and have fun. Thank you very much Josh for the interview.



I would like to once again thank Audrey for taking the time to be interviewed and also thank O'Reilly for their continued support of Perlcast through promotional give always. On that note, remember to get your entry in by April 10th to perlcast plus perlhacks at gmail dot com.

Be sure to check back with Perlcast soon. There are interviews with Bob Walsh, the author of "Micro ISV: From Vision to Reality", as well as, Steve Oualline, the author of "Wicked Cool Perl Scripts", already recorded and awaiting post production.

Also, as some of you know, I'm helping organize Yet Another Perl Conference this year in Chicago. Well, we just opened registration for the conference, which will be held from June 26th to 28th on the campus of the Illinois Institute of Technology. Also, just after the conference we will have three open classes taught by some of Perl's premiere instructors: Learning Perl by brian d foy, Intermediate Perl by Randal Schwartz, and Perl Best Practices by Damian Conway. With the conference costing only $85 and the classes only $200 each, this is one of the best deals in conferences today. Check out for more information and instructions on registering.

The artist for this podcast was Feldspar with "Lunatics Audio" from their "Metropolis Mixes" album.

Thanks for listening to Perlcast. This is Josh McAdams signing out until next time.

Tuesday, March 7, 2006

Interview with Chia-liang Kao

This time we have an interview for you that was recorded at at Euro OSCON 2005 in Amsterdam. Jose Castro and BooK interviewed Chia-liang Kao, the creator of svk. svk is a version control system written in Perl. Listen it to find out more about what svk is, why it was created, why people should use it, and what "complaint-driven development" means.

The artist for this podcast was Ten Story Relapse with
the track "Planting Seeds".

Wednesday, March 1, 2006

Comments, and Other News

For a while, the comment spam got out of hand and so I shut off all blog comments. Since then, a few listeners have requested that I turn comments back on. Comments are turned back on now. You no longer need to be registered to post comments; however, all comments will be held for moderation. I'll try to approve them as fast as I can, but if it takes a day or so to get your comment on the site, please forgive me.

In other news, Perlcast has been quite for a while. I've been in the process of swapping out jobs and machines and didn't queue up quite enough podcasts to last the gap. Hopefully I'll have a show up tomorrow. And, don't worry, I have a few more interviews scheduled to happen.

Thanks for listening!