Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: If God wrote a Perl script

by coreolyn (Parson)
on Jan 03, 2001 at 02:46 UTC ( #49410=note: print w/replies, xml ) Need Help??

in reply to If God wrote a Perl script

#!/usr/local/perl use Create; $universe = Create->new();
You can't tell me God wouldn't have his own modules :) coreolyn

Replies are listed 'Best First'.
(Ovid - Genesis) Re(2): If God wrote a Perl script
by Ovid (Cardinal) on Jan 03, 2001 at 03:19 UTC
    Nothing fancy... just some spare time on my hands
    #!/usr/local/perl use Create; DAY_1: { $universe = Create->new(); $universe->addLight; } DAY_2: { while ( 1 ) { @firmament = split $universe->existence, 2; last DAY_2 if $#firmament; } } DAY_3: { $water = []; $land = []; # Hmm... God should know better than to use an experimental # feature such as a pseudo-hash. Explains quite # a bit, really $firmament[0] = [ { water => 1, land => 2, } $water, $land ]; } DAY_4: { $universe->hookUpLights; } DAY_5: { push @{ $firmament[0]->{ water } }, $_ for( "fish", "cetaceans", "calamari (live and minus the breadi +ng)" ); push @{ $firmament[0]->{ land } }, $_ for ( "cattle", "serpents", "birds" ); } DAY_6: { $firmament[0]->[ $firmament[0]->[ 0 ]->{ ExtraStuff } = @{ $firmam +ent[0] } ] = "Humans"; # Ya see, he had to put humans somewhere to allow them to rule ove +r animals, # so he stuck them in the $firmament[0] pseudo-hash # Poor planning if I ever saw it... } DAY_7_AND_BEYOND: { sleep while 1; }


    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. addition:

      DAY_7 : { sleep while 1; } DAY_8_AND_BEYOND: { if (time==(60*60*24*365*1966*-1)) { ## (This version of time is quite accurate) if (fork) { &Jesus; exit; } &END_OF_DAYS if $REVELATIONS and $SIGNS>=7; redo DAY_8_AND_BEYOND; }
Re: Re: If God wrote a Perl script
by Blue (Hermit) on Jan 03, 2001 at 03:01 UTC
    We couldn't run any of god's scripts because they would all have:

    require omnipotence; require omniscience;
    Heck, root access on the universe is rough to get. And installing modules locally on the universal incarnation of Perl has beel lost with the ole'-time wizards like Circe and Merlin.

    =Blue might be eaten by a grue...

      # Need this line too to prevent unpredictable crashes. no paradox;
      I wonder if the universe is really written in Perl... If you could get root on God's box, you could -- dare I say -- <gasp!> RULE THE WORLD! BWAHAHAHAHAHAA!!!
Re: Re: If God wrote a Perl script
by danger (Priest) on Jan 03, 2001 at 04:04 UTC

    I think God used to be more hands on, but he long since automated much of the grunt work:

    #!/usr/bin/perl -w use strict; # face it, God is strict and gives warnings use Create; while(1){ my $universe = Create->new(); $universe->first_seven_days(); while(1){ last unless universe->still_has_life(); $universe->random_cataclysm() if int(rand(10000)) == 666; $universe->random_miracle() if int(rand(1000)) == 7; } print "Do you want to play again?[y/n] "; chomp(my $answer = <STDIN>); last if $answer =~ /^n/i; } __END__
Proof of nill?
by lzcd (Pilgrim) on Jan 03, 2001 at 08:51 UTC
    That of course leads one to ponder the old HHGTTG paradox...
    if (defined $babelfish) { exit(0); }
    PS: Douglas Adams for those few who missed the acronym.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://49410]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2021-04-16 03:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found