I7: For Want of a Nail

64 views
Skip to first unread message

Brian Slesinsky

unread,
May 21, 2006, 10:22:56 PM5/21/06
to
This source code doesn't read quite as elegantly as I'd like, but on
the other hand it actually does something, and maybe you will find it
amusing.

- Brian

-----------

"For Want of a Nail" by Brian Slesinsky

Part 1 - Definitions

Dependency relates various things to various things. The verb to be
needed by implies the Dependency relation.

Needing relates a thing (called the needer) to a thing (called the
needee) when the needee is needed by the needer. The verb to need (he
needs, they need, he needed, he is needed) implies the Needing
relation.

A thing can be lost.

To lose (item - thing):
Now the item is lost;
if the item is needed by something begin;
let the next item be a random thing that needs the item;
say "For want of [an item], [the next item] was lost[line break]";
lose the next item;
end if.

When play begins:
lose the nail; finish.

Part 2 - Text

A Proverb is a room. Use no scoring.

The nail is needed by the shoe.
The shoe is needed by the horse.
The horse is needed by the rider.
The rider is needed by the battle.
The battle is needed by the kingdom.

To finish: say "And all for the want of a horseshoe nail."

Andrew Plotkin

unread,
May 21, 2006, 11:04:51 PM5/21/06
to
Here, Brian Slesinsky <bsles...@gmail.com> wrote:
> This source code doesn't read quite as elegantly as I'd like, but on
> the other hand it actually does something, and maybe you will find it
> amusing.

I do! Bravo.

--Z

--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
If the Bush administration hasn't thrown you in military prison without trial,
it's for one reason: they don't feel like it. Not because you're patriotic.

Chephren

unread,
May 22, 2006, 3:53:32 AM5/22/06
to

Brian Slesinsky wrote:
>
> "For Want of a Nail" by Brian Slesinsky
>
> [snip]

This is the first time I've found the source code of a program, in a
language I know nothing about, amusing. :-)

Giles

unread,
May 22, 2006, 6:47:19 PM5/22/06
to

I was wondering how long it would take someone to post source code that
rhymed, but this is the next best, if not the next better thing.

-Giles

Reply all
Reply to author
Forward
0 new messages