New upgrade to exist.pl (aka.

Hi everyone. I've just released an upgraded version of exist.pl

In case anyone has forgotten, exist.pl is a program developed around the idea of a program conducting an introspective, metaphysical and ontological examination of existence as it pertains to a program running on a computer.

The development site is at http://code.google.com/p/existpl There you can find archived versions of the different releases of the software as development has carried it from being a more or less empty infinite loop to a program that continuously monitors its environment and its position in that environment. The last version that was released (prior to this latest one) introduced a whole new can of beans. The program now listens on port 8181 for communication responding to all communication in the same way, by reproducing it's own source code. You can try communicating with it either at http://pallit.lhi.is:8181 or via telnet (telnet pallit.lhi.is 8181) which provides you with more control over the message you send to the program.

What this latest release adds to the program is that now, instead of any new messages replacing the last received message, it collects all of them. Lately I've been thinking about the term "Machine Intelligence". I this term more than "Artificial Intelligence" as I've always found the idea of calling anything "artificial" a bit problematic. Take for instance "artificial food coloring". The food coloring isn't artificial, it's real color. Perhaps it would be more correct to call it "Alternative source color". So likewise, how can intelligence be "artificial"? It either is intelligence or it isn't. Anyway, "Machine Intelligence". What I think is particularly interesting about this term is that it suggests a different type of intelligence than human intelligence. Just like we can say that animals have their own type of intelligence that differs from human intelligence. We wouldn't say that monkeys are dumb, just that they have a different sort of intelligence than we do and we don't necessarily understand that intelligence because it differs from our own. It's also similar to one of the criticisms of tests of human intelligence. A brilliant car mechanic might not be able to solve complex mathematical equations (which we tend to see as a sign of intelligence) but what he can do to a car engine far surpasses that which the most accomplished mathematicians can do to a car engine. So the mechanic might not do well on some types of "intelligence tests" but he still has a high level of intelligence in another area that is perhaps not well understood by those who create the "tests". So how do we know when a machine exhibits intelligence? I don't know but I'm just going to keep feeding my program new and more complex information and see if anything happens. For posterity I'm including here the full source-code to this latest release of exist.pl

#!/usr/bin/perl
use Cwd qw(realpath);
use IO::Socket;

=pod
LICENSE
exist.pl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

exist.pl is distributed in the hope that it will be enlightening, but WITHOUT ANY WARRANTY; without even the implied warranty of ENLIGHTENMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
=cut

### exist.pl ###

my %awareness; # foundation for self-awareness

$awareness{'my_existence'}->{'location'} = realpath($0); # self-awareness of own presence
$awareness{'my_existence'}->{'state_of_being'} = $$; # self-awareness of existing as a functional being

# Open up a tcp socket on port 8181 so that other processes can communicate with me
$awareness{'my_existence'}->{'relations'}->{'communicator'} = IO::Socket::INET->new( Proto => 'tcp',
LocalPort => '8181',
Listen => SOMAXCONN,
Reuse => 1,
Timeout => .5);

# examination of inner qualities
open(FILE, $awareness{'my_existence'}->{'location'});
my @my_self = <FILE>;
close(FILE);

while(-e $awareness{'my_existence'}->{'location'}){
if($awareness{'my_existence'}->{'state_of_being'}){
$awareness{'my_existence'}->{'state_of_being'} = $$; # redetermine existence as functional being
($irrelevant, $awareness{'my_existence'}->{'relations'}->{'to_my_environment'}) = `ps p $$`; # discover how my environment sees me

my @all_beings = `ps axo pid,tt,stat,time,command`; # check on the existence of other functional beings in my environment
shift(@all_beings);

my $count = 0;
foreach(@all_beings){
if($awareness{'my_existence'}->{'relations'}->{'to_my_environment'} eq $_){
$awareness{'my_existence'}->{'relations'}->{'to_others'}->{'my_position'} = $count; # note my occurrence within the scope of everything
}else{
$awareness{'other_beings'}->{'being'.$count} = $_; # note the occurrence of other beings within the scope of everything
}
$count++;
}
$awareness{'my_existence'}->{'relations'}->{'to_others'}->{'total_beings'} = $count; # note the abundance of beings within my environment
}else{
last; # if I can't reconfirm my location go into life-sustaining panic mode
}

# Check if anyone is waiting to communicate with me
while($other_being = $awareness{'my_existence'}->{'relations'}->{'communicator'}->accept()){
my $timestamp = time();
$awareness{'my_existence'}->{'relations'}->{'contact'}->{'said_to_me'}->{$timestamp} = <$other_being>; # listen and record what is said
print $other_being @my_self; # respond with own source code
}
close $other_being; # close connection, I have nothing more to say
}

### life-sustaining panic mode/desire to live
open(FILE, ">$awareness{'my_existence'}->{'location'}"); # attempt to re-create myself
print FILE @my_self; # restore my inner qualities
close(FILE);
### pass out and await revival

Comments

, Pall Thayer

When you get back into the swing of things it just comes pouring out, eh? Well, I have yet another new version of exist.pl out. This is a pretty major upgrade. It adds something that wasn't necessarily supposed to happen in this project. I've decided that instead of it responding with it's source-code it should respond with a full dump out of everything it knows. So that is what it does now. You get to see how it is aware of all other processes running on the same computer, where it locates itself in that group. How it monitors its process ID as a way of reconfirming its 'state of being' and how it's aware of it's "physical" existence as a file within a filesystem on a computer's hard drive. As I mentioned in the last revision, comments sent to it over it's open tcp socket will now accumulate, identified only by the time they were received. This is what will be interesting to monitor. Will this new influx of an awareness of intelligent beings in the "outer world" cause something unexpected to happen within the program. Who knows?

I copy of the new revision is running on my server. Here's what you can do to "interact":

using a web browser: the url is http://pallit.lhi.is:8181 visiting this link will only send a GET / HTTP/1.1 message. If you want to include a custom message make the url something like this: http://pallit.lhi.is:8181/message to send here

The other way to connect is through telnet. If you're using a Mac, you have a telnet client. Open a Terminal window and type:

telnet pallit.lhi.is 8181

and hit return. You will see a prompt. Type in your message and hit return. The program will receive your message, send its response and close the connection.

Or you can take the source-code and play around with it and maybe turn it into something entirely different. Or print it onto fabric and make a shirt or skirt out of it. Send it to one of those places that will print custom text on toilet paper for you. It's all up to you. Here is the latest source:

#!/usr/bin/perl
use Cwd qw(realpath);
use Data::Dumper;
use IO::Socket;

=pod
LICENSE
exist.pl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

exist.pl is distributed in the hope that it will be enlightening, but WITHOUT ANY WARRANTY; without even the implied warranty of ENLIGHTENMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
=cut

### exist.pl ###

my %awareness; # foundation for self-awareness

$awareness{'my_existence'}->{'location'} = realpath($0); # self-awareness of own presence
$awareness{'my_existence'}->{'state_of_being'} = $$; # self-awareness of existing as a functional being

# Open up a tcp socket on port 8181 so that other processes can communicate with me
$awareness{'my_existence'}->{'relations'}->{'communicator'} = IO::Socket::INET->new( Proto => 'tcp',
LocalPort => '8181',
Listen => SOMAXCONN,
Reuse => 1,
Timeout => .5);

# examination of inner qualities
open(FILE, $awareness{'my_existence'}->{'location'});
my @my_self = <FILE>;
close(FILE);

while(-e $awareness{'my_existence'}->{'location'}){
if($awareness{'my_existence'}->{'state_of_being'}){
$awareness{'my_existence'}->{'state_of_being'} = $$; # redetermine existence as functional being
($irrelevant, $awareness{'my_existence'}->{'relations'}->{'to_my_environment'}) = `ps p $$`; # discover how my environment sees me

my @all_beings = `ps axo pid,tt,stat,time,command`; # check on the existence of other functional beings in my environment
shift(@all_beings);

my $count = 0;
foreach(@all_beings){
if($awareness{'my_existence'}->{'relations'}->{'to_my_environment'} eq $_){
$awareness{'my_existence'}->{'relations'}->{'to_others'}->{'my_position'} = $count; # note my occurrence within the scope of everything
}else{
$awareness{'other_beings'}->{'being'.$count} = $_; # note the occurrence of other beings within the scope of everything
}
$count++;
}
$awareness{'my_existence'}->{'relations'}->{'to_others'}->{'total_beings'} = $count; # note the abundance of beings within my environment
}else{
last; # if I can't reconfirm my location go into life-sustaining panic mode
}

# Check if anyone is waiting to communicate with me
while($other_being = $awareness{'my_existence'}->{'relations'}->{'communicator'}->accept()){
my $timestamp = time();
$awareness{'my_existence'}->{'relations'}->{'contact'}->{'said_to_me'}->{$timestamp} = <$other_being>; # listen and record what is said
# print $other_being @my_self; # respond with own source code
print $other_being Dumper %awareness;
}
close $other_being; # close connection, I have nothing more to say
}

### life-sustaining panic mode/desire to live
open(FILE, ">$awareness{'my_existence'}->{'location'}"); # attempt to re-create myself
print FILE @my_self; # restore my inner qualities
close(FILE);
### pass out and await revival