Microcode

Repost due to Rhizome's loss of some data…

I've been toying around with some new code based art that I've been
posting to the Rhizome list and want to share them here as well. The
idea is to create complete works of art that consist of a very small
body of code and a title. The concept/meaning of the work is revealed,
not strictly through the running of the code, but should rather rely
on a combination of the title, code and running process. I haven't
come up with any limits as to how many lines or anything and it
doesn't necessarily have to be perl code. Here are some samples:

The first is a diptych inspired by a post by Eric Dymond
(serial_killer and random_killer):

serial_killer
#!/usr/bin/perl
foreach(0..30000){
eval{
`kill $_`;
}
}

random_killer
#!/usr/bin/perl
$process_id = int(rand(30000));
eval{
`kill $process_id`;
}

Walking backwards so that I can see the destruction in my wake (don't
attempt to run this, it's dangerously volatile)
#!/usr/bin/perl
$path = '';
while(1){
`rm -rf $path`;
$path .= '../';
}

Unfolding/unglued
#!/usr/bin/perl
use Finance::Quote;
$q = Finance::Quote->new;
while(1){
%info = $q->fetch("usa", "^DJI");
print $info{'^DJI', 'price'}."\n";
sleep(5);
}

Generative
#!/usr/bin/perl
$width = `tput cols`;
foreach(5..$width){
$he = sprintf("%".$_."s", "–=o");
$she = sprintf("%".int($width-$_)."s", "@");
print $he.$she."\n";
select(undef, undef, undef, 0.1);
print "\033[2J";
}