This verb might accomplish what you want,

   process=. 4  : '(x ; (5!:1)<''y'')`:6'"0

   *: ` -: `^ process 3 1 0
9 0.5 1
   *: ` -: `^ process  i.3 5
      0       1      4      9       16
    2.5       3    3.5      4      4.5
22026.5 59874.1 162755 442413 1.2026e6

I there a tacit (verb) counterpart?  Actually, the verb above is a rough
transcription of a wicked verb I wrote several years ago,

   Process=. ,^:(0:`(<'`:'))&6@:([ ; <@:((,'0') ,&:< ])@:])"0

For what is worth,

   stp 111
   *: ` -: `^ process  i.3 5
   *: ` -: `^ Process  i.3 5
)
┌────────────────────────────┬─────┬──────────┬────────────┐
│Sentence                    │Space│Time      │Space * Time│
├────────────────────────────┼─────┼──────────┼────────────┤
│   *: ` -: `^ process  i.3 5│5184 │3.03879e_5│0.157531    │
├────────────────────────────┼─────┼──────────┼────────────┤
│   *: ` -: `^ Process  i.3 5│4416 │2.56204e_5│0.11314     │
└────────────────────────────┴─────┴──────────┴────────────┘

Beware, wicked entities are endangered species whose habitat has been
reduced by the relentless advance of civilization.  However, Process still
works (at least it runs on J901 beta-c).

Are there orthodox tacit versions of the verb process (and Process)?  In
theory, yes; in practice, ...

What about repeating arguments?  Since,

   process b.0
0 0 0
   *:` -: `^ process 3 1 0 3
|length error: process
|   *:`-:`^    process 3 1 0 3

However, as Raul suggested, one could reshape the gerund,

   *:` -: `^ (({.@:$@:] $ [) process ]) 3 1 0 3
9 0.5 1 9
   *:` -: `^ (({.@:$@:] $ [) process ]) i.4 5
      0       1      4      9       16
    2.5       3    3.5      4      4.5
22026.5 59874.1 162755 442413 1.2026e6
    225     256    289    324      361

I hope it helps.


On Fri, May 3, 2019 at 5:19 AM Piet de Jong <[email protected]> wrote:

> Thanks for pointing the problem with repeated items.
>
>  “respectively” (I looked at the code) appears to be  a long complicated
> explicitly defined conjunction.   I was hoping for something succinct and
> elegant that I could add to my bag of tricks (and understanding).
>
> > On 3 May 2019, at 7:04 pm, Ric Sherlock <[email protected]> wrote:
> >
> > I think /.~ works fine until there are repeated items. So
> >   g=: *:`-:`^
> >   c=: /.~
> >   g c 3 1 0 3   NB. probably not the desired result
> >  9 9
> >
> > 0.5 0
> >
> > 1 0
> >
> >
> > Using respectively works ok and also allows for dyadic verb use in the
> > gerund.
> >
> > c2=: respectively ]
> >
> > g c2 3 1 0 3
> >
> > 9 0.5 1 9
> >
> > g c2 i. 3 4
> >
> > 0 1 4 9
> >
> > 2 2.5 3 3.5
> >
> > 2980.96 8103.08 22026.5 59874.1
> >
> >
> >
> >
> > On Fri, May 3, 2019 at 8:16 PM Piet de Jong <[email protected]> wrote:
> >
> >> Following all the suggestions, the following seems to get close
> >>   g=. *: ` -: `^
> >>   c=. /.~
> >>
> >> g c i.3 4
> >> 0 2 4 6
> >>
> >> 2 2.5 3 3.5
> >>
> >> 16 18 20 22
> >>
> >>   $ g c i.3 4
> >> 3 1 4
> >>
> >> The only annoying thing are the final dimensions, fixed up with ,”2
> >>
> >>> On 3 May 2019, at 5:04 pm, Piet de Jong <[email protected]> wrote:
> >>>
> >>> c=:((128!:2)&.><)”0
> >>>
> >>> seems to work great.   Will have to work out exactly why it works —
> >> don’t understand the why  the rank 0 boxing makes things happen the
> right
> >> way.
> >>>
> >>>> On 3 May 2019, at 2:32 pm, Gilles Kirouac <[email protected]> wrote:
> >>>>
> >>>> or (not as simple)
> >>>>
> >>>> c=: (128!:2)&.><
> >>>>
> >>>> g c"0 y
> >>>>
> >>>> ┌─┬───┬─┐
> >>>>
> >>>> │9│0.5│1│
> >>>>
> >>>> └─┴───┴─┘
> >>>>
> >>>> Try removing "0
> >>>>
> >>>>
> >>>> Le 2019-05-02 à 22:35, 'Rob Hodgkinson' via Programming a écrit :
> >>>>> Hi Piet, not ignorant at all !
> >>>>>
> >>>>> Try using oblique (an obscure feature is that the u in u/. can be a
> >> gerund, in which case it is evoked cell wise);
> >>>>>
> >>>>> g=. *: ` -: `^
> >>>>> y=. 3 1 0
> >>>>> g /. y
> >>>>> 9
> >>>>> 0.5
> >>>>> 1
> >>>>>
> >>>>> Found in Section 15 of https://www.jsoftware.com/books/pdf/brief.pdf
> <
> >> https://www.jsoftware.com/books/pdf/brief.pdf>.
> >>>>>
> >>>>> HTH, Regards Rob
> >>>>>
> >>>>>> On 3 May 2019, at 10:59 am, pietdion <[email protected]> wrote:
> >>>>>>
> >>>>>> Hopefully not an ignorant question.
> >>>>>>
> >>>>>> Am looking for a simple (tacit, non complicated) construction (verb?
> >>>>>> adverb? conjunction?) “c" that takes a gerund and applies the
> >> successive
> >>>>>> verbs in the gerund to successive items.
> >>>>>>
> >>>>>> A simple example is
> >>>>>>
> >>>>>>  g=. *: ` -: `^
> >>>>>>  y=. 3 1 0
> >>>>>>  g  c  y
> >>>>>> 9  0.5  1
> >>>>>>
> >>>>>> What “c”  achieves this for arbitrary gerunds g's and y’s?
> >>>>>>
> >>>>>> I realise this can be done in a variety of explicit ways and  with
> the
> >>>>>> agenda construct.    All I can come up with is intricate
> >> constructions.
> >>>>>> Looking for something simple and direct.   Seems to have a lot of
> >> uses.
> >>>>>>
> ----------------------------------------------------------------------
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to