Lachlan Brown on Thu, 31 Oct 2002 06:25:02 +0100 (CET)


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

[Nettime-bold] (no subject)




Seems an important innovation,

Lachlan



#   Perl Routines for the redistribution of the worlds wealth 
#   Takes the cash from the rich and turn it into clean drinking water wells. 
#   w.blake@scotoma.org
#   v 0.0.1 

#   Copyright (c) 1792-2002 William Blake  
#   Unpublished work reconstituted W.Blake@Scotoma.org.
#   Permission granted to use and modify and append this library so long as the
#   copyright above is maintained, modifications are documented, and
#   credit is given for any use of the library.
#   This code is distributed under the same conditions as perl itself
#   This code is distributed with no warrenty whatsoever.
#   Thanks are due to many people for reporting bugs and suggestions

#   For more information, see http://www.scotoma.org



#Constants

my $SKINT = 0;
my $TO_MUCH = $SKINT + 1;

#This is a anonymous hash record to be filled with the Name and Cash of the rich
%{The_Rich} = {
    0 =>{
        Name        => '???',
        Cash        => '???',
    },
} 
#This is a anonymous hash record to be filled with the Price Of Clean Water
#for any number of people without clean water
%{The_Poor} = {
    0 =>{
        PlaceName           => '???', #the place name were to build a well
        PriceOfCleanWater   => '???',
        Cash                => '???',
    },
} 

# for each of the rich, process them one at a time passing 
#them by reference to RedistributeCash.
foreach my $RichBastardIndex (keys %{The_Rich}){
    &ReDisdributeCash(\%{The_Rich->{$RichBastardIndex}});
}


#This is the core subroutine designed to give away
# cash as fast as possible.
sub ReDisdributeCash {
    my $RichBasterd_REFERENCE = @_;
    
    #go through each on the poor list giving away Cash until each group
    # can afford clean drinking water
    while($RichBasterd_REFERENCE ->{CASH} >=  $TO_MUCH ){
        
        foreach my $Index (keys @{Poor}){
            $RichBasterd_REFERENCE->{CASH}--;
            $Poor->{$Index}->{Cash}++;
            if( $Poor->{$Index}->{Cash} =>
$Poor->{$Index}->{PriceOfCleanWater}){
                &BuildWell($Poor->{$Index}->{PlaceName} );
            }
            
        }
    
    }   



Lachlan Brown
T(416) 826 6937
VM (416) 822 1123

                                       

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

_______________________________________________
Nettime-bold mailing list
Nettime-bold@nettime.org
http://amsterdam.nettime.org/cgi-bin/mailman/listinfo/nettime-bold