Re: [Jprogramming] Selecting trains with m@.v

2019-12-08 Thread Jose Mario Quintana
> This is closer to what I am trying to do: > > (+1:)`*`%`(+2:)@.(0 , (1 + 2&|) , 3:)"0 [ 5 6 NB. fictional usage > 0.857143 56 This explicit verb seems to produce what you want, u=. 3 : '(+1:)`*`%`(+2:)@.((0,(1+2&|),3:) y) y'"0 u 5 6 0.857142857 56 Writing a tacit counterpar

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread 'Jim Russell' via Programming
As always Brian, I am impressed; and probably will be even more so after the time it will take me to understand the documents you and Jimmy referenced. Long ago I concluded that x (exp1;exp2;...;expn) y was just a way for smart j'ers to let beginners like me to compare the results of related e

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread Brian Schott
The expression X exp1;exp2;exp3 Y needs ()'s to be properly constructed as a 5 element "train": X (exp1;exp2;exp3) Y. As near as I can tell it is referenced in the following link. https://www.jsoftware.com/help/dictionary/dicte.htm On that page the reference is to the following page: https://ww

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread ethiejiesa via Programming
> is the following what you want ? > >1 2 3 (+ ; * ; -) 6 7 8 Not quite. The example in my original email was probably overly minimal to be completely unhelpful. This is closer to what I am trying to do: (+1:)`*`%`(+2:)@.(0 , (1 + 2&|) , 3:)"0 [ 5 6 NB. fictional usage 0.857143

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread 'Jim Russell' via Programming
Thank you. I may reply more in a year ot two when I have fully grokked Roger’s note in your reply! Wanting to be snippy in a complaint I was making to my local bank, I wanted to compare how many prime numbers my iPhone (using J) could calculate in the 15 seconds their cash machine took to read

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread Jimmy Gauvin
Hi, The first vocabulary is full of information. So much so that it is easy to overlook lots of "tasty tidbits". The answer your question " where is that first explained to the J Beginner ? " , it is not so much explained but rather demonstrated. I had to change my reading style from "passive assi

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread 'Jim Russell' via Programming
As shown throughout the Vocabulary. But where is that first explained to the J Beginner? > On Dec 7, 2019, at 1:08 PM, Jimmy Gauvin wrote: > > Hi, > > note also that the shape of the results can vary considerably : > > 1 2 3 (+ ; * ; - ; +/ ; ,&4 5) 6 7 8 > ┌──┬───┬┬───┬─

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread Jimmy Gauvin
Hi, note also that the shape of the results can vary considerably : 1 2 3 (+ ; * ; - ; +/ ; ,&4 5) 6 7 8 ┌──┬───┬┬───┬─┐ │7 9 11│6 14 24│_5 _5 _5│7 8 9│6 7 8 4 5 0 0 0 0│ │ │ ││8 9 10│6 7 8 4 5 4 5 0 0│ │ │ ││9 10 11│6 7

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread 'Jim Russell' via Programming
Does this shed any light on the mystery?? J Http Server |ill-formed name: null_ *** response not sent for ~addons/docs/help/dictionary/null *** html409 Conflict I had not seen any of the Safari/Reader errors included in my original message until just now, when I replied to it > On Dec 7, 20

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread 'Jim Russell' via Programming
Another rabbit hole… This expression format is used throught the original Iverson/Hui Vocabulary, and I had always been bothered that I had to figure out what was going on before I could get much value from the Vocabulary examples. To investigate what I had missed long ago, I was in JHS, and

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread 'Jim Russell' via Programming
Lovely! Not at all obvious (to me)until you do it with simple verbs. > On Dec 7, 2019, at 9:30 AM, Jimmy Gauvin wrote: > > Hi, > > is the following what you want ? > > 1 2 3 (+ ; * ; -) 6 7 8 > ┌──┬───┬┐ > │7 9 11│6 14 24│_5 _5 _5│ > └──┴───┴┘ > > > >> On

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread Henry Rich
You are right, it doesn't allow trains when v is a verb. Henry Rich On 12/6/2019 9:54 PM, ethiejiesa via Programming wrote: Am I just doing something silly? Or does @. really not support building trains when the right operand is a verb? Here is an overly minimal example of what I want:

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread Jimmy Gauvin
Hi, is the following what you want ? 1 2 3 (+ ; * ; -) 6 7 8 ┌──┬───┬┐ │7 9 11│6 14 24│_5 _5 _5│ └──┴───┴┘ On Fri, Dec 6, 2019 at 9:54 PM ethiejiesa via Programming < programm...@jsoftware.com> wrote: > Am I just doing something silly? Or does @. really not

[Jprogramming] Selecting trains with m@.v

2019-12-06 Thread ethiejiesa via Programming
Am I just doing something silly? Or does @. really not support building trains when the right operand is a verb? Here is an overly minimal example of what I want: (1:)`+`(1:)@.(0 1 2) 0 2 (1:)`+`(1:)@.(0 1 2"_) 0 |rank error | (1:)`+`(1:)@.(0 1 2"_)0 This is an obv