I don't see that the dyad I. (interval index) belongs with the others.
I assume you mean |. (rotate).

{
{.
}.
|.
A.

You can not have the new behaviour (boxed left arguments)
for {. }. |. and still be compatible.  The left ranks are wrong.



----- Original Message -----
From: Joey K Tuttle <[email protected]>
Date: Wednesday, December 16, 2009 10:57
Subject: Re: [Jprogramming] Proposed extension to A. (incompatible)
To: Programming forum <[email protected]>

> If such an extension was to be implemented I think it would make 
> sense  
> to have similar arguments work with I. {. {. as well. Current 
> behavior  
> could be left as a convenience/back compatibility.
> 
> Sent from my iPod - excuse terseness and typos.
> 
> - joey
> 
> 
> 
> On Dec 16, 2009, at 10:41, Roger Hui <[email protected]> wrote:
> 
> > The extension can be more readily accommodated (i.e.,
> > with backward compatibility) if the left argument were boxed.
> > Likewise, if we were designing from scratch (which we are not),
> > we would be tempted to box the left arguments of the dyads 
> |.  {. }. .
> >
> >
> >
> > ----- Original Message -----
> > From: Dan Bron <[email protected]>
> > Date: Wednesday, December 16, 2009 9:59
> > Subject: [Jprogramming] Proposed extension to A. (incompatible)
> > To: 'Programming forum' <[email protected]>
> >
> >> I would like to propose an extension to dyad
> >> A.   Specifically, I would like dyad  A.  to
> >> interpret left-arguments in a way similar
> >> to  |.  and  {.  , where each atom
> >> of   x   corresponds to an axis of
> >> y  .    For example,  with the new
> >> definition, the phrase (0
> >> _1 A. i. 4 5)  would reverse the columns of y, yielding the
> >> same results as  (_1 A.&.|: i. 4 5)  does with the
> >> current definition.
> >> Similar statements apply to higher dimensions; I can post a
> >> model (using  |:)  if that's helpful.
> >>
> >> Of course, right now, the ranks of dyad  A.  are
> >> 0  _  .   The new definition of
> >> A.  would require them to be   1
> >> _    , so
> >> extension is not backwards compatible.  But because of the
> >> way  A.  is typically used, I doubt it would break
> >> much code in practice.
> >> Furthermore, the fix is trivial;  substitute  A."_ 0
> >> _   for all uses of  A.
> >>
> >> I believe the extension would be useful; more and more I find
> >> myself wanting direct access non-leading axes of an array, 
> and I now
> >> make heavy use of  (boxes <;.n  y), (list {. y),
> >> (list |.  y)  etc.  This extension to
> >> A.  would make a nice companion to another
> >> proposal I made:
> >> 
> http://www.jsoftware.com/jwiki/System/Interpreter/Requests#redefineu.3B.0y 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to