Larry Wall, the Guru of Perl


Larry Wall, the Guru of Perl 1/12 Larry Wall, the Guru of Perl May 01, 1999 By Marjorie Richardson Discover a bit about Perl’s creator and what’s happening with Perl. 看看Perl的创造者,看看Perl的新进展。 I “talked” to Larry Wall, the creator of the Perl scripting language, by e-mail on March 1. Larry proved to be quite voluble, and I think you’ll find this interview fun as well as informative. I certainly did. 我和Perl脚本语言的创造者,Larry Wall(拉里•沃尔),在3月1号通过电子邮件进行了一次“交谈” 。Larry显得非常健谈,你一定会觉得这次交谈既有趣又使人受益。我是这样感觉的。 Marjorie: Back in the beginning, what inspired you to write Perl? 玛乔丽:开始的时候,是什么让你决定开发Perl的? Larry: That depends on what you mean by “beginning”. Like Moses said: “In the beginning, God cre- ated the heavens and the earth.” I’m not being entirely facetious about that. Whichever way you care (or don’t care) to interpret scripture, I think the universe is a pretty hefty inspiration for anyone who aspires to be a creator. I’ve certainly tried to put a universe of ideas into Perl, with some amount of suc- cess. 拉里:这要看你的“开始的时候”是指什么样的“开始”。就象摩西所说:“开始时,上帝创造了天空 和大地。”我并不是完全在说笑。每个人都有他在意(或不在意)的对圣经的阐释方法,而我认为宇宙 万物就是激发我们想要成为一个创造者的最大的灵感。我也已经努力地要把这样一种整体的思想加入到 Perl中间去,有些已经获得了实现。 In terms of biographical beginnings, my father was a pastor, as were both my grandfathers, and many of my ancestors before that. My wife likes to say that preachers are bred for intelligence (though I suppose she might be saying that just to flatter me). Be that as it may, I did receive a fairly decent set of brain construction genes. Beyond that, I also received a rich heritage of ideas and skills, some of which found their way into Perl culture. For instance, the notion that you can change the world. The idea that other people are important. The love of communication and an understanding of rhetoric, not to mention linguistics. The appreciation of the importance of text. The desire to relate everything to everything else. The passion to build up rather than tear down. And, of course, the dead certainty that true wealth is measured not by what you accumulate, but by what you pass on to others. 要是以传记体的开始来讲,我的父亲是牧师,我的爷爷也是牧师,我的很多祖先也是牧师。我的妻子总 是喜欢说传教士是智慧的种子(我猜她是在奉承我)。不过也有可能吧,我确实继承了还算像样的脑组 织结构的基因。另外我还继承了一些思想和技能,有些思想和技能已经融入到Perl文化当中了。比如, 认为你能改变世界的思想;比如,认为别人很重要的思想;比如,对于交流的热爱,包括花言巧语的理 Larry Wall, the Guru of Perl 2/12 解,更别说对语言学的关注了。再比如,对于文字重要性的认识;对于将所有事物与其他事物进行联系 的渴望;对于建设的狂热,对于毁坏的厌恶。当然还有一点,那就是真正衡量财富的方法不是看你积聚 了多少,而是看你与别人分享了多少。 The beginnings of Perl were directly inspired by running into a problem I couldn’t solve with the tools I had. Or rather, that I couldn’t easily solve. As the Apostle Paul so succinctly put it, “All things are pos- sible, but not all things are expedient.” I could have solved my problem with awk and shell eventually, but I possess a fortuitous surplus of the three chief virtues of a programmer: Laziness, Impatience and Hubris. I was too lazy to do it in awk because it would have been hard to get awk to jump through the hoops I was wanting it to jump through. I was too impatient to wait for awk to finish because it was so slow. And finally, I had the hubris to think I could do better. 最直接的诱因是我遇到了一个问题,我手头的工具都无法解决它。或者说,都不能轻易得解决它。就象 使徒保罗所说“任何事都是有可能的,但并不全都是有利的。”我应该能够用awk和shell解决我的问题, 但幸运的是程序员最重要的三个美德在我身上储量丰富,它们是:懒惰,急躁和傲慢。我太懒了,如果 用awk来做的话需要做大量的工作,这是无法忍受的。我太急躁了,awk做起来很慢,我可等不及。然 后,我的傲慢使我认为自己可以做的更好一些。 Of course, actually writing something like Perl takes a great deal of hard work, patience and even humil- ity. Had I just been doing it for myself, I probably wouldn’t have made the effort. However, I was aware from the beginning that other people were going to be using Perl, so I’ve always integrated the “laziness curve” over the whole community, not just over myself. I was being vicariously lazy. So here we are talk- ing about vicars again. 当然,真正要写出Perl这样的东西需要做大量艰苦的工作,也需要耐心甚至谦卑。如果我仅仅是为了我自 己,可能是不会下这么大的功夫的。然而,我知道,其他的人也会来使用Perl,不仅仅只有我一个人而 已,所以我的“懒惰曲线”是结合整个社区来绘制的。这样看来我的懒惰就是代理性质的懒惰咯。 Marjorie: Well, that certainly answered the question fully. I must admit I didn’t expect you to go back as far as the beginning of the Universe. :-) How’d you come up with that name? 玛乔丽:哦,回答的非常全面。必须承认,我本来没有期望你能从宇宙的起源说起。:-) 那么,为什么用 Perl这个名字呢? Larry: I wanted a short name with positive connotations. (I would never name a language “Scheme” or “Python”, for instance.) I actually looked at every three- and four-letter word in the dictionary and rejected them all. I briefly toyed with the idea of naming it after my wife, Gloria, but that promised to be confusing on the domestic front. Eventually I came up with the name “pearl”, with the gloss Practical Extraction and Report Language. The “a” was still in the name when I made that one up. But I heard ru- mors of some obscure graphics language named “pearl”, so I shortened it to “perl”. (The “a” had already disappeared by the time I gave Perl its alternate gloss, Pathologically Eclectic Rubbish Lister.) 拉里:我希望起一个短一点的有正面意义的名字。(比如,我绝对不会把一个语言叫作“Scheme”或 是“Python”)。实际上我查阅了字典中所有三个或是四个字母的单词,最后却一个也没有用。我也曾 想过用我妻子的名字,Gloria,来命名它,但与家庭态度相左。最后我选中了“Pearl”,作为Practical Extraction and Report Language(实用摘录和报告语言)的缩写。那时,字母“a”还在名字当中。但是我 听到有传闻说有个朦胧绘画语言也叫作“pearl”,就把它缩短为“Perl”了。(当我给这个语言新的诠释 的时候,名称中的“a”也就真的消失了,可以把“Perl”理解为:Pathologically Eclectic Rubbish Lister 病 态折衷垃圾列表器。 Larry Wall, the Guru of Perl 3/12 Another interesting tidbit is that the name “perl” wasn’t capitalized at first. UNIX was still very much a lower-case-only OS at the time. In fact, I think you could call it an anti-upper-case OS. It’s a bit like the folks who start posting on the Net and affect not to capitalize anything. Eventually, most of them come back to the point where they realize occasional capitalization is useful for efficient communication. In Perl’s case, we realized about the time of Perl 4 that it was useful to distinguish between “perl” the pro- gram and “Perl” the language. If you find a first edition of the Camel Book, you’ll see that the title was Programming perl, with a small “p”. Nowadays, the title is Programming Perl. 另一个关于“Perl”这个名称的珍闻是,刚开始时“Perl”中间的“p”是小写的。那时UNIX还只能支持 小写字母。实际上,你可以把它叫作反小写系统。就象在网上发贴的人最初所有的东西都是小写的,后 来它们发现适当的使用大写可以使得交流更加的方便。对Perl来说,当Perl4发布之时我们觉得有必要区 分“perl”程序和“Perl”语言。如果你找出第一版骆驼书,你可以看到标题是Programming perl,p是小 写的。而现在,标题是Programming Perl。 Marjorie: Okay, is Perl perfect now or do you continue to do further development? 玛乔丽:嗯,Perl现在完美了吗,你还会进一步的开发它吗? Larry: Hmm, the two are not mutually exclusive. Look at Linux. :-) 拉里:嗯,这两者并不是互斥的。看看Linux。:-) Actually, Perl was never designed to be perfect. It was designed to evolve, to become more adaptive, as they say. There is no such thing as a perfect organism, biologically speaking. About the most you can say is an organism is more or less suited for the environment in which it finds itself. In fact, biologists are just now realizing that any organism which seems to be “perfect” for one environment is likely to be in danger of extinction as soon as the environment changes. Over-specialization is only as good as your ecological niche. We’re not just talking about dinosaurs here, but also snail darters and cheetahs and a bazillion beetles in Brazil—not to mention Visual Basic. 实际上,Perl从来没有设计的很完美。设计的时候我们就打算使它适合进一步的发展,具有更强的适应 性。从生物学角度来讲,世界上没有完美的生命体。最多你只能说一个生命体对其所处的环境适应的好 些或是差些。实际上,生物学家已经认识到任何对于一个环境来说似乎是“完美”的生命体当环境发生 变化的时候就有灭绝的危险。超特定性几乎与生态龛位同义。我们说的并不只是恐龙,还有快速蜗牛和 印度豹,还有巴西的一种甲虫—当然还有Visual Basic。 We’ve already seen the deaths of many over-specialized organisms in computing: Lisp machines, Ada chips and many so-called fourth generation languages. Any program ever written in assembly language for an obsolete architecture is now obsolete. Likewise, any program that ties its fortunes to a single operating system is likely to go down with the ship. I don’t know how many more torpedoes Windows can take before it sinks, but if and when it does, a whole batch of specialized programs are going down with it. Obviously, for reasons relating to the open source movement, Linux doesn’t have this particular problem. 我们已经看到很多超特定性有机体的死亡了,在计算机世界中,这包括:Lisp机器,Ada芯片和很多所谓 的第四代语言。任何用汇编语言为废弃的系统编制的程序如今也都被废弃了。同样的,任何把自己的命 运与单一操作系统捆绑在一起的程序也会随着操作系统的消亡而消亡。我不知道Windows在沉没之前还能 够经受几颗鱼雷的轰击,但是当它沉没的时候,一大批仅适用于这个操作系统的程序将随其一起沉没。 明显的,由于开放源码运动,Linux不存在这样的问题。 Larry Wall, the Guru of Perl 4/12 Anyway, back to Perl. Right from the start, Perl was designed for change. This involves certain tradeoffs, some of which appear to be suboptimal to people who don’t think the way I think. For instance, I want- ed to be able to add new keywords to Perl without breaking old programs, so I put them into a separate namespace from variable names. This meant either variable names or keywords had to be marked somehow as special. I chose to mark variables, since it also made it easy to interpolate variables into strings, and since there’s a history of marking variables in computer languages such as BASIC. Note this was actually non-adaptive in certain environments, namely in the minds of certain purists who think the added punctuation makes Perl ugly, and too much like BASIC. Well, maybe it does. So what? That was a conscious tradeoff so that Perl would be more useful in the long run. In that respect, Perl is less adaptive in the specific ecological niche comprising the minds of computer scientists, but more adaptive in the world as a whole. I’ve never regretted that particular tradeoff. 不管怎么说,让我们回到Perl上来。从一开始,Perl就是为改变而设计的。这中间包括了某些折衷。如果 以和我不同的观点来看的话,这些折衷可能并不是最好的处理方法。比如,为了在将来给Perl增加关键词 的时候不会破坏已有的老程序,我在变量名上给它们使用了不同的命名空间。即变量名和关键字必须是 要用标记明显区分开的。我选择了标记变量,一个是因为这样可以方便的使用变量在字符串中的内插, 另一个原因是在BASIC语言中有标记变量的先例。在某些环境下这可能是无法接受的,比如某些顽固的 纯化论者会说,加入标记会使Perl变得很难看,而且太象BASIC。或许吧。那又怎么样?这是一种有意的 折衷,目的是为了Perl可以更为有用。从这方面来讲,Perl可能不是很符合计算机科学家的定位,但是它 适合这个世界。对于这个折衷,我从来没有觉得遗憾。 Of course, once you get past first impressions, there are many things in Perl that computer scientists do like, such as lexically scoped variables and closures. So by and large, those computer scientists who can hold their nose long enough to get the cheese into their mouths find the taste bearable. 当然,第一印象之后,还是有些东西会得到计算机科学家的喜欢的,比如变量的作用域和closures。因此 大体上,如果这些科学家能够强捏住他们的鼻子把Perl奶酪放到他们的嘴里尝一尝的话,那么他们会发现 还是可以一吃的。 More importantly, Perl 5 introduced an extension system that, much like Linux’s module system, allows continued development of the language without actually changing the core language. That is, you can pull in a Perl module that warps the language to your purposes in a controlled fashion. If a module be- comes popular enough, we can consider making it part of the core of Perl—maybe. 更重要的,Perl5使用了一种扩展系统,它有些类似Linux的模块系统,允许连续的开发,而不需要改变核 心语言。即,你可以开发特定功能的Perl模块如果这个模块非常流行,常用的话,我们会考虑把它加入到 Perl核心中去。 That’s not to say we never change the core anymore. We recently added support for multi-threading and for Unicode. Interestingly, even when we do make changes to the core these days, we make it look as though the programmer is pulling in an extension module. Essentially, if you use a fancy new core feature that warps the semantics in some way, you have to declare it. This is how we maintain almost complete compatibility with older Perl scripts. Most Perl 1 scripts still run unchanged under Perl 5. As a side benefit, feature declarations are right up front where the dependency is visible at compile time, so we rarely die in the middle of execution for lack of a feature. Compare this with shell programming, where you don’t even know whether all the programs you’re intending to invoke actually exist until you try to run them, and then, kablooey! 这并不是说我们不会改变核心了。最近我们还加入了对多线程和Unicode的支持。有趣的是,虽然我们确 Larry Wall, the Guru of Perl 5/12 实是在修改核心,我们还是使得它看起来就象是在做一个扩展模块。实际上,如果你要使用新的核心的 特性,那你必须要首先声明。这正是我们使得Perl几乎可以100%兼容老版本Perl脚本的秘诀。大多数Perl1 的脚本可以不用更改的运行于Perl5之下。一个附带的好处是,对于特性的声明使得依赖性在编译时是可 见的,所以程序不会在运行时因为缺少某个特性而退出。这与shell编程形成了鲜明的对比,在那里,直到 执行的时候这些问题才会暴露出来。 Marjorie: What are your future development plans for Perl? 玛乔丽:有没有进一步的Perl开发计划? Larry: If I could predict that, I’d be a smarter person than I am. I’m just smart enough to know I’m no smarter than that, which is why I designed Perl to evolve in the first place. 拉里:我要是比自己再聪明一些,大概就能预见到了。不过我的智慧只能是知道我还没有聪明到那样的 程度,正因为如此我把可扩展性放到了Perl的首要位置。 That being said, I can tell you some of the characteristics I look for in a project. 说到这个,我可以告诉你一些我希望实现的特性。 First, if it has anything to do with text processing, Perl is a natural. Perl has never stopped being a text-processing language, though it long ago escaped the straitjacket of being just a text processing language. That’s one reason Perl was a natural for CGI programming, because Perl excels at ripping text apart and putting it back together. 首先,如果要来处理文本,Perl是首选。Perl一直就是一个文本处理语言,虽然很早以前它就已经不仅仅 局限于文本处理了。由于这个缘故,Perl就成为CGI编程的首选,因为在提取和组合文本方面Perl非常拿 手。 Second, I look for projects that involve gluing things together. We don’t use glue on Legos—we glue together things that weren’t designed to go together. As a glue language, Perl has thin characteristics so that it can flow into tiny gaps, and thick characteristics so that it can fill in larger voids. Perl is always at home in the interstices. The typical CGI script or mod_perl servlet glues a database together with the Web. When that particular interstice disappears, there will be other interstices. 其次,我希望Perl可以把这样那样的东西黏结到一起。我们并不是黏结积木,我们的目的是把原来并不同 类的东西黏结到一起。作为一个胶水语言,Perl既适合于修补裂缝,也适合于填充壕沟。Perl对空隙极为 熟悉。典型的CGI脚本或是mod_perl servlet可以把数据库和网络黏结到一起。当一个空隙消失之后,又会 产生其它空隙。 Third, I look for projects that franchise the disenfranchised. We joke about sending our leftovers to the starving people in Africa, but there are, in fact, billions of potential programmers outside of America who can’t afford to lay out hundreds of bucks for an operating system or an application. China recently put in a single order for 200,000 Internet books from a publisher I know (and work for). That’s just the beginning. This is why I hacked Unicode support into Perl last year. Of course, text processing has something to do with Unicode too. 第三,我希望可以给失去特权的人以特权。我们开玩笑说准备把多出来的饭菜送给饥饿的非洲人,实际 上,在美国之外,有非常多的程序员,他们没有足够的钱用来购买操作系统或是软件。中国最近一次就 从某出版社(我为其工作)订购了200,000本英特网书籍。这仅仅只是开始而已。也正因为如此去年我把 对Unicode的支持加入到Perl中去。当然,文本处理也涉及到Unicode。 Larry Wall, the Guru of Perl 6/12 Having said all that, it almost doesn’t matter what I look for in my next development project, because I don’t do most of the Perl development these days. The Perl community outweighs me by many orders of magnitude, and they’re really the ones who are making Perl the be-all and end-all of scripting languag- es. I just sit on the sidelines and cheer occasionally. I’m cheering now. Rah, rah, rah! :-) 说了这么多,其实它们基本上和下一步的开发计划无关,因为这些天以来我基本上已经很少参与开发 了。Perl社区的工作已经超过我很多数量级了,他们才是真正的使Perl成为真正的脚本语言的人。我只是 待在一边偶尔为他们欢呼罢了。我现在就要为他们欢呼。啦啦啦!:-) Marjorie: In what way is Perl better than other scripting languages such as Python and Eiffel? 玛乔丽:Perl到底是在哪些方面优于其它的脚本语言的,比如Python和Eiffel? Larry: Perl is unique, not just among scripting languages, but among computer languages in general. It’s the only computer language consciously and explicitly designed to be postmodern. All other computer languages are still stuck in the modern era to some degree. Now, as it happens, I don’t normally use the term “postmodern” to describe Perl, because most people don’t really understand postmodernism, even as they embrace it. But the fact is that American culture has become thoroughly postmodern, not just in music and literature, but also in fashion, architecture and in overall multicultural awareness. 拉里:对于脚本语言来讲,Perl是独特的,而且在所有的计算机语言中,Perl也是非常独特的。它是唯一 的一个有意识的并且明确的被设计为后现代化的计算机语言。而其它的语言都还不同程度的坚持着他们 的现代化特性。事情虽然是这样,我却很少使用后现代化来描述Perl,因为很多人并不能真正理解后现代 主义,虽然他们已经处于后现代化之中。事实是,美国文化已经完全进入后现代化了,不仅是音乐和文 学,还包括时尚,建筑以及所有的与文化沾边的领域。 Modernism was based on a kind of arrogance, a set of monocultural blinders that elevated originality above all else, and led designers to believe that if they thought of something cool, it must be considered universally cool. That is, if something’s worth doing, it’s worth driving into the ground to the exclusion of all other approaches. Look at the use of parentheses in Lisp or the use of white space as syntax in Py- thon. Or the mandatory use of objects in many languages, including Java. All of these are ways of taking freedom away from the end user “for their own good”. They’re just versions of Orwell’s Newspeak, in which it’s impossible to think bad thoughts. We escaped from the fashion police in the 1970s, but many programmers are still slaves of the cyber police. 现代化是基于某种傲慢之上的,把创意置于一切之上的文化的有色眼镜,它的设计者认为他们认为很好 的东西,全世界都应该喜欢。即是说,如果某件事值得做,那就应该把所有其它可能的途径都推到一边 而仅留它一个。看看在Lisp中对圆括号的使用,以及Python中对空格的使用吧。还有对对象的强制使用, 这包括很多语言,其中就有Java。所有这些都是“为了用户考虑”而限制了用户的自由。它们其实就是阻 碍自由思想的翻版。1970年代的时尚警察已经离我们远去了,但是很多程序员依然是网络警察的奴隶。 In contrast, postmodernism allows for cultural and personal context in the interpretation of any work of art. How you dress is your business. It’s the origin of the Perl slogan: “There’s More Than One Way To Do It!” The reason Perl gives you more than one way to do anything is this: I truly believe computer programmers want to be creative, and they may have many different reasons for wanting to write code a particular way. What you choose to optimize for is your concern, not mine. I just supply the paint—you paint the picture. 恰恰相反,后现代主义允许人们对任何艺术品从个人的或是不同文化的背景给出诠释。无论怎么说都是 Larry Wall, the Guru of Perl 7/12 你自己的事情。Perl的口号即来源于此,那就是:“条条大路通罗马”。Perl之所以在你做任何事时都给 你许多不同的可以使用的方法的原因是:我确信程序员们都希望自己是具有创造性的,他们可以有很多不 同的理由想要写出他们自己的特别的代码。你想要做什么是你自己的事情,不是我应该考虑的。我要做 的就是给你油漆—而你绘制你的图画。 Marjorie: Who is using Perl and how are they using it? 玛乔丽:谁在使用Perl,他们怎么使用它? Larry: A couple of years ago, I ran into someone at a trade show who was representing the NSA (Nation- al Security Agency). He mentioned to someone else in passing that he’d written a filter program in Perl, so without telling him who I was, I asked him if I could tell people that the NSA uses Perl. His response was, “Doesn’t everyone?” So now I don’t tell people the NSA uses Perl. I merely tell people the NSA thinks everyone uses Perl. They should know, after all. 拉里:两年前,我在一次商业展会中遇到一个人。他和另一个人在经过我面前的时候,他正给那人介绍 国家安全局的有关情况,他说他用Perl写了一个过滤器。我于是问他,我可不可以告诉别人国家安全局使 用Perl。他当时的回答是:“难道有谁不用吗?”所以现在我不会说国安局用Perl。我只是告诉大家国安 局的人认为大家都在用Perl。我想大家应该知道这个。 As an interesting side note, it turned out this fellow was the very administrator who shut down the NSA project Perl was (indirectly) written to support. He was vaguely amused when I pointed out Perl might well be the most enduring legacy of the project. 有趣的是,正是这个人中止了那个使用到perl的项目。当我告诉他,Perl可能是那个项目最大的受益者 时,他觉得很开心。 As to what everyone uses Perl for, it’s really all over the map. I was astounded several years ago to be told how heavily Perl is used on Wall Street. “A Perl book on every other desk” is how I heard it. But it makes sense when you realize that market analysts need to revise their models continually, and they need to scan news services for information that might be related to their positions in the market. Rapid prototyping and text processing are what they need. 说到大家用Perl做什么,可以说是做什么的都有。几年前当我听说Perl在华尔街使用非常广泛的时候,着 实吃了一惊。当时他们说:“每个桌子上都有一本Perl书”。不过,考虑到市场分析需要他们不断的修正 他们的模型,他们还需要扫描那些可能与他们在市场中的位置相关的新闻信息的话,就会觉得合情合理 了。他们需要的正是快速原型和文本处理。 Many people associate Perl with CGI scripts, though of course most of the heavy lifting is done with mod_perl servlets under Apache. Perl is used just as much on the client side in the robots and spiders that navigate the Web and build much of the linkage implicit in various on-line databases. And that’s not all. If you’ve ever been spammed (and who hasn’t?), your e-mail address was almost certainly gleaned from the Net using a Perl script. The spam itself was likely sent via a Perl script. One could say that Perl is the language of choice for Net abuse. And one could almost be proud of it. 很多人把Perl和CGI脚本联系在一起,其实那主要是由Apache下的mod_perl servlets完成的。Perl多是用于 那些客户端的机器人和蜘蛛,它们搜索网络并在形形色色的数据库中建立链接。不过,这并不是全部。 如果你曾经受到垃圾邮件的困扰(有谁没有过?),那么几乎可以肯定,你的邮件地址被某个Perl脚本从 网络上搜集到了。垃圾邮件本身也很有可能是由Perl脚本送出的。有人可能说Perl是滥用网络的首选。但 同时也会有人以此为傲。 Larry Wall, the Guru of Perl 8/12 That’s only scratching the surface of what Perl is used for. Without getting Mr. Gallup or the U.S. Census Bureau involved, the best way to figure out what Perl is used for is to look at the 800 or so reusable extension modules in the Comprehensive Perl Archive Network (the CPAN, for short). If you glance through those modules, you’ll get the impression that Perl has interfaces to almost everything in the world. With a little thought, you may figure out the reason Perl has interfaces to everything is not so much so Perl itself can talk to everything, but so Perl can get everything in the world talking to everything else in the world. The combinatorics are staggering. The very first issue of The Perl Journal (not to be confused with Linux Journal) contained an article entitled “How Perl Saved the Human Ge- nome Project”. It explains how all the different genome sequencing laboratories used different databas- es with different formats, and how Perl was used to massage the data into a cohesive whole. 这仅仅是Perl用途的一鳞半爪而已。如果不考虑民意测验或调查也不考虑美国人口调查局,那么最好的了 解Perl用途的方法就是查看Comprehensive Perl Archive Network(CPAN)站点上的800个或是经常使用的 模块。如果你把这些模块都看一遍,你会发现,Perl几乎与世界上所有事物都有联系。稍微动动脑筋,你 会发现Perl之所以与世界上所有的事物都有联系,并不是因为Perl能够与所有这些事物如何如何,而是因 为Perl可以把世界上的所有事物联系在一起。 组合学是令人惊讶的。Perl杂志的第一期(不要与Linux杂志 混淆)有一篇文章,标题是“Perl是如何拯救了人类基因组计划”。文中说明了世界各地不同的基因组实 验室使用了不同的数据库,其中的数据格式也是千差万别,而Perl如何将这些数据处理成统一的数据。 Marjorie: We received a product announcement for PerlDirect from ActiveState Tool Corporation that says: 玛乔丽:我们收到ActiveState Tool公司的一份产品声明,它说: “PerlDirect provides reliability, stability, support and accountability for Perl through the following features: validated, quality-assured releases of Perl and its popular extensions; advice and support; Y2K test suite; and a Perl Alert weekly bulletin. PerlDirect offers an opportunity to provide direct in- put to a leading organization involved in open-source development. Basic annual subscription rates start at $12,000 US.” “PerlDirect 提供对Perl的如下特性的可靠的,稳定的,支持和责任:Perl的可用的高质量的分发包,以及 常用扩展;建议和支持;Y2K测试组件;每周一次的Perl警告信息。PerlDirect提供给您直接支持一个引导 开源运动的组织的机会。年捐助额应当不低于12,000美元。” Are you affiliated with this company? I think it’s interesting they are offering to let a subscriber have direct input to open-source development for $12,000 a year. Does this make sense? 你和这家公司熟吗?我觉得他们提供的这个机会非常有趣。这有什么意义吗? Larry: Sounds like a pretty ordinary support contract to me. I don’t think even Richard Stallman would disagree with the notion that support is a valid way to make money off free software. 拉里:听起来好像是和我签约的支持。我相信即使是Richard Stallman也会承认技术支持是通过自由软件 盈利的有效方式。 I’m not directly affiliated with ActiveState, but I’ve worked with them, and I think the problems they’ve solved far outweigh any problems they’ve created. You’ve got to understand their market has always been the Windows space, where you’re actually doing people a favor by charging them money for things, because that’s the only way to keep from confusing them. Linux users are smarter than this, of course, but some Linux users aren’t quite smart enough to realize Windows is a different culture, and Perl, be- ing a postmodern language that is sensitive to context, will look different in a different culture. Larry Wall, the Guru of Perl 9/12 我和ActiveState没有直接的联系,不过我跟他们合作过,我想他们解决的问题远比他们引起的问题要多得 多。你得了解,他们的市场是Windows,在那里他们收取报酬帮用户做事是很好的事情,因为那是唯一不 会使用户们疑惑的方式。Linux用户当然要聪明一些,不过他们还是不够聪明,没有认识到Windows完全 是一种不同的文化,而Perl作为一种后现代化语言对环境是非常敏感的,因此在那样一种环境下看起来会 大不相同。 Marjorie: Oops, didn’t mean to sound as if I thought they weren’t on the up-and-up—just curious if you knew them. What are your views of the Open Source movement? Do you think it will become a true phe- nomenon, or is it just a passing fancy? 玛乔丽:噢,我的本意并不是说他们不诚实—只是好奇想知道你到底知不知道这件事。你对开放源代码 运动的看法怎样?你认为它将会变成长期存在,还是只是一时流行? Larry: I must have a conjunctive rather than a disjunctive brain, because I think both of those notions are true. And I also think they’re both false. :-) 拉里:我的大脑一定是连接性很强的,因为我认为你所说的两方面都是正确的。而且它们同时也都是不 对的。:-) How can we claim open source is becoming a true phenomenon when it has already been a true phe- nomenon for a couple of decades now? We’re merely pointing out to everyone a practice that has a prov- en track record of producing excellent code. On the other hand, we’re certainly trying to make it a truer phenomenon, in the sense that we hope more people will feel it’s a valid development model for many kinds of software that were formerly developed under a closed model. 到目前为止,开源运动已经经历了20年的发展了,我们怎么能说它将变成什么什么? 我们仅仅要向大家显示开源也曾经产生了大量优秀的代码程序。另一方面,我们想更进一步,希望更多 的人认识到这是一种有效的开发模式,对很多不同种类的,以前都是以封闭模式开发的软件也是适用 的。 And, of course, it’s a passing fancy—just as we’ve had other passing fancies for free-form syntax, struc- tured programming, and more recently, object orientation. 不过,当然,它也是一时流行—就象我们已有的其它一时流行的东西一样,比如自由语法,结构化程序 设计以及最近的面向对象。 What you have to understand is that, from the viewpoint of the passing fancy, people represent a kind of fork in the road. It’s like separating the sheep from the goats in the book of Revelation. Some of these fancies pass on the one side and go into oblivion, while others pass on the other side and go into com- mon practice, usually after a period of excessive enthusiasm. Free-form syntax, structured program- ming and object orientation are all good (in moderation). But note that all of these passing fancies had a history of being useful before they became popular. The passing fancies that go into oblivion are the ones rooted not in history, but rather in someone’s wishful thinking (usually someone from marketing). By this criterion, open source will probably go into common practice because it’s already in common practice. 你得了解的是,对一时流行的东西,人们通常会有两种对待的方法。这有些象启示录中把绵羊和山羊分 开一样。有些一时流行的东西,流行过去之后就会从此消失,但是另外一些一时流行的东西会由流行转 为平淡,通常在这之前都会经过一个狂热期。比如自由语法,结构化程序设计和面向对象等,它们都是 Larry Wall, the Guru of Perl 10/12 由一时流行转为平淡,但是并没有消失。那些流行之后即消失的东西,通常不是来源于历史,而是来源 于某些人的希望(通常是市场人士)。以此来判断的话,开源应该会由一时流行转为普通应用,因为它 其实已经是普通应用了。 The way I see it, the open source movement is just another manifestation of the growing postmod- ernism of our culture. By contrast, the notion of trade secrecy is just a rehash of the modernistic idea of originality at any cost. We’ve had a lot of lip service given to code reuse over the years, but it really only works with open source. A postmodern computer programmer truly believes in reusing good code whether it’s original or not. It’s not a point of pride anymore. A good postmodern is supposed to plagia- rize the things he or she thinks are cool. 以我来看,开源运动正是我们正在成长的后现代化文化的又一个展示。相反的,所谓商业机密的提法只 是之前的创意无价的思想的翻版。我们以前经常说代码重用服务,可是这么多年来,只有当开源出现之 后,代码重用服务才得以实现。后现代化程序员认为重用好代码不必考虑它是原创还是相反。这与自豪 无关。后现代化主义者应该是一个剽窃者,剽窃一切他(她)认为精彩的东西。 Marjorie: If everything becomes open source, how will programmers make a living? 玛乔丽:要是什么东西都开源的话,程序员要靠什么生活呢? Larry: Contrary to many open source advocates, I don’t see everything becoming open source. What I do see is a growing recognition that anything resembling large-scale infrastructure ought to be open source, much as the United States has recognized that interstate highways should not be toll roads. On the other hand, we don’t expect city parking lots to be free except in certain enlightened municipalities. So I’d expect to see Windows become open source before Word does. 拉里:和许多其他开源的支持者不同,我不认为任何东西都会开源。我所持的是目前也在逐渐得到更多 认同的观点,那就是那些具有很大规模的基础性的东西需要开源,就象美国政府逐渐认识到州际公路应 该是不收费的一样。另一方面,我不会期望城市中的停车场会免费,除非那个市府特别开明。因此如果 拿Windows和Word来比较,我更希望Windows能够开源。 That being said, there are many ways to make a living off open source, just as there are many ways to make a living off open science. But here’s precisely where I think the open source movement has some growing to do. Open science basically started out as a hobby of the rich, but it didn’t truly blossom into the form we recognize today until its patronage was taken over by educational institutions. This has not quite happened yet with open source. Or rather, it started to happen, but then many educational institu- tions got caught up in the drive for the almighty dollar. I wish more places would follow the example of UC Berkeley. 有一种说法,我们可以有很多方法通过开源来谋生,这就好像我们有很多方法通过开放的科学来谋生一 样。不过,我认为这里正是开源需要努力开发的一个方向。科学在开始时,只是富人的爱好,只是当它 进入到教育学院之中以后才逐渐发展成今天为我们所熟悉的形式。开源还没有开始这一步,或者更确切 的说,开始了,但是各个教育院校却把目标设定在赚钱上了。我希望有更多的地方能向UC Berkeley学 习。 Marjorie: On that note, how do you make a living? 玛乔丽:那么,你靠什么谋生呢? Larry: To start off, I worked programming and sys admin jobs like anyone else and did my free software Larry Wall, the Guru of Perl 11/12 on the side. Later, I wrote a book and started collecting royalties. The book became a best-seller, so it made my publisher, O’Reilly & Associates, even more money than it made me. Of course, they have to pay more people with that money, so it evens out. 拉里:开始时,我和其他人一样,一边编程一边做系统管理的工作,同时我还开发自由软件。之后,我 写了一本书然后就有了版税。那本书很畅销,它使得我和出版商O’Reilly & Associates都赚了很多钱,可 能赚的比我还多。当然,那些钱他们还要用来支付其他人的报酬,总的来说是差不多的。 Anyway, three years ago it occurred to Tim O’Reilly and me that anything good for Perl was also good for O’Reilly & Associates, so now they pay me to do whatever I like, as long as it helps Perl. It’s been a good symbiosis. 不管怎么说,三年前我和Tim O’Reilly都认识到,对Perl有利的事情O’Reilly & Associates也是有利的。 因此现在我想干什么他们都会为我付账,只要是对Perl有帮助就好。这是一种良好的共生关系。 Marjorie: Any interesting projects you’d like to tell us about? 玛乔丽:有没有新的令人感兴趣的计划呢? Larry: I’m supposed to be working on the third edition of the Camel Book, so I don’t officially have any other interesting projects at the moment. Of course, I have been playing around with that Palm Pilot Tim O’Reilly gave me for Christmas, but I won’t tell if you won’t. 拉里:有人建议我写作骆驼书的第三版,除此之外我还没有正式的计划。 Marjorie: Agreed. Give us some personal info—where you went to school, interests, etc. 玛乔丽:哦。介绍一下你自己吧。比如你在哪里上的学,你有什么兴趣爱好之类的。 Larry: I spent the first half my childhood in south Los Angeles about two miles from where the Watts ri- ots broke out, and the second half of my childhood in Bremerton, Washington, where no riots broke out, but I did graduate from high school. For the third half of my childhood, I went to Seattle Pacific Uni- versity, where I started off majoring in chemistry and music, later switched to premed, and eventually (after taking several years off to work in the SPU computer center) ended up majoring in Natural and Artificial Languages (a self-designed major). After that, my wife and I attended grad school in linguis- tics at Berkeley and UCLA. At the time, we were actually planning to be missionaries (more specifically, Bible translators), but we had to drop that idea for health reasons. Funny thing is, now the missionaries probably get more good out of Perl than they’d have gotten out of me as a missionary. Go figure. 拉里:我的童年有一半时间是在洛杉矶南部度过的,然后是在华盛顿。我从高中毕业之后,进入西雅图 太平洋大学,开始学的是化学和音乐,然后转到医学,最后的专业是自然和人工语言。之后,我和我妻 子参加了语言学的进修。当时,我们打算去做传教士(准确的说,是圣经解说员),最后考虑到健康的 原因放弃了该计划。有趣的是,传教士们由Perl上得到的帮助大概会大于我作为一名传教士能够提供的帮 助。 As for my interests, that’s hard, because I tend to be interested in anything that’s interesting. Which comes out to pretty much anything except opera and soap opera—space opera’s okay, though. 至于说到我的兴趣,这个有点困难,因为我对所有有趣的东西都感兴趣。说起来就会有很多了,不过有 两样例外,即歌剧和肥皂剧—太空题材的影片除外。 Marjorie: What do you do for fun? Larry Wall, the Guru of Perl 12/12 玛乔丽:你娱乐的时候会做什么? Larry: Read and listen to my wife read to me (especially space opera). Discuss anything and everything with anyone and everyone in my family. Work NY Times crossword puzzles. Play mah jong. Practice aikido. Watch anime. (Maybe Japanese soap opera is okay.) Play with my fish. Rescue my fish from the equipment I bought to keep them alive. 拉里:读书和听我的妻子给我读书(特别是太空类的)。和家里任何人讨论任何问题。玩填字游戏。玩 麻将。练合气道。看动画。逗鱼。 Marjorie: Looks like you stay busy and have fun—a good combination. What do you eat for breakfast? 玛乔丽:看起来你很忙碌有很有趣味—很好的组合。那么你早饭吃什么? Larry: I eat all kinds of things for breakfast—but then, I generally eat breakfast at lunchtime. 拉里:我早饭吃很多东西—不过,我通常是在午餐时间吃早饭。 Marjorie: Seems as good a time as any. Thanks for giving us so much of your time. It’s been interesting. 玛乔丽:时间过得好快。谢谢你抽空接受采访。非常感谢!
还剩11页未读

继续阅读

下载pdf到电脑,查找使用更方便

pdf的实际排版效果,会与网站的显示效果略有不同!!

需要 8 金币 [ 分享pdf获得金币 ] 0 人已下载

下载pdf

pdf贡献者

xm7f

贡献于2016-02-29

下载需要 8 金币 [金币充值 ]
亲,您也可以通过 分享原创pdf 来获得金币奖励!
下载pdf