Re: [Jprogramming] Fine, I can't win, but J can.

2013-04-25 Thread Dan Bron
I hadn't seen that - thanks for the pointer! Please excuse typos; composed on a handheld device. On Apr 25, 2013, at 8:49 PM, Kenneth Lettow wrote: > Hey Dan, have you seen EEM's at play with J article? > http://www.jsoftware.com/jwiki/Doc/Articles/Play191 > > Ken > > > On Thu, Apr 25, 2013

Re: [Jprogramming] Fine, I can't win, but J can.

2013-04-25 Thread Kenneth Lettow
Hey Dan, have you seen EEM's at play with J article? http://www.jsoftware.com/jwiki/Doc/Articles/Play191 Ken On Thu, Apr 25, 2013 at 7:30 PM, Dan Bron wrote: > I'm playing the Game of Nim with a colleague. He's an old hand and knows > all the patterns by heart. I do not. I can't beat him. >

[Jprogramming] Fine, I can't win, but J can.

2013-04-25 Thread Dan Bron
I'm playing the Game of Nim with a colleague. He's an old hand and knows all the patterns by heart. I do not. I can't beat him. But I can do this: winNim =: (* 0&<)@(- (~:"1 ~:/)&.#:) So if you have a Nim board like this: 1 1 1 1 1 1 1 1 1 1 1 1

Re: [Jprogramming] rosettacode

2013-04-25 Thread Raul Miller
On Thu, Apr 25, 2013 at 12:54 PM, Linda Alvord wrote: > If there are 38 people in a line and every 4th on is killed, where would you > stand? As far away from that line as I could manage. -- Raul -- For information about J foru

Re: [Jprogramming] rosettacode

2013-04-25 Thread Linda Alvord
If there are 38 people in a line and every 4th on is killed, where would you stand? josephus =: dyad define NB. explicit form, assume executioner starts at position 0 NB. use: SKIP josephus NUMBER_OF_PRISONERS N =: y K =: N | x EXECUTIONER =: 0 PRISONERS =: i. N kill =: ] #~ (~

Re: [Jprogramming] key

2013-04-25 Thread Thomas Costigliola
In my experience I find that it is useful that the nub, self classify and key cell orderings are the same. On Thu, Apr 25, 2013 at 12:56 AM, Joey K Tuttle wrote: > I share this opinion (and the later caveats for use in APL... :) > > > On 2013/04/24 13:35 , Dan Bron wrote: > >> Occurrence in x.