Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!psuvax1!psuvax1!schwartz From: schwartz@shire.cs.psu.edu (Scott Schwartz) Newsgroups: comp.lang.c Subject: Re: Right-to-left (was: Re: entry at other than main) Message-ID: Date: 27 Aug 89 04:17:19 GMT References: <19173@mimsy.UUCP> <207600032@s.cs.uiuc.edu> <19218@mimsy.UUCP> <10731@riks.csl.sony.co.jp> <230@ssp1.idca.tds.philips.nl> <1989Aug26.221107.25606@utzoo.uucp> Sender: news@psuvax1.cs.psu.edu Organization: Pennsylvania State University, computer science Lines: 26 In-reply-to: henry@utzoo.uucp's message of 26 Aug 89 22:11:07 GMT Henry Spencer writes: | Dolf Grunbauer writes: | >For those unknown to APL: do you know that APL is so compact that an | >algorithm to get the first N primes can be written in just *ONE* expression | >(of about 25 characters), including the reading of N from the terminal ? | | Yes, and a month afterward, even its author can't understand it without | half an hour of study. Just for fun, here it is: P <- (2=+ /- 0=(iN)o.|iN)/iN Where "<-" and "/-" are overstruck, "i" is iota, and "o" is the little open circle. It takes about 10 minutes to read the page long explaination in the handout I copied the expression from. Believe it or not, I once had a physics professor who went through "The C Programming Language" and translated some of the examples into APL, and scribbled them in the margins. Now _that_ was scary. -- Scott Schwartz