[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[comp.lang.perl.misc,alt.sources] antichrist.pl



------- Start of forwarded message -------
From: Tom Fawcett <[email protected]>
Newsgroups: comp.lang.perl.misc,alt.sources
Subject: antichrist.pl
Date: 12 Dec 1996 09:10:53 -0500
Organization: The practical transmission of speech
Message-ID: <[email protected]>
Summary: fun with small search spaces


Recently I saw a posting demonstrating that Bill Gates is the antichrist:

> Before you decide, consider the following:
> 
> M  S  -  D  O  S     6  .  2  1
> 77+83+45+68+79+83+32+54+46+50+49 = 666
> 
> W  I  N  D  O  W  S  9  5
> 87+73+78+68+79+87+83+57+53+1 = 666
> 
> Coincidence?  I think not.


I thought, surely we can search for the antichrist using Perl.
So, just in time for the holidays, I hereby release this script
into the public domain.


------------------------------  antichrist.pl  ------------------------------
#  antichrist.pl -- search for evidence of the antichrist
$NUMBER_OF_THE_BEAST = 666;
@nums = map(ord, split(//, $ARGV[0]));
@ops = qw(+ -);   # or whatever you want
if ($deriv=inferno(undef, @nums)) {
    foreach (@nums) { print chr($_), "\t$_\n" };
    print "$deriv\nCoincidence?  I think not!\n"
}

sub inferno {
    my($n, @nums) = @_;
    if ($#nums == -1) {
	int($n) == $NUMBER_OF_THE_BEAST ? " = $NUMBER_OF_THE_BEAST" : 0;
    } else {
	for $op (@ops) { 
	    my($deriv);
	    if ($deriv=inferno(eval("$n$op$nums[0]"), @nums[1..$#nums])) {
		return("$op$nums[0]$deriv");
	    }
	}
    }
}
------------------------------ cut here -----------------------------------

No man page, sorry, but here are some examples:

~> perl antichrist.pl "Thomas Fawcett"
T	84
h	104
o	111
m	109
a	97
s	115
 	32
F	70
a	97
w	119
c	99
e	101
t	116
t	116
+84-104+111+109+97+115-32+70-97-119+99+101+116+116 = 666
Coincidence?  I think not!

~> perl antichrist.pl "Ivan Seidenberg"   # NYNEX CEO
I	73
v	118
a	97
n	110
 	32
S	83
e	101
i	105
d	100
e	101
n	110
b	98
e	101
r	114
g	103
+73+118+97+110+32-83+101-105+100-101+110+98-101+114+103 = 666
Coincidence?  I think not!

~> perl antichrist.pl "PeeWee Herman"
P	80
e	101
e	101
W	87
e	101
e	101
 	32
H	72
e	101
r	114
m	109
a	97
n	110
+80+101+101+87+101+101+32-72-101+114+109-97+110 = 666
Coincidence?  I think not!
-----

Endless fun for 5 minutes or so.

The more devout among you can extend the search to use exponentiation,
transcendental functions, EBCDIC, etc.

-Tom
------- End of forwarded message -------

wopr:~$ ./antichrist.pl 'Gregory Sutter'
G       71
r       114
e       101
g       103
o       111
r       114
y       121
        32
S       83
u       117
t       116
t       116
e       101
r       114
+71+114+101+103-111+114+121-32+83-117+116+116+101-114 = 666
Coincidence?  I think not!

-- 
This message comes to you as a service of the mph-humor list.  No
claims of real or perceived humor are offered.
Sumbissions:  [email protected]
Information:  http://wopr.ml.org/~hunt/mph-humor.html