Interview with Audrey Tan, Part 1
- Transfer

Audrey Tan is primarily known as the creator and developer of Pugs , the Perl 6 User's Golfing System, the Perl 6 implementation on Haskell, which appeared on February 1, 2005 and was the most actively developed and most complete implementation at that time.
The questions and answers in this document are licensed under CC0 and are in the public domain.
Biography
You started learning Perl when you were 12?
I met Perl from Randal Schwartz's “The Llama Book ” when I was 13. I watched closely the development of the OnePerl project during development 5.004-5.005, helped create communities, such as the Usenet group tw.bbs.comp.lang.perl , and learned a lot from the nascent CPAN community.

Was it your first language?
My first computer languages, at the age of 8, were GW-BASIC and Logo (LISP variant). I programmed in different languages (LPC for LPMud, etc.) before the web appeared in 1994.
In addition to Pugs, you have many Perl 5 modules published on CPAN since 2001. How was your life related to Perl before Perl 6?
Since the advent of the web, Perl has virtually covered all of my programming needs for the next 10 years. In 1999-2000, I migrated from EFNet to IRCNet to the new Rhizomatic server (also known as MAGNet, later irc.perl.org), where I learned about the global Perl Monger initiative and the more reckless Perl Golf endeavors .
At that time, we were translating the third edition of The Llama Book into traditional Chinese , so it seemed logical to form Taipei.pm and join the wider CPAN community. I mainly worked on CPANPLUS, the CPAN smoke test framework, Module :: Signature, and the PAR / pp package building tool.
When and why did you decide to work on Perl 6?
I visited OSCON 2003 to givemaster class on PAR.pm - although I spent most of the flight preparing a blitz report that was very warmly received by the community. The last blitz in the same session was Allison's Restaurant , with these particularly inspiring words:
You know, if one person, just one person, does this, they might think that he is sick and put him in a psychiatric hospital. And if the two do it, in unison, they might think that both are nuts, and hide both. And if three do it! Can you imagine - three people come in, sing a line from Perl 6 Development and go out? They might think this is an organization! Can you imagine fifty people a day? I said FIFTY people a day ... incoming, singing a line from Perl 6 Development and leaving? Then, friends, they might think that this is MOVEMENT, and so it is: ANTI-MILITARY, CLEANING, POSSIBLE DELIVERY, LOVING PARROT DEVELOPMENT PERL6 MOVEMENT! .. and you all should join us and sing next time.It was then that I decided to work on Perl 6.
Before Pugs, you actively participated in the Parrot project. What exactly were you doing there?
I participated with Dan Kogai in a discussion about the internationalization infrastructure at Parrot on the perl6-internals mailing list .
Besides that, I just tried new builds from time to time and reported problems with the build process; I was not actively involved in Parrot in the early years when the project was run by Simon Cozens and Dan Sugalski.
When you started this, did you think about creating both a compiler and an interpreter?
Yes. 02/26/2005 Pugs Apocrypha already talked about compilation in Haskell, Parrot, and Perl 5.
-Ofun
You are the author of the “-Ofun” meme, or “Optimizing for fun”. What does this mean for you and what was it for the rest of the team?
There is a set of slides explaining what this meant to me:
For community members, this meant a culture of warm welcome, regular updates, attention to detail, personal feedback, building a ladder of skills and helping each other.
For software hackers, the “-Ofun” culture focuses on using distributed versioning, encouraging forks, preferring ideas over consensus, hugging trolls and throwing ideas through code.

