Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ames!jaw From: jaw@ames.UUCP (James A. Woods) Newsgroups: rec.puzzles,comp.misc,comp.lang.prolog Subject: Re: self-reproducing programs Message-ID: <1370@ames.UUCP> Date: Fri, 24-Apr-87 16:10:18 EST Article-I.D.: ames.1370 Posted: Fri Apr 24 16:10:18 1987 Date-Received: Sat, 25-Apr-87 21:09:01 EST References: <3248@bigburd.PRC.Unisys.COM> Organization: NASA Ames Research Center, Moffett Field, CA Lines: 23 Xref: mnetor rec.puzzles:206 comp.misc:464 comp.lang.prolog:209 # "Sixty minutes of thinking of any kind is bound to lead to confusion & unhappiness." -- James Thurber A formal discussion may be found in Hartley Rogers' classic text "Theory of Recursive Functions and Effective Computability", McGraw-Hill, 1967, p. 188-190. The existence of such programs date back to a theorem of von Neumann, though the text uses a consequence of the fixpoint "recursion theorem" of Kleene in proof. More leisurely, one might peek at the European Unix User's Group newsletter (EUUGN vol. 3, no. 4) for the article "Some Self-Reproducing Programs" by Theo de Ridder. Or, for the truly lazy, just compile and run p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} for a demonstration of such introspective behavior. The 66-byte C version was the culmination of a lively net.sources discussion in 1984. However, some masochists were composing much more elaborate self-reproducing code in FORTRAN at various institutions during the 1950's. -- James A. Woods (ames!jaw)