SICP公开课翻译小记(零)

DeathKing posted @ 2013年2月04日 00:50 in Scheme with tags lisp ruby Scheme SICP 公开课 , 13055 阅读

于此来说,计算机科学是个很糟糕的名字。

首先,它不是一门科学。它或许是一门工程或者一种艺术。但我们会发现计算机被叫做所谓的科学 ,是因为它有很多与魔法一致的地方。这些将在本课中体现 。

——Harold Abelson

 

缘起

  记得那是在高一信息技术课上,我从老师的口中听到了两个来自于上古的名字:PrologLisp。而在高二与朋友的闲聊中,又听闻到了Scheme——这个由MIT主导开发的Lisp方言,以及Scheme界的“The Bibble”——魔法书Structure and Interpretation of Computer Programs

Structure and Interpretation of Computer Program

《计算机程序的结构与解释》

  《算法导论》《编译原理》C程序设计语言》甚至《计算机程序设计艺术》毫无疑问都是计算机学界的瑰宝,然而这本《计算机程序的构造和解释》,却凭借与其自身的独特魅力,或者说魔力,在这个群魔乱舞的神坛里面独树一帜。我们也很想跟随SICP,跟随两位作者,去不一样的世界冒险,去追寻那神秘的魔法之力。偶然的机会,我得知SICP有公开课视频,这是两位作者Harold AbelsonGerald Jay Sussman19867月给Hewlett-Packard公司员工培训时所录制的视频。于是,怀着对SICP以及两位作者的崇高敬意,我和@ChingfanTson师兄开始了这段艰难的漫长翻译路。

 

视频、字幕和SICP中译版

Harold Abelson

  首先要再次说明,SICP公开课的系列视频录制于1986年,并作为HP公司的内部资料。而HP公司为响应Harold Abelson教授的MIT OCW建设,也于惠普影视部后制处理之后大方地公开。由于当时的录制条件所限,分辨率只有320X240,并且画质也非常糟糕。这对我们的字幕制作带来了很大的影响,我们也尝试着将分辨率提高到640X480(否则小分辨率显示字幕非常糟糕),并使用一些商业软件略微修补画质,但效果不太理想。

  而就字幕来说,我和@ChingfanTson之前都没有做过类似的工作,因此这次也是硬着头皮来完成这个系列的翻译。以前看电影时从没考虑过字幕组会付出多少心血,如今亲身实践,才发现此中不易!一节课的视频只有一个小时,但完成划句、翻译、审校、做时间轴花了我们不下30个小时的功夫,期间的种种酸甜苦辣,也只有我们才知道。个别句子,甚至要花上好些时间理解,有时还得热烈讨论一番才能得出结果。有些句子,为了使翻译符合中文习惯,不得不苦心孤诣,再三斟酌。还有的句子,在参考了资料后,又不得不改了又改。而最后的结果也难以令人满意。除了已经把这个项目托管到了GitHub,我还希望能有时间再细细的磨下,把措辞再变得准确一点、优雅一点。

Gerald Jay Sussman

  SICP的中译版,也就是《计算机程序的结构和解释》,是由北京大学的裘宗燕教授翻译的,虽然网路上有一部分人不太认可他的翻译,但我觉得,这个译本是非常棒的(尤其是序言的翻译,非常精彩)。在翻译SICP公开课的时候,很多地方也采用了他的译法。另外,出于统一的考虑,公开课出现的术语都朝裘书中的译法靠拢,比如:

  • Operator,操作符→运算符;
  • Operand,操作数→运算对象;

  出于忠于上下文的考虑,仔细理解后,Lec1a中有一处我们保留了我们的译法:

  • Conventional Interfaces,约定的接口,约定的界面(裘书)

  还有的术语出于跟上时代的考虑,翻译成了当下的叫法,比如:

  • Black Box,黑箱→黑盒
  • Syntactic Sugar,语法糖衣→语法糖;

  还有的词,再与裘宗燕教授交流一番后,我们终于从几种不同的译法中择出了最优:

  • Imperative Knowledge,行动性知识→指令性知识;

  虽然我们的翻译不能确保100%的准确,而且能够用中文表达作者的神韵,但我们的确是用心在做这件事。

 

Lisp\Scheme

C Lisp 一个就像红外线,一个就像紫外线,它们分布在光谱的最两端。它俩一个牛逼的地方刚好是另一个傻逼了的地方。

—— Steve Yegge ,Tour De Babel

  我承认,正因为之前有一点其它程序设计语言的基础,接触到PrologLisp的时候着实给吓傻了。一个不需要“for”语句,不需要“do-while”语句的语言,你这是想说Edsger W. Dijkstra提出的计算机程序的结构“顺序、分支、循环”中的“循环”是多余的么?Lisp告诉你,对,我们不需要它。我们可以用迭代或者递归来完成(SICP中会告诉你递归和迭代在某种程度上是一致的)。于是在SICP书中你就可以看到用递归完成的求平方根法。

  Lisp\Scheme之美,在于它能够模糊数据与代码的边界。代码和数据,在Lisp的世界中,就如道家的阴和阳,相互对立又相互转化,十分和谐。这是什么意思呢?我们假设在代码中,我们有一个叫a的变量,如果我们只是简单的使用它,那么编译器/解释器就会对其求值,以Ruby作喻:

a = 5
a #=> 5

  然而,我们如果想表示,叫a的这个变量的名字,也就是“a”这个符号,那么我可以用“符号”这个东西

a = 5
:a #=> :a

  Ruby只是从Lisp那里继承了一点东西,所以才会看起来更Lisp有异曲同工之妙,Lisp\Scheme通过一个单引号就将代码变成了数据:

(define atom?   
  (lambda (x)  
    (and (not (pair? x)) (not (null? x)))))  

