From 855cbed88f4d48b5e65158c81dc7a2b1e7100c67 Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 19 Oct 2015 01:08:40 +0800 Subject: [PATCH 1/2] Create 20150716 Interview--Larry Wall.md --- .../talk/20150716 Interview--Larry Wall.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 translated/talk/20150716 Interview--Larry Wall.md diff --git a/translated/talk/20150716 Interview--Larry Wall.md b/translated/talk/20150716 Interview--Larry Wall.md new file mode 100644 index 0000000000..e989b01d9d --- /dev/null +++ b/translated/talk/20150716 Interview--Larry Wall.md @@ -0,0 +1,125 @@ +专访: Larry Wall +================================================================================ +> 经历了15年的打造,Perl 6终将在年底与大家见面。我们预先采访了她的作者了解一下新特性。 + +Larry Wall是个相当有趣的人。他即编程语言Perl的创造者,这种语言被广泛的誉为将互联网粘在一起的胶水,也因为对非字母使用的密度和宽容度被嘲笑是‘只写’语言。Larry本人具有语言学背景,曾风趣的使用“洋葱的状态”来介绍Perl特性,为人津道。 + +在2015年布鲁塞尔的FOSDEM上,我们赶上Larry,问了问他为什么Perl 6花了如此长的时间(Perl 5的发布时间是1994年),了解当项目中的每个人都各执己见时是多么的难以管理,以及他的语言学背景自始至终究竟给Perl带来了怎样的影响。做好准备,让我们来领略其中的奥妙…… + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall1.jpg) + +**Linux Voice:你有计划寻找世界某处某种不知名的语言来写脚本,但你还未曾有机会去实现它。现在呢?** + +Larry Wall:那需要多么青春,才能承担得起呀!做这些事需要投入很大的努力和人力,以至于已经不适合那些上了年纪的人了。健康、活力是其中的一部分,同样也因为人们在年轻的时候更容易学习一门新的语言,只有在你学会了语言之后你才能写脚本呀。 + +我自学了日语十年,由于语音和发声联系我能说的比流利——但要理解别人的意思对我来说还十分困难。所以到了日本我会问路,但我听不懂他们的回答! + +> “在Perl 6中,我们试图让电脑更准确的了解我们。” + +通常需要学习一门语言直到能开发一个书写系统,并且可以使用这种语言进行少量的交流,经过日积月累直到,你能用它学习研究、教书育人,最后达到可以教授本土人如何以他们的文明书写。 + +当然如果在语言方面你有帮手 —— 经过别人的提醒我们不再使用“语言线人”来称呼他们了,那样显得我们像是在CIA工作的一样!—— 你可以通过他们的帮助来学习外语。他们不是老师,但他们会以另一种方式来激发你学习 —— 当然他们也能叫你如何说。他们会拿着一根棍子,指着它说“这是一根棍子”,然后丢掉同时说“棒子掉下去了”。你开始记下一些东西并将其系统化。 + +大多数迫使人们站出来的原因是翻译圣经。但是这只是其中的一方面;另一方面也是为了保护自己的文明。传教士在这方面臭名昭著,应为人类学家认为人们应该基于自己的文明来做这件事。但注定有些有些人会改变他们的文明——他们可能是军队、或是商人,如可口可乐或者缝纫机器,或传教士。在这三者之间,传教士式相对来讲伤害最小的了,如果他们恪守本职的话。 + +**LV:许多文字系统有本可依,相较而言你的发明就像是格林兰语…** + +切诺基人照搬字母就发明了他们自己的语言,并没有在这些字母上施加任何他们的想法,这种做法相当任性。它们必须要能够表达出人们所想,才能使交流更顺畅。经常是有些声调语言使用的是西方文字拼写,并尽可能的使用拉丁文的字符变化。然后用重音符或数字标注出音调。 + +在你开始学习如何使用语音和语调表示之后,你也开始变得迷糊——或者你书写就不如从前准确。或者你对话的时候像在讲英文,但发音开始无法匹配拼写。 + +**LV:当你在维护Perl的时候,你的语言学背景会不会使你认为:“这对程序设计语言真的非常重要”?** + +LW:我在人们是如何使用语言上想了很多。在现实的语言中,你有一套名词、动词和形容词的体系,并且你知道这些单词的词性。在现实的自然语言中,你时常将一个单词放到不同的位置。我所学的语言学理论也被称为法位学,他会解释这些在自然语言中工作的原理 —— 也就是有些东西你考虑的时候是名词,但你可以将它用作动词,并且人们总是这样做。 + +你能很好的将任何单词放在任何位置,然后你就能沟通了。我比较喜欢的例子是将一整句话用作为一个形容词。这句话会是这样的:“我不喜欢你[我可以用任何东西来取代这个形容词的]态度”! + +所以自然语言非常灵活,因为聆听者非常聪明 —— 至少,相对于电脑而言 —— 你相信他们会理解你最想表达的意思,即使存在歧义。当然对电脑而言,你必须保证歧义不大。 + +可以说在Perl 1到5上,我们针对这方面的管理做得还不够。有时电脑会在不应该的时候抽风。在Perl 6上,我们找了许多方法,使得电脑对你所说的话能更准确的理解,就算用户并不清楚这底是字符串还是数字。电脑准确的知道它的类型。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall2.jpg) + +**LV:Perl被视作互联网上的“胶水”语言已久,能将点点滴滴组合在一起。在你看来Perl 6的发布是否符合当前用户的需要,或者旨在招揽更多新用户,能使她重获新生吗?** + +LW:最初的设想是为Perl程序员带来更好的Perl。但在看到了Perl 5上的不足后,很明显改掉这些不足会使Perl 6更易用,就像我在讨论中提到过 —— 类似于在J. R. R. Tolkien上对易用性的讨论一样[see http://tinyurl.com/nhpr8g2]。 + +重点是“简单的东西应该简单,而难得东西应该可以实现”。让我们回顾一下,在Perl 2和3之间的那段时间。在Perl 2上我们不能处理二进制数据或嵌入的空值 —— 只有C语言风格的字符串。我曾说过“Perl只是文本执行语言 —— 你并不需要有这些功能的文本执行语言”。 + +但当时发生了一大对的问题,因为大多数的文本中会包含少量的二进制数据 —— 类似的例如网址。你使用二进制数据打开套接字,然后文本处理它。所以语言的可用性两倍于处理二进制的可能性。 + +那我们开始探讨在语言中什么应该简单。现在的Perl中有一条原则,我们偷师了哈夫曼编码,在位编码系统中为字符采取了不同的尺寸。常用的字符占用的位数较少,不常用的字符占用的位数更多。 + +> “掌握平衡时需要格外小心。毕竟在刚开始的时候总会有许多的好主意。” + +我们偷师了这种想法并将它作为Perl的原则,针对常用的或者说常输入的 —— 这些常用的东西必须简单或简洁。另一方面,也显得更加的不规则。在自然语言中也是这样的,由诸多的常用的动词趋于诸多的不规律。 + +所以在这样的情况下需要更多的差异存在。我很喜欢一本书是Umberto Eco写的的《探寻完美的语言》,说的并不是计算机语言;而是哲学语言,大体的意思是古代的语言也许是完美的,我们应该将她们带回来。 + +所有的这类语言错误的认为同样的事物,其编码也应该一直是相同的。但这并不是我们沟通的方式。如果你的农场中有许多动物,他们都有对应的名字,当你想杀一只鸡的时候说“走,去把Blerfoo宰了”,你的真实想法是宰了Blerfee,但有可能最后死的是一头牛。 + +所以在这种时候我们其实更需要好好的将单词区分开,使沟通的信道的冗余增加。 + +在电子学中还有另一种自时钟码。在从前的串行传输协议中有停止和启动位,来保持同步。自然语言中也会包含这些。比如说,在写日语时,你不用空格。由于书写方式的原因,他们会在每个词组的开头使用中文中的汉字字符,然后用音节表中的字符来结尾。 + +**LV:平假名,对吗?** + +LW: 是的,平假名。所以使用这一系统,每个词组的开头就自然而然的脱颖而出了。同样的,在古老的希腊,大多数的动词都是搭配好的。所以它们拥有时钟排序机制的标准结尾。在他们的书写体系中空格也是可有可无的 —— 引入空格是更现代的一大发明。 + +所以在计算机语言上也要如此,将值包含于自时钟码中。在Perl上我们重度依赖此道,而且在Perl 6上相较于前几代这种依赖更重。当你使用表达式时,你要么想得到一个词,要么想到得到插入操作符。当你想要得到一个词,你有可能同时得到一个前缀操作符,同样当你想要得到一个插入符,你也可能同时得到前一个词的后缀。 + +但是反过来。如果编译器准确的知道它想要什么,你只用多写那么一丢丢,其他的让Perl来完成。所以在切断的时候,它会根据需要推荐常规表达式,分割处也会如你所愿。而我们并不需要操心任何事,因为那只会使你失去自时钟冗余。 + +大多数我们最好的语法错误消息,源于对一行中出现两个词的观察。然后我们尝试找出原因 —— “哦,你一定漏掉了上一行的分号”。所以我们相较于很多其他特殊解析器可以生成更加好的错误消息。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall3.jpg) + +**LV:为什么Perl 6花了15年?当每个人对她有不同看法时一定十分难管理,而且正确和错误并不是绝对的。** + +LW:这其中必定会有非常微妙的平衡。刚开始会有许多的想法 —— 当然,我并不是想说那些是好想法。也有很多令人烦恼的地方,就像有361条RFC[功能建议文件],而我想要实现的可能只有其中的20条。我们需要坐下来,将它们全部看完,并忽略其中的解决方案,因为它们通常流于表象、视野狭隘。几乎每一条只针对一样事物,如若我们将它们全部拼凑起来,那简直是一堆垃圾。 + +所以我们必须基于人们在使用Perl 5时的真实感受重新整理。寻找统一、深层的解决方案。许多的RFC文档都提到了一个事实,就是类型系统的不足。通过引入更条理分明的类型系统,我们可以解决很多问题并且即聪明又紧凑。 + +同时我们开始关注其他面:如何统一特征集并开始重用不同领域的想法。并不需要他们在下层相同。我们有一种标准的书写配对方式——好的吧,Perl的话有两种!但使用冒号书写配对的方法同样可以被基数计数法或是任何文字编号所重用。同样也可以用于其他形式的引用。在Perl里我们称它为“奇妙的一致”。 + +> “早先组建Perl 6实施小组的朋友,挽着我的手说:“我们真的很需要一位语言的设计者。”” + +同样的想法涌现出来,你说“我已经熟悉了语法如何运作,但是我实在别处看到的”。所以说视角相同才能找出这种一致。那些早期将Perl 6呈现在我面前的人们,握着我的手说:“我们真的需要一位语言的设计者。您能作为我们的精神领袖吗?” + +所以我是语言的设计者,但总是听到:“离实施小组远点!我们目睹了你对Perl 5做的那些,我们不想历史重演!”真是让我忍俊不禁因为他们作为起步的核心和原先Perl 5的内部结构上几乎别无二致,也许就只因为这个原因实施小组早期的工作并不顺利。 + +因为我们始终坚持我们的整体设计方法,所以在是否应该使用VM上讨论良久,最后解决的方式很像面向对象的汇编语言。类似的问题在伊始阶段无处不在。然后Pugs这家伙走过来说:“用用看Haskell吧,它能让你们清醒的认识自己正在干什么。让我们用它来弄清自己的言下之意。” + +因此,我们明确了其中的一些语义模型的,但更重要的是,我们开始建立符合哪些语义模型的测试套件。在这时候,持续的对Parrot VM进行开发,以及另一个实施项目Niecza的到来,它基于.Net,是由一个年轻的家伙搞出来的。他很聪明且实施了一大部分的Perl 6。不过他还是一个人干,并没有找到什么好方法让别人介入他的项目。 + +同时Parrot项目变得过于庞大,以至于任何人都不能真正的由内而外的管理它,并且很难重构。负责这方面工作的Rakudo觉得我们可能需要在更多平台上运行不止Parrot VM。于是他们发明了所谓的可移植层,“Not Quite Perl”简写成NQP。他们一开始将它移植到JVM(Java虚拟机)上运行,与此同时,他们还秘密的在一个新的VM上工作。这个叫做MoarVM的VM这去年刚刚为人知晓。 + +无论MoarVM还是JVM在回归测试中表现得十分接近 —— 在许多方面Parrot算是紧随其后。这样不挑剔VM真的很棒,我们也能开始考虑将NQP发扬光大。谷歌夏季编码大赛的目标就是针对JavaScript的NQP,这应该靠谱,因为MoarVM平时处理也同样使用Node.js。 + +我们可能要将今年余下的时光投在MoarVM上,直到6.0发布,方可休息片刻。 + +**LV:去年英国,政府开展编程年,来激发年轻人对编程的兴趣。针对活动的建议五花八门——类似为了让人们准确的认识到内存的使用你是否应该从低阶语言开授,或是一门高阶语言。你对此作和看法?** + +LW:到现在为止,Python社区在低阶方面的教学工作做得比我们要好。我们也很想在这一方面做点什么,这也是我们有蝴蝶logo的部分原因,以此来吸引七岁大小的女孩子! + +我们认为将Perl 6作为第一门语言来学习是可行的。一大堆的将Perl 5作为第一门语言学习的人让我们吃惊。你知道,在Perl 5中有许多相当大的概念,如闭包,范围操作符,和一些你通常在函数式编程中学到的特性。这才Perl 6中同样有很多。 + +> “到现在为止,Python社区在低阶方面的教学工作做得比我们要好。” + +Perl 6花了这么长时间的部分原因是我们尝试去坚持将近50种互不相同的原则,在设计语言的最后对于“哪点是最重要的规则”这个问题还是悬而未决。有太多的问题需要讨论。优势我们做出了决定,并已经工作了一段时间,才发现这个决定并不正确。 + +之前我们并未针对并发程序设计设计或指定些什么,直到Jonathan Worthington的出现,他非常巧妙的权衡了各个方面。他结合了一些其他语言诸如Go和C#的想法,将并发原语写的非常好。可组合性是一个语言至关重要的一部分。 + +很滑稽的是很多程序设计系统的并发和并行写的并不好 —— 就像线程和锁,不良的操作方式有很多。所以在我看来,额外花点时间看一下Go或者C#这种高阶原语的开发是很值得的 —— 他们在条目中列出了矛盾 —— 写的相当棒。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/interview-larry-wall/ + +作者:[Mike Saunders][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ From 527ff17151a21f189912fe3d4f2983be3ba25b01 Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 19 Oct 2015 01:09:24 +0800 Subject: [PATCH 2/2] Delete 20150716 Interview--Larry Wall.md --- .../talk/20150716 Interview--Larry Wall.md | 127 ------------------ 1 file changed, 127 deletions(-) delete mode 100644 sources/talk/20150716 Interview--Larry Wall.md diff --git a/sources/talk/20150716 Interview--Larry Wall.md b/sources/talk/20150716 Interview--Larry Wall.md deleted file mode 100644 index f3fea9c596..0000000000 --- a/sources/talk/20150716 Interview--Larry Wall.md +++ /dev/null @@ -1,127 +0,0 @@ -translating... - -Interview: Larry Wall -================================================================================ -> Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on. - -Larry Wall is a fascinating man. He’s the creator of Perl, a programming language that’s widely regarded as the glue holding the internet together, and mocked by some as being a “write-only” language due to its density and liberal use of non-alphanumeric characters. Larry also has a background in linguistics, and is well known for delivering entertaining “State of the Onion” presentations about the future of Perl. - -At FOSDEM 2015 in Brussels, we caught up with Larry to ask him why Perl 6 has taken so long (Perl 5 was released in 1994), how difficult it is to manage a project when everyone has strong opinions and pulling in different directions, and how his background in linguistics influenced the design of Perl from the start. Get ready for some intriguing diversions… - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall1.jpg) - -**Linux Voice: You once had a plan to go and find an undocumented language somewhere in the world and create a written script for it, but you never had the opportunity to fulfil this plan. Is that something you’d like to go back and do now?** - -Larry Wall: You have to be kind of young to be able to carry that off! It’s actually a lot of hard work, and organisations that do these things don’t tend to take people in when they’re over a certain age. Partly this is down to health and vigour, but also because people are much better at picking up new languages when they’re younger, and you have to learn the language before making a script for it. - -I started trying to teach myself Japanese about 10 years ago, and I could speak it quite well, because of my phonology and phonetics training – but it’s very hard for me to understand what anybody says. So I can go to Japan and ask for directions, but I can’t really understand the answers! - -> “With Perl 6, we found some ways to make the computer more sure about what the user is talking about.” - -So usually learning a language well enough to develop a writing system, and to at least be conversational in the language, takes some period of years before you can get to the point where you can actually do literacy and start educating people on their own culture, as it were. And then you teach them to write about their own culture as well. - -Of course, if you have language helpers – and we were told not to call them “language informants”, or everyone would think we were working for the CIA! – if you have these people, you can get them to come in and help you learn the foreign language. They are not teachers but there are ways of eliciting things from someone who’s not a language teacher – they can still teach you how to speak. They can take a stick and point to it and say “that’s a stick”, and drop it and say “the stick falls”. Then you start writing things down and systematising things. - -The motivation that most people have, going out to these groups, is to translate the Bible into their languages. But that’s only one part of it; the other is also culture preservation. Missionaries get kind of a bad rep on that, because anthropologists think they should be left to sit their in their own culture. But somebody is probably going to change their culture anyway – it’s usually the army, or businesses coming in, like Coca Cola or the sewing machine people, or missionaries. And of those three, the missionaries are the least damaging, if they’re doing their job right. - -**LV: Many writing systems are based on existing scripts, and then you have invented ones like Greenlandic…** - -LW: The Cherokee invented their own just by copying letters, and they have no mapping much to what we think of letters, and it’s fairly arbitrary in that sense. It just has to represent how the people themselves think of the language, and sufficiently well to communicate. Often there will be variations on Western orthography, using characters from Latin where possible. Tonal languages have to mark the tones somehow, by accents or by numbers. - -As soon as you start leaning towards a phoenetic or phonological representation, then you also start to lose dialectical differences – or you have to write the dialectal differences. Or you have conventional spelling like we have in English, but pronunciation that doesn’t really match it. - -**LV: When you started working on Perl, what did you take from your background in linguistics that made you think: “this is really important in a programming language”?** - -LW: I thought a lot about how people use languages. In real languages, you have a system of nouns and verbs and adjectives, and you kind of know which words are which type. And in real natural languages, you have a lot of instances of shoving one word into a different slot. The linguistic theory I studied was called tagmemics, and it accounts for how this works in a natural language – that you could have something that you think of as a noun, but you can verb it, and people do that all time. - -You can pretty much shove anything in any slot, and you can communicate. One of my favourite examples is shoving an entire sentence in as an adjective. The sentence goes like this: “I don’t like your I-can-use-anything-as-an-adjective attitude”! - -So natural language is very flexible this way because you have a very intelligent listener – or at least, compared with a computer – who you can rely on to figure out what you must have meant, in case of ambiguity. Of course, in a computer language you have to manage the ambiguity much more closely. - -Arguably in Perl 1 through to 5 we didn’t manage it quite adequately enough. Sometimes the computer was confused when it really shouldn’t be. With Perl 6, we discovered some ways to make the computer more sure about what the user is talking about, even if the user is confused about whether something is really a string or a number. The computer knows the exact type of it. We figured out ways of having stronger typing internally but still have the allomorphic “you can use this as that” idea. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall2.jpg) - -**LV: For a long time Perl was seen as the “glue” language of the internet, for fitting bits and pieces together. Do you see Perl 6 as a release to satisfy the needs of existing users, or as a way to bring in new people, and bring about a resurgence in the language?** - -LW: The initial intent was to make a better Perl for Perl programmers. But as we looked at the some of the inadequacies of Perl 5, it became apparent that if we fixed these inadequacies, Perl 6 would be more applicable, as I mentioned in my talk – like how J. R. R. Tolkien talked about applicability [see http://tinyurl.com/nhpr8g2]. - -The idea that “easy things should be easy and hard things should be possible” goes way back, to the boundary between Perl 2 and Perl 3. In Perl 2, we couldn’t handle binary data or embedded nulls – it was just C-style strings. I said then that “Perl is just a text processing language – you don’t need those things in a text processing language”. - -But it occurred to me at the time that there were a large number of problems that were mostly text, and had a little bit of binary data in them – network addresses and things like that. You use binary data to open the socket but then text to process it. So the applicability of the language more than doubled by making it possible to handle binary data. - -That began a trade-off about what things should be easy in a language. Nowadays we have a principle in Perl, and we stole the phrase Huffman coding for it, from the bit encoding system where you have different sizes for characters. Common characters are encoded in a fewer number of bits, and rarer characters are encoded in more bits. - -> “There had to be a very careful balancing act. There were just so many good ideas at the beginning.” - -We stole that idea as a general principle for Perl, for things that are commonly used, or when you have to type them very often – the common things need to be shorter or more succinct. Another bit of that, however, is that they’re allowed to be more irregular. In natural language, it’s actually the most commonly used verbs that tend to be the most irregular. - -And there’s a reason for that, because you need more differentiation of them. One of my favourite books is called The Search for the Perfect Language by Umberto Eco, and it’s not about computer languages; it’s about philosophical languages, and the whole idea that maybe some ancient language was the perfect language and we should get back to it. - -All of those languages make the mistake of thinking that similar things should always be encoded similarly. But that’s not how you communicate. If you have a bunch of barnyard animals, and they all have related names, and you say “Go out and kill the Blerfoo”, but you really wanted them to kill the Blerfee, you might get a cow killed when you want a chicken killed. - -So in realms like that it’s actually better to differentiate the words, for more redundancy in the communication channel. The common words need to have more of that differentiation. It’s all about communicating efficiently, and then there’s also this idea of self-clocking codes. If you look at a UPC label on a product – a barcode – that’s actually a self-clocking code where each pair of bars and spaces is always in a unit of seven columns wide. You rely on that – you know the width of the bars will always add up to that. So it’s self-clocking. - -There are other self-clocking codes used in electronics. In the old transmission serial protocols there were stop and start bits so you could keep things synced up. Natural languages also do this. For instance, in the writing of Japanese, they don’t use spaces. Because the way they write it, they will have a Kanji character from Chinese at the head of each phrase, and then the endings are written in the a syllabary. - -**LV: Hiragana, right?** - -LW: Yes, Hiragana. So naturally the head of each phrase really stands out with this system. Similarly, in ancient Greek, most of the verbs were declined or conjugated. So they had standard endings were sort-of a clocking mechanism. Spaces were optional in their writing system as well – it was a more modern invention to put the spaces in. - -So similarly in computer languages, there’s value in having a self-clocking code. We rely on this heavily in Perl, and even more heavily in Perl 6 than in previous releases. The idea that when you’re parsing an expression, you’re either expecting a term or an infix operator. When you’re expecting a term you might also get a prefix operator – that’s kind-of in the same expectation slot – and when you’re expecting an infix you might also get a postfix for the previous term. - -But it flips back and forth. And if the compiler actually knows which it is expecting, you can overload those a little bit, and Perl does this. So a slash when it’s expecting a term will introduce a regular expression, whereas a slash when you’re expecting an infix will be division. On the other hand, we don’t want to overload everything, because then you lose the self-clocking redundancy. - -Most of our best error messages, for syntax errors, actually come out of noticing that you have two terms in a row. And then we try to figure out why there are two terms in a row – “oh, you must have left a semicolon out on the previous line”. So we can produce much better error messages than the more ad-hoc parsers. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall3.jpg) - -**LV: Why has Perl 6 taken fifteen years? It must be hard overseeing a language when everyone has different opinions about things, and there’s not always the right way to do things, and the wrong way.** - -LW: There had to be a very careful balancing act. There were just so many good ideas at the beginning – well, I don’t want to say they were all good ideas. There were so many pain points, like there were 361 RFCs [feature proposal documents] when I expected maybe 20. We had to sit back and actually look at them all, and ignore the proposed solutions, because they were all over the map and all had tunnel vision. Each one many have just changed one thing, but if we had done them all, it would’ve been a complete mess. - -So we had to re-rationalise based on how people were actually hurting when they tried to use Perl 5. We started to look at the unifying, underlying ideas. Many of these RFCs were based on the fact that we had an inadequate type system. By introducing a more coherent type system we could fix many problems in a sane fashion and a cohesive fashion. - -And we started noticing other ways how we could unify the featuresets and start reusing ideas in different areas. Not necessarily that they were the same thing underneath. We have a standard way of writing pairs – well, two ways in Perl! But the way of writing pairs with a colon could also be reused for radix notation, or for literal numbers in any base. It could also be used for various alternative forms of quoting. We say in Perl that it’s “strangely consistent”. - -> “People who made early implementations of Perl 6 came back to me, cap in hand, and said “We really need a language designer.”” - -Similar ideas pop up, and you say “I’m already familiar with how that syntax works, but I see it’s being used for something else”. So it took some unity of vision to find these unifications. People who had the various ideas and made early implementations of Perl 6 came back to me, cap-in-hand, and said “We really need a language designer. Could you be our benevolent dictator?” - -So I was the language designer, but I was almost explicitly told: “Stay out of the implementation! We saw what you did made out of Perl 5, and we don’t like it!” It was really funny because the innards of the new implementation started looking a whole lot like Perl 5 inside, and maybe that’s why some of the early implementations didn’t work well. - -Because we were still feeling our way into the whole design, the implementations made a lot of assumptions about what VM should do and shouldn’t do, so we ended up with something like an object oriented assembly language. That sort of problem was fairly pervasive at the beginning. Then the Pugs guys came along and said “Let’s use Haskell, because it makes you think very clearly about what you’re doing. Let’s use it to clarify our semantic model underneath.” - -So we nailed down some of those semantic models, but more importantly, we started building the test suite at that point, to be consistent with those semantic models. Then after that, the Parrot VM continued developing, and then another implementation, Niecza, came along and it was based on .NET. It was by a young fellow who was very smart and implemented a large subset of Perl 6, but he was kind of a loner, didn’t really figure out a way to get other people involved in his project. - -At the same time the Parrot project was getting too big for anyone to really manage it inside, and very difficult to refactor. At that point the fellows working on Rakudo decided that we probably needed to be on more platforms than just the Parrot VM. So they invented a portability layer called NQP which stands for “Not Quite Perl”. They ported it to first of all run on the JVM (Java Virtual Machine), and while they were doing that they were also secretly working on a new VM called MoarVM. That became public a little over a year ago. - -Both MoarVM and JVM run a pretty much equivalent set of regression tests – Parrot is kind-of trailing back in some areas. So that has been very good to flush out VM-specific assumptions, and we’re starting to think about NQP targeting other things. There was a Google Summer of Code project year to target NQP to JavaScript, and that might fit right in, because MoarVM also uses Node.js for much of its more mundane processing. - -We probably need to concentrate on MoarVM for the rest of this year, until we actually define 6.0, and then the rest will catch up. - -**LV: Last year in the UK, the government kicked off the Year of Code, an attempt to get young people interested in programming. There are lots of opinions about how this should be done – like whether you should teach low-level languages at the start, so that people really understand memory usage, or a high-level language. What’s your take on that?** - -LW: Up until now, the Python community has done a much better job of getting into the lower levels of education than we have. We’d like to do something in that space too, and that’s partly why we have the butterfly logo, because it’s going to be appealing to seven year old girls! - -But we do think that Perl 6 will be learnable as a first language. A number of people have surprised us by learning Perl 5 as their first language. And you know, there are a number of fairly powerful concepts even in Perl 5, like closures, lexical scoping, and features you generally get from functional programming. Even more so in Perl 6. - -> “Until now, the Python community has done a much better job of getting into the lower levels of education.” - -Part of the reason the Perl 6 has taken so long is that we have around 50 different principles we try to stick to, and in language design you’re end up juggling everything and saying “what’s really the most important principle here”? There has been a lot of discussion about a lot of different things. Sometimes we commit to a decision, work with it for a while, and then realise it wasn’t quite the right decision. - -We didn’t design or specify pretty much anything about concurrent programming until someone came along who was smart enough about it and knew what the different trade-offs were, and that’s Jonathan Worthington. He has blended together ideas from other languages like Go and C#, with concurrent primitives that compose well. Composability is important in the rest of the language. - -There are an awful lot of concurrent and parallel programming systems that don’t compose well – like threads and locks, and there have been lots of ways to do it poorly. So in one sense, it’s been worth waiting this extra time to see some of these languages like Go and C# develop really good high-level primitives – that’s sort of a contradiction in terms – that compose well. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/interview-larry-wall/ - -作者:[Mike Saunders][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/mike/