I would not generalize to higher rank arrays without a model of why I'd be
using them.

In other words, v=: {"_1 |:~&0 2 is probably good enough.

There are some interesting contradictions here - while one needs to be
comfortable thinking mathematically to get decent performance out of a
system, usually what we are building is a mix of instant and delayed
gratification and we usually assume our audience has no direct interest in
the math we are performing (indirect interest, yes - sometimes).

Often I think we go overboard, and we should throw back in some exposure to
some of the more robust concepts (especially for the kids, so they have
something interesting to play with). But professional adults tend to be
under a lot of time pressure, and as a result their needs often seem to be
a mix of the very basic and the childish.

Meanwhile, it seems like anything worthwhile takes time and effort.

Anyways, professional software design often centers around use cases and
similar models which are aimed at extracting the important concepts about
what people need to get done and how they want to work. And that kind of
information is what you need if you are going to properly generalize
application code.

Thanks,

-- 
Raul


On Fri, Jul 11, 2014 at 10:07 PM, Marshall Lochbaum <[email protected]>
wrote:

> My first instinct would be
>    v =: ({"_1) 1 0 2&|:
> although this does not generalize to higher-rank arrays without a little
> work. The following adverb also works, but goes through boxes and
> consequently is probably a bit inefficient.
>    v =: } (&.:(<"1))
>
> Marshall
>
> On Fri, Jul 11, 2014 at 05:56:49PM -0700, 'Pascal Jasmin' via Programming
> wrote:
> > what verb v (or I guess adverb is ok) could I use to get
> >
> > 0 1 1 v i. 2 3 2
> >
> > 0  1
> > 8  9
> > 10 11
> >
> >
> >     i.2 3 2
> >  0  1
> >  2  3
> >  4  5
> >  6  7
> >  8  9
> > 10 11
> > ----------------------------------------------------------------------
> > 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

Reply via email to