Интервью /

Interview with Florian Ragwitz (rafl) (June 2014)

How and when did you learn to program?

I still am and I don't think I'll be done any time soon.

They say you never forget your first, but apparently that's a lie. I've been dabbling around in programming starting from around the age of 10, but I can't quite remember what initially sparked my interest.

I do however have fond memories of a certain "children's learning computer". It had the form factor of a laptop, but was really just a children's toy. It had a monochrome 4x20 character display and came with a couple of educational programs such as various word and maths puzzles installed. A lengthy internet search seems to suggest it was called "V-Tech Genius Leader 4004 Quadro L" (http://www.pinterest.com/pin/146930006562843060/) and apparently only sold in Germany. In addition to the various learning games it also had a BASIC interpreter and the manual included a brief introduction to the language. I have no recollection of what I programmed with that device, but I do remember being fascinated by BASIC and spending a lot of time with it.

A less fond memory is of the i486 my family used in their business for some time. I enjoyed playing games and learning about Windows 3.1, DOS, and batch file commands, but I got into trouble a few too many times for breaking the whole system and my family having to call support to be able to do their work again.

The next programming related memory I have is from some time later during secondary school. We were all using Casio graphing calculators of the CFX-9850G series (http://en.wikipedia.org/wiki/Casio_9850_series). It was programmable through a dialect of BASIC and a great distraction during the more boring classes. I recall writing a couple of programs I'd use in maths or physics class to solve certain problems, but most of the time I'd be writing games for it. One of my proudest programming achievements of that time was a graphical 2 player chess game. Sadly, both players had to play on just a single calculator. To this day I blame a bug in the implementation of the Send() and Receive() commands of my calculator model for the network multiplayer version never fully working. My attempts at writing a chess AI on that device were never successful either.

I've also had some exposure to languages like Logo and Pascal in school and I tried to learn about Visual C++, Visual Basic, and Java once I had my own personal computer at my disposal. None of those things really stuck, though. It wasn't until I stopped using Windows that I've started programming on a regular basis to solve actual problems I was having. Most of my programs from that time were quite simple and written in shell. Some of the more complicated ones were written with awk, PHP, and Perl.

What editor do you use?

Both!

Quite some time ago, probably around the year 2002, I've switched from Windows to Linux as my primary operating system. The first text editor I've been introduced to as part of that switch was Vim. A little while later, after I had figured out how to exit the editor and had gotten a chance to read some of its documentation, I had grown quite fond of its modal editing and expressiveness.

Vim is a great editor and even today I still use it on a regular basis. However, my primary editor these days is Emacs.

I had been wanting to switch from Vim to Emacs for a fairly long time. I found some of it's features and extensions quite intriguing. I spend a lot of my time in org-mode (http://orgmode.org) and probably wouldn't wanna switch to another editor that didn't provide similar functionality. Being able to use different fonts within the same buffer is very helpful in editing structured text like LaTeX documents and Perl POD - having =head1 headings displayed larger than =head2 headings, for example, makes the document's structure a lot more clear to me.

In addition to that, I also have a tendency to spend too much time configuring and fine-tuning my most commonly used tools, text editors included. I'd much rather spend that time writing Emacs Lisp than Vim Script.

Switching from Vim to Emacs wasn't easy and it took me several tries. It went surprisingly smooth, though, after I had finally stopped using Vim to edit my Emacs configuration and forced myself to use Emacs for everything with something along the lines of alias vi=emacs in my shell configuration.

I'm occasionally trying other editors and IDEs and am excited about how easy they make certain things that'd take me an hour or longer to configure in Emacs. I'm looking forward to switching editors again in the future, but I have yet to find a new editor with enough distinguishing features to make the pain of switching worthwhile.

When and how have you been introduced to Perl?

I vaguely recall me getting interested in Perl when I was doing web programming with PHP a lot, still during secondary school, probably around 2003. I might've come across it in a UNIX book I was reading, or perhaps I've stumbled upon it searching for an alternative to the PHP language that I didn't feel particularly happy with at the time.

Version 5.8 was recent at the time I started using Perl. It was a marvelous language compared to what I was used to. Lexical scope alone was worth switching to me. PHP, at the time, didn't have namespaces, closures, or even anonymous functions. Perl had all that, and then some.

I would still sometimes write the occasional program in PHP due to how easy it was to deploy the result, at least when compared with Perl and other languages at the time. Perl excels in many things, but ease of deployment still doesn't seem to be its strong suit, albeit the many improvements it has seen since when I started using it. That makes me a little sad.

What are other programming languages you enjoy working with?

Most of them.

Almost every language I've encountered so far has something unique and interesting about it. I feel that with every new language I learn about, I become a slightly better programmer. Many languages seem to impose a certain world view onto their users, but rarely, if ever, is that world view the only valid one.

Exposure to different ideas as expressed in different programming languages often makes me reconsider my preconceptions about those ideas. Many dynamically typed languages being popular currently and some older static type systems, such as C's and Pascal's, having lots of practical problems doesn't make static typing a bad idea. Threads aren't bad because Perl's threads are bad. Functional programming paradigms can express many problems very naturally, but yet there's problems that are much more elegantly solved with object-orientation.

There's many of these somewhat contradictory concepts in the field of programming. Most of the time, though, I feel they aren't actually mutually exclusive. Typically each option has its own merits that have to be considered in the context of the problem you're trying to solve. You're not going to be able to do that if you only know one of the options because that's the only one supported by your programming language.

Therefore, I try to learn and use a lot of languages whenever I get the chance. The ones I'm currently most fond of include Haskell, F#, OCaml, Go, and Scala.

What do you think is the strongest Perl advantage?

Historically Perl had a lot of advantages over many of the other language at the time: it's "manipulexity" and "whipuptitude", the support for many different programming paradigms, it's portability, the great support for text processing, it's culture of testing, and so on. Since then, however, it appears that other programming languages have caught up.

At first I was gonna answer this question saying CPAN would be Perl's strongest advantage. CPAN most definitely is one of the main reasons I continue writing Perl code, but even in that area other languages seem to have made huge leaps forward and CPAN probably isn't the leader of the pack anymore, at least as far as the comprehensiveness of the module archive is concerned.

One thing Perl still has going for itself is its, to my knowledge, unparalleled malleability. Many things usually considered to be impossible in other languages are quite doable in Perl, even though doing so might be a bit involved. I would like Perl a whole lot less if it weren't possible to write modules like Moose, List::Gather, or Scope::Escape::Sugar for it. On the flipside, modules like that tend to just add language features that are already available in one form or another in various languages. I don't know if that's a good or a bad thing.

What do you think is the most important feature of the languages of the future?

I can't think of a single most important feature I'd like future languages to have, but I'm hoping those languages are going to liberally steal from existing languages such as Lisp, Haskell, and Scala. I feel there's many language features in those that haven't quite made it into the mainstream programming world just yet.

I hope I won't have to program in languages without pattern matching and destructuring binds for much longer. I also find the prospect of automatic parallelisation of operations for which it can safely be done quite exciting. I'm also looking forward to see static type systems evolve further so I won't have to debug quite as many of my dumb mistakes because the compiler will tell me about them upfront and reject the program.

Another area I'm hoping to see improvements in is interoperability between different languages. Many languages now sharing a common run-time environment like the JVM or CLI is a great step forward for code reuse across language barriers, but I think there's still a lot of room for improvement. I don't believe there can be a single language that's good at solving every kind of problem, and I'd like to have more freedom to mix languages as I see fit.

Do you write CPAN modules because you lack functionality or as a proof that it can be done in Perl?

Most of the modules I wrote and the contributions I made to other people's modules were motivated by actual problems I've been having. Almost all of the time I'd contribute to existing modules trying to fix bugs I encountered or to make them more general in order to solve my specific problems. Only rarely, for example in the case of List::Gather, have I had to write new modules because the existing ones just weren't good enough for my purposes.

Most of the new modules I wrote were provide functionality I wanted to use that was not previously available on CPAN at all. A lot of those seem to just be bindings to existing C libraries I wanted to use.

The only module I recall creating as a proof something could be done in Perl was my signatures.pm experiment.

How did you end up releasing perl distributions?

I don't quite recall how exactly that happened, but I did my first release of Perl in 2010, during Jesse Vincent's reign as a pumpkin. I imagine he either asked me to do a release or I volunteered to do so, probably on IRC. Back then the new release process establish by Jesse was already pretty good and shipping a new version of perl turned out to be surprisingly easy.

My favourite releases remain 5.15.4, which I got to release on Larry Wall's sofa, 5.17.5, which I was able to release live during a talk about Perl release management at YAPC::Brasil, and 5.14.2, the only non-development version of perl I've ever shipped.

How does one start contributing into perl core?

I don't have a good way to recommend, but what I did was scratching my own itches.

It appears that my first core commit was in 2008. Back then given/when and smartmatch were still new and exciting to me, and apparently B::Deparse, which I use a lot when working with Perl, didn't seem to handle that new construct very well yet. That bugged me enough to go ahead and fix it, and it turned out to be super simple - it was a one line code change in the B::Deparse module.

Many of my early commits followed the same pattern. At some point I discovered that I couldn't easily combine perl's -E and -p/-n options when using the perl -n'} END { ...' pattern in oneliners. A tiny 3-line patch later it worked. Whenever I'd find a typo or inaccuracy in the documentation I'd submit a patch. It felt very rewarding.

In general, there's nothing magic about the perl core (well, maybe with the exception of sv_magicext() and related functions). A lot of the perl core is written in perl itself - the same kind of perl code you deal with every day. There's absolutely no point in being intimidated by it. I feel that almost every Perl programmer would be able to contribute to the core of their language in one way or another if they set their mind to it.

Does perl have enough volunteers to keep its code evolving? What are the current most important needs?

I'm not currently worried about Perl not having enough volunteers to maintain and improve the language, though there's certainly room for more.

I don't know what Perl's most important need right now. For anyone wanting to start contributing, the perlhack documentation and the Porting/todo.pod that are part of the perl code distribution should contain plenty of starting points. I'm sure the perl5 porters community would also gladly discuss ways for you to contribute if you approached them on the p5p mailing list, the #p5p IRC channel, or otherwise.

Personally I'm hoping to see alternative implementations on Perl that are able to run in different environments such as on top of the JVM, the CLI, or perhaps LLVM. Projects like Compiler::Lexer, Compiler::Parser, and gperl seem like a step in the right direction, but it seems to me that there's still a lot of room for improvements in that area.

What do you do for Debian?

Not much anymore. I used to maintain a relatively large number of packages. Most of them were Perl-related, but I also packaged a couple of non-perl things such as the XMMS2 music player and various clients of it. These days, most of my former packages have found new maintainers that are doing a great job at keeping them up to date and in working order.

Where do you work now? How much of your time are you writing Perl code?

I work at a small IT consultancy called Infinity Interactive (http://iinteractive.com). There I get to work with whatever tools are appropriate to fix our partner's problems. Sometimes that's Perl, and sometimes it's something else. I quite enjoy the technical diversity of my work.

As of late I've been working mostly on systems automation tasks. Application programming in Perl is currently about 10% to 20% of my work time.

Should we encourage young people to learn Perl right now?

I don't think Perl is one of the better languages for teaching and learning programming. I'd probably recommend different languages for a newcomer's first foray into the field.

Nonetheless, I believe there's many good lessons to be learned from studying Perl which are gonna be useful in a programmer's life, no matter if they're gonna use Perl to solve their problems or not. In that sense, I feel that encouraging developers, young and old alike, to learn about Perl is generally a good thing.

Questions from our readers

How do you notice that your talk is too hardcore for an average developer?

Sadly, I usually don't.

How did Acme::rafl::Everywhere started?

That happened during YAPC::NA 2012 in Madison, Wisconsin. On my first day there I joined a group of Perl folks organised by Dave Rolsky for an (anti-) arrival-dinner. Also amoung us were Robert Blackwell and Sawyer X.

I don't quite recall how the conversation got there, but at some point Robert pointed out how I appeared to be present in a lot of different communities and/or projects. I believe he alluded to the relatively large number of very diverse CPAN modules I maintained at the time, me being a contributor to many non-Perl projects such as Git, Linux, XMMS2, and Arduino, and possibly also the fact that I had visited all of the 5 YAPCs as well as many international Perl workshops in that year.

At some point, the phrase "you are everywhere!" was uttered, and Sawyer just ran with it. A lot of the jokes in Acme::rafl::Everywhere originate from that dinner. Later on, once Sawyer had published the module shortly after the conference, a few other silly people sent pull requests to add additional facts.

Apparently there's even a "!rafl" bang command on DuckDuckGo.com these days.

I feel ambivalent about all of this.

How often do you go outside?

If the slight sunburn on my forehead and neck right now is any indication - too much.

There's many exciting things going on in Brooklyn and New York City in general, and sadly most of them don't happen in my home. In order to be able to see those, I'm sometimes forced to go outside. That's usually a sacrifice I'm willing to make. Also the selection of beers on tap in my home is quite limited, so I often have to resort to working from various bars and beer gardens in the area.

Interview by Viacheslav Tykhanovskyi (vti)