On 12 Nov 2009 at 14:15, Hilarie Orman wrote:
I entered the obfuscated C contest one year with a program that computed a prime sieve in an incredibly slow and non-intuitive manner.
Way back when, I hacked up a macro set for MIDAS on our PDP-1 that generated primes at assemble-time: just spent forever assembling occcasionally printing out a # on the console. didn't do it with a sieve, though: brute force.. tried dividing by all of the primes up to 1/2 the number [I seem to recall that I tried making that sqrt(number) but that actually made the macros *slower*]. [as a side note, in the course of hacking with this I discovered a long- latent very obscure bug in Bill Mann's macro-garbage-collection code in the assembler]. /Bernie\ -- Bernie Cosell Fantasy Farm Fibers mailto:bernie@fantasyfarm.com Pearisburg, VA --> Too many people, too few sheep <--