Hey Brian,

I've been thinking about your ideas and I'll explain what I've come up with. 
The challenge of using items for Plus (+) imagery is that they are a rank 0 0 0 
primitive. For scalars - no difference; for vectors - no difference, since 
items are scalars - but for matrix arguments, items become vectors - but  Plus 
works on scalars. In visual terms, we can align vectors vertically and apply 
Plus 'across' the two arguments, but to correspond matrices would need to be 
ravelled into vectors, lined up vertically, added and then reshaped. If you 
leave the matrices as they are, you can still represent addition as has been 
done in the previous animations, but now your  vertical vector representation 
of Plus contradicts how we usually see a vector in J (a horizontal string).

What I found really interesting in this thought experiment, was that the way we 
represent vectors horizontally is not consistent with the way we represent 
other shapes where items are always separated vertically.

Scalar
4  NB. unity case - one item (scalar-itself)

Vector
4 4 4 NB. Items (scalars) are separated horizontally

Matrix
4 4 4  NB. Items (vectors) are separated vertically
4 4 4
4 4 4

Tables
4 4 4 NB. Items (matrices) are separated vertically
4 4 4
4 4 4

4 4 4
4 4 4
4 4 4

I think representing vectors vertically would be a big change to the language 
(and would be problematic when it came to representing character strings, which 
benefit from this horizontal item separation). For now, I don't think it would 
be a good idea to show newcomers the vertical vector, if this is not consistent 
with how they will interact with the language. 

Although I have not found any primitives that have a built in rank of _1 
(items). Your ideas have got thinking more deeply about verbs such as Base (#.) 
which have rank 1.

Thoughts?

Cheers, bob

On -Mar10-2010, at -Mar10-20109:09 AM, Brian Schott wrote:

> I really like Catherine's simplicity suggestions and her call for
> symmetry when possible, instead of ghosts moving unidirectionally.
> 
> Just below I have copied Skip's clear description of his proposal,
> which I like a lot, but want to revise slightly.
> 
> With the possible exception of the example where 2 scalars are added,
> I believe the animation would be more informative if the items  (j
> items, that is) being added were arranged vertically with respect to
> one another just before the sparkle or the lack of sparkle.
> 
> Actually I think I will just add my changes interspersed below among
> Skip's. Look for my variants between brackets: [ ].
> 
> ******copy of Skip's proposal below********
> The variable-width font messed up the display I was trying to show.
> Hopefully, this second cut ill look better.
> 
> so you start with   2 + 3
> 
> and you end:        2 + 3
> 
> [ 2
>  +
>  3]
> 
>                     5    NB. The 5 is the ghost array that started
>                              on the right, moved to the left, changed
>                              to the sum and solidified, and then
>                              moved below the original two numbers.
> ------------------------------------------------------------------------
> 
> you start      1 + 2 3 4
> 
>                              NB. In this example it might be good to
>                                  use a middle step to show how the
>                                  left arg is replicated:
> 
> middle step   1 1 1 + 2 3 4    NB. The replicated ones could be "ghosted"
>                                  to indicate their temporary status.
> [1 1 1
>    +
> 2 3 4]
> you end       1 + 2 3 4        NB. The replicated ones disappear as the
>                                  answer array is solidified and moved
>               3 4 5              under the original equation
> 
> ------------------------------------------------------------------------
> 
> you start       1 2 3 + 4 5 6
> 
> you end:        1 2 3 + 4 5 6
> [1 2 3
>    +
> 4 5 6]
>                  5 7 9
> ------------------------------------------------------------------------
> 
> you start        1 2 3   1 2 3
>                4 5 6 + 4 5 6
>                7 8 9   7 8 9
> 
> you end          1 2 3   1 2 3
>                4 5 6 + 4 5 6
>                7 8 9   7 8 9
> 
> [1 2 3
> 4 5 6
> 7 8 9
>    +
> 1 2 3
> 4 5 6
> 7 8 9]
> 
>                   2  4  6
>                   8 10 12
>                   4 16 18
> 
> ******copy of Skip's proposal above********
> 
> This vertical scheme matching up items has improved my understanding
> of most dyadic verbs. Though I admit that in the case of adding +~>:i.
> 3 3 it is appealling to include an another step which aligns the pairs
> of vectors.
> 
> -- 
> (B=)
> ----------------------------------------------------------------------
> 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