查看: 2597|回复: 19
收起左侧

[讨论] 【发动全卡饭的力量】所有会英文的卡饭请进

[复制链接]
JY-YZX714
发表于 2009-7-12 11:46:16 | 显示全部楼层 |阅读模式
您进来了,您肯定会英文吧
这次我不做其他的,麻烦您们一件事
帮我翻译一篇文章

想必大家都知道一种新型的解释性语言叫python,它轻巧,实用,可移植,极大的减低了程序员的工作的复杂性
著名的程序员Bruce Eckel在他的著作——Thinking In Java的第二版中说:python语言最接近征服程序开发与维护的种种复杂度的目标(但是Bruce Eckel在Thinking In Java第三版中因为种种原因收回了这句话,但是这不能抹去大师对python的喜爱)
另一个与python有关的大师当然是ESR,ESR是我最崇敬的黑客,我认为ESR可以说是开源世界中第二有号召力的人(第一位当然是Linus),ESR在很多地方都表示python语言是他的最爱,并且在他的著作《HOW TO BE A HACKER》中把python列为黑客必需掌握的5种语言,并且是一名黑客应该最先学习的语言
说到这里,ESR还有一篇文章——why python,详细的介绍了他认识python的过程,从不屑一顾到爱不释手,文中把python同其他语言进行了对比(包括perl,lisp,c/c++)文章是学习python了解python的瑰宝
我今天请大家的任务就是这个,Why python只有一个英文版本和一个翻译得感觉不那么好的中文版本(翻译人是chaox,我没有贬低他劳动成果的意思,我感谢他对黑客文化做的贡献)所以我想翻译一个比较好的中文版本,但是文章比较长,加上我的英文水平实在有限,所以我想请全卡饭的朋友一起来翻译
1.不用你翻译多少,随便选择一点翻译一下,以附件形式传上来,注明翻译的位置(或者用过QQ(499855641)或者邮箱javer821@gmail.com
2.我也没有什么奖品,只能代表全体黑客(或许我没有这个资格)感谢您
3.您尽量翻译别人翻译得少的,我从您们翻译中选择最佳最易理解的版本
我在附件中上传英文版(约3000个单词)和已有的中文版
我再添加英文版和中文版的连接

英文版:http://blog.chinaunix.net/u1/37994/showart_331571.html
已有中文版:http://wiki.woodpecker.org.cn/moin/WhyPython/WhyPythonZh
插入紧急任务,本想在下午完成翻译的第一个版本,现在我自己完成大多数,ANDERSON997帮我完成了LISTING 4,只有listing2了,谁帮我下,我直接贴上来
Python could then evaluate the fetchmail --configdump output and have the configuration available as the value of the variable ``fetchmail''.
This wasn't quite the last step in the dance. What I really wanted wasn't just for fetchmailconf to have the existing configuration, but to turn it into a linked tree of live objects. There would be three kinds of objects in this tree: Configuration (the top-level object representing the entire configuration), Site (representing one of the sites to be polled) and User (representing user data attached to a site). The example file describes five site objects, each with one user object attached to it.
I had already designed and written the three object classes (that's what took four days, most of it spent getting the layout of the widgets just right). Each had a method that caused it to pop up a GUI edit panel to modify its instance data. My last remaining problem was somehow to transform the dead data in this Python initializer into live objects.
I considered writing code that would explicitly know about the structure of all three classes and use that knowledge to grovel through the initializer creating matching objects, but rejected that idea because new class members were likely to be added over time as the configuration language grew new features. If I wrote the object-creation code in the obvious way, it would be fragile and tend to fall out of sync when either the class definitions or the initializer structure changed.
What I really wanted was code that would analyze the shape and members of the initializer, query the class definitions themselves about their members, and then adjust itself to impedance-match the two sets.
This kind of thing is called metaclass hacking and is generally considered fearsomely esoteric--deep black magic. Most object-oriented languages don't support it at all; in those that do (Perl being one), it tends to be a complicated and fragile undertaking. I had been impressed by Python's low coefficient of friction so far, but here was a real test. How hard would I have to wrestle with the language to get it to do this? I knew from previous experience that the bout was likely to be painful, even assuming I won, but I dived into the book and read up on Python's metaclass facilities. The resulting function is shown in Listing 3, and the code that calls it is in Listing 4.

[ 本帖最后由 JY-YZX714 于 2009-7-12 16:09 编辑 ]

why python(english and chinese).rar

20.73 KB, 下载次数: 38

zwl2828
发表于 2009-7-12 11:51:12 | 显示全部楼层
不是有英文版么?需要翻译什么?
Ayer
发表于 2009-7-12 11:52:54 | 显示全部楼层
用google翻译吧。
JY-YZX714
 楼主| 发表于 2009-7-12 11:53:20 | 显示全部楼层
原帖由 zwl2828 于 2009-7-12 11:51 发表
不是有英文版么?需要翻译什么?
为黑客文化服务,为python在中国普及服务

[ 本帖最后由 JY-YZX714 于 2009-7-12 11:55 编辑 ]
壞寶[熷]帥?
发表于 2009-7-12 11:59:24 | 显示全部楼层
   google翻译
fengtaks
发表于 2009-7-12 12:00:23 | 显示全部楼层
先下下来看一下,今天实在比较忙~希望有更多热心饭友来帮忙啊~(毕竟机器对于非日常的用语翻起来是很“冷漠”的,呵呵)

[ 本帖最后由 fengtaks 于 2009-7-12 12:01 编辑 ]
hptutu
头像被屏蔽
发表于 2009-7-12 12:04:35 | 显示全部楼层
我想早一点积到25分,如果有奖励可以试试
淘金者
发表于 2009-7-12 12:06:36 | 显示全部楼层
ubuntu中文论坛那里还带着一个python的版区了
qwqwtianyuan
发表于 2009-7-12 12:18:30 | 显示全部楼层
googie已经很人性话了
耍花剑的猫
发表于 2009-7-12 12:19:44 | 显示全部楼层
理解不了专业术语,只能帮顶
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2025-1-11 20:55 , Processed in 0.142343 second(s), 19 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表