{"id":393,"date":"2009-09-03T15:31:57","date_gmt":"2009-09-03T19:31:57","guid":{"rendered":"http:\/\/nickm.com\/post\/?p=393"},"modified":"2009-09-03T15:32:58","modified_gmt":"2009-09-03T19:32:58","slug":"a-tiny-poetry-generator-with-blinkenlights","status":"publish","type":"post","link":"https:\/\/nickm.com\/post\/2009\/09\/a-tiny-poetry-generator-with-blinkenlights\/","title":{"rendered":"A Tiny Poetry Generator with Blinkenlights"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nickm.com\/post\/wp-content\/stuff\/ppg256-4_1.JPG\" alt=\"ppg256-4 on a shelf\" title=\"ppg256-4 on a shelf\" width=\"461\" height=\"346\" class=\"alignleft size-full wp-image-563\" style=\"margin-right: 6px\" \/><\/p>\n<p>[As I wrote on netpoetic.com:] My latest Perl Poetry Generator in 256 Characters, <em>ppg256-4,<\/em> is my first one created specifically for a gallery setting. Although shown here in my office, it&#8217;s now on display at the <a href=\"http:\/\/axiomart.org\/\">Axiom Gallery for New and Experimental Media<\/a> in Boston in the show <em>Pulling Back the Curtain,<\/em> which runs through September 27.<\/p>\n<p>Since 2007, I have been developing Perl poetry generators that are 256 characters long. These programs constitute <a href=\"http:\/\/nickm.com\/poems\/ppg256.html\">the ppg256 series.<\/a> They are simply 256 characters of Perl code; they use no external data sources, online or local, and they do not make use of any special libraries or invoke any other programs. Here&#8217;s the code for ppg256-4:<\/p>\n<blockquote><p><tt>perl -e &#39;sub c{$_=pop;$_[rand split]}sub w{c(&quot;b br d f fl l m p s tr w&quot;).c&quot;ad ag ap at ay ip on ot ow&quot;}{$|=print&quot;\\0\\0\\0\\0\\0\\1Z00\\2AA\\33 b&quot;.c(&quot;be de mis re pre &quot;).w.&quot; &quot;.c(&quot;a on the that&quot;).&quot; &quot;.w.w.&quot;, &quot;.c(&quot;boss bro buddy dogg dude guy man pal vato&quot;).&quot;\\4&quot;;sleep 4;redo}&#39; &gt; \/dev\/alpha<\/tt><\/p><\/blockquote>\n<p>Note that those 256 characters of Perl include all of the control codes that are needed to drive the sign; the output is just redirected to the sign, a serial device, instead of appearing in the terminal. If you want to run ppg256-4 yourself, you can use this modified version that doesn&#8217;t include the control codes &mdash; it&#8217;s ready for you to copy and paste it into a terminal window:<\/p>\n<blockquote><p><tt>perl -le &#39;sub c{$_=pop;$_[rand split]}sub w{c(&quot;b br d f fl l m p s tr w&quot;).c&quot;ad ag ap at ay ip on ot ow&quot;}{$|=print &quot;\\n&quot;.c(&quot;be de mis re pre &quot;).w.&quot; &quot;.c(&quot;a on the that&quot;).&quot; &quot;.w.w.&quot;, &quot;.c(&quot;boss bro buddy dogg dude guy man pal vato&quot;).&quot;\\4&quot;;sleep 4;redo} #No LED sign version&#39;<\/tt><\/p><\/blockquote>\n<p>I&#8217;ll try to post a longer discussion about <em>ppg256-4<\/em> on netpoetic.com and\/or on <em>Post Position<\/em> before too long.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nickm.com\/post\/wp-content\/stuff\/ppg256-4_2.JPG\" alt=\"ppg256-4_2\" title=\"ppg256-4_2\" width=\"461\" height=\"346\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nickm.com\/post\/wp-content\/stuff\/ppg256-4_3.JPG\" alt=\"ppg256-4_3\" title=\"ppg256-4_3\" width=\"461\" height=\"346\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nickm.com\/post\/wp-content\/stuff\/ppg256-4_4.JPG\" alt=\"ppg256-4_4\" title=\"ppg256-4_4\" width=\"461\" height=\"346\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nickm.com\/post\/wp-content\/stuff\/ppg256-4_5.JPG\" alt=\"ppg256-4_5\" title=\"ppg256-4_5\" width=\"461\" height=\"346\" \/><\/p>\n<p><i>This was <b>posted<\/b> here on <\/i><i>Post Position<\/i> for the convenience of those of you who subscribe to the feed or visit the site. If you want to leave a <b>comment,<\/b> please head over to <a href=\"\">this post on netpoetic.com.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[As I wrote on netpoetic.com:] My latest Perl Poetry Generator in 256 Characters, ppg256-4, is my first one created specifically for a gallery setting. Although shown here in my office, it&#8217;s now on display at the Axiom Gallery for New and Experimental Media in Boston in the show Pulling Back the Curtain, which runs through &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/nickm.com\/post\/2009\/09\/a-tiny-poetry-generator-with-blinkenlights\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A Tiny Poetry Generator with Blinkenlights&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12,21,17,23,33,4,15,13],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-art","tag-constraint","tag-digital","tag-hardware","tag-netpoetic-com","tag-poetry","tag-programming","tag-writing"],"_links":{"self":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":5,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"predecessor-version":[{"id":398,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/393\/revisions\/398"}],"wp:attachment":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}