Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!news-server.csri.toronto.edu!rpi!usc!wupost!darwin.sura.net!haven.umd.edu!socrates!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: I'm *so* confused....
In-Reply-To: mjs@s4mjs.UUCP's message of 17 Feb 92 04:21:03 GMT
Message-ID: <ROCKWELL.92Feb17144238@socrates.umd.edu>
Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Organization: Traveller
References: <9200131@s4mjs.UUCP> <9200133@s4mjs.UUCP>
Date: Mon, 17 Feb 1992 19:42:38 GMT
Lines: 22

M. J. Shannon Jr:
   Ok, I did find a better way to look at it, and I've managed to
   avoid iteration using branches.  So far, so good.  But I had to
   remove a feature I'd really like to have: deleting entries with an
   inode number of 0.  In APL, I'd have used "compress", but that only
   gives me a domain error in J.

In APL, compress and reduction both use the same symbol.  But, using
J's terminology, compress is a dyadic verb and reduce is an adverb.
So J uses '/' for reduce and '#' for compress.  [Also, '/' is called
INSERT'in J, and '#' is called COPY.]

   The other thing that is troublesome is that my dyadic strcpy is
   very very slow.  But given my current knowledge of J, I have no
   idea how else to code the operation.  Any hints?

This might be faster:

strcpy =. ({.~  i.&(0{a.))  :  (;&$:)

-- 
Raul Deluth Miller-Rockwell                   <rockwell@socrates.umd.edu>
