Right -- my suggestion here would be that #@= would not produce the
result of = but would instead generate the counts directly without
generating the intermediate results.

And yes i.~ and u/. give the same information more compactly, (but the
equivalent expression involving i.~ would be >./@i.~ which is harder
to read, so #@~. would be preferable).  and u/. assumes that we are
using the bit vectors to compress an argument.

Meanwhile, if you were to get rid of the monadic definition of = it
would make sense to give it the nub operation in its place, leaving ~.
in place (mapping it to CEQ instead of CNUB) for backwards
compatibility. I would be hesitant to take that step (at the very
least, I'd want to read through every published book on J to make sure
I hadn't overlooked something important. For example, are there
approaches to fractals where the current = monadic result is useful?)

A general issue, in the context of the usefulness of primitives, is
that any single application domain is going to tend to emphasize a
handful of primitives, but an unrelated application domain would tend
to emphasize a different handful.

Anyways, this doesn't have to go out immediately or anything, but the
argument that jtsclass() might be tossed is not necessarily an
argument against my suggestion.

Thanks,

-- 
Raul

On Tue, Dec 6, 2022 at 12:00 PM Henry Rich <[email protected]> wrote:
>
> I abhor (= y) because it is so wasteful of space and computation.  (i.~
> y) gives the same information more compactly.  Given the chance, I would
> expunge monad = .
>
> To me, #@~. is more to the point (how many unique values?, rather than
> how many sets of equivalent values?), but that's a matter of taste.
>
> Henry Rich
>
>
> On 12/6/2022 3:50 AM, Raul Miller wrote:
> > #@= gives the same result as #@~. and is more concise (and, plausibly
> > easier to read, once you're used to the idea).
> >
>
> ----------------------------------------------------------------------
> 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