Microcodes by Pall Thayer http://pallthayer.dyndns.org/microcodes Microcodes are small code-based artworks Pall Thayer en Microcodes by Pall Thayer http://pallthayer.dyndns.org/microcodes/mcrss.png http://pallthayer.dyndns.org/microcodes Fri, 15 Dec 2017 10:24:29 +0000 Done http://pallthayer.dyndns.org/microcodes/index.php?code_id=80 http://pallthayer.dyndns.org/microcodes/index.php?code_id=80 Tue, 13 Jan 2015 03:33:10 +0000 #!/usr/bin/perl<br /> done; Descartes http://pallthayer.dyndns.org/microcodes/index.php?code_id=79 http://pallthayer.dyndns.org/microcodes/index.php?code_id=79 Tue, 02 Dec 2014 22:53:01 +0000 #!/usr/bin/perl<br /> think ? am : am_not; Rob and Seryna http://pallthayer.dyndns.org/microcodes/index.php?code_id=78 http://pallthayer.dyndns.org/microcodes/index.php?code_id=78 Mon, 22 Sep 2014 00:00:00 +0000 #!/usr/bin/perl<br /> if(rob){seryna}elsif(seryna){rob}; War http://pallthayer.dyndns.org/microcodes/index.php?code_id=77 http://pallthayer.dyndns.org/microcodes/index.php?code_id=77 Fri, 13 Jun 2014 02:28:58 +0000 #!/usr/bin/perl<br /> for($war = 0; $war < inf; $war++) {<br /> kill;<br /> } Hey Joe http://pallthayer.dyndns.org/microcodes/index.php?code_id=76 http://pallthayer.dyndns.org/microcodes/index.php?code_id=76 Wed, 28 May 2014 00:00:00 +0000 #/usr/bin/perl<br /> hey joe;<br /> where you going;<br /> with that gun;<br /> in your hand;<br /> Starting over http://pallthayer.dyndns.org/microcodes/index.php?code_id=75 http://pallthayer.dyndns.org/microcodes/index.php?code_id=75 Tue, 30 Nov 1999 00:00:00 +0000 #/usr/bin/perl<br /> 1&&1;<br /> 1||1; To the NRA http://pallthayer.dyndns.org/microcodes/index.php?code_id=74 http://pallthayer.dyndns.org/microcodes/index.php?code_id=74 Sat, 19 Apr 2014 03:18:39 +0000 #!/usr/bin/perl<br /> bless guns && die; New Art (NOOArt) http://pallthayer.dyndns.org/microcodes/index.php?code_id=73 http://pallthayer.dyndns.org/microcodes/index.php?code_id=73 Sun, 19 Jan 2014 18:28:21 +0000 #!/usr/bin/perl<br /> $artwork = new Art();<br /> package Art;<br /> sub new {$this={};return bless $this;} Erased de Kooning http://pallthayer.dyndns.org/microcodes/index.php?code_id=72 http://pallthayer.dyndns.org/microcodes/index.php?code_id=72 Fri, 08 Mar 2013 00:00:00 +0000 #!/usr/bin/perl<br /> sub rauschenberg {<br /> $_[0] =~ s/\w//;<br /> return $_[0];<br /> }<br /> $de_Kooning = "de Kooning Drawing\n";<br /> print $de_Kooning = &rauschenberg($de_Kooning) while $de_Kooning =~ /\w/; Nude Descending a Staircase http://pallthayer.dyndns.org/microcodes/index.php?code_id=71 http://pallthayer.dyndns.org/microcodes/index.php?code_id=71 Fri, 01 Mar 2013 00:00:00 +0000 #!/usr/bin/perl<br /> $nude = "nude\n";<br /> foreach(1..39){<br /> print " " x $_.$nude;<br /> sleep(1);<br /> } Event Horizon http://pallthayer.dyndns.org/microcodes/index.php?code_id=70 http://pallthayer.dyndns.org/microcodes/index.php?code_id=70 Wed, 29 Aug 2012 15:50:36 +0000 #!/usr/bin/perl<br /> until(last){<br /> next;<br /> } A more personal Hello World - 11:00 EST, Mar 11, 2012 http://pallthayer.dyndns.org/microcodes/index.php?code_id=69 http://pallthayer.dyndns.org/microcodes/index.php?code_id=69 Sun, 11 Mar 2012 17:52:20 +0000 #!/usr/bin/perl<br /> use v5.10;<br /> $population = 6999816938;<br /> foreach(1...$population){<br /> say "Hello";<br /> } And then... http://pallthayer.dyndns.org/microcodes/index.php?code_id=68 http://pallthayer.dyndns.org/microcodes/index.php?code_id=68 Wed, 04 Jan 2012 04:16:27 +0000 #!/usr/bin/perl<br /> while(next){anything and everything you want} The beginning of the end http://pallthayer.dyndns.org/microcodes/index.php?code_id=67 http://pallthayer.dyndns.org/microcodes/index.php?code_id=67 Wed, 02 Nov 2011 16:18:03 +0000 #!/usr/bin/perl<br /> end while start; Protest http://pallthayer.dyndns.org/microcodes/index.php?code_id=66 http://pallthayer.dyndns.org/microcodes/index.php?code_id=66 Thu, 06 Oct 2011 17:37:39 +0000 #!/usr/bin/perl<br /> sub protest{<br /> reset $wall_street;<br /> return our $future;<br /> }<br /> until($equality){<br /> protest;<br /> } For Occupy Wall Street http://pallthayer.dyndns.org/microcodes/index.php?code_id=65 http://pallthayer.dyndns.org/microcodes/index.php?code_id=65 Wed, 05 Oct 2011 04:34:15 +0000 #!/usr/bin/perl<br /> push(@rights, my $rights); Folding time http://pallthayer.dyndns.org/microcodes/index.php?code_id=64 http://pallthayer.dyndns.org/microcodes/index.php?code_id=64 Mon, 26 Sep 2011 14:28:01 +0000 #!/usr/bin/perl<br /> open(TIME, '>time');<br /> print TIME localtime;<br /> print `fold -w 5 time`; Lack of substance (abstract) http://pallthayer.dyndns.org/microcodes/index.php?code_id=63 http://pallthayer.dyndns.org/microcodes/index.php?code_id=63 Sat, 23 Jul 2011 00:48:25 +0000 #!/usr/bin/perl<br /> sub stance{} Ceci n'est pas une pipe http://pallthayer.dyndns.org/microcodes/index.php?code_id=62 http://pallthayer.dyndns.org/microcodes/index.php?code_id=62 Fri, 15 Jul 2011 13:45:50 +0000 #!/usr/bin/perl<br /> pipe(0,0); I am redundant http://pallthayer.dyndns.org/microcodes/index.php?code_id=61 http://pallthayer.dyndns.org/microcodes/index.php?code_id=61 Mon, 09 May 2011 17:39:17 +0000 #!/usr/bin/perl<br /> sub redundant {<br /> 'I' =~ /I/ ? return 1 : return 1;<br /> }<br /> &redundant ? &redundant : &redundant; eol: End of Life http://pallthayer.dyndns.org/microcodes/index.php?code_id=60 http://pallthayer.dyndns.org/microcodes/index.php?code_id=60 Thu, 17 Mar 2011 15:46:34 +0000 #!/usr/bin/perl<br /> sub to_earth{return;}<br /> sub your_life{return to_earth;}<br /> sub eol{return your_life;}<br /> eol; What I want/need http://pallthayer.dyndns.org/microcodes/index.php?code_id=59 http://pallthayer.dyndns.org/microcodes/index.php?code_id=59 Mon, 24 Jan 2011 02:56:18 +0000 #!/usr/bin/perl<br /> $me = 1;<br /> sub need {<br /> $want = shift;<br /> $need = $want+$me;<br /> return $need;<br /> }<br /> print need($me)."\n"; How to forget http://pallthayer.dyndns.org/microcodes/index.php?code_id=58 http://pallthayer.dyndns.org/microcodes/index.php?code_id=58 Wed, 27 Oct 2010 18:17:36 +0000 #!/usr/bin/perl<br /> $remember = "fixed in memory";<br /> foreach $k(keys %main::){<br /> $var = $k;<br /> eval{$$var = undef;};<br /> }<br /> print $remember; The path to enlightenment http://pallthayer.dyndns.org/microcodes/index.php?code_id=57 http://pallthayer.dyndns.org/microcodes/index.php?code_id=57 Sat, 16 Oct 2010 21:34:44 +0000 #!/usr/bin/perl<br /> $height = `tput lines`;<br /> @lines = ('\\', '|', '/');<br /> $last_line = 30;<br /> while(!$enlightened){<br /> system 'clear';<br /> foreach(1..$height){<br /> $the_spot = abs($_ - ($height));<br /> $the_line = int(rand(scalar @lines));<br /> system 'tput', 'cup', $the_spot, $last_line;<br /> print $lines[$the_line];<br /> $last_line += $the_line-1;<br /> select(undef, undef, undef, 0.25);<br /> }<br /> } The rumour http://pallthayer.dyndns.org/microcodes/index.php?code_id=56 http://pallthayer.dyndns.org/microcodes/index.php?code_id=56 Mon, 11 Oct 2010 16:48:50 +0000 #!/usr/bin/perl<br /> if(true){<br /> true unless false;<br /> }else{<br /> false unless true;<br /> }<br /> Waltz http://pallthayer.dyndns.org/microcodes/index.php?code_id=55 http://pallthayer.dyndns.org/microcodes/index.php?code_id=55 Sat, 26 Jun 2010 16:12:13 +0000 #!/usr/bin/perl<br /> for(1;2;3){<br /> 1;<br /> 2;<br /> 3;<br /> } The end of the world http://pallthayer.dyndns.org/microcodes/index.php?code_id=54 http://pallthayer.dyndns.org/microcodes/index.php?code_id=54 Wed, 14 Apr 2010 17:24:26 +0000 #!/usr/bin/perl<br /> $the_end = true;<br /> while($the_end){end;} The world could end today http://pallthayer.dyndns.org/microcodes/index.php?code_id=53 http://pallthayer.dyndns.org/microcodes/index.php?code_id=53 Tue, 13 Apr 2010 17:16:03 +0000 #!/usr/bin/perl<br /> $secs_per_day = ((24*60)*60);<br /> ($curr_secs, $curr_mins, $curr_hours) = (localtime)[0..2];<br /> $curr_total_secs = (($curr_hours*60)*60)+($curr_mins*60)+$curr_secs;<br /> $likelyhood = sprintf("%.2f", (($secs_per_day-$curr_total_secs)/$secs_per_day)*100);<br /> print "The chances that the world could end today are $likelyhood%\n"; For Each (and every) Color http://pallthayer.dyndns.org/microcodes/index.php?code_id=52 http://pallthayer.dyndns.org/microcodes/index.php?code_id=52 Wed, 07 Apr 2010 16:02:27 +0000 #!/usr/bin/perl<br /> while(1){<br /> foreach $color (1..256){<br /> $output = "\x1b[48;5;$color"."m";<br /> foreach(0..`tput lines`){<br /> $output .= " " x `tput cols`;<br /> $output .= "\n";<br /> }<br /> $output .= "\x1b[0m\n";<br /> print $output;<br /> select(undef, undef, undef, 0.05);<br /> }<br /> } Moodstream http://pallthayer.dyndns.org/microcodes/index.php?code_id=51 http://pallthayer.dyndns.org/microcodes/index.php?code_id=51 Mon, 05 Apr 2010 15:30:55 +0000 #!/usr/bin/perl<br /> $width = `tput cols`;<br /> $mood = @ARGV[1] if @ARGV[0] eq '-m';<br /> @mood = split('', $mood ? $mood : 'indifferent');<br /> while(1){<br /> foreach(@mood){<br /> $color = ord($_).'m';<br /> print "\x1b[48;5;$color";<br /> print " " x int($width/scalar @mood);<br /> print "\x1b[0m";<br /> }<br /> print "\n";<br /> select(undef, undef, undef, 0.1);<br /> } The semi-automatic doodle machine http://pallthayer.dyndns.org/microcodes/index.php?code_id=50 http://pallthayer.dyndns.org/microcodes/index.php?code_id=50 Tue, 26 Jan 2010 12:37:48 +0000 #!/usr/bin/perl<br /> print "Use a pencil and a 210mm x 210mm sheet of paper. Start with your hand at the upper-left corner.\n";<br /> @position = ('up', 'down');<br /> @direction = (['up', '-'], ['to the left', '-'], ['down', '+'], ['to the right', '+']);<br /> @amount = (0, 0);<br /> while(1){<br /> $d = int(rand(scalar @direction));<br /> $new_amount = int(rand(100));<br /> unless(eval("$amount[$d%2] $direction[$d][1] $new_amount") < 0 || eval("$amount[$d%2] $direction[$d][1] $new_amount") &gt; 210){<br /> print "With pencil ".$position[int(rand(scalar @position))].", move ".$new_amount."mm ".$direction[$d][0].".[Enter]\n";<br /> $amount[$d%2] = eval("$amount[$d%2] $direction[$d][1] $new_amount");<br /> $input = &lt;&gt;;<br /> }<br /> } Augmented reality http://pallthayer.dyndns.org/microcodes/index.php?code_id=49 http://pallthayer.dyndns.org/microcodes/index.php?code_id=49 Wed, 20 Jan 2010 13:17:42 +0000 #!/usr/bin/perl<br /> $reality = "real text\n";<br /> $augmented_reality = "\e[31;40m augmented ".$reality."\e[0m";<br /> print $reality;<br /> print $augmented_reality; Carcinogen http://pallthayer.dyndns.org/microcodes/index.php?code_id=48 http://pallthayer.dyndns.org/microcodes/index.php?code_id=48 Sun, 17 Jan 2010 22:48:58 +0000 #!/usr/bin/perl<br /> while(1){<br /> $new_cell = $0;<br /> $ts = time;<br /> $new_cell =~ s/^(.*?)\.?([^\.]*)$/$1$ts\.$2/;<br /> `cp $0 $new_cell`;<br /> print `clear && df`;<br /> sleep(1);<br /> } The strain and pressure of modern living http://pallthayer.dyndns.org/microcodes/index.php?code_id=47 http://pallthayer.dyndns.org/microcodes/index.php?code_id=47 Mon, 11 Jan 2010 11:27:04 +0000 #!/usr/bin/perl<br /> while(1){<br /> my $strain = {name => 'strain'};<br /> my $pressure = {name => 'pressure'};<br /> $strain->{strain} = $pressure;<br /> $pressure->{pressure} = $strain;<br /> select(undef, undef, undef, 0.0002);<br /> print `clear && free -m`;<br /> } Substance trilogy - Gas http://pallthayer.dyndns.org/microcodes/index.php?code_id=46 http://pallthayer.dyndns.org/microcodes/index.php?code_id=46 Thu, 10 Dec 2009 12:24:28 +0000 #!/usr/bin/perl<br /> sub match { print "match\n"; }<br /> if(&lt;&gt; =~ /^.+$/){<br /> match;<br /> } Substance trilogy - Fluid http://pallthayer.dyndns.org/microcodes/index.php?code_id=45 http://pallthayer.dyndns.org/microcodes/index.php?code_id=45 Thu, 10 Dec 2009 12:23:38 +0000 #!/usr/bin/perl<br /> sub match { print "match\n"; }<br /> $in = &lt;&gt;;<br /> if($in =~ /$in/){<br /> match;<br /> } Substance trilogy - Solid http://pallthayer.dyndns.org/microcodes/index.php?code_id=44 http://pallthayer.dyndns.org/microcodes/index.php?code_id=44 Thu, 10 Dec 2009 12:22:47 +0000 #!/usr/bin/perl<br /> sub match { print "match\n"; }<br /> if(&lt;&gt; =~ /^solid$/){<br /> match;<br /> } WAR has NO value http://pallthayer.dyndns.org/microcodes/index.php?code_id=43 http://pallthayer.dyndns.org/microcodes/index.php?code_id=43 Wed, 18 Nov 2009 09:25:41 +0000 #!/usr/bin/perl<br /> use constant WAR;<br /> print WAR; Just listen http://pallthayer.dyndns.org/microcodes/index.php?code_id=42 http://pallthayer.dyndns.org/microcodes/index.php?code_id=42 Tue, 17 Nov 2009 00:15:35 +0000 #!/usr/bin/perl<br /> `nc -l -p 2345`; If times ten http://pallthayer.dyndns.org/microcodes/index.php?code_id=41 http://pallthayer.dyndns.org/microcodes/index.php?code_id=41 Tue, 17 Nov 2009 00:12:57 +0000 #!/usr/bin/perl<br /> $one = 1;<br /> if($one){<br /> $two = 1;<br /> if($two){<br /> $three = 1;<br /> if($three){<br /> $four = 1;<br /> if($four){<br /> $five = 1;<br /> if($five){<br /> $six = 1;<br /> if($six){<br /> $seven = 1;<br /> if($seven){<br /> $eight = 1;<br /> if($eight){<br /> $nine = 1;<br /> if($nine){<br /> $ten = 1;<br /> if($ten){<br /> }<br /> }<br /> }<br /> }<br /> }<br /> }<br /> }<br /> }<br /> }<br /> } > Intended http://pallthayer.dyndns.org/microcodes/index.php?code_id=40 http://pallthayer.dyndns.org/microcodes/index.php?code_id=40 Mon, 19 Oct 2009 13:25:32 +0000 #!/usr/bin/perl<br /> system 'clear';<br /> ($width,$height) = (`tput cols`,`tput lines`);<br /> while($height &gt; 0){<br /> foreach(1..$width/2){<br /> system 'tput', 'cup', $height-$_, int($width*0.5) - int($_*0.5);<br /> print "&gt;" x $_;<br /> }<br /> $height-=1;<br /> } Subverting time-based media: Frozen in time http://pallthayer.dyndns.org/microcodes/index.php?code_id=39 http://pallthayer.dyndns.org/microcodes/index.php?code_id=39 Sun, 11 Oct 2009 13:52:38 +0000 #!/usr/bin/perl<br /> fork && print "Time has fallen asleep in the afternoon sunshine.\n" while 1; My @rt http://pallthayer.dyndns.org/microcodes/index.php?code_id=38 http://pallthayer.dyndns.org/microcodes/index.php?code_id=38 Tue, 22 Sep 2009 15:26:14 +0000 #!/usr/bin/perl<br /> map my @rt, $ometime;<br /> $ave; foreach(%generation){<br /> package it;<br /> study it && redo;<br /> $ave.it;<br /> }<br /> @rt = (80, 65, 76, 76, 32, 84, 72, 65, 89, 69, 82, 10);<br /> foreach(@rt){print chr($_);} Two or love http://pallthayer.dyndns.org/microcodes/index.php?code_id=37 http://pallthayer.dyndns.org/microcodes/index.php?code_id=37 Mon, 21 Sep 2009 14:40:29 +0000 #!/usr/bin/perl<br /> if(2 == 2 || 'love' =~ /u/){<br /> $two = 1 unless $none;<br /> while($beef || $pork){<br /> sleep(11) && fork();<br /> }<br /> }else{<br /> sleep(22) && print "fun";<br /> } Flag http://pallthayer.dyndns.org/microcodes/index.php?code_id=36 http://pallthayer.dyndns.org/microcodes/index.php?code_id=36 Sun, 20 Sep 2009 21:24:19 +0000 #!/usr/bin/perl<br /> binmode STDOUT, ':utf8';<br /> @colors = ("\e[0;31m", "\e[0;34m");<br /> @symbols = (chr(0x268c), chr(0x272a));<br /> while(1){<br /> ($x, $y) = (int(rand(`tput cols`)), int(rand(`tput lines`)));<br /> system 'tput', 'cup', $y, $x;<br /> $select = int(rand(2));<br /> print $colors[$select].$symbols[$select];<br /> } Half full http://pallthayer.dyndns.org/microcodes/index.php?code_id=35 http://pallthayer.dyndns.org/microcodes/index.php?code_id=35 Tue, 25 Aug 2009 00:20:08 +0000 #!/usr/bin/perl<br /> POTENTIAL:<br /> if(0.5){<br /> goto POTENTIAL;<br /> } Half empty http://pallthayer.dyndns.org/microcodes/index.php?code_id=34 http://pallthayer.dyndns.org/microcodes/index.php?code_id=34 Tue, 25 Aug 2009 00:19:33 +0000 #!/usr/bin/perl<br /> POTENTIAL:<br /> unless(0.5){<br /> goto POTENTIAL;<br /> } ...stripped bare... http://pallthayer.dyndns.org/microcodes/index.php?code_id=33 http://pallthayer.dyndns.org/microcodes/index.php?code_id=33 Mon, 17 Aug 2009 17:11:33 +0000 #!/usr/bin/perl<br /> system('sudo', 'bash'); How to explain Perl to a dead hare http://pallthayer.dyndns.org/microcodes/index.php?code_id=32 http://pallthayer.dyndns.org/microcodes/index.php?code_id=32 Sat, 01 Aug 2009 19:09:32 +0000 #!/usr/bin/perl<br /> $info = `perldoc -q .`;<br /> @words = split(" ", $info);<br /> foreach $word(@words){<br /> `say $word`;<br /> } Insecure II (uNcode) http://pallthayer.dyndns.org/microcodes/index.php?code_id=31 http://pallthayer.dyndns.org/microcodes/index.php?code_id=31 Sat, 25 Jul 2009 00:24:42 +0000 #!/usr/bin/perl<br /> $text=`cat ncode.txt`;@text=split('N',$text);<br /> foreach(@text){<br /> $ascii=length($_) unless $_=~/[^n]/g;<br /> $uNcode.=chr($ascii);<br /> }<br /> print "$uNcode\n"; Insecure I (Ncode) http://pallthayer.dyndns.org/microcodes/index.php?code_id=30 http://pallthayer.dyndns.org/microcodes/index.php?code_id=30 Sat, 25 Jul 2009 00:22:37 +0000 #!/usr/bin/perl<br /> print "Enter text to Ncode:\n";<br /> $text=<>;@text=split('', $text);<br /> foreach(@text){<br /> $ascii=ord($_);<br /> $coded.="N"."n" x $ascii."N";<br /> }<br /> `echo $coded >ncode.txt`;print $coded; Seedbed http://pallthayer.dyndns.org/microcodes/index.php?code_id=29 http://pallthayer.dyndns.org/microcodes/index.php?code_id=29 Wed, 01 Jul 2009 17:21:20 +0000 #!/usr/bin/perl<br /> use Cwd qw(realpath);<br /> $myself = realpath($0);<br /> while(1){<br /> `touch $myself`;<br /> print `ls -l $myself`;<br /> } Repeating history http://pallthayer.dyndns.org/microcodes/index.php?code_id=28 http://pallthayer.dyndns.org/microcodes/index.php?code_id=28 Wed, 27 May 2009 15:53:14 +0000 #!/usr/bin/perl<br /> sub relive {$command = shift;print `$command`;}<br /> $bash_history = $ENV{ HOME }."/.bash_history";<br /> while(1){<br /> open(HISTORY, $bash_history);<br /> while($moment = &lt;HISTORY&gt;){<br /> relive($moment);<br /> }<br /> } Frustration http://pallthayer.dyndns.org/microcodes/index.php?code_id=27 http://pallthayer.dyndns.org/microcodes/index.php?code_id=27 Thu, 21 May 2009 23:31:55 +0000 #!/usr/bin/perl<br /> $width = `tput cols`;<br /> @word = split('',"frustration");<br /> while(!$calm){<br /> $vent;<br /> foreach(1..$width){<br /> $vent .= $word[int(rand(scalar @word))];<br /> }<br /> print $vent."\n"; select(undef, undef, undef, 0.1);<br /> $calm = 1 if $vent =~ /frustration/;<br /> } Untitled composition http://pallthayer.dyndns.org/microcodes/index.php?code_id=26 http://pallthayer.dyndns.org/microcodes/index.php?code_id=26 Mon, 04 May 2009 20:05:04 +0000 #!/usr/bin/perl<br /> use LWP::Simple;<br /> getstore('http://www.gutenberg.org/dirs/etext04/cnspr10.txt', 'file.txt');<br /> open FILE, 'file.txt';<br /> while(&lt;FILE&gt;){<br /> print "\e]0;$_\007";<br /> sleep(1);<br /> } On_Kawara tweets http://pallthayer.dyndns.org/microcodes/index.php?code_id=25 http://pallthayer.dyndns.org/microcodes/index.php?code_id=25 Wed, 29 Apr 2009 16:25:19 +0000 #!/usr/bin/perl<br /> use Net::Twitter;<br /> ($user, $pass) = ("On_Kawara", "stillalive");<br /> $client = Net::Twitter->new(username=>$user, password=>$pass);<br /> $result = $client->update("...");<br /> $client = Net::Twitter->new(username=>$user, password=>$pass);<br /> $result = $client->update("I AM STILL ALIVE #art"); Sonic Silence http://pallthayer.dyndns.org/microcodes/index.php?code_id=24 http://pallthayer.dyndns.org/microcodes/index.php?code_id=24 Tue, 21 Apr 2009 01:23:02 +0000 #!/usr/bin/perl<br /> ($x, $fw) = (0, 1);<br /> while(1){<br /> foreach $x (0..300){<br /> $x = abs($x-300) unless $fw;<br /> print "\n";<br /> $y = int(sin($x/25)*25+200);<br /> print "\e[3;".$x.";"."$y"."t";<br /> select(undef, undef, undef, 0.05);<br /> }<br /> $fw ? ($fw = 0) : ($fw = 1);<br /> } In praise of circular reasons http://pallthayer.dyndns.org/microcodes/index.php?code_id=23 http://pallthayer.dyndns.org/microcodes/index.php?code_id=23 Mon, 13 Apr 2009 22:56:03 +0000 #!/usr/bin/perl<br /> $pi = 3.14195;<br /> while(1){<br /> system 'clear';<br /> ($offsetx, $offsety) = (int(rand(`tput cols`/2)), int(rand(`tput lines`/2)));<br /> ($radius, $angle) = (int(rand(`tput cols`/8)), 0);<br /> while($angle < 2 * $pi){<br /> $x = int($radius * cos($angle))+$offsetx;<br /> $y = int($radius * sin($angle))+$offsety;<br /> unless($x < 0 || $y < 0){<br /> system 'tput', 'cup', $y, $x; print "O";<br /> }<br /> $angle += 0.1; select(undef, undef, undef, 0.05);<br /> }<br /> } L'objet d'art http://pallthayer.dyndns.org/microcodes/index.php?code_id=22 http://pallthayer.dyndns.org/microcodes/index.php?code_id=22 Sat, 04 Apr 2009 14:27:11 +0000 #!/usr/bin/perl<br /> use Cwd qw(realpath);<br /> $file = realpath($0);<br /> `lp $file`; Sleep http://pallthayer.dyndns.org/microcodes/index.php?code_id=21 http://pallthayer.dyndns.org/microcodes/index.php?code_id=21 Tue, 31 Mar 2009 11:21:55 +0000 #!/usr/bin/perl<br /> sleep((8*60)*60); Active monochrome http://pallthayer.dyndns.org/microcodes/index.php?code_id=20 http://pallthayer.dyndns.org/microcodes/index.php?code_id=20 Thu, 26 Mar 2009 23:55:51 +0000 #!/usr/bin/perl<br /> print "\e[?25l";<br /> system 'clear';<br /> while(1){<br /> $SIG{'INT'}=sub{print "\e[?25h";exit;};<br /> }<br /> White on white http://pallthayer.dyndns.org/microcodes/index.php?code_id=19 http://pallthayer.dyndns.org/microcodes/index.php?code_id=19 Thu, 26 Mar 2009 22:49:57 +0000 #!/usr/bin/perl<br /> system 'tput', 'setb', '7';system 'clear';<br /> ($height, $width) = (`tput lines`-10, `tput cols`-10);<br /> print "\033[37m\n" x 5;<br /> foreach $line (1..$height){<br /> print " " x 5;<br /> print "*" x $width;<br /> print "\n";<br /> }<br /> print "\n\033[0m" x 5;<br /> The aesthetic algorithm http://pallthayer.dyndns.org/microcodes/index.php?code_id=18 http://pallthayer.dyndns.org/microcodes/index.php?code_id=18 Tue, 24 Mar 2009 00:16:40 +0000 #!/usr/bin/perl<br /> ($width, $height) = (`tput cols`, `tput lines`);$width -= 10;<br /> @colors = (40,41,43,'null',44,42,47);<br /> while(1){<br /> $select = int(rand(3))+1;<br /> @thesecolors = ($colors[3-$select], $colors[3+$select]);<br /> ($x, $y) = (int(rand($width)), int(rand($height)));<br /> system 'tput', 'cup', ($y), ($x);<br /> print "\e[37;".$thesecolors[0]."m \e[0m";<br /> system 'tput', 'cup', $height-$y, $width-$x;<br /> print "\e[37;".$thesecolors[1]."m \e[0m";<br /> }<br /> Catching up with the temporal horizon http://pallthayer.dyndns.org/microcodes/index.php?code_id=17 http://pallthayer.dyndns.org/microcodes/index.php?code_id=17 Fri, 20 Mar 2009 00:47:54 +0000 #!/usr/bin/perl<br /> use POSIX;<br /> sub thisyear{ return strftime("%Y", localtime(time)); }<br /> $year = &thisyear;<br /> while($year < &thisyear+1){<br /> $year = &thisyear;<br /> }<br /> I believe this is what you meant (twisting your words) http://pallthayer.dyndns.org/microcodes/index.php?code_id=16 http://pallthayer.dyndns.org/microcodes/index.php?code_id=16 Wed, 18 Mar 2009 21:16:48 +0000 #!/usr/bin/perl<br /> print "Enter some long, meaningful and important text, please:\n";<br /> $yourwords = <>;<br /> while($yourwords ne ''){<br /> ($wordleft, $wordcenter, $wordright, $yourwords) = split(' ', $yourwords, 4);<br /> $myversion = $myversion." $wordright $wordcenter $wordleft";<br /> }<br /> print "\n\n$myversion\n";<br /> Our eternal sins http://pallthayer.dyndns.org/microcodes/index.php?code_id=15 http://pallthayer.dyndns.org/microcodes/index.php?code_id=15 Mon, 16 Mar 2009 21:03:14 +0000 #!/usr/bin/perl<br /> use LWP::Simple;<br /> use constant PI => 3.14159265358979;<br /> ($times) = get("http://www.ndbc.noaa.gov/station_page.php?station=44140") =~ /WTMP\):<\/td><td> (\d+\.\d+) \&amp;deg/;<br /> while($times){<br /> $sin = sin(($times / 180)*PI);<br /> print "$sin\n";<br /> sleep(1);<br /> $times *= 1.01;<br /> }<br /> We're sorry and we take it all back http://pallthayer.dyndns.org/microcodes/index.php?code_id=14 http://pallthayer.dyndns.org/microcodes/index.php?code_id=14 Sun, 15 Mar 2009 12:32:54 +0000 #!/usr/bin/perl<br /> use POSIX;<br /> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);<br /> $timestamp = mktime($sec, $min, $hour, $mday, $mon, $year, 0, 0);<br /> while(1){<br /> $newtime = POSIX::strftime("%m%d%H%M%Y.%S", localtime($timestamp-$count));<br /> `date $newtime`;<br /> print `date`;<br /> $count++;sleep(1);<br /> }<br /> An Icelandic landscape http://pallthayer.dyndns.org/microcodes/index.php?code_id=13 http://pallthayer.dyndns.org/microcodes/index.php?code_id=13 Sat, 14 Mar 2009 21:27:19 +0000 #!/usr/bin/perl<br /> use LWP::Simple;<br /> @data = get("http://www.google.com/ig/api?weather=Reykjavik") =~ /(\d+)/g;<br /> @char = ('*','.','#');<br /> foreach $data_unit (@data){<br /> ($counter, $thischar, $slope) = (1, $char[int(rand(3))], int(rand(9)));<br /> ($width,$height) = (`tput cols`,`tput lines`);<br /> ($peak_pos,$peak_height) = (int(rand($width)),$data_unit);<br /> foreach $point (1..$height){<br /> if($point>$peak_height){<br /> last if int($width-$peak_pos-int($counter/2))<0;<br /> system 'tput','cup',$point,int($width-$peak_pos-int($counter/2));<br /> print "$thischar"x$counter;$counter = $counter+$slope;<br /> }<br /> }<br /> }<br /> Introspection http://pallthayer.dyndns.org/microcodes/index.php?code_id=12 http://pallthayer.dyndns.org/microcodes/index.php?code_id=12 Thu, 12 Mar 2009 00:11:24 +0000 #!/usr/bin/perl<br /> use IO::Socket::INET;<br /> $pid = fork();<br /> if($pid==0){<br /> $myself = IO::Socket::INET->new(Proto=>'tcp', LocalPort=>4321, Reuse=>1, Listen=>5);<br /> while($conn = $myself->accept()){<br /> }<br /> }else{<br /> sleep(5);<br /> $specter = IO::Socket::INET->new(Proto=>'tcp', PeerAddr=>'localhost', PeerPort=>4321);<br /> waitpid($pid,0);<br /> }<br /> Social space http://pallthayer.dyndns.org/microcodes/index.php?code_id=11 http://pallthayer.dyndns.org/microcodes/index.php?code_id=11 Sun, 08 Mar 2009 23:46:11 +0000 #!/usr/bin/perl<br /> use LWP::Simple;<br /> $social_text = get('http://twitter.com/statuses/public_timeline.rss');<br /> @social_space = $social_text =~ /(\s)/g;<br /> foreach(@social_space){<br /> print $_;<br /> }<br /> Five-dimensional self-portrait http://pallthayer.dyndns.org/microcodes/index.php?code_id=10 http://pallthayer.dyndns.org/microcodes/index.php?code_id=10 Sun, 08 Mar 2009 00:14:59 +0000 #!/usr/bin/perl<br /> foreach(1..4){<br /> $pid = fork() unless $pid;<br /> }<br /> print "I($$)\n";<br /> Abstraction http://pallthayer.dyndns.org/microcodes/index.php?code_id=9 http://pallthayer.dyndns.org/microcodes/index.php?code_id=9 Fri, 06 Mar 2009 10:19:41 +0000 #!/usr/bin/perl<br /> ($horiz, $vert) = (`tput cols`, `tput lines`);<br /> while(1){<br /> ($curs_horiz, $curs_vert) = (int(rand($horiz)), int(rand($vert)));<br /> ($targ_horiz, $targ_vert) = (int(rand($horiz)), int(rand($vert)));<br /> ($now_horiz, $now_vert) = (10, 10);<br /> $stroke = ("(c)(c)(c)", "(R)(R)(R)", "(T)(T)(T)", " ")[int(rand(4))];<br /> while($now_horiz != 0 && $now_vert != 0){<br /> $now_horiz = int(($targ_horiz - $curs_horiz)*0.1);<br /> $now_vert = int(($targ_vert - $curs_vert)*0.1);<br /> $curs_horiz += $now_horiz;$curs_vert += $now_vert;<br /> system 'tput', 'cup', ($curs_vert, $curs_horiz);print $stroke;<br /> select(undef, undef, undef, 0.15);<br /> }<br /> }<br /> CNN dada http://pallthayer.dyndns.org/microcodes/index.php?code_id=8 http://pallthayer.dyndns.org/microcodes/index.php?code_id=8 Wed, 04 Mar 2009 21:53:13 +0000 #!/usr/bin/perl<br /> use LWP::Simple;<br /> system 'clear';<br /> $width = `tput cols`;<br /> $height = `tput lines`;<br /> $text = get('http://rss.cnn.com/rss/edition.rss');<br /> $text =~ s/<[^>]*?>//g;<br /> @words = split(' ', $text);<br /> while(1){<br /> ($horiz, $vert) = (int(rand($width)), int(rand($height)));<br /> system 'tput', 'cup', ($vert, $horiz);<br /> print $words[int(rand(scalar @words))];<br /> } Thickening time http://pallthayer.dyndns.org/microcodes/index.php?code_id=7 http://pallthayer.dyndns.org/microcodes/index.php?code_id=7 Tue, 03 Mar 2009 21:52:41 +0000 #!/usr/bin/perl<br /> $count = 0;<br /> while(1){<br /> foreach(0..$count){<br /> $back = "../" x $_;<br /> mkdir $back."time".$count;<br /> chdir "time".$_;<br /> }<br /> $count++;<br /> } Generative http://pallthayer.dyndns.org/microcodes/index.php?code_id=6 http://pallthayer.dyndns.org/microcodes/index.php?code_id=6 Mon, 02 Mar 2009 21:52:08 +0000 #!/usr/bin/perl <br /> $width = `tput cols`; <br /> foreach(5..$width){ <br /> $he = sprintf("%".$_."s", "--=o"); <br /> $she = sprintf("%".int($width-$_)."s", "@"); <br /> print $he.$she."\n"; <br /> select(undef, undef, undef, 0.1); <br /> print "\033[2J"; <br /> } Unfolding/Unglued http://pallthayer.dyndns.org/microcodes/index.php?code_id=5 http://pallthayer.dyndns.org/microcodes/index.php?code_id=5 Mon, 02 Mar 2009 21:51:23 +0000 #!/usr/bin/perl <br /> use Finance::Quote; <br /> $q = Finance::Quote->new; <br /> while(1){ <br /> %info = $q->fetch("usa", "^DJI"); <br /> print $info{'^DJI', 'price'}."\n"; <br /> sleep(5); <br /> } Walking backwards to see the destruction in my wake http://pallthayer.dyndns.org/microcodes/index.php?code_id=4 http://pallthayer.dyndns.org/microcodes/index.php?code_id=4 Wed, 25 Feb 2009 21:48:49 +0000 #!/usr/bin/perl <br /> $path = ''; <br /> while(1){ <br /> `rm -rf $path`; <br /> $path .= '../'; <br /> } Serial killer http://pallthayer.dyndns.org/microcodes/index.php?code_id=3 http://pallthayer.dyndns.org/microcodes/index.php?code_id=3 Wed, 25 Feb 2009 21:47:55 +0000 #!/usr/bin/perl <br /> foreach(1..30000){ <br /> eval{ <br /> `kill $_`; <br /> }; <br /> } Random killer http://pallthayer.dyndns.org/microcodes/index.php?code_id=2 http://pallthayer.dyndns.org/microcodes/index.php?code_id=2 Wed, 25 Feb 2009 21:47:20 +0000 #!/usr/bin/perl<br /> while(1){ <br /> $process_id = int(rand(30000)); <br /> eval{ <br /> `kill $process_id`; <br /> };<br /> } <br /> <br />