The campus newspaper of IIT Kharagpur

Perls of Wisdom

As the creator and Benevolent-Dictator-for-Life of the Perl project, Larry Wall is a regular rock star in the world of programming. After his talk at Kshitij ’11, The Scholars’ Avenue caught up with Larry and his wife Gloria for some intellectually stimulating conversation on Perl, Linguistics, Religion and much more. 

TSA: How has your stay been at Kharagpur?

Larry: It’s been wonderful. I think the talk had a good turnout. (Gloria: There were some fans with signs! Ha). I thought it was a good thing it was held in a large auditorium. Everything about my stay was wonderful. They made sure that there were too many people, like in volleyball; you want too many people going for the ball rather than too few people going for it. We had too many people taking care of us, and it was really a good thing.

 

TSA: Did you interact with any students? And what do you think about the open source community here in India?

Larry: A few of them, yes. They are a small group but they are excited, and there are a lot of other people who are interested even if it’s not their main branch. People here are studying an awful lot of different things and that is fine by me because, you know, Perl is not designed to be used just by the hard-core programmers, but by people just trying to get their job done. So I really love to see people who are on the edges looking in and being interested in it. There have been a number of people who have participated in Perl development from India, though it’s a little hard because our time zones are backward. But these days we do round-the-clock development; whenever I wake up, I have to see the backlog on the IRC channel and see what happened while I was asleep. So, there’s always somebody awake and working away. I guess maybe people around here are just a little more intent on pursuing their careers; people in the US have a little more free time to spend on things that seem not essential. (That is just a vague impression. I could be wrong about it.)

TSA: Please describe your journey from preparing to go to Africa as a linguist to writing Perl.

Larry: We were planning to become field linguists, and I was providentially hindered from doing so by developing a set of food allergies which would make it very difficult to be field linguists. At that time we thought that it was sort of a bummer, but you just sort of do what is right in front of you. What was right in front of me at that time was working in industry and paying for my kids. But it also was a very big learning experience working in the Defense industry, and later NASA’s JPL. For a while I went from being a programmer to being a system administrator, and system administrators do a lot of text processing and quick and dirty scripting. I just didn’t like the tools that were available. Well, the Unix philosophy was “Do one thing and do it well”, but it was not clear that the Unix tools at that time were doing one thing or that they were doing it well. Often the one thing they were doing was the wrong thing. So I needed a language that would be better able to integrate the tools that did do the one thing that I needed to do and do it well. I’d done languages before. I had done languages for school and my employment earlier at Seattle Precinct University. So I knew that I could write a language. I just started by hacking something together with yacc, and out came Perl.

TSA: In the past few years, web frameworks for scripting languages like Django, Ruby on Rails, etc. have brought more users into their languages. Do you think Perl has fewer of those mainstream applications that could draw more people into the community?

Larry: Perl has had some over the years, tending to have several of them simultaneously. It is not like the Ruby world where Ruby on Rails is dominant. But there are 3 – 4 projects that are slightly less prominent, but existing at the same time. So, that might be healthier for growth. We are not really interested in a big PR thing. We are just interested in getting people’s jobs done. It is nice when you can have a nice exciting killer app, but there are other ways to make progress and be of help.

TSA: What do you think is the largest system or architecture you have encountered that was written in Perl?

Larry: That’s hard to say. Amazon’s pretty big, they’re pretty much… by definition, Amazon. And there are even some Wall Street firms. Well, there are a lot of companies, but they don’t make a big deal of it.

TSA: What was the weirdest bug you have encountered?

Larry: The strangest bug that I actually ever ran into, I had to debug by sound. This was actually a C++ bug – while I was working at the Jet Propulsion Laboratory, I think, I was stepping through a program that was misbehaving. I kept looking at the code 10 times, but I could not figure out what was going on. I was stepping through it with a debugger and I hit ‘next’ and my disk rattled. I said, “Why did my disk rattle?” It was just a declaration of a variable. Then I said, “Wait. C++ is always running these hidden constructors underneath, you know, doing various sorts of things.” So I poked down that constructor and realized that there was actually a bug in there. So the disk rattle told me there was something happening, while I thought it was just a static declaration. That was the fun-est debugging that I’ve ever done.

TSA: Do you have any words of advice for rookie programmers who are out trying to find their language or platform of choice?

Larry: I would say that the most important thing for somebody who is starting out is to find a project that you’re interested in. I mean, there should be some external reason to be interested and motivated. I think when you are starting off you should try different things, and find what speaks to you.

Gloria: One of them will be the way that you think. But then it’s also good to find things that are not the way that you think.

Larry: If you study languages that are different from the way you think, then either you learn to think differently or you decide that you don’t like that language. I recommend learning things differently because that will strengthen your skills. Then even if you are using a language that does not necessarily support the same way of thinking, it’s often easy to add in a few things that make it easy to think that way. The flip-side of that is that if you happen to program only in one language, then you always happen to do the same things. The old saying was that Real Programmers can program Fortran in any language. So that’s also a trap to avoid. You sort of got to learn to think the way it’s natural in a language. If you learn to think in a number of different languages, you might eventually decide that a multi-paradigmatic language like Perl is right for you, because you can think of it whichever way you want, whether you’re trying to do functional programming, object oriented planning, logic programming or just plain old imperative programming, pattern matching, scripting etc.

TSA: You’re usually pointed out as one of the intelligent people who believe in God. Do you sometimes feel like a fish out of the bowl?

Larry: There is a sense in which I always do. But it is also sort of intentional. When we took our Linguistics and Anthropological Training, they said, “Okay, now you are going to recognize these cultural differences, and a side effect of this is that you will never again feel completely at home in any culture.” You can no longer always just blindly go along with your correct culture, or switch to a different culture and assume that it is always correct. All cultures are a mixture of good things and bad things… and so, in that sense, I choose to have more of a postmodern kind of a sensibility where I am always a little bit suspicious of everything but also able to recognize good work where I see it. It’s a more nuanced view, it does give one the feeling of being a fish out of the fishbowl, quite frequently. But it’s okay, there are lots of interesting fishbowls in the world and many of them are not toxic.

Gloria: Most people’s religion – they have it because they were brought up in it, because it was part of their culture. And one of things you learn if you’re going to study to be some kind a missionary, you need to ask yourself “What is really my religion as opposed to my culture?” They are not the same.

Larry: Yeah, they whacked us upside the head and said, “Your goal is not to go out and build a little white church with a steeple. That is culture, not religion!”

Gloria: One of the things you’re not allowed to do, for instance, is to talk to people about God unless you can talk to them in their own language. And that’s a good rule even if people speak the same language as you officially.

Larry: So I am actually very slow to bring up theological things. I don’t preach the way some people preach. I’m not interested in hearing myself talk, I am interested in hearing someone else hear, and that requires understanding. It takes a certain kind of patience to try to communicate and be communicated with that way. It’s a two-way communication, and it requires a feedback.

TSA: Is it true that the languages you speak influence the way you think?

Gloria: In a way it is true, in a way it isn’t. If you want to talk about something strange you haven’t seen before, you can always find a way to get there. Say a parrot sees an apple and all it knows about is banana and cherries, so it will describe the apple as banana-cherry. (Larry: Alex the parrot actually did this.) People do that all the time. The question is not what you can say, the question is what is easy. Ultimately, the languages don’t differ much.

Larry: The most recent issue of The Scientific American had an article where they were discussing this very subject. In some culture (maybe Australian), their mental models are geographical. In my personal viewpoint, I believe I have a geographical mindset since I am thinking of directions all the time. Most of my solid memories are tagged with directions, so it is not that a person who does not speak a particular language cannot think in a way typical of it.

Gloria: And there’s an African language in which you cannot say anything without describing how you came to know about it. Did you see it with your own eyes, is it hearsay… there are several different things you have to speak about. And it’s not that you cannot say that; you just don’t think about it. Also, you never know about your own language unless you learn some other language and then you start noticing things that you normally won’t.

Larry: You’d find yourself trapped all the time. When I was learning Japanese and they say, “Girl Riding Bicycle”, I’d assume that there was only one girl, then I’d be shocked when it was revealed that they were actually talking about several of them. And then I would realize that my mother tongue was getting in the way. So, the strong Sapir-Whorf hypothesis is probably false, that your language controls the way you think or limits and boxes the way you think; however, the weak one is certainly true, that language does affect the way you think. It sets up the set of pathways you find easy to think in and believing that from our linguistic training is a part of why Perl gives a lot of shortcuts unlike a lot of historical computer science designs which are all about ‘orthogonal sets of features’.

Gloria: The impetus of making a computer language is to make people think about things which they are not thinking about. When they first built the University of California at Irvine, the architect didn’t put in any sidewalks. He just put grass everywhere, and they asked him ‘Why did you do that?’ And he said ‘In a year, we’ll know where to put the sidewalks.’

Larry: And they looked at where the cow trails were, and they put the sidewalks there, and that’s where people wanted the sidewalks. That’s the sort of language that Perl is, and the sense in which it works more like a natural language than most computer science languages do.