OnlineWoerterBuecher.de
Internes

Lexikon


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 ef="module.php?name=Lexikon&file=search&eid=1&query=Lisp">Lisp dialects (e.g. ef="module.php?name=Lexikon&file=search&eid=1&query=emacs Lisp">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 ef="module.php?name=Lexikon&file=search&eid=1&query=Lisp">Lisp using this idea: ((lambda (x) (list x x)) (lambda (x) (list x x))) Compare this to the ef="module.php?name=Lexikon&file=search&eid=1&query=lambda expression">lambda expression: ( x . x x) ( x . x x) which reproduces itself after one step of ef="module.php?name=Lexikon&file=search&eid=1&query=beta reduction">beta reduction. This is simply the result of applying the ef="module.php?name=Lexikon&file=search&eid=1&query=combinator">combinator ef="module.php?name=Lexikon&file=search&eid=1&query=fix">fix to the ef="module.php?name=Lexikon&file=search&eid=1&query=identity function">identity function. In fact any quine can be considered as a ef="module.php?name=Lexikon&file=search&eid=1&query=fixed point">fixed point of the language' s evaluation mechanism. We can write this in ef="module.php?name=Lexikon&file=search&eid=1&query=Lisp">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 ef="module.php?name=Lexikon&file=search&eid=1&query=PostScript">PostScript which readily handle programs as data much harder (and thus more challenging!) in languages like ef="module.php?name=Lexikon&file=search&eid=1&query=C">C which do not. Here is a classic ef="module.php?name=Lexikon&file=search&eid=1&query=C">C quine for ef="module.php?name=Lexikon&file=search&eid=1&query=ASCII">ASCII machines: char*f="char*f=%c%s%c main() ef="f,34,f,34,10">printf%c" main()ef="f,34,f,34,10">printf For excruciatingly exact quinishness, remove the interior line break. Some infamous ef="module.php?name=Lexikon&file=search&eid=1&query=Obfuscated C Contest">Obfuscated C Contest entries have been quines that reproduced in exotic ways. ef="module.php?name=Lexikon&file=search&eid=1&query=Ken Thompson">Ken Thompson' s ef="module.php?name=Lexikon&file=search&eid=1&query=back door">back door involved an interesting variant of a quine - a compiler which reproduced part of itself when compiling (a version of) itself. [ef="module.php?name=Lexikon&file=search&eid=1&query=Jargon File">Jargon File] (1995-04-25)

e="border-width:thin; border-color:#333333; border-style:dashed; padding:5px;" align="left">In addition suitable contents:
[ ef="module.php?name=Lexikon&op=content&tid=31">2 ] [ ef="module.php?name=Lexikon&op=content&tid=134">= ] [ ef="module.php?name=Lexikon&op=content&tid=262">ad ] [ ef="module.php?name=Lexikon&op=content&tid=383">af ] [ ef="module.php?name=Lexikon&op=content&tid=396">ag ] [ ef="module.php?name=Lexikon&op=content&tid=411">ai ] [ ef="module.php?name=Lexikon&op=content&tid=433">al ] [ ef="module.php?name=Lexikon&op=content&tid=544">am ] [ ef="module.php?name=Lexikon&op=content&tid=592">an ] [ ef="module.php?name=Lexikon&op=content&tid=683">app ] [ ef="module.php?name=Lexikon&op=content&tid=740">ar ] [ ef="module.php?name=Lexikon&op=content&tid=743">arc ] [ ef="module.php?name=Lexikon&op=content&tid=759">arg ] [ ef="module.php?name=Lexikon&op=content&tid=760">argument ] [ ef="module.php?name=Lexikon&op=content&tid=799">AS ] [ ef="module.php?name=Lexikon&op=content&tid=800">as ] [ ef="module.php?name=Lexikon&op=content&tid=810">ASCII ] [ ef="module.php?name=Lexikon&op=content&tid=894">at ] [ ef="module.php?name=Lexikon&op=content&tid=935">au ] [ ef="module.php?name=Lexikon&op=content&tid=996">av ] [ ef="module.php?name=Lexikon&op=content&tid=1026">b ] [ ef="module.php?name=Lexikon&op=content&tid=1034">ba ] [ ef="module.php?name=Lexikon&op=content&tid=1049">back door ] [ ef="module.php?name=Lexikon&op=content&tid=1177">bd ] [ ef="module.php?name=Lexikon&op=content&tid=1181">be ] [ ef="module.php?name=Lexikon&op=content&tid=1251">beta ] [ ef="module.php?name=Lexikon&op=content&tid=1255">beta reduction ] [ ef="module.php?name=Lexikon&op=content&tid=1261">bf ] [ ef="module.php?name=Lexikon&op=content&tid=1269">bi ] [ ef="module.php?name=Lexikon&op=content&tid=1444">bo ] [ ef="module.php?name=Lexikon&op=content&tid=1501">bot ] [ ef="module.php?name=Lexikon&op=content&tid=1535">br ] [ ef="module.php?name=Lexikon&op=content&tid=1562">break ] [ ef="module.php?name=Lexikon&op=content&tid=1708">C ] [ ef="module.php?name=Lexikon&op=content&tid=1724">ca ] [ ef="module.php?name=Lexikon&op=content&tid=1863">cat ] [ ef="module.php?name=Lexikon&op=content&tid=2001">ch ] [ ef="module.php?name=Lexikon&op=content&tid=2018">char ] [ ef="module.php?name=Lexikon&op=content&tid=2099">ci ] [ ef="module.php?name=Lexikon&op=content&tid=2136">ck ] [ ef="module.php?name=Lexikon&op=content&tid=2138">cl ] [ ef="module.php?name=Lexikon&op=content&tid=2145">class ] [ ef="module.php?name=Lexikon&op=content&tid=2147">classic ] [ ef="module.php?name=Lexikon&op=content&tid=2247">co ] [ ef="module.php?name=Lexikon&op=content&tid=2330">com ] [ ef="module.php?name=Lexikon&op=content&tid=2333">combinator ] [ ef="module.php?name=Lexikon&op=content&tid=2429">compiler ] [ ef="module.php?name=Lexikon&op=content&tid=2441">complete ] [ ef="module.php?name=Lexikon&op=content&tid=2545">con ] [ ef="module.php?name=Lexikon&op=content&tid=2606">cons ] [ ef="module.php?name=Lexikon&op=content&tid=2791">cr ] [ ef="module.php?name=Lexikon&op=content&tid=2976">D ] [ ef="module.php?name=Lexikon&op=content&tid=3006">data ] [ ef="module.php?name=Lexikon&op=content&tid=3151">de ] [ ef="module.php?name=Lexikon&op=content&tid=3565">do ] [ ef="module.php?name=Lexikon&op=content&tid=3752">du ] [ ef="module.php?name=Lexikon&op=content&tid=3834">e ] [ ef="module.php?name=Lexikon&op=content&tid=3865">ec ] [ ef="module.php?name=Lexikon&op=content&tid=3896">ed ] [ ef="module.php?name=Lexikon&op=content&tid=3923">edu ] [ ef="module.php?name=Lexikon&op=content&tid=3929">ee ] [ ef="module.php?name=Lexikon&op=content&tid=4035">emacs Lisp ] [ ef="module.php?name=Lexikon&op=content&tid=4148">er ] [ ef="module.php?name=Lexikon&op=content&tid=4150">era ] [ ef="module.php?name=Lexikon&op=content&tid=4171">es ] [ ef="module.php?name=Lexikon&op=content&tid=4199">et ] [ ef="module.php?name=Lexikon&op=content&tid=4204">eta reduction ] [ ef="module.php?name=Lexikon&op=content&tid=4246">evaluation ] [ ef="module.php?name=Lexikon&op=content&tid=4317">expression ] [ ef="module.php?name=Lexikon&op=content&tid=4379">fact ] [ ef="module.php?name=Lexikon&op=content&tid=4497">fi ] [ ef="module.php?name=Lexikon&op=content&tid=4520">file ] [ ef="module.php?name=Lexikon&op=content&tid=4595">fix ] [ ef="module.php?name=Lexikon&op=content&tid=4597">fixed point ] [ ef="module.php?name=Lexikon&op=content&tid=4700">fo ] [ ef="module.php?name=Lexikon&op=content&tid=4727">for ] [ ef="module.php?name=Lexikon&op=content&tid=4940">function ] [ ef="module.php?name=Lexikon&op=content&tid=5057">ge ] [ ef="module.php?name=Lexikon&op=content&tid=5070">gen ] [ ef="module.php?name=Lexikon&op=content&tid=5089">generate ] [ ef="module.php?name=Lexikon&op=content&tid=5141">gi ] [ ef="module.php?name=Lexikon&op=content&tid=5171">gl ] [ ef="module.php?name=Lexikon&op=content&tid=5291">gr ] [ ef="module.php?name=Lexikon&op=content&tid=5403">gu ] [ ef="module.php?name=Lexikon&op=content&tid=5434">h ] [ ef="module.php?name=Lexikon&op=content&tid=5438">hack ] [ ef="module.php?name=Lexikon&op=content&tid=5449">hackish ] [ ef="module.php?name=Lexikon&op=content&tid=5488">handle ] [ ef="module.php?name=Lexikon&op=content&tid=5540">hat ] [ ef="module.php?name=Lexikon&op=content&tid=5681">hn ] [ ef="module.php?name=Lexikon&op=content&tid=5722">hose ] [ ef="module.php?name=Lexikon&op=content&tid=5768">hr ] [ ef="module.php?name=Lexikon&op=content&tid=5791">hu ] [ ef="module.php?name=Lexikon&op=content&tid=5931">id ] [ ef="module.php?name=Lexikon&op=content&tid=5956">ie ] [ ef="module.php?name=Lexikon&op=content&tid=6013">il ] [ ef="module.php?name=Lexikon&op=content&tid=6064">in ] [ ef="module.php?name=Lexikon&op=content&tid=6194">int ] [ ef="module.php?name=Lexikon&op=content&tid=6272">interesting ] [ ef="module.php?name=Lexikon&op=content&tid=6381">interpreted ] [ ef="module.php?name=Lexikon&op=content&tid=6413">io ] [ ef="module.php?name=Lexikon&op=content&tid=6449">ir ] [ ef="module.php?name=Lexikon&op=content&tid=6482">is ] [ ef="module.php?name=Lexikon&op=content&tid=6558">it ] [ ef="module.php?name=Lexikon&op=content&tid=6589">J ] [ ef="module.php?name=Lexikon&op=content&tid=6620">Jargon File ] [ ef="module.php?name=Lexikon&op=content&tid=6760">K ] [ ef="module.php?name=Lexikon&op=content&tid=6789">ke ] [ ef="module.php?name=Lexikon&op=content&tid=6793">Ken Thompson ] [ ef="module.php?name=Lexikon&op=content&tid=6822">ki ] [ ef="module.php?name=Lexikon&op=content&tid=6904">kw ] [ ef="module.php?name=Lexikon&op=content&tid=6918">la ] [ ef="module.php?name=Lexikon&op=content&tid=6940">lambda expression ] [ ef="module.php?name=Lexikon&op=content&tid=6950">language ] [ ef="module.php?name=Lexikon&op=content&tid=7091">Lex ] [ ef="module.php?name=Lexikon&op=content&tid=7107">li ] [ ef="module.php?name=Lexikon&op=content&tid=7151">line ] [ ef="module.php?name=Lexikon&op=content&tid=7203">Lisp ] [ ef="module.php?name=Lexikon&op=content&tid=7220">list ] [ ef="module.php?name=Lexikon&op=content&tid=7399">ls ] [ ef="module.php?name=Lexikon&op=content&tid=7410">lt ] [ ef="module.php?name=Lexikon&op=content&tid=7415">lu ] [ ef="module.php?name=Lexikon&op=content&tid=7437">lv ] [ ef="module.php?name=Lexikon&op=content&tid=7441">ly ] [ ef="module.php?name=Lexikon&op=content&tid=7463">ma ] [ ef="module.php?name=Lexikon&op=content&tid=7479">machine ] [ ef="module.php?name=Lexikon&op=content&tid=8019">mm ] [ ef="module.php?name=Lexikon&op=content&tid=8032">mo ] [ ef="module.php?name=Lexikon&op=content&tid=8040">mod ] [ ef="module.php?name=Lexikon&op=content&tid=8079">module ] [ ef="module.php?name=Lexikon&op=content&tid=8167">mp ] [ ef="module.php?name=Lexikon&op=content&tid=8228">ms ] [ ef="module.php?name=Lexikon&op=content&tid=8258">mu ] [ ef="module.php?name=Lexikon&op=content&tid=8386">na ] [ ef="module.php?name=Lexikon&op=content&tid=8460">nc ] [ ef="module.php?name=Lexikon&op=content&tid=8472">ne ] [ ef="module.php?name=Lexikon&op=content&tid=8622">nf ] [ ef="module.php?name=Lexikon&op=content&tid=8627">ng ] [ ef="module.php?name=Lexikon&op=content&tid=8630">ni ] [ ef="module.php?name=Lexikon&op=content&tid=8672">nn ] [ ef="module.php?name=Lexikon&op=content&tid=8675">no ] [ ef="module.php?name=Lexikon&op=content&tid=8760">ns ] [ ef="module.php?name=Lexikon&op=content&tid=8820">O ] [ ef="module.php?name=Lexikon&op=content&tid=8832">Obfuscated C Contest ] [ ef="module.php?name=Lexikon&op=content&tid=8964">om ] [ ef="module.php?name=Lexikon&op=content&tid=9014">op ] [ ef="module.php?name=Lexikon&op=content&tid=9176">output ] [ ef="module.php?name=Lexikon&op=content&tid=9204">pa ] [ ef="module.php?name=Lexikon&op=content&tid=9550">ph ] [ ef="module.php?name=Lexikon&op=content&tid=9651">pl ] [ ef="module.php?name=Lexikon&op=content&tid=9738">ply ] [ ef="module.php?name=Lexikon&op=content&tid=9762">point ] [ ef="module.php?name=Lexikon&op=content&tid=9864">PostScript ] [ ef="module.php?name=Lexikon&op=content&tid=9908">pr ] [ ef="module.php?name=Lexikon&op=content&tid=9965">printf ] [ ef="module.php?name=Lexikon&op=content&tid=10023">program ] [ ef="module.php?name=Lexikon&op=content&tid=10042">programming ] [ ef="module.php?name=Lexikon&op=content&tid=10044">programming language ] [ ef="module.php?name=Lexikon&op=content&tid=10144">pt ] [ ef="module.php?name=Lexikon&op=content&tid=10194">py ] [ ef="module.php?name=Lexikon&op=content&tid=10198">Q ] [ ef="module.php?name=Lexikon&op=content&tid=10253">query ] [ ef="module.php?name=Lexikon&op=content&tid=10364">rc ] [ ef="module.php?name=Lexikon&op=content&tid=10385">re ] [ ef="module.php?name=Lexikon&op=content&tid=10453">reduction ] [ ef="module.php?name=Lexikon&op=content&tid=10589">rete ] [ ef="module.php?name=Lexikon&op=content&tid=10767">ro ] [ ef="module.php?name=Lexikon&op=content&tid=10887">ru ] [ ef="module.php?name=Lexikon&op=content&tid=10918">S ] [ ef="module.php?name=Lexikon&op=content&tid=11009">SC ] [ ef="module.php?name=Lexikon&op=content&tid=11010">sc ] [ ef="module.php?name=Lexikon&op=content&tid=11047">Scheme ] [ ef="module.php?name=Lexikon&op=content&tid=11059">SCI ] [ ef="module.php?name=Lexikon&op=content&tid=11150">se ] [ ef="module.php?name=Lexikon&op=content&tid=11314">sh ] [ ef="module.php?name=Lexikon&op=content&tid=11376">si ] [ ef="module.php?name=Lexikon&op=content&tid=11556">sm ] [ ef="module.php?name=Lexikon&op=content&tid=11651">so ] [ ef="module.php?name=Lexikon&op=content&tid=11745">source ] [ ef="module.php?name=Lexikon&op=content&tid=11934">st ] [ ef="module.php?name=Lexikon&op=content&tid=12133">su ] [ ef="module.php?name=Lexikon&op=content&tid=12246">sy ] [ ef="module.php?name=Lexikon&op=content&tid=12359">T ] [ ef="module.php?name=Lexikon&op=content&tid=12557">test ] [ ef="module.php?name=Lexikon&op=content&tid=12567">text ] [ ef="module.php?name=Lexikon&op=content&tid=12578">tf ] [ ef="module.php?name=Lexikon&op=content&tid=12588">th ] [ ef="module.php?name=Lexikon&op=content&tid=12721">to ] [ ef="module.php?name=Lexikon&op=content&tid=12777">tp ] [ ef="module.php?name=Lexikon&op=content&tid=12787">tr ] [ ef="module.php?name=Lexikon&op=content&tid=12986">ua ] [ ef="module.php?name=Lexikon&op=content&tid=13008">ug ] [ ef="module.php?name=Lexikon&op=content&tid=13030">um ] [ ef="module.php?name=Lexikon&op=content&tid=13175">us ] [ ef="module.php?name=Lexikon&op=content&tid=13229">V ] [ ef="module.php?name=Lexikon&op=content&tid=13252">va ] [ ef="module.php?name=Lexikon&op=content&tid=13260">value ] [ ef="module.php?name=Lexikon&op=content&tid=13274">var ] [ ef="module.php?name=Lexikon&op=content&tid=13310">ve ] [ ef="module.php?name=Lexikon&op=content&tid=13335">version ] [ ef="module.php?name=Lexikon&op=content&tid=13366">vi ] [ ef="module.php?name=Lexikon&op=content&tid=13864">write ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (13322 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.11 Seconds, with 16 Database-Queries
Zurück zur Startseite