On Wed, 15 Jun 2022, Marshall Lochbaum wrote:
my opposition to J's flat array model (I think it's almost always worse than
BQN's based model) is different from my stance on flat arrays BQN can also
represent and optimize these, although there's no name for the category;
they'd be called arrays of numbers or arrays of characters
I was speaking only of semantics, not implementation details.
And of course there can be huge advantages to working with them, but I think
it's madness to use this as grounds to dismiss a solution that's much
shorter and easier to read
I was not dismissing your solution, nor saying that the present one was
better. I was saying that I find the use of nested structures inelegant (as
well as unnecessary in this case, since the data are completely rectangular),
and that the deficiency in j is only a lack of a primitive for managing these
multi-dimensional data effectively. It is a general problem: it is difficult
to manipulate high-dimensional data.
Regarding nests:
1. They provide inconsistent results: what relationship has the shape of x{y
to the shapes of x and y? How can dyad , possibly behave consistently?
2. They are a shadow world (cf
https://gbracha.blogspot.com/2014/09/a-domain-of-shadows.html) of
organisation. Monads 'split' and 'mix' in apl illustrate this; it is not
possible to compose contiguous organisation (adding dimensions to an array)
with noncontiguous organisation (adding nested structure to an array). K is
consistent because it only has nested organisation; bqn has both. J
explicitly places nested organisation in a box, segregated from the rest of
the languages, which composes and is coherent.
more in keeping with other array principles: that blind reshape ($,) on the
transposed array is something I try hard to avoid.
Yes; see again the baker paper.
-E
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm