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 )
安装中文字典英文字典查询工具!
中文字典英文字典工具:
复制到剪贴板
英文字典中文字典相关资料:
Tiempo La Noticia Digital | Noticias de Chihuahua Periódico digital en tiempo real con información preferentemente del estado de Chihuahua y diversas secciones En línea desde el 10 de marzo de 1998, pionero en su tipo en el mundo
El Tiempo El golfista estadounidense, exnúmero uno del mundo, se preparaba para volver a competir en el Masters de Augusta
Clima. El Tiempo a 14 días - Meteored México El clima en Mexico y el Mundo Pronóstico Climatológico por ciudades para hoy, mañana y los próximos días
Previsión meteorológica de tres días para Roma, Lacio, Italia | AccuWeather Máximas y mínimas, RealFeel, precipitaciones, radar y todo lo que necesita saber para estar preparado para el día, el trayecto a su trabajo y el fin de semana
El Tiempo El Tiempo de hoy en España y el mundo Previsión del tiempo para hoy, mañana y los próximos días El Tiempo en 200 000 ciudades
Meteored - Pronóstico del tiempo Consulta la información del tiempo en el mapa meteorológico mundial de Meteored en tiempo real: radar de lluvia, satélite, predicción ECMWF, calidad del aire
Servicio Meteorológico Nacional Pronóstico Meteorológico especial por cuencas para el Sureste Mexicano a 96 horas Pronóstico Meteorológico especial por cuencas para el Sureste Mexicano a 360 horas
El tiempo en México Pronóstico del tiempo para las diferentes provincias de MX, selecciona la provincia deseada para ver más detalles sobre su pronóstico de lluvías, tempera o velocidad del viento
El Tiempo en México. Predicción a 14 días - Meteored España El Tiempo en México Predicción a 14 días Mapas del Tiempo para Estados Capitales de México: Temperaturas, velocidad del viento, humedad,…
El Tiempo. Pronósticos del Tiempo. Estado Actual del Tiempo. Alertas . . . El Tiempo Pronósticos detallados por semana para ciudades, poblados y topónimos Condiciones Meteorológicas actuales Alertas meteorológicos por condiciones de tiempo severo Pronóstico a largo plazo freemeteo mx