Rob and Seryna
22. September 2014
22. September 2014
#!/usr/bin/perl if(rob){seryna}elsif(seryna){rob};
War
13. June 2014
13. June 2014
#!/usr/bin/perl for($war = 0; $war < inf; $war++) { kill; }
Hey Joe
The first of my Microcodes that results in an error. Wonder why.
28. May 2014
The first of my Microcodes that results in an error. Wonder why.
28. May 2014
#/usr/bin/perl hey joe; where you going; with that gun; in your hand;
New Art (NOOArt)
Object oriented non-object oriented art
19. January 2014
Object oriented non-object oriented art
19. January 2014
#!/usr/bin/perl $artwork = new Art(); package Art; sub new {$this={};return bless $this;}
Erased de Kooning
08. March 2013
08. March 2013
#!/usr/bin/perl sub rauschenberg { $_[0] =~ s/\w//; return $_[0]; } $de_Kooning = "de Kooning Drawing\n"; print $de_Kooning = &rauschenberg($de_Kooning) while $de_Kooning =~ /\w/;
Nude Descending a Staircase
01. March 2013
01. March 2013
#!/usr/bin/perl $nude = "nude\n"; foreach(1..39){ print " " x $_.$nude; sleep(1); }
A more personal Hello World - 11:00 EST, Mar 11, 2012
11. March 2012
11. March 2012
#!/usr/bin/perl use v5.10; $population = 6999816938; foreach(1...$population){ say "Hello"; }
And then...
04. January 2012
04. January 2012
#!/usr/bin/perl while(next){anything and everything you want}
The beginning of the end
02. November 2011
02. November 2011
#!/usr/bin/perl end while start;
Protest
Another one for Occupy Wall Street
06. October 2011
Another one for Occupy Wall Street
06. October 2011
#!/usr/bin/perl sub protest{ reset $wall_street; return our $future; } until($equality){ protest; }
For Occupy Wall Street
05. October 2011
05. October 2011
#!/usr/bin/perl push(@rights, my $rights);
Folding time
26. September 2011
26. September 2011
#!/usr/bin/perl open(TIME, '>time'); print TIME localtime; print `fold -w 5 time`;
Lack of substance (abstract)
23. July 2011
23. July 2011
#!/usr/bin/perl sub stance{}
I am redundant
09. May 2011
09. May 2011
#!/usr/bin/perl sub redundant { 'I' =~ /I/ ? return 1 : return 1; } &redundant ? &redundant : &redundant;
eol: End of Life
17. March 2011
17. March 2011
#!/usr/bin/perl sub to_earth{return;} sub your_life{return to_earth;} sub eol{return your_life;} eol;
What I want/need
24. January 2011
24. January 2011
#!/usr/bin/perl $me = 1; sub need { $want = shift; $need = $want+$me; return $need; } print need($me)."\n";
How to forget
27. October 2010
27. October 2010
#!/usr/bin/perl $remember = "fixed in memory"; foreach $k(keys %main::){ $var = $k; eval{$$var = undef;}; } print $remember;
The path to enlightenment
16. October 2010
16. October 2010
#!/usr/bin/perl $height = `tput lines`; @lines = ('\\', '|', '/'); $last_line = 30; while(!$enlightened){ system 'clear'; foreach(1..$height){ $the_spot = abs($_ - ($height)); $the_line = int(rand(scalar @lines)); system 'tput', 'cup', $the_spot, $last_line; print $lines[$the_line]; $last_line += $the_line-1; select(undef, undef, undef, 0.25); } }
The rumour
Alternative title: Cognitive dissonance
11. October 2010
Alternative title: Cognitive dissonance
11. October 2010
#!/usr/bin/perl if(true){ true unless false; }else{ false unless true; }
The end of the world
14. April 2010
14. April 2010
#!/usr/bin/perl $the_end = true; while($the_end){end;}
The world could end today
13. April 2010
13. April 2010
#!/usr/bin/perl $secs_per_day = ((24*60)*60); ($curr_secs, $curr_mins, $curr_hours) = (localtime)[0..2]; $curr_total_secs = (($curr_hours*60)*60)+($curr_mins*60)+$curr_secs; $likelyhood = sprintf("%.2f", (($secs_per_day-$curr_total_secs)/$secs_per_day)*100); print "The chances that the world could end today are $likelyhood%\n";
For Each (and every) Color
07. April 2010
07. April 2010
#!/usr/bin/perl while(1){ foreach $color (1..256){ $output = "\x1b[48;5;$color"."m"; foreach(0..`tput lines`){ $output .= " " x `tput cols`; $output .= "\n"; } $output .= "\x1b[0m\n"; print $output; select(undef, undef, undef, 0.05); } }
Moodstream
Accepts a command line argument [-m] describing one's mood: i.e. 'perl moodstream.pl -m happy'.
Made for 256 color terminal emulators.
05. April 2010
Accepts a command line argument [-m] describing one's mood: i.e. 'perl moodstream.pl -m happy'.
Made for 256 color terminal emulators.
05. April 2010
#!/usr/bin/perl $width = `tput cols`; $mood = @ARGV[1] if @ARGV[0] eq '-m'; @mood = split('', $mood ? $mood : 'indifferent'); while(1){ foreach(@mood){ $color = ord($_).'m'; print "\x1b[48;5;$color"; print " " x int($width/scalar @mood); print "\x1b[0m"; } print "\n"; select(undef, undef, undef, 0.1); }
The semi-automatic doodle machine
A bit longer than most but I like it so much I had to include it.
26. January 2010
A bit longer than most but I like it so much I had to include it.
26. January 2010
#!/usr/bin/perl print "Use a pencil and a 210mm x 210mm sheet of paper. Start with your hand at the upper-left corner.\n"; @position = ('up', 'down'); @direction = (['up', '-'], ['to the left', '-'], ['down', '+'], ['to the right', '+']); @amount = (0, 0); while(1){ $d = int(rand(scalar @direction)); $new_amount = int(rand(100)); unless(eval("$amount[$d%2] $direction[$d][1] $new_amount") < 0 || eval("$amount[$d%2] $direction[$d][1] $new_amount") > 210){ print "With pencil ".$position[int(rand(scalar @position))].", move ".$new_amount."mm ".$direction[$d][0].".[Enter]\n"; $amount[$d%2] = eval("$amount[$d%2] $direction[$d][1] $new_amount"); $input = <>; } }
Augmented reality
20. January 2010
20. January 2010
#!/usr/bin/perl $reality = "real text\n"; $augmented_reality = "\e[31;40m augmented ".$reality."\e[0m"; print $reality; print $augmented_reality;
Carcinogen
17. January 2010
17. January 2010
#!/usr/bin/perl while(1){ $new_cell = $0; $ts = time; $new_cell =~ s/^(.*?)\.?([^\.]*)$/$1$ts\.$2/; `cp $0 $new_cell`; print `clear && df`; sleep(1); }
The strain and pressure of modern living
Running this for extended periods of time will cause your computer to become unresponsive.
11. January 2010
Running this for extended periods of time will cause your computer to become unresponsive.
11. January 2010
#!/usr/bin/perl while(1){ my $strain = {name => 'strain'}; my $pressure = {name => 'pressure'}; $strain->{strain} = $pressure; $pressure->{pressure} = $strain; select(undef, undef, undef, 0.0002); print `clear && free -m`; }
Substance trilogy - Gas
10. December 2009
10. December 2009
#!/usr/bin/perl sub match { print "match\n"; } if(<> =~ /^.+$/){ match; }
Substance trilogy - Fluid
10. December 2009
10. December 2009
#!/usr/bin/perl sub match { print "match\n"; } $in = <>; if($in =~ /$in/){ match; }
Substance trilogy - Solid
10. December 2009
10. December 2009
#!/usr/bin/perl sub match { print "match\n"; } if(<> =~ /^solid$/){ match; }
WAR has NO value
18. November 2009
18. November 2009
#!/usr/bin/perl use constant WAR; print WAR;
If times ten
17. November 2009
17. November 2009
#!/usr/bin/perl $one = 1; if($one){ $two = 1; if($two){ $three = 1; if($three){ $four = 1; if($four){ $five = 1; if($five){ $six = 1; if($six){ $seven = 1; if($seven){ $eight = 1; if($eight){ $nine = 1; if($nine){ $ten = 1; if($ten){ } } } } } } } } } }
> Intended
19. October 2009
19. October 2009
#!/usr/bin/perl system 'clear'; ($width,$height) = (`tput cols`,`tput lines`); while($height > 0){ foreach(1..$width/2){ system 'tput', 'cup', $height-$_, int($width*0.5) - int($_*0.5); print ">" x $_; } $height-=1; }
Subverting time-based media: Frozen in time
Warning: This will cause your computer to freeze, requiring a hard restart.
11. October 2009
Warning: This will cause your computer to freeze, requiring a hard restart.
11. October 2009
#!/usr/bin/perl fork && print "Time has fallen asleep in the afternoon sunshine.\n" while 1;
My @rt
A software artist's plea.
22. September 2009
A software artist's plea.
22. September 2009
#!/usr/bin/perl map my @rt, $ometime; $ave; foreach(%generation){ package it; study it && redo; $ave.it; } @rt = (80, 65, 76, 76, 32, 84, 72, 65, 89, 69, 82, 10); foreach(@rt){print chr($_);}
Two or love
A rhyme
21. September 2009
A rhyme
21. September 2009
#!/usr/bin/perl if(2 == 2 || 'love' =~ /u/){ $two = 1 unless $none; while($beef || $pork){ sleep(11) && fork(); } }else{ sleep(22) && print "fun"; }
Flag
Terminal must use utf8 encoding to get the full effect.
20. September 2009
Terminal must use utf8 encoding to get the full effect.
20. September 2009
#!/usr/bin/perl binmode STDOUT, ':utf8'; @colors = ("\e[0;31m", "\e[0;34m"); @symbols = (chr(0x268c), chr(0x272a)); while(1){ ($x, $y) = (int(rand(`tput cols`)), int(rand(`tput lines`))); system 'tput', 'cup', $y, $x; $select = int(rand(2)); print $colors[$select].$symbols[$select]; }
Half full
25. August 2009
25. August 2009
#!/usr/bin/perl POTENTIAL: if(0.5){ goto POTENTIAL; }
Half empty
25. August 2009
25. August 2009
#!/usr/bin/perl POTENTIAL: unless(0.5){ goto POTENTIAL; }
...stripped bare...
17. August 2009
17. August 2009
#!/usr/bin/perl system('sudo', 'bash');
How to explain Perl to a dead hare
This will only run on Mac OS X.
01. August 2009
This will only run on Mac OS X.
01. August 2009
#!/usr/bin/perl $info = `perldoc -q .`; @words = split(" ", $info); foreach $word(@words){ `say $word`; }
Insecure II (uNcode)
Reads ncode.txt generated by Insecure I (Ncode)
25. July 2009
Reads ncode.txt generated by Insecure I (Ncode)
25. July 2009
#!/usr/bin/perl $text=`cat ncode.txt`;@text=split('N',$text); foreach(@text){ $ascii=length($_) unless $_=~/[^n]/g; $uNcode.=chr($ascii); } print "$uNcode\n";
Insecure I (Ncode)
Generates a textfile titled 'ncode.txt' to be used with Insecure II (uNcode)
25. July 2009
Generates a textfile titled 'ncode.txt' to be used with Insecure II (uNcode)
25. July 2009
#!/usr/bin/perl print "Enter text to Ncode:\n"; $text=<>;@text=split('', $text); foreach(@text){ $ascii=ord($_); $coded.="N"."n" x $ascii."N"; } `echo $coded >ncode.txt`;print $coded;
Seedbed
Inspired in part by James Morris' ( http://www.jwm-art.net ) microcrudities.
01. July 2009
Inspired in part by James Morris' ( http://www.jwm-art.net ) microcrudities.
01. July 2009
#!/usr/bin/perl use Cwd qw(realpath); $myself = realpath($0); while(1){ `touch $myself`; print `ls -l $myself`; }
Repeating history
This code was inspired by The Wheel of the Devil (MTAA and Ed Halter) and historic_loop (James Morris).
It is not recommended that you run this script as it could adversely affect your computer and files.
27. May 2009
This code was inspired by The Wheel of the Devil (MTAA and Ed Halter) and historic_loop (James Morris).
It is not recommended that you run this script as it could adversely affect your computer and files.
27. May 2009
#!/usr/bin/perl sub relive {$command = shift;print `$command`;} $bash_history = $ENV{ HOME }."/.bash_history"; while(1){ open(HISTORY, $bash_history); while($moment = <HISTORY>){ relive($moment); } }
Frustration
21. May 2009
21. May 2009
#!/usr/bin/perl $width = `tput cols`; @word = split('',"frustration"); while(!$calm){ $vent; foreach(1..$width){ $vent .= $word[int(rand(scalar @word))]; } print $vent."\n"; select(undef, undef, undef, 0.1); $calm = 1 if $vent =~ /frustration/; }
Untitled composition
04. May 2009
04. May 2009
#!/usr/bin/perl use LWP::Simple; getstore('http://www.gutenberg.org/dirs/etext04/cnspr10.txt', 'file.txt'); open FILE, 'file.txt'; while(<FILE>){ print "\e]0;$_\007"; sleep(1); }
On_Kawara tweets
Needs the Net::Twitter module (available on cpan)
29. April 2009
Needs the Net::Twitter module (available on cpan)
29. April 2009
#!/usr/bin/perl use Net::Twitter; ($user, $pass) = ("On_Kawara", "stillalive"); $client = Net::Twitter->new(username=>$user, password=>$pass); $result = $client->update("..."); $client = Net::Twitter->new(username=>$user, password=>$pass); $result = $client->update("I AM STILL ALIVE #art");
Sonic Silence
May not work in all terminals. Works in OS X's Terminal and ETerm on Linux.
21. April 2009
May not work in all terminals. Works in OS X's Terminal and ETerm on Linux.
21. April 2009
#!/usr/bin/perl ($x, $fw) = (0, 1); while(1){ foreach $x (0..300){ $x = abs($x-300) unless $fw; print "\n"; $y = int(sin($x/25)*25+200); print "\e[3;".$x.";"."$y"."t"; select(undef, undef, undef, 0.05); } $fw ? ($fw = 0) : ($fw = 1); }
In praise of circular reasons
13. April 2009
13. April 2009
#!/usr/bin/perl $pi = 3.14195; while(1){ system 'clear'; ($offsetx, $offsety) = (int(rand(`tput cols`/2)), int(rand(`tput lines`/2))); ($radius, $angle) = (int(rand(`tput cols`/8)), 0); while($angle < 2 * $pi){ $x = int($radius * cos($angle))+$offsetx; $y = int($radius * sin($angle))+$offsety; unless($x < 0 || $y < 0){ system 'tput', 'cup', $y, $x; print "O"; } $angle += 0.1; select(undef, undef, undef, 0.05); } }
L'objet d'art
04. April 2009
04. April 2009
#!/usr/bin/perl use Cwd qw(realpath); $file = realpath($0); `lp $file`;
Active monochrome
26. March 2009
26. March 2009
#!/usr/bin/perl print "\e[?25l"; system 'clear'; while(1){ $SIG{'INT'}=sub{print "\e[?25h";exit;}; }
White on white
Results may vary depending on terminals
26. March 2009
Results may vary depending on terminals
26. March 2009
#!/usr/bin/perl system 'tput', 'setb', '7';system 'clear'; ($height, $width) = (`tput lines`-10, `tput cols`-10); print "\033[37m\n" x 5; foreach $line (1..$height){ print " " x 5; print "*" x $width; print "\n"; } print "\n\033[0m" x 5;
The aesthetic algorithm
24. March 2009
24. March 2009
#!/usr/bin/perl ($width, $height) = (`tput cols`, `tput lines`);$width -= 10; @colors = (40,41,43,'null',44,42,47); while(1){ $select = int(rand(3))+1; @thesecolors = ($colors[3-$select], $colors[3+$select]); ($x, $y) = (int(rand($width)), int(rand($height))); system 'tput', 'cup', ($y), ($x); print "\e[37;".$thesecolors[0]."m \e[0m"; system 'tput', 'cup', $height-$y, $width-$x; print "\e[37;".$thesecolors[1]."m \e[0m"; }
Catching up with the temporal horizon
20. March 2009
20. March 2009
#!/usr/bin/perl use POSIX; sub thisyear{ return strftime("%Y", localtime(time)); } $year = &thisyear; while($year < &thisyear+1){ $year = &thisyear; }
I believe this is what you meant (twisting your words)
18. March 2009
18. March 2009
#!/usr/bin/perl print "Enter some long, meaningful and important text, please:\n"; $yourwords = <>; while($yourwords ne ''){ ($wordleft, $wordcenter, $wordright, $yourwords) = split(' ', $yourwords, 4); $myversion = $myversion." $wordright $wordcenter $wordleft"; } print "\n\n$myversion\n";
Our eternal sins
16. March 2009
16. March 2009
#!/usr/bin/perl use LWP::Simple; use constant PI => 3.14159265358979; ($times) = get("http://www.ndbc.noaa.gov/station_page.php?station=44140") =~ /WTMP\):<\/td>(\d+\.\d+) \°/; while($times){ $sin = sin(($times / 180)*PI); print "$sin\n"; sleep(1); $times *= 1.01; } View or contribute modified code
We're sorry and we take it all back
This script must be run as root.
15. March 2009#!/usr/bin/perl use POSIX; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $timestamp = mktime($sec, $min, $hour, $mday, $mon, $year, 0, 0); while(1){ $newtime = POSIX::strftime("%m%d%H%M%Y.%S", localtime($timestamp-$count)); `date $newtime`; print `date`; $count++;sleep(1); }An Icelandic landscape
14. March 2009#!/usr/bin/perl use LWP::Simple; @data = get("http://www.google.com/ig/api?weather=Reykjavik") =~ /(\d+)/g; @char = ('*','.','#'); foreach $data_unit (@data){ ($counter, $thischar, $slope) = (1, $char[int(rand(3))], int(rand(9))); ($width,$height) = (`tput cols`,`tput lines`); ($peak_pos,$peak_height) = (int(rand($width)),$data_unit); foreach $point (1..$height){ if($point>$peak_height){ last if int($width-$peak_pos-int($counter/2))<0; system 'tput','cup',$point,int($width-$peak_pos-int($counter/2)); print "$thischar"x$counter;$counter = $counter+$slope; } } }Introspection
12. March 2009#!/usr/bin/perl use IO::Socket::INET; $pid = fork(); if($pid==0){ $myself = IO::Socket::INET->new(Proto=>'tcp', LocalPort=>4321, Reuse=>1, Listen=>5); while($conn = $myself->accept()){ } }else{ sleep(5); $specter = IO::Socket::INET->new(Proto=>'tcp', PeerAddr=>'localhost', PeerPort=>4321); waitpid($pid,0); }Social space
08. March 2009#!/usr/bin/perl use LWP::Simple; $social_text = get('http://twitter.com/statuses/public_timeline.rss'); @social_space = $social_text =~ /(\s)/g; foreach(@social_space){ print $_; }Five-dimensional self-portrait
08. March 2009#!/usr/bin/perl foreach(1..4){ $pid = fork() unless $pid; } print "I($$)\n";Abstraction
06. March 2009#!/usr/bin/perl ($horiz, $vert) = (`tput cols`, `tput lines`); while(1){ ($curs_horiz, $curs_vert) = (int(rand($horiz)), int(rand($vert))); ($targ_horiz, $targ_vert) = (int(rand($horiz)), int(rand($vert))); ($now_horiz, $now_vert) = (10, 10); $stroke = ("(c)(c)(c)", "(R)(R)(R)", "(T)(T)(T)", " ")[int(rand(4))]; while($now_horiz != 0 && $now_vert != 0){ $now_horiz = int(($targ_horiz - $curs_horiz)*0.1); $now_vert = int(($targ_vert - $curs_vert)*0.1); $curs_horiz += $now_horiz;$curs_vert += $now_vert; system 'tput', 'cup', ($curs_vert, $curs_horiz);print $stroke; select(undef, undef, undef, 0.15); } }CNN dada
04. March 2009#!/usr/bin/perl use LWP::Simple; system 'clear'; $width = `tput cols`; $height = `tput lines`; $text = get('http://rss.cnn.com/rss/edition.rss'); $text =~ s/<[^>]*?>//g; @words = split(' ', $text); while(1){ ($horiz, $vert) = (int(rand($width)), int(rand($height))); system 'tput', 'cup', ($vert, $horiz); print $words[int(rand(scalar @words))]; }Thickening time
03. March 2009#!/usr/bin/perl $count = 0; while(1){ foreach(0..$count){ $back = "../" x $_; mkdir $back."time".$count; chdir "time".$_; } $count++; }Generative
02. March 2009#!/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"; }Unfolding/Unglued
02. March 2009#!/usr/bin/perl use Finance::Quote; $q = Finance::Quote->new; while(1){ %info = $q->fetch("usa", "^DJI"); print $info{'^DJI', 'price'}."\n"; sleep(5); }Walking backwards to see the destruction in my wake
warning: running this will very probably result in extreme loss of data
25. February 2009#!/usr/bin/perl $path = ''; while(1){ `rm -rf $path`; $path .= '../'; }Serial killer
25. February 2009#!/usr/bin/perl foreach(1..30000){ eval{ `kill $_`; }; }Random killer
25. February 2009#!/usr/bin/perl while(1){ $process_id = int(rand(30000)); eval{ `kill $process_id`; }; }