statebelt's Journal statebelt's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:43:24+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 statebelt's Journal Snooping the parrot Got parrot compiled on linux and snooped around the BASIC compiler. Whew, last time I looked at assembly code was when I programmed a <a href="">picoweb web server</a> for my model railroad. <p> I'm a little mystified about compiling parrot on Mac OS X though. Docs say use fink, but fink seems to want only mirrors for sources. How do I get fink to <em>see</em> my parrot download?</p> statebelt 2002-04-18T21:23:09+00:00 journal Dr. Seuss art online <a href="">Chase Art</a> is showing some of Dr. Seuss' lesser known works. statebelt 2002-04-11T19:40:34+00:00 journal Scheme-in-Perl.txt Found <a href="">Scheme-in-Perl.txt</a> while reading an <a href=";node_id=34786">functional programming article</a> at PerlMonks. statebelt 2002-04-08T23:36:39+00:00 journal mod_perl and mod_dav, don't use expat-lite I finally got mod_perl and mod_dav working together in Apache 1.3.24 - originally I was having lots of core dumps, but it turns out the fix was easy - don't use Apache's expat-lite, use the full expat. I gather this is common knowledge, but it took me a while to figure it out. <p> WebDAV works pretty well in IE on Windows and directly in Mac OS X. I don't have access to XP, but I understand it can mount WebDAV folders as a drive letter instead of going through IE.</p> statebelt 2002-04-08T16:29:02+00:00 journal Using scm2perl to understand SICP At PerlWhirl '02 I sat in on one of Dominus' lectures on using functional programming techniques in Perl. I asked where I could learn more about this and was recommended the book <a href=""> <em>Structure and Interpretation of Computer Programs</em> </a>. <p> The examples are in Scheme, which is line-noise to me, so I've been using the scm2perl translator to help me understand the examples in my native perl. It does a decent job of translation, although it doesn't understand lambda functions (anon subs). scm2perl is part of the Gimp CPAN package and handles Gimp's script-fu dialect of Scheme. </p><p> Example:</p><blockquote><div><p> <tt>[localhost:~] thomas% less sum.scm<br>(define (sum term a next b)<br>&nbsp; (if (&gt; a b)<br>&nbsp; &nbsp; &nbsp; 0<br>&nbsp; &nbsp; &nbsp; (+ (term a)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(sum term (next a) next b))))<br> <br>[localhost:~] thomas% scm2perl sum.scm<br>creating parser...done<br>header...reading(sum.scm)...translating...trailer...wrote(<nobr>)<wbr></nobr> <br>[localhost:~] thomas% less<br>#!/usr/bin/perl<br> <br>use Gimp qw(:auto);<br>use Gimp::Fu;<br> <br>sub sum {<br>&nbsp; &nbsp;my ($term, $a, $next, $b) = @_;<br>&nbsp; &nbsp;if ($a &gt; $b) {<br>&nbsp; &nbsp; &nbsp; 0;<br>&nbsp; &nbsp;} else {<br>&nbsp; &nbsp; &nbsp; (term ($a) + sum ($term, next ($a), $next, $b));<br>&nbsp; &nbsp;}<br>}<br> <br>exit main;</tt></p></div> </blockquote> statebelt 2002-04-05T17:14:35+00:00 journal