Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

If God wrote a Perl script

by jeffa (Bishop)
on Jan 03, 2001 at 02:34 UTC ( #49407=perlmeditation: print w/ replies, xml ) Need Help??

#!/usr/bin/perl 1
Remember, God doesn't need to warned about anything. Of course, God doesn't really need the interpreter either. . .

Jeff

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)

Comment on If God wrote a Perl script
Download Code
Replies are listed 'Best First'.
Re: If God wrote a Perl script
by coreolyn (Parson) on Jan 03, 2001 at 02:46 UTC
    #!/usr/local/perl use Create; $universe = Create->new();
    You can't tell me God wouldn't have his own modules :) coreolyn
      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; }

      Cheers,
      Ovid

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

        Hrmm...one 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; }
      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
      ...you might be eaten by a grue...

        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!!!

      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__
      That of course leads one to ponder the old HHGTTG paradox...
      if (defined $babelfish) { exit(0); }
      {grin}
      PS: Douglas Adams for those few who missed the acronym.
Re (tilly) 1: If God wrote a Perl script
by tilly (Archbishop) on Jan 03, 2001 at 04:19 UTC
    I am less interested in what the scripts look like and more interested in what patches are locally installed!

    Of course that depends on which God we are talking about here...

Re: If God wrote a Perl script
by t0mas (Priest) on Jan 03, 2001 at 12:25 UTC
    Here is another program by "God", (in C) thats been around for a while. Would God use C to write a program? Nah, it is probably fake, but fun anyway...

    /brother t0mas
Re: If God wrote a Perl script
by repson (Chaplain) on Jan 03, 2001 at 06:15 UTC
    Humph...I already did a creation perl script at universe.pl. Stealer :P
Re: If God wrote a Perl script
by stephen (Priest) on Apr 22, 2001 at 00:10 UTC
    Scarily enough, someone actually wrote a song about this...

    stephen

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://49407]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2015-08-01 02:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls