Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

kag (4257)

  (email not shown publicly)

Journal of kag (4257)

Sunday May 02, 2004
10:17 PM

Perl Medic blogging

At the last meeting, I got a review copy of Perl Medic. Pretty good so far.

I'm noting my reactions to each chapter on a blog that I'd installed for a client. Others reading the book are free to come participate.

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.

Thursday March 18, 2004
07:23 PM

Reviving the CLU project

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.

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.

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.

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.

Thursday March 11, 2004
04:10 PM


A chow mein with almost unlimited storage capacity

This is why I leave cooking to the professionals.

Sunday January 11, 2004
05:23 PM


"Our new car will lose control and plummet to a fiery doom."

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.

Thursday January 08, 2004
04:18 PM

Blood sacrificed

And the new motherboard booted successfully. Now to install the new hard drive so I have somewhere to put FreeBSD 5.x.

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.
Option 1: take a saw to the connector.
Option 2: someone, somewhere out there, sells a 3->2 adapter.

Monday January 05, 2004
01:32 PM

Look surprised

[kag@kagnote kag]$ look surprised

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').

Tuesday December 09, 2003
05:38 PM

Oh, just melt already

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.

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.

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.

Tuesday July 22, 2003
03:10 AM

CLU on Parrot

For reasons that can best be described as "obsessive compulsive", I've decided to port CLU to Parrot.

What is CLU?

  • 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.)
  • A language with some interesting features. Parameterized types; parameterized procedures; iterators; parameterized iterators; exceptions.
  • It's a language I learned to program in once, so therefore it can never be allowed to die.

Why port to Parrot?

  • Clusters and exceptions will test bits of Parrot not heavily stressed yet.
  • While CLU iterators don't have to be implemented with coroutines, they can be. So that gets tested too.
  • It's strongly-typed, and Parrot should have at least one B&D language.
  • I wanna.
  • I never bothered taking the compiler course, so this is my chance to use the Dragon book in anger.
  • I get to play with Parse::RecDescent and Parrot.

Things I have:

  • A Perl6 grammar that looks like it might parse CLU. Useless until Perl6::Rules gets released.
  • A Parse::RecDescent grammar that parses the bits of CLU I've fed into it so far.
  • The outline of the parsetree cleanup code.
  • Vague ideas of how I'm going to do code emission. (I'm going to target IMCC.)

Things I need:

  • A set of parsing tests.
  • Finish the AST cleanup code.
  • Write the code generation.
    • Do I understand the current state of the calling conventions?
    • How is linking supposed to happen?
    • How out-of-date is Perl 6 Essentials already?
  • Implement the builtin types and the standard library (or at least enough of streams to print).
  • Tests, tests, tests