Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/21/84; site rlgvax.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!hplabs!hao!seismo!rlgvax!jack From: jack@rlgvax.UUCP Newsgroups: net.lang.c Subject: Re: Re: self-abusing C programs Message-ID: <81@rlgvax.UUCP> Date: Tue, 4-Sep-84 09:30:45 EDT Article-I.D.: rlgvax.81 Posted: Tue Sep 4 09:30:45 1984 Date-Received: Sun, 16-Sep-84 07:01:38 EDT References: <4317@brl-tgr.ARPA> <2675@ncsu.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 17 > Re: main(){system("cat foo.c");} > > I beleive there is an implicit assumption that programs that > simply print out their source files do not qualify as > "self reproducing" because they are so trivial. If we alow this, > then cat can produce any arbitrary program whose source is already > on the system. Not very exciting. > > --jcz > North Carolina State University To make writing self-replicating C programs fun, I'd say the reasonable restriction is that they are forbidden to make any system call except 'write'. I have one that satisfies the further restriction that it makes no call on any library routine except 'write'.