Re: [Jprogramming] Expression to generate sequ

2018-04-07 Thread 'Pascal Jasmin' via Programming
there is also, iota =: i. : (+ i.) 3 iota 5 3 4 5 6 7 ([ iota >:@-~)/ 3 7 3 4 5 6 7 3 iota _5 7 6 5 4 3 From: Joe Bogner To: programm...@jsoftware.com Sent: Friday, April 6, 2018 3:50 PM Subject: Re: [Jprogramming] Expression to generate sequ Ligh

[Jprogramming] Sliding Windows

2018-04-07 Thread Skip Cave
How do I implement this sliding window verb 'f'? Where is this kind of function described in the J documentation? Search keywords? 2 f 3 5 6 3 8 5 3 7 3 5 5 6 6 3 3 8 5 3 3 7 3 f 3 5 6 3 8 5 3 7 3 5 6 5 6 3 6 3 8 3 8 5 8 5 3 5 3 7 Skip Skip Cave

Re: [Jprogramming] Sliding Windows

2018-04-07 Thread Roger Hui
It's called "infix". 3 <\ 'abcdefg' ┌───┬───┬───┬───┬───┐ │abc│bcd│cde│def│efg│ └───┴───┴───┴───┴───┘ 3 <\ 7 5 $ 'the notorious lonesome stranger' ┌─┬─┬─┬─┬─┐ │the n│otori│ous l│oneso│me st│ │otori│ous l│oneso│me st│range│ │ous l│oneso│me st│range│rthe │ └─┴─┴

Re: [Jprogramming] Sliding Windows

2018-04-07 Thread Don Guinn
Change 2 < to , to get your exact result. On Sat, Apr 7, 2018, 10:03 AM Roger Hui wrote: > It's called "infix". > >3 <\ 'abcdefg' > ┌───┬───┬───┬───┬───┐ > │abc│bcd│cde│def│efg│ > └───┴───┴───┴───┴───┘ >3 <\ 7 5 $ 'the notorious lonesome stranger' > ┌─┬─┬─┬─┬─┐ > │the

Re: [Jprogramming] Sliding Windows

2018-04-07 Thread Raul Miller
f=: ]\ or f=: ,\ or f=: +\ I imagine... -- Raul On Sat, Apr 7, 2018 at 12:03 PM, Roger Hui wrote: > It's called "infix". > >3 <\ 'abcdefg' > ┌───┬───┬───┬───┬───┐ > │abc│bcd│cde│def│efg│ > └───┴───┴───┴───┴───┘ >3 <\ 7 5 $ 'the notorious lonesome stranger' > ┌─┬─┬

Re: [Jprogramming] Sliding Windows

2018-04-07 Thread Henry Rich
J's facilities for this kind of thing are described at http://code.jsoftware.com/wiki/Vocabulary/Loopless Henry Rich On 4/7/2018 11:57 AM, Skip Cave wrote: How do I implement this sliding window verb 'f'? Where is this kind of function described in the J documentation? Search keywords? 2 f 3

Re: [Jprogramming] Sliding Windows

2018-04-07 Thread Skip Cave
Ah, yes "infix". Thanks Roger. I knew it had to be something using "\" , but I couldn't remember how to do it, or what it was called. Skip Skip Cave Cave Consulting LLC On Sat, Apr 7, 2018 at 11:03 AM, Roger Hui wrote: > It's called "infix". > >3 <\ 'abcdefg' > ┌───┬───┬───┬───┬───┐ > │ab

Re: [Jprogramming] Sliding Windows

2018-04-07 Thread Skip Cave
Henry, The "Loopless" page is great!​ I have somehow overlooked that page on the Jsoftware.com site. It helps a lot in understanding the various repeated-operation primitives. Skip Skip Cave Cave Consulting LLC On Sat, Apr 7, 2018 at 11:39 AM, Henry Rich wrote: > J's facilities for this kind

Re: [Jprogramming] Expression to generate sequ

2018-04-07 Thread Devon McCormick
Thanks to everyone who answered - there were a few that were just what I needed. On Sat, Apr 7, 2018 at 6:48 AM, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > there is also, > > iota =: i. : (+ i.) > > > 3 iota 5 > 3 4 5 6 7 > > ([ iota >:@-~)/ 3 7 > 3 4 5 6 7 > > 3 io