Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!botter!tjalk!cogito From: cogito@tjalk.cs.vu.nl (Robbert van Renesse) Newsgroups: comp.lang.c Subject: palindrome Message-ID: <761@tjalk.cs.vu.nl> Date: Mon, 29-Dec-86 16:59:58 EST Article-I.D.: tjalk.761 Posted: Mon Dec 29 16:59:58 1986 Date-Received: Tue, 30-Dec-86 05:38:09 EST Reply-To: cogito@cs.vu.nl (Robbert van Renesse) Distribution: world Organization: VU Informatica, Amsterdam Lines: 51 Here follows a PORSROP (say it out loud), that is, a PORtable Self-Reproducing Obfuscated Palindrome+ =============================================== Features: produces itself as output reversible short++ Author: Robbert van Renesse Dept. of Maths and Computer Science Vrije Universiteit Amsterdam The Netherlands ------------ +) This research was supported in part by the Netherlands Foundation for the Advancement of Pure Research under grant 125-30-10, in an effort to develop a Dutch SDI system. It will reproduce missiles sent to the Netherlands and reverse the original direction (whatever that was). ++) Since this is a Dutch project the program must be short, to save on the number of bytes (each byte is more disk space, thus more money). --------8<----------------8<----------------8<----------------8<-------- /*X enifed# };)b-f,b,1(etirw;)01(a,)p*(l);p++*;m=p(rof;)01(a,)44(a,) 43(a,)++p*(l,)43(a);p*;1+f=b(rof{)(niam};)++s*(a)s*(elihw{ ;s*rahc)s(l};c=b--* =++f*{)c(a;b*,994+d=f*,]999[d,m=p**,}0 ,"/*X enifed#" ,"};)b-f,b,1(etirw;)01(a,)p*(l);p++*;m=p(rof;)01(a,)44(a,)" ,"43(a,)++p*(l,)43(a);p*;1+f=b(rof{)(niam};)++s*(a)s*(elihw{" ,";s*rahc)s(l};c=b--* =++f*{)c(a;b*,994+d=f*,]999[d,m=p**,}0" ,"*/char*m[]={"{=][m*rahc/*", "0},**p=m,d[999],*f=d+499,*b;a(c){*f++= *--b=c;}l(s)char*s;", "{while(*s)a(*s++);}main(){for(b=f+1;*p;)a(34),l(*p++),a(34", "),a(44),a(10);for(p=m;*++p;)l(*p),a(10);write(1,b,f-b);}", "#define X*/", 0},**p=m,d[999],*f=d+499,*b;a(c){*f++= *--b=c;}l(s)char*s; {while(*s)a(*s++);}main(){for(b=f+1;*p;)a(34),l(*p++),a(34 ),a(44),a(10);for(p=m;*++p;)l(*p),a(10);write(1,b,f-b);} #define X*/ --------8<----------------8<----------------8<----------------8<-------- Who's going to make the shortest one? For a start, the above program can be made as small as 10 lines instead of 18, by eliminating some newlines, saving 12 characters. Have fun in 1987.