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 ]

nkuitse (193)

  (email not shown publicly)

Journal of nkuitse (193)

Friday February 14, 2003
11:16 PM

Too Kool for Words


Wow. Mac OS X goodness. Shiny widgets. Cool tools.

A comic strip viewer, a game, a puzzle, an HTML validator, RSS streamers, and a gazillion clocks.

I just whipped up a widget to display random words. All it does is invoke my Perl script kwet on a profile selected from a pop-up in the Preferences window.

A new random word every n seconds. Now to code up a visual history display...

If only I had the graphics savvy to make mine look as purty as other peoples'. Sigh...

02:47 PM

The incredible silliness of being an uncle

I just received a Yahoo greeting:

To: Uncle Paul
Have a wonderful Valentine!

Being an uncle is cool. You get to buy them toys and books, teach them words in strange languages, tell them stories about your shoes, make jokes about rutabagas, and when you arrive at their house for a weekend visit they gang-tackle you as you walk in the door.

And of course my nephew and nieces are the best of all!

Thursday February 13, 2003
04:06 PM


An apple fritter.

A cup of apple juice.

Thanks, Angelo's: these simple things keep me going in the afternoon when hunger strikes after too much coding.

No thanks for the Flash spasm, though.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

"Too much coding"? Who am I kidding?

01:55 PM

Did I kill

Every once in a while I'll submit a form in a Web site, and the next thing I know the site isn't working properly.

Usually, it's my own server, and the problem is a bug in my own code. I scoot my chair over to the server (just two feet from my desk) to see what new torture I've put my long-suffering HyperCard stack cum CGI handler through. Or maybe long-lived HyperCard is showing its age again: it happens every once in a while, usually during automated backup, and ever since upgrading to Mac OS X closing the stack invariably leaves cruft in the stack. Or maybe the older version of Classic I'm using (not upgraded for fear of breaking my HyperCard stack) is driving up CPU usage. Or maybe it's a synergy of many things.

In any event, it's usually my fault but I'm able to fix it in a few minutes. If it's not my server that's acting up, I go nervously on my way hoping it wasn't my garbage in that triggered the server's garbage out, looking around to make sure no one was watching and feeling the emptiness around me (computers and hubs and a router off in a closet somewhere).

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Twenty minutes ago, it happened when I was visiting

No more do I submit a new HTML-formatted journal entry for preview than I find myself staring at Internal Server Error. Was my HTML malformed? Yes. Did I think to syntax-check it first? No. When I fix the mistake (just one little '>' forgotten) and resubmit, do I get the same error? Yes. When I chop off all but the opening paragraph (nothing but a <p> and some text inside) and resubmit, do I see the same error? Yes. When I try to go to (don't forget the final slash!), do I see the same error? Yes.

Did I kill

Between that last paragraph and this, I went back to try again. The internal server error is gone. I pull up my diary to write the new entry I'd been previewing. All is well. I preview, I edit; I submit: happiness all around. I sigh in relief.

But a hint of worry remains. My lunch hour is over, and I'll never know: did I kill

Sometimes the loneliness of the Internet is a mile wide.

01:40 PM

Hammers and nails

When all you have is a hammer, everything looks like a nail.

Evidently, this can be generalized:

When you get a nice shiny new hammer, everything looks like a nail. Even the things you pounded on with the last shiny new hammer you got. And the one before that. And the one before that. And so on. Hammers and nails everywhere, and all so shiny and new!

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

My most recently acquired shiny new hammer is YAML . Earlier, it was XML. Now, entries in the lexicon for my invented language are going from something like this:

   <sg cat="noun">
   <sg cat="adj">
      <sg label="a">
         <xp>similar to gold in appearance</xp>
      <sg label="b">
         <xp>made of gold</xp>
</e> something like this:

   - noun: gold
   - adj:
      - a:
         - xp: similar to gold in appearance
         - gold
      - b:
         - xp: made of gold
         - golden

That's a mighty nice, shiny new hammer. And look! -- nails!

Wednesday February 12, 2003
01:54 PM


Consider a classless object model with these simple principles:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

A world is a collection of objects.

Each world is wholly independent from all other worlds.

Each world has a single root object.

Every object has a unique identifier (its OID).

Every object has exactly one parent, except a root object, which has none.

An object may have any number of slots.

An object inherits its parent's slots.

A root object needn't have any slots.

A slot has code.

A slot may have a parent, which is another slot.

An object has no code.

Objects receive messages.

A message has a name, arguments, and a sender.

When an object receives a message, it invokes its slot of the same name. If it has no such slot, the message is forwarded to the object's parent.

An error occurs when the root object receives a message and has no slot of the same name.

A slot may have data.

Upon being invoked, a slot may access its data.

Upon being invoked, a slot may invoke its parent, the sender of the message which resulted in the slot being invoked, or any object to which its data contains a reference.

Slots may share code.

Slots may not share data.

A slot knows of no other slot except its parent (if it has one).

Objects can't send messages, because they don't have code. Their task is simply to handle messages by finding and invoking the right slots.

A slot is given a reference to its owning object when the slot is invoked, but may not keep it (unless for some reason the slot wishes to keep the reference in its data).

An object (call it X) may be cloned to produce another object (call it B). X is then the parent of Y.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

In a nutshell: an object is simply a collection of slots, each of which may inherit from some other slot.

This is what is keeping me busy now at work. There are a few more principles (reflection, translucency, acyclicity, etc.) but this is the gist of it.

01:10 PM

Getting test religion

Test::Inline is wonderful.

Test::More is terrific.

It's only in the past month or so that I've begun writing lots of small tests. It's only in the past month or so that I've begun writing any test code to speak of. My eyes are wide open now to new vistas.

I'm a very happy camper.

I'm tickled pink.

I'm pleased as Punch.

But in the last few days, I've found myself coding so fast that I haven't paused to write tests. Well, maybe two or three short ones. And a longer one. I guess that's not so bad: a few is better than none at all...

I wonder: am I coding fast because my newfound test religion makes working code easier to produce? No, I don't think so.

But suppose I hit that familiar wall and the code engine dries up. What then? Well, I go back to writing tests; that may just be my ticket back to Happy Hack Mode Land.

07:29 AM


What I want is a command-line wiki.

A backend, not a curses- (or suchlike-)based interface à la lynx.

emacs WikiMode sounds interesting, but I'm a BBEdit monkey myself.

I suppose I'll have to write one myself.

At least I have a name for it: clew.

ModE clue, clew < ME clewe < OE cleowen, cliewen; cf. OHG kliu 'ball'.

...and here I thought it came from Latin clavis 'key'. Etymolomumbojumbo narrowly averted!

Tuesday February 11, 2003
07:09 PM

Day one

Despite a terrible track record in journals and diaries and such (oh my!), I'm going to give this a shot.

Look here for occasional accounts of adventures in Perl and whatnot. Emphasis on the whatnot.