The obvious downside of the thought experiment is that trailing fill is ignored.
That said, I cannot think of any computational cases where (a) trailing fill is significant, and (b) it's meaningful for item/cell shapes to conflict. -- Raul On Thu, Oct 24, 2013 at 2:54 PM, Roger Hui <[email protected]> wrote: > I=: 4 : '(s{."(1,c) x) i. (s{."(1,c) y) [ s=. (}.$x)>.(-c=. <:$$x){.$y' > > 1 2 vs. 1 2 0. What you get now is this: > > x=: 4 2$1 2 > y=: 4 3$1 2 0 > x i. y > 4 4 4 4 > > That is, uniformly #x if the shapes don't match. The question is, is the > thought experimental version more useful? > > Reshaping the item yourself. Of course. Or overtake yourself, or any > number alternatives. The thought experimental version hides this bit of > complexity. > > > > > On Thu, Oct 24, 2013 at 6:16 AM, Don Guinn <[email protected]> wrote: > >> I don't see much of a need for this. I can reshape the items myself if >> necessary. What about the choice of the fill, particularly for numerics? >> Help for i. does not say that the comparison of items is specifically match >> (-:), but I thought it was. Should 1 2 be considered the same as 1 2 0 ? >> >> (>1 2;2 4) I (>1 3 2; 1 2 0;2 5) >> >> 2 0 2 >> >> (>1 2;2 4) i. (>1 3 2; 1 2 0;2 5) >> >> 2 2 2 >> >> Got the following error for leaving the items boxed. >> >> x=: ;:'zero one two five one' >> >> y=: ;:'three one four one five nine' >> >> x i. y >> >> 5 1 5 1 3 5 >> >> x I y >> >> |length error: I >> >> | (s{."c x)i.(s {."c y)[s=.(}.$x)>.(-c=.<:$$x){.$y >> >> >> On Wed, Oct 23, 2013 at 2:28 PM, Roger Hui <[email protected] >> >wrote: >> >> > Thought experiment: What if i. does overtake on the arguments to ensure >> > that the item shape of the left argument matches the cell shape of the >> > right argument? >> > >> > I=: 4 : '(s{."c x) i. (s{."c y) [ s=. (}.$x)>.(-c=. <:$$x){.$y' >> > x=: > ;:'zero one two five one' >> > y=: > ;:'three one four one five nine' >> > >> > $x >> > 5 4 >> > $y >> > 6 5 >> > >> > x i. y >> > 5 5 5 5 5 5 >> > x I y >> > 5 1 5 1 3 5 >> > ---------------------------------------------------------------------- >> > 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