(atom? (atom? 'a))    ; #t
(atom? '(atom? 'a))   ; #f

  由于Lisp写出下面的代码也不奇怪,运算符也可以作为返回值——因为它们都是复合过程——这是Lisp/Scheme神奇的组合以及抽象手段:

(define my-opr
    (lambda (x)
        ((cond ((> x 0) *)
                (else +)) x x)))

(my-opr 3)  ; 9
(my-opr -3) ; -6

  就此打住,Lisp\Scheme的奥秘还请各位自行在这个魔法世界里探索。

彩蛋

  公开课中播放的音乐是Johann S. BachJesus, Joy of Man's Desiring

  Harold Abelson教授是左撇子

视频

  正在后期制作,估计年三十那天应该能正式看到吧,算是送给各位虔诚的\(\lambda\)教信徒的新年贺礼吧!

Avatar_small
FTS 说:
2013年2月07日 16:12

十分感谢LZ做出的贡献!

just 说:
2013年11月04日 13:22

Excellent work,thanks a lot~最近也在看这本书

未命名 说:
2016年11月20日 21:50

我觉得裘的中译版是别人代笔的。第169页,图3-8中,“这里是由set改变的平衡”。本来是平衡的?现在被打破了?等等,代码里面好像有balance,一直是余额啊,难道莫非,看了下原版,果然是余额。。。。坑。。。。其中一个小坑而已。。。。

Top SEO 说:
2021年4月19日 00:32

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. kuliah karyawan

jackjohnny 说:
2021年6月26日 21:44

Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. 안전놀이터

jackjohnny 说:
2021年6月29日 18:18

I was reading your article and wondered if you had considered creating an ebook on this subject. Your writing would sell it fast. You have a lot of writing talent. indian visa online

jackjohnny 说:
2021年7月05日 19:00

Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. สล็อต

seo 说:
2021年7月06日 14:39

I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks 123movies.com official site

seo 说:
2021年7月06日 14:53

This was among the best posts and episode from your team it let me learn many new things. 123 free movies

seo 说:
2021年7月06日 14:59

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. 123 free movies

seo 说:
2021年7月08日 12:54

I would recommend my profile is important to me, I invite you to discuss this topic... sa gaming

seo 说:
2021年7月10日 14:56 There's no doubt i would fully rate it after i read what is the idea about this article. You did a nice job.. superslot
seo 说:
2021年7月10日 14:59

I would also motivate just about every person to save this web page for any favorite assistance to assist posted the appearance. pg slot

jackjohnny 说:
2021年7月11日 18:33

You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. 토토사이트

seo 说:
2021年7月13日 15:02

Please give some advice on how to achieve this kind of posts. sa gaming

seo 说:
2021年7月13日 15:35

I don’t think many of websites provide this type of information. 2021 waec runz

jackjohnny 说:
2021年7月13日 19:18

I havent any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. Brawl Stars Hack 2021

seo 说:
2021年7月13日 23:54

i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful. joker gaming

seo 说:
2021年7月14日 15:20

If you have experienced a scenario where in you logged on to your real money account in an online casino to find out that all your money or bankroll was emptied, then you probably have landed on the seemingly right but actually a wrong place to play online casino games. Incident like this one is so unfortunate of course. But, aside from it is unfortunate, it also reveals a serious problem that most of the online casino players fall onto. 카지노사이트

jackjohnny 说:
2021年7月14日 22:49

ikinci el cikma enjektör bosch kullanilmis oto enjektör satin al ikinci el enjektör

seo 说:
2021年8月08日 14:36

Wow i can say that this is another great article as expected of this blog.Bookmarked this site.. xe đông lạnh 1 tấn

seo 说:
2021年8月09日 12:16

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. Blog About Tech

seo 说:
2021年8月13日 23:55

Personally I think overjoyed I discovered the blogs. affordable skateboards

seo 说:
2021年8月14日 00:00

If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries cheap air fryer

seo 说:
2021年8月14日 00:04

I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it.. portable air conditioner reviews

seo 说:
2021年8月14日 00:09

Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! home safe reviews

seo 说:
2021年8月14日 00:13

Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though. dishwasher reviews under 500

seo 说:
2021年8月20日 18:17

Mobile ringtones are one of the costless source of entertainment that provides pleasure and fun on the beats of music. Ringtones are basically the tracks of movies, albums, artists played on cell phones whenever a mobile user want and whenever the phone rings. The user can listen to various songs of his/her choice in a hassle free manner. Download Pakistani Movies

seo 说:
2021年8月25日 14:56

With the introduction of the blog, creation of a community driven, local, online, news website is made so much easier than it was using a conventional website. One advantage of an online news service over a print newspaper is the ability to update the current news as it comes to hand. NewsExel.Com - Latest and Fastest

seo 说:
2021年9月01日 07:46

Do people open offshore bank accounts for privacy, asset protection, tax mitigation or a combination? Or is it just because international banks provide a broader range of services, better internet banking and more flexible debit and credit cards? Why do wealthy individuals seek offshore safe haven or nest egg accounts? And is it legal? Those are just a few of your questions about offshore private banking that will be answered in this article. Buy Zelle Account

seo 说:
2021年9月01日 07:51

With the advancement of entertainment facilities online, the online slot games are getting an increased patronage from people from all walks of life. Because of the availability of varied choices in online slots, it stands at the top, when compared to other sources of entertainment. There exist umpteen number of slot online which are being offered by several facilitators of slot software. joker slot

seo 说:
2021年9月01日 10:03

For your journey to be trouble-free you'll need to make sure your passport's in-date and in good condition. You'll also need to have the right visas and documentation for all the countries you plan to visit before you go. If you don't have the right paper work on arrival in a country, you won't be let in! Here's a checklist of things to check before you go. buy real registered passport online

seo 说:
2021年9月01日 10:05

When you're on a weight loss journey or plan you don't need to eat rabbit food, anyone who says you do hasn't met me or my methods. This is especially true when it comes to healthy snacks. This article outlines some of my personal favourite healthy snacks for weight loss, all of these are nutritious, delicious and don't take much time to prepare at all. welche Nüsse zum Abnehmen

seo 说:
2021年9月04日 10:44 It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing. slot pg
seo 说:
2021年9月08日 00:36

Air Supply Returns to Rhode Island. Performs at Twin River Events Center. Ethernet Installation Toronto

seo 说:
2021年9月08日 00:42

https://backlinks.hk is one of the well-established SEO companies which provides quality backlinks to local business in Hong Kong. By purchasing our backlinks, web owners can rank their websites higher on Google’s SERPs. Don’t feel hesitate, act now and your website will rank on the first page soon. SEO backlinks

seo 说:
2021年9月08日 00:49

Branden & Rayni Williams are recognized as L.A.’s highest-performing real estate team based on their impressive list of record-breaking deals and billions of dollars in sales. The husband and wife real estate duo specialize in historic properties in Malibu, Trousdale, Beverly Hills, Bel Air, Brentwood, Holmby Hills, Los Feliz, and beyond. holmby hills realtor

seo 说:
2021年9月14日 12:57 Okay so you suffer with psoriasis? Trust me, You're not alone! Psoriasis actually affects around 3% of the worlds population which going by current world population estimates puts the number of psoriasis sufferers at approximately 203 million people! This scary figure explains why treatment for psoriasis is such big business. UBA bank online money transfer
seo 说:
2021年9月15日 13:03

This is an awesome motivating article.I am practically satisfied with your great work.You put truly extremely supportive data. Keep it up. Continue blogging. Hoping to perusing your next post canada visum

seo 说:
2021年9月16日 19:50

The visually focused and stylish nature of Instagram makes it popular for brands to showcase their products and services. More than 200 million users visit at least one brand profile on Instagram per day. Wow! free instagram views

seo 说:
2021年9月18日 23:20

Leading casino review site gives you the goods on the top online casino payout rates. johnny cash pokies

seo 说:
2021年9月21日 23:57

Enhancement of technology and the advent of Internet has increased the popularity of on line businesses. With the increasing competition of on line businesses, every business owner intends to have a successful search engine ranking in order to have an edge over their competitors. It is at this point of time that an expert SEO services play an important role in taking your on line business way ahead in the competition. jasa seo indonesia


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter