kag's Journal http://use.perl.org/~kag/journal/ kag'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:41:20+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 kag's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~kag/journal/ Perl Medic blogging http://use.perl.org/~kag/journal/18593?from=rss At the last Boston.pm meeting, I got a review copy of <i>Perl Medic</i>. Pretty good so far.<p> I'm noting my reactions to each chapter on <a href="http://www.newburyport.k12.ma.us/~kag/medic">a blog</a> that I'd installed for a client. Others reading the book are free to come participate.</p><p> I'm not sure how much coordination a "reading group" needs, but this seemed an easy way to try to start a bit of conversation about the book.</p> kag 2004-05-03T03:17:20+00:00 books Reviving the CLU project http://use.perl.org/~kag/journal/17959?from=rss <p>A few months ago I tried to write a CLU compiler for parrot (for no better reason than nostalgia for my undergraduate days). I got bogged down in trying to figure out a not-horribly-complex way to implement parameterized clusters, so on the shelf it went.</p><p>Parrot has progressed a lot since then. So it's time to take CLU off the shelf and dust it off a bit. The Parse::RecDescent parser is still mostly good. (I need to wrap my brain around PRD's error reporting. Compilers really should report syntax errors rather than just exiting.) I'll probably port to Perl6::Rules when they're done.</p><p>The code generation was definitely in the "build one to throw away" category. So out it goes. This time I'm going to output an AST to feed to the not-yet-existant ast2imc layer of Parrot. I can spit out ASTs for statements in either YAML or s-expressions. (More complex constructs awaiting me deciding how scopes are handled.) The sexprs lose some of the metadata.</p><p>Google finds several intentions to write a YAML library for Parrot, but no code. The only firm AST stuff for Parrot is Leo's YAL, which is in C. (Subgoal of mine: avoid C.) But at the rate I'm devoting time to my little toy, that probably isn't a problem.</p> kag 2004-03-19T00:23:10+00:00 parrot near-singularity http://use.perl.org/~kag/journal/17864?from=rss <a href="http://home.comcast.net/~pshaughn/tandr.html">A chow mein with almost unlimited storage capacity</a> <p> This is why I leave cooking to the professionals.</p> kag 2004-03-11T21:10:22+00:00 journal Phaeton http://use.perl.org/~kag/journal/16764?from=rss <p>"Our new car will lose control and plummet to a fiery doom."</p><p>I was thinking that the trend to name cars with meaningless sequences of numbers and letters was boring, but maybe the marketing department can't be trusted with anything more.</p> kag 2004-01-11T22:23:25+00:00 journal Blood sacrificed http://use.perl.org/~kag/journal/16718?from=rss <p>And the new motherboard booted successfully. Now to install the new hard drive so I have somewhere to put FreeBSD 5.x.</p><p>The only outstanding nuisance is that the case had a three pin (middle unused) connector for the power LED, and the board expects a two-pin connector.<br>Option 1: take a saw to the connector.<br>Option 2: someone, somewhere out there, sells a 3-&gt;2 adapter.</p> kag 2004-01-08T21:18:07+00:00 journal Look surprised http://use.perl.org/~kag/journal/16648?from=rss <code>[kag@kagnote kag]$ look surprised<br> surprised</code> <p> I'd couldn't remember if there was a 'r' before the 'p' or not. Then I noticed that I'd invented a new 'cat food' (or 'make love').</p> kag 2004-01-05T18:32:58+00:00 journal Oh, just melt already http://use.perl.org/~kag/journal/16248?from=rss <p>It snows occasionally in Boston. It's rather pretty for the first few hours. Then it starts turning into gunk. You never see brown snow on those TV holiday specials.</p><p>The landlord did a good job of clearing the steps and sidewalk this storm. The city did a passable job clearing the street. That just leaves the berm where the curb used to be. So I grab a shovel and punch a hole through it.</p><p>Mission accomplished? Nah. Someone decides that he'll park his car to block my curb-cut. So I dig another one today. Any car blocking it tomorrow (when my groceries are to be delivered; the main reason I bothered with this) gets buried in whatever remaining snow I can find.</p> kag 2003-12-09T22:38:49+00:00 tools CLU on Parrot http://use.perl.org/~kag/journal/13609?from=rss For reasons that can best be described as "obsessive compulsive", I've decided to port CLU to Parrot.<p> What is CLU? </p><ul> <li>An early sorta-OO language. It appeared in the late 70s, and was used as a teaching langauge in the early and mid 80s. It has "clusters", which are a set of operations that can be performed on an opaque data abstraction. (Like a class, but no inheritance, and slightly awkward syntax.)</li> <li>A language with some interesting features. Parameterized types; parameterized procedures; iterators; parameterized iterators; exceptions.</li> <li>It's a language I learned to program in once, so therefore it can never be allowed to die.</li> </ul><p> Why port to Parrot? </p><ul> <li>Clusters and exceptions will test bits of Parrot not heavily stressed yet.</li> <li>While CLU iterators don't <i>have</i> to be implemented with coroutines, they can be. So that gets tested too.</li> <li>It's strongly-typed, and Parrot should have at least one B&amp;D language.</li> <li>I wanna.</li> <li>I never bothered taking the compiler course, so this is my chance to use the Dragon book in anger.</li> <li>I get to play with Parse::RecDescent and Parrot.</li> </ul><p> Things I have: </p><ul> <li>A Perl6 grammar that looks like it might parse CLU. Useless until Perl6::Rules gets released.</li> <li>A Parse::RecDescent grammar that parses the bits of CLU I've fed into it so far.</li> <li>The outline of the parsetree cleanup code.</li> <li>Vague ideas of how I'm going to do code emission. (I'm going to target IMCC.)</li> </ul><p> Things I need: </p><ul> <li>A set of parsing tests.</li> <li>Finish the AST cleanup code.</li> <li>Write the code generation. <ul> <li>Do I understand the current state of the calling conventions?</li> <li>How is linking supposed to happen?</li> <li>How out-of-date is <i>Perl 6 Essentials</i> already?</li> </ul></li> <li>Implement the builtin types and the standard library (or at least enough of streams to print).</li> <li>Tests, tests, tests</li> </ul> kag 2003-07-22T08:10:37+00:00 parrot