Re: [Jprogramming] An easy one

2016-07-05 Thread R.E. Boss
too easy *//.~q: 4200 8 3 25 7 R.E. Boss > -Original Message- > From: Programming [mailto:programming-boun...@forums.jsoftware.com] > On Behalf Of Kip Murray > Sent: maandag 4 juli 2016 23:46 > To: programm...@jsoftware.com > Subject: [Jprogramming] An easy

Re: [Jprogramming] An easy one

2016-07-05 Thread Kip Murray
Notice my specification had (q:) "outside". Ric's brilliant solution meets my specification. --Kip On Tuesday, July 5, 2016, Martin Kreuzer wrote: > Bill - Thanks; that's quite a shortcut -- my negligence: wasn't aware (q:) > had also a dyadic use ... > > The closest I could get toward that ve

Re: [Jprogramming] An easy one

2016-07-05 Thread Martin Kreuzer
Bill - Thanks; that's quite a shortcut -- my negligence: wasn't aware (q:) had also a dyadic use ... The closest I could get toward that verb would now be red=. [: ^/ __ & q: red 4200 8 3 25 7 (didn't manage to keep (q:) "outside" ...) -M At 2016-07-05 11:10, you wrote: q: in ^/__ q:

Re: [Jprogramming] An easy one

2016-07-05 Thread bill lam
q: in ^/__ q:4200 is dyad executed as ^/ ( __ q: 4200 ) Вт, 05 июл 2016, Martin Kreuzer написал(а): > Please be patient while I elaborate; > > Ric - > - > Looking at your solution, I first read up on "Key" (x u /.. y) and came up > with this example: > >2 3 2 3 3 (2&|)/. 9 5 7 6 4 >

Re: [Jprogramming] An easy one

2016-07-05 Thread Martin Kreuzer
Please be patient while I elaborate; Ric - - Looking at your solution, I first read up on "Key" (x u /.. y) and came up with this example: 2 3 2 3 3 (2&|)/. 9 5 7 6 4 1 1 0 1 0 0 which I interpreted as * group the list on the left (2 2) (3 3 3), then * partition the list on the right a

Re: [Jprogramming] An easy one

2016-07-04 Thread Don Guinn
^/__ q:4200 8 3 25 7 On Mon, Jul 4, 2016 at 3:48 PM, Ric Sherlock wrote: > How's this? >*//.~ q: 4200 > 8 3 25 7 > > On Tue, Jul 5, 2016 at 9:46 AM, Kip Murray wrote: > > > Consider > > > > q: 4200 > > 2 2 2 3 5 5 7 > > > > How would you "reduce" this to 8 3 25 7 ? > > Write the

Re: [Jprogramming] An easy one

2016-07-04 Thread Ric Sherlock
How's this? *//.~ q: 4200 8 3 25 7 On Tue, Jul 5, 2016 at 9:46 AM, Kip Murray wrote: > Consider > > q: 4200 > 2 2 2 3 5 5 7 > > How would you "reduce" this to 8 3 25 7 ? > Write the verb red: > > red q: 4200 > 8 3 25 7 > > --Kip Murray > > > > -- > Sent from Gmail Mobile > ---

[Jprogramming] An easy one

2016-07-04 Thread Kip Murray
Consider q: 4200 2 2 2 3 5 5 7 How would you "reduce" this to 8 3 25 7 ? Write the verb red: red q: 4200 8 3 25 7 --Kip Murray -- Sent from Gmail Mobile -- For information about J forums see http://www.jsoftware

Re: [Jprogramming] An easy one

2014-10-19 Thread Nollaig MacKenzie
I had thought the notion I had for pnm: (}: (^ * ^~) }.)@(p:@x:@i.) would be slower than prh: 2 */@(^ |.)\ p:@x:@i. But they turn out not very different: (100) 6!:2 'prh 40' 0.00277307 (100) 6!:2 'pnm 40' 0.00263127 9!:14 '' j701/2011-01-10/11:25 build: Feb

Re: [Jprogramming] An easy one

2014-10-17 Thread 'Pascal Jasmin' via Programming
there is also: 2 (^~ * ^)/\ p: i.6x 72 30375 1313046875 38532504363714053 61870237399093306018139447 which has a winking cat power :P From: Roger Hui To: Programming forum Sent: Friday, October 17, 2014 7:49 PM Subject: Re: [Jprogramming] An easy one

Re: [Jprogramming] An easy one

2014-10-17 Thread Roger Hui
2 */@(^|.)\ p: i.6x 72 30375 1313046875 38532504363714053 61870237399093306018139447 On Fri, Oct 17, 2014 at 4:30 PM, Kip Murray wrote: > 72 30375 1313046875 > > The first of these numbers is (2^3) * (3^2) , the second is (3^5) * (5^3), > and the third is (5^7) * (7^5) . You see the pattern

Re: [Jprogramming] An easy one

2014-10-17 Thread Nollaig MacKenzie
If one can take 2 3 5 and 3 5 7 as given, this might do: */2 3 5x (^ ,: ^~) 3 5 7x If it was "do this for the first N primes", it would be a little more complicated. On 2014.10.17 18:30:14, you, the extraordinary Kip Murray, spake thus: > > 72 30375 1313046875 > > The first of these number

[Jprogramming] An easy one

2014-10-17 Thread Kip Murray
72 30375 1313046875 The first of these numbers is (2^3) * (3^2) , the second is (3^5) * (5^3), and the third is (5^7) * (7^5) . You see the pattern involving successive primes. Write a J expression to produce the above list. --Kip Murray -- Sent from Gmail Mobile