|
quine 音标拼音: [kw'ɑɪn] Quine n 1: United States philosopher and logician who championed an empirical view of knowledge that depended on language ( 1908- 2001) [ synonym: { Quine}, { W. V. Quine}, { Willard Van Orman Quine}] /kwi:n/ (After the logician Willard V. Quine,
via Douglas Hofstadter) A program that generates a copy of its
own source text as its complete output. Devising the shortest
possible quine in some given programming language is a common
hackish amusement.
In most interpreted languages, any constant, e.g. 42, is a
quine because it "evaluates to itself". In certain {Lisp}
dialects (e.g. {Emacs Lisp}), the symbols "nil" and "t" are
"self-quoting", i.e. they are both a symbol and also the value
of that symbol. In some dialects, the function-forming
function symbol, "lambda" is self-quoting so that, when
applied to some arguments, it returns itself applied to those
arguments. Here is a quine in {Lisp} using this idea:
((lambda (x) (list x x)) (lambda (x) (list x x)))
Compare this to the {lambda expression}:
(\ x . x x) (\ x . x x)
which reproduces itself after one step of {beta reduction}.
This is simply the result of applying the {combinator} {fix}
to the {identity function}. In fact any quine can be
considered as a {fixed point} of the language's evaluation
mechanism.
We can write this in {Lisp}:
((lambda (x) (funcall x x)) (lambda (x) (funcall x x)))
where "funcall" applies its first argument to the rest of its
arguments, but evaluation of this expression will never
terminate so it cannot be called a quine.
Here is a more complex version of the above Lisp quine, which
will work in Scheme and other Lisps where "lambda" is not
self-quoting:
((lambda (x)
(list x (list (quote quote) x)))
(quote
(lambda (x)
(list x (list (quote quote) x)))))
It's relatively easy to write quines in other languages such
as {PostScript} which readily handle programs as data; much
harder (and thus more challenging!) in languages like {C}
which do not. Here is a classic {C} quine for {ASCII}
machines:
char*f="char*f=%c%s%c;main() {printf(f,34,f,34,10);}%c";
main(){printf(f,34,f,34,10);}
For excruciatingly exact quinishness, remove the interior line
break. Some infamous {Obfuscated C Contest} entries have been
quines that reproduced in exotic ways.
{Ken Thompson}'s {back door} involved an interesting variant
of a quine - a compiler which reproduced part of itself when
compiling (a version of) itself.
[{Jargon File}]
(1995-04-25)
|
安装中文字典英文字典查询工具!
中文字典英文字典工具:
英文字典中文字典相关资料:
- 有什么好的ed2k下载器? - 知乎
知乎,中文互联网高质量的问答社区和创作者聚集的原创内容平台,于 2011 年 1 月正式上线,以「让人们更好的分享知识、经验和见解,找到自己的解答」为品牌使命。知乎凭借认真、专业、友善的社区氛围、独特的产品机制以及结构化和易获得的优质内容,聚集了中文互联网科技、商业、影视
- 怎么查往年的考研成绩? - 知乎
学信网查,快速且可靠。一般985往年录取名单,公式期结束是搜不出来的,除非你存了PDF。此外,研招网这玩意,过了你考研的那年,是一点点考研和调剂信息都不会保留的,也不用尝试了。学信网查询方法如下(如果是当年考上的,请去研招网查,学信一般次年1月才同步): 进学信网-学信档案:
- Stark-C 的想法: 珍藏超过100PB 115资源,请随意下载!!! | ⚠️⚠️⚠️所有资源皆来自于网上免费分享,请勿 . . .
珍藏超过100PB 115资源,请随意下载!!! | ⚠️⚠️⚠️所有资源皆来自于网上免费分享,请勿用于营利!!! 如果看到有用的资源请及时保存到本地(NAS),以免和谐!!!【腾讯文档】115资源 链接【腾讯文…
- 安神补脑液真的有用吗?其有副作用吗? - 知乎
安神补脑液真的有用吗,其有副作用吗? 安神补脑液其实有点偏滋补药,鹿茸,淫羊藿,大枣,干姜,甘草都用上了。相对西药,对胃肠的刺激没那么大。因为光谈副作用,不谈剂量,都是耍流氓。 长辈失眠,加上我自己也偶尔失眠,很关注这些东西。敖东安神补脑液来说,看成分表,一支一半
- win10怎么更改系统语言(Windows显示语言只能使用中文,没有下拉列表)? - 知乎
需要说明的是,因为系统语言不能修改的原因有很多,所以这里的方法也只是一种参考,大家可以尝试一下看看是否在自己的电脑中可行。 这里就介绍一下在 Windows 10 操作系统中,修改系统的显示语言的方法;并解决在这一过程中,出现的“ 很抱歉,我们无法获取此Windows显示语言 ”报错问题
- 暗黑2重制版资料片术士君临加入了哪些新符文之语? - 知乎
暗黑2新资料片新增了几个符文之语,主要都与新职业术士有关,分别有权威、女巫团、仪式、虚空,不排除新赛季继续增加新
- 人名中的“茜”读什么音,xī还是qiàn? - 知乎
知乎,中文互联网高质量的问答社区和创作者聚集的原创内容平台,于 2011 年 1 月正式上线,以「让人们更好的分享知识、经验和见解,找到自己的解答」为品牌使命。知乎凭借认真、专业、友善的社区氛围、独特的产品机制以及结构化和易获得的优质内容,聚集了中文互联网科技、商业、影视
- 不想上吊王承恩 - 知乎
就是说有没有这样一种可能,特朗普是在通过伊朗洗钱? 不管是股市划K线还是全家卖币,来钱都太慢了,相比之下战争赔款是最快的,而且伊朗封锁个海峡就敢要3000亿美元,不怕美国一拍两散、鸡飞蛋打吗?特朗普一合计,干脆名义上美国或者美国的海湾盟友们向伊朗赔偿3000亿美元,背后伊朗再
- win10系统不激活可以换壁纸吗? - 知乎
不激活Win10也可以更换桌面背景,可以通过多种方法实现。 一种方法是使用注册表编辑器来更改桌面背景。具体步骤如下: 按下Win + R键,打开运行对话框,输入“regedit”,并按下Enter键,打开注册表编辑器。 在注册表编辑器中,导航到以下路径:HKEY_CURRENT_USER\Control Panel\Desktop。 在右侧窗格中
- 两个书名号或者双引号之间加不加顿号? - 知乎
如果是表示并列列举,那么两个引号之间是不加顿号的。语文书上明确提及。 原因在于,对于并列列举来说,两引号之间的空隙足以在视觉上达到顿号起到的分隔效果,因此不需要额外添加顿号(额外添加顿号反而会使空隙过大,影响视觉效果)。 书名号应当相同,但是我没找到明确的出处。 需要
|
|