What could be the path of the project, would you choose the opposite motto, for example, “There is no premature optimization”?
“-Ofun” actually means the same thing as “No premature optimization,” because premature optimization would limit the possibilities of research, and thereby reduce pleasure.
In the case of the logical opposite, that is, if I chose “Optimization for boredom” or “Optimization for boredom”, I think we would have reached a local maximum very quickly, ending in a very definite way - specifically, rushing towards ⊥. :-)
But seriously, compiling and testing early versions of Pugs took literally hours. What did you do to speed it up?
We waited for Moore's law to catch up, and it worked pretty well. In addition, we refactored large, monolithic modules into smaller parts, which made incremental compilation and testing noticeably faster.
For Pugs releases, you used the π approximation as version numbers. Is this also part of “-Ofun”?
Undoubtedly. This doubles the fun of the TeX versioning system .
The TeX versioning system implies that no significant changes will be made in future versions. There were several steps in implementing Perl 6. How close have you been to this list?
6.0: Initial release
6.2: Basic I / O and flow controls; mutable variables; assignment
6.28: Classes and traits
6.283: Rules and grammars
6.2831: Type system and layout
6.28318: Macros
6.283185: Porting Pugs to Perl 6, if needed
Pretty close. In Pugs, the first two stages were implemented according to the Synopsis, and we are pretty far along the path to the third stage. The early implementers of step 6.28 eventually started the Moose project, bringing the Perl 6 object system to the Perl 5 and JavaScript communities.
As for the following three steps: although Pugs helped start the discussion of the design of these aspects, it took much longer for the Synopsis to crystallize for grammar systems, types, and macros using the subsequent implementers of Perlito, Niecza, and Rakudo.
Haskell
Quoting your post announcing Pugs, it was "an attempt to write a Perl 6 interpreter in Haskell." Why Haskell?
At that time, I was studying Haskell on the ask.freenode.net Haskell channel:
Pugs was my second Haskell program, originally written as an exercise for the book “Types and Programming Languages” (page 82 of the slides above).
Haskell is a purely functional programming language, while Perl 6 is not. Which parts of the implementation have become easier thanks to this choice, and for which Haskell is not very suitable?
This was useful in that it was much easier to talk about the semantics of Perl 6, making all the ambiguities in the specification explicit, because Haskell does not give preference to one semantics over another.
As for the flaws, there is a list in my 2010 article . The Haskell community was still young when we started the Pugs, and I'm glad to see that cross-pollination pushed both communities forward.

You often mentioned monads in your blog posts; what did you do with them in pugs?
An interpreter is a monad of this type: It explicitly expresses the continuation semantics, the type of result, the lexical environment of the run-time, and distinguishes between the states of programmatic transaction memory, input-output effects, as well as clean code. A parser is another monad that includes an interpreter monad, allowing BEGIN blocks to change parsing logic at compile time. Has the nature of Haskell helped implement the async and start keywords and all the features for parallel and competitive things in Perl 6?
runEvalT :: ContT (EvalResult Val) (ReaderT Env SIO) (EvalResult a) -> Eval a
-- data SIO a = MkSTM !(STM a) | MkIO !(IO a) | MkSIO !a
Definitely. When Perl 6 explored concurrency and concurrency designs, the Haskell community also dealt with the operational semantics of their underlying abstractions, such as streams, events, limited continuations, and so on. It was very appropriate to use advanced design to check if the advanced design was good.
What about the object-oriented features of Perl 6, including the method resolution order?
The resolution of multimethods, as well as the interaction with junctions, were among the first things that Pugs helped clarify in the design of Perl 6. We also influenced the adoption in Perl 5 of a plug-in order of method resolution: the mro.pm module included in the base packagerefers to Pugs as inspiration, thanks to Stevan Little, who completed the initial C3 prototyping .
Your quote : “A twenty-minute hack paid off in full: in 33 lines we got a quick implementation of support for the basic Perl 6 rules on pure Haskell.” This sounds amazing, can you explain how this is possible, and how Haskell (or, apparently, some libraries) works internally with Perl grammars and rules?
This is about Text.Parser.Rule.parseGrammar , the PGE port of Patrick Michaud's Parser Arrows Haskell. Internally, arrow abstraction made the effects that accumulate during parsing much more pronounced. Later Adrian D. Thurston (independently) fully exploredthe idea of parsing engines with built-in return / cancel rules, resulting in the Colm programming language.
You also contributed to Haskell itself. Specifically, you worked in the Haskell 'project (Haskell Prime) to upgrade Haskell standards. What was your role there, and did working on Pugs change your vision of Haskell and how it should evolve? Or, in short, did Perl 6 affect Haskell?
I have been working on language suggestions related to Unicode, such as SourceEncodingDetection ; In addition, I considered and discussed other proposals. Pugs was an early follower of GADT, Delimited Continuations, QuasiQuotation, etc., and we gave feedback on the GHC to make these opportunities more seamless.
Our main influence on Haskell, however, was attracting people to the study of Haskell for the most part of the online online community, instead of its original academic setting, Powered by PhDs. People who met Haskell through the Pugs - such as Edward Kmett - continued to revitalize the Haskell community with the same spirit of intense collaborative development.
In the same 2005, you began to study Erlang. Do you think it was possible to write a Perl 6 compiler in this language? Would it be different from a Haskell implementation?
Definitely possible. The main difference is that Haskell - thanks to its ability to make all effects explicit - helped clarify the set of semantics of Perl 6, “native” to Perl 6, which made it unique among other functional languages at that time.
If not Haskell or Erlang, what other functional languages could be candidates for creating a Perl 6 compiler or interpreter?
OCaml would also be a smart choice, with its emphasis on runtime performance and good multi-stage programming support.
Among contemporaries, Perl 6, Scala, Clojure, and C # 3.0+ (on which Niecza is built) are excellent functional languages for implementing Perl 6.
Compiling a project on Haskell required not only patience, but also dependencies such as GHC and the Haskell compiler. This could stop those who just wanted to play with Perl 6. What did you recommend to such an audience?
Yes: I recommended Perl 6 test servers, deb-like packages like Haskell Platform and MinGHC, and Perl 6 IRC bot.
Command
Within a few weeks after launching Pugs, the project had half a dozen contributors, and a year later more than 200. How did it happen that the project in a language completely different from Perl (I mean Haskell, not Perl 6 :-)) attracted so many people ?
There was already considerable community interest in Perl 6, and Pugs benefited from the generosity of the community. For example, Scott Walters, who wrote Perl 6 Now in 2004, graciously donated pieces of Perl 6 code that became one of the earliest materials in the Pugs repository.
In fact, relatively few people worked on the Haskell codebase. Due to the strong culture of “first tests”right from the start, most people at IRC contributed by writing Perl 6 code - examples, tests, modules - so the language barrier wasn’t so restrictive.

How many active contributors were there?
There were 131 active commiters during the first year, and 395 people all had a list in the perl6 / mu repository .
How many of them lingered for a long time?
Many of the followers either stayed on the # perl6 channel or subscribed to Perl 6 related news and blogs, but the degree of engagement is difficult to assess.
However, since there are more commiters in Perl 6 after 2007 than there were in 2005-2006, it is clear that the Perl 6 community has successfully booted up.
You are known as a project coordinator who easily distributes commissions. What did you do when someone committed something completely different from your vision for project development?
Usually I changed my vision accordingly - and consulted with language designers to change their vision accordingly. In this regard, the IRC channel was an effective tool for uniting the vision of different people.
Do you have any rules for developers?
The only requirement is that you know how to relate to a variety of people (and, some years later, butterflies ), or learn to relate well, or at least want to learn how to relate well. As Larry says :
You do not want to be good yet, but perhaps you want to want. Perhaps we can help with this. If the acceleration remains positive, the speed and position will also be tightened over time.
Probably not every member of the Pugs team was familiar with Haskell? Was it easy for them to work on the project?
As mentioned above, most of the participants in IRC contributed by writing Perl 6 code.
For those who wanted to learn Haskell, we prepared READTHEM and READTOO files specifically for this . Studying Haskell was not particularly simple — those who already had experience in imperative programming had to unlearn many habits — but we did everything we could to make this process enjoyable and properly nourished .
Can you name a few members of the team that have contributed the most and tell what was their merit?
Pugs was a fully collaborative project. If I list those I remember along with their significant contributions, the answer to this question will be longer than the rest of the interview!
However, I would say that this consistency would not appear so quickly if it were not for the existing online community infrastructure in the form of use Perl; , Perl Monks , Perl Mailing Lists , FreeNode IRC and OpenFoundry Project Hosting - these spaces, with the underlying technologies and operators, have made this kind of interaction possible in principle.
To be continued...