Note that dot product (for example) is designed such that its v should
have a minimal rank (mostly rank 0, but rank 1 can sometimes be
useful, and rank 2 is plausible).

We mostly notice when we want exceptions and it's easy to gloss over
stuff that's working well.

Take care,

-- 
Raul

On Tue, Oct 26, 2021 at 11:32 PM Elijah Stone <[email protected]> wrote:
>
> I think that primitives should try to handle as highly-ranked an array
> they can.  I find it much more simple and regular to explicitly lower the
> rank of a verb than to recreate the high-rank version of the algorithm
> myself.
>
> I had a similar issue recently with #.: it is effectively a trailing-axis
> reduction, and I wanted to reduce the leading axis, so I had to write
> #.&.|:.  I would much rather have written #., and used #."1 if I
> explicitly wanted to reduce the last axis.
>
> I do not know if this argument is strong or objective, but: in general, if
> primitives have natively high rank, then lower-ranked versions can be
> produced in a uniform manner; whereas if primitives are low-ranked, then
> distinct high-ranked versions must be produced for each relevant
> primitive.
>
>   -E
>
> On Tue, 26 Oct 2021, Henry Rich wrote:
>
> > First: rank "_1 is shorthand for "_1"_ . Every verb must have
> > nonnegative rank.
> >
> > Second: it seems to me that the current definition of I. is more
> > convenient for some things (where f@I. is used) and less for others
> > (where I.@, is used).  Is there any strong objective argument one way or
> > the other?
> >
> > Henry Rich
> >
> > On 10/26/2021 1:56 AM, Elijah Stone wrote:
> >> On Mon, 25 Oct 2021, Marshall Lochbaum wrote:
> >>
> >>> If I. combined the two, functions written with the high-rank version
> >>> would usually fail in this case. Better to make the programmer
> >>> remember an idiom than to provide an incomplete version of it.
> >>
> >> No definition could be less amenable to high-rank computation than the
> >> current one.  And for code which does want to go that mile, "_1 is
> >> much nicer (IMHO).
> >>
> >>  -E
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >
> >
> > --
> > This email has been checked for viruses by AVG.
> > https://www.avg.com
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to