Re: [Jprogramming] More-than-binary Gray codes

2014-01-01 Thread Devon McCormick
As it turns out, my simple substitution appears to have been mistaken: it happened to work for 3 but fails for 4. It looks like the "2&^." argument to "under" does not vary according to the base. So, the base-n Gray code generator can be implemented like this: baseNGray=: 4 : '([:>[:(({. * #@])

Re: [Jprogramming] More-than-binary Gray codes

2013-12-22 Thread Raul Miller
One issue is this: i.@<.&.(3&^.) Notice that 3%^. is the right verb for the under conjunction. There's no simple way of passing the 3 in as an argument to that verb. Does that make sense? Thanks, -- Raul On Sun, Dec 22, 2013 at 10:28 PM, Devon McCormick wrote: > Hi Everybody - > > I was

[Jprogramming] More-than-binary Gray codes

2013-12-22 Thread Devon McCormick
Hi Everybody - I was recently thinking of a possible use for Gray codes that work in a base greater than 2. Searching my mail on this, I was led back to a discussion from 2006 that Dan Bron had kicked off by offering the generation and conversion of Gray codes as a puzzle. R. E. Boss, among othe