Dan and Linda, I will describe how I think of ic 1j2 . ic 1j2 is the ravel of a complex form of the Cartesian product of i: 1 and i: 2 .
Here, from the Vocabulary page for Catalogue { is a definition plus example of Cartesian product: CP=: {@(,&<) 0 1 CP 2 3 4 +---+---+---+ |0 2|0 3|0 4| +---+---+---+ |1 2|1 3|1 4| +---+---+---+ Then (i: 1) CP i: 2 +-----+-----+----+----+----+ |_1 _2|_1 _1|_1 0|_1 1|_1 2| +-----+-----+----+----+----+ |0 _2 |0 _1 |0 0 |0 1 |0 2 | +-----+-----+----+----+----+ |1 _2 |1 _1 |1 0 |1 1 |1 2 | +-----+-----+----+----+----+ j./&> (i: 1) CP i: 2 _1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2 My mind went straight to this last array. I wanted its ravel to be the result of ic 1j2 . Kip Sent from my iPad On Jan 20, 2013, at 9:43 PM, "Dan Bron" <j...@bron.us> wrote: > Linda wrote: >> ic=:[: , ([: i: 9&o.) j./ ([: i: 11&o.) >> ic2=: [: , j./&i:/@+. >> ic3=: 13 :'j./ i:+.y' > > Please post a description, in English, of the algorithm behind ic3. What is > that verb attempting to accomplish? In operational terms, how does it > transform its input to its output? > > If you can provide an analysis, similar to the one I posted yesterday, where > you describe how you came to believe that ic3 is equivalent to ic (or ic2, > whichever), that would be most helpful. Barring that, please provide a > description of the algorithm behind ic (or ic2), as you understand it, which > we could compare/contrast to your description of the algorithm underlying > ic3. > > In short: from my perspective, ic and ic3 are different verbs, and I have no > reason to believe that given identical inputs, they will produce identical > outputs (and, as you noticed, the J interpreter shares this perspective, at > least for certain inputs). I would like to understand why you believe > differently. > > Bear in mind I ask this not in order to help you repair ic3 (which is > trivial), but in order to understand your general approach to programming in > J. I would honestly like to teach you to fish, as it were, rather than > forcing you to continue to rely on others to catch fish for you. > > My first attempt at that was taking time and effort to write-up a formal > procedure for transforming ic to ic2, to see if it could help you meet your > goals of educating with J. I'm certainly willing to continue that effort in > good faith - if you are. > > -Dan > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm