[NetBehaviour] exist.pl and communication, what next?

Pall Thayer pallthay at gmail.com
Fri Aug 1 19:57:40 CEST 2008


Hi Clement,
Just want to respond to show that I am paying attention. I've been
pretty busy with a number of things so I haven't had time to respond
to yours and Robs very interesting points. And now I'm going out of
town over the weekend. I will try to respond after the weekend. For
now here's the updated source code with the communications socket that
outputs the programs code when something is sent. The port it listens
on is 8181. You can telnet into it or even point a browser to it. In
the case of a http request it will respond immediately but with telnet
it will wait until you actually type something in after making the
connection. I haven't checked this version into the Google code site
yet. I'll do that after the weekend.

best r.
Pall

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

# 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/>.

### 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 => .1);

# 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()){
	$awareness{'my_existence'}->{'relations'}->{'contact'}->{'said_to_me'}
= <$other_being>;
	}
	close $other_being;
}

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



On Wed, Jul 30, 2008 at 3:47 PM, clemos <cl3mos at gmail.com> wrote:
> Hi Pall
>
> I'm glad I helped. I really love your project, because such things
> have been very often in my thoughts and a few times in my text editor.
> I've been thinking about similar experiments very much, but (as often
> with me) these reflexions have quickly turned into too complex things,
> so that most of the time, I have not even reached the code writing
> step.
> Your project took directly an experimental approach, which consists in
> writing code quickly to see what happens, and then going little step
> by little step further, and I think it's indeed very important to keep
> going that way, and avoid to go into over-complicated steps.
> That's why I've been trying to repress my thoughts here when they look
> too "parasiting" for the sake of simplicity.
> Now that you're warned, I guess I can say a couple more:
> I think the "duplication" possibility could be at the same time very
> simple, and very powerful for the future. You could start by writing a
> simple "spreading" algorithm that would copy the source here and there
> on your system, and maybe run it. If your script copies itself once
> somewhere else, and runs this copy, then the copy would copy itself
> once again, until a certain point.
> This "process" will probably meet opposition by the system : it will
> probably reach limits of memory, but even more probably will not be
> able to spread to some locations, like system protected ones (on Mac
> and Linux, hehehe). Its spreading may also be constrained by the OS in
> other ways, or by other programs like antiviruses...
> I think the "duplication" process is interresting in the fact that it
> reveals those limits, which are the limits between the "being" (which
> here is the spreading mass of programs like cells) and the world.
>
> For very different reasons, I've also been interrested in
> phenomenology, though not very deeply. I don't want to go too far in
> that (I don't want to prove my ignorance, and it's a bit difficult for
> me to explain in english), but "being" seem to be not only about "here
> and now", but also about the continuity of being "here and now", and
> thus about projecting oneself in the future, like in the word
> "pre-sence".
> Also, "being" has something to do with pointing limits between the
> body and the outside.
>
> Anyway, in this approach, I think the "awareness" should imply for the
> program to be aware of the activity of its "brothers" in some way.
> Each program should then "communicate" with the others in a (real)
> "peer to peer" way: maybe via server/client relationships (each
> programs listens to its own port, and attempts to communicate with
> other ports if opened), or via other ways (list all processes and send
> signals to them, I don't know)
>
> All this looks "simple" enough to me, at list in terms of
> implentation, but yet may allow you to experiment funny things. It
> could also totally mess up your computer, but that's why "beings" are
> there, no ?
>
> By the way, it's not directly related but do you know the novel
> Permutation City by Greg Egan.
> http://en.wikipedia.org/wiki/Permutation_City
> If not insightful for your research, I think you'll at least spend
> good times reading it.
> (What makes me think about your project is mainly the "Dust theory"
> developped in it :
> http://gregegan.customer.netspace.net.au/PERMUTATION/FAQ/FAQ.html )
>
> About "Polymorphic Code" (which I didn't know), something very
> interesting in that topic is Genetic programming :
> http://en.wikipedia.org/wiki/Genetic_programming .
> In fact you never heard of this, it consists (AFAIK) in creating a
> "population" of programs with random code. You "test" the "efficiency"
> of each program (this is probably the hard part), and generate the
> next "generation" of programs by combining them in function of this
> "efficiency", giving more probability for good programs to "duplicate"
> themselves. After a while generations, you may get a program that
> solves your problem. It's in fact the programming equivalent of the
> Darwin theory.
> It's quite difficult to actually do (I've been trying to generate
> random code ... and "efficiency" testing is not always very clear),
> but might at least inspire you.
>
> +++++++
> Clément
>
> On Wed, Jul 30, 2008 at 4:01 PM, Pall Thayer <pallthay at gmail.com> wrote:
>
>> Ah you know, these things are always crystal clear when you're not
>> sitting in front of a computer. For instance when I'm waiting for the
>> bus in the morning, I've got it all figured out. But give me a few
>> minutes and let me try to recall... Ok (now I remember), effectively the
>> program shouldn't be able to do anything about dying. It could attempt
>> to avoid being killed by capturing signals as Rob had suggested, but if
>> something has already killed it or voided its existence (deleted the
>> file), in human terms it shouldn't be able to do anything about it.
>> However, it's not human and it CAN in fact recreate itself in the face
>> of a threat to its being. It recreates itself because it can. The reason
>> it dies after recreating itself is that the running process is no longer
>> a product of the existing file. So the "state of being" has been
>> compromised. There's no longer the same relation between the "existence"
>> (the file) and the "state of being" (the process). It gets a bit
>> complicated here because of the fact that a computer program such as
>> this one can run independently of the file from which it was started. In
>> our case, although some like to believe otherwise, you can't maintain a
>> "state of being" if someone removes your physical body.
>
>
>
>> The viral issue is a touchy one. Not a decision to be taken lightly.
>>
>> Thanks a lot for the comments. They really help.
>>
>> best,
>> Pall
>>
>>
>>> ++++++++
>>> Clément
>>>
>>> On Mon, Jul 28, 2008 at 11:36 PM, Pall Thayer <pallthay at gmail.com> wrote:
>>>
>>>> (ps. I'm now posting these to both Rhizome and Netbehaviour. My
>>>> apologies to anyone who receives them twice.)
>>>>
>>>> The latest revision to exist.pl has opened a whole new can of beans.
>>>> Since it is now capable of receiving communication from other
>>>> processes it will inevitably have to respond and that's the tricky
>>>> part. How does a process that is just beginning to experiment with an
>>>> awareness of anything at all, respond to anything at all? It makes no
>>>> attempt to understand the message being conveyed or even who it's
>>>> coming from. It would be great to get some feedback on this. Of
>>>> course, my first inclination is to just have it respond to anything
>>>> with a full dump of its entire "awareness". Well, no. My first
>>>> inclination was to have it respond to anything by outputting the full
>>>> path to the file (its "existence") and its process ID (its "state of
>>>> being") but when you think about it, there's really nothing to
>>>> indicate to exist.pl that those two bits of information would mean
>>>> anything to anyone else.
>>>>
>>>> Pall
>>>>
>>>> --
>>>> *****************************
>>>> Pall Thayer
>>>> artist
>>>> http://www.this.is/pallit
>>>> *****************************
>>>> _______________________________________________
>>>> NetBehaviour mailing list
>>>> NetBehaviour at netbehaviour.org
>>>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour
>>>>
>>>>
>>>
>>> _______________________________________________
>>> NetBehaviour mailing list
>>> NetBehaviour at netbehaviour.org
>>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour
>>>
>>
>> _______________________________________________
>> NetBehaviour mailing list
>> NetBehaviour at netbehaviour.org
>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour
>>
>
> _______________________________________________
> NetBehaviour mailing list
> NetBehaviour at netbehaviour.org
> http://www.netbehaviour.org/mailman/listinfo/netbehaviour
>



-- 
*****************************
Pall Thayer
artist
http://www.this.is/pallit
*****************************




More information about the NetBehaviour mailing list