On 4/3/07, Henry Rich <[EMAIL PROTECTED]> wrote:
Terrence,
Thank you for being what Fowler called "that pestilential
fellow the critical reader".
My pleasure. Thank you for producing a useful and thought-out
introduction to this language. The labs really dont take enough time
to elaborate on things. I was suffering through the labs, but as long
as I carefully read "J for C", I am doing fine.
1. 'cell size'
Agreed that I shouldn't have used that word. I have replaced
the first couple of sentences with
Each time you operate on an array, you decide the rank of the
cells to be operated on. The rank of the cells is not a
property of the array; rather, it indicates how you want to
group the atoms of the array for a single operation.
When you have decided to operate on cells of rank n, you can
then think of your noun as an array of n-cells; the shape of that
array of cells is called the frame of the noun relative to n-cells.
Is that better?
Yes, that is very clear.
2. Frame and shape
The way I read the table, my examples on the array with shape 4 5 6 show
frame 4 and shape 5 6, which is correct. Please show exactly where
I say frame 5 6 and shape 4 .
That was my misunderstanding, which Roger already caught. You didn't
say that...
3. Atoms vs single-item arrays
I hope you have seen from the other responses that it ain't so that
atoms have rank 1. They have rank 0 by definition, and you just have
to accept that.
yes, it appears that years of experience in implementing
array-processing languages has led to the conclusion that things be
that way. My crib sheet for the "Declarations" chapter now has:
- scalar == atom == rank 0 array
- shape of 0 is for an array. an atom's shape is an empty list
I'm a little sad that you have stopped going through the 'Introductory
Course in J' lab, because it could benefit from meticulous reading
too. If you get back to it I'll be happy to fix what you find.
playing with J (and the labs) is like playing in a Vegas casino. You
will be slaughtered if you did not spend time away from the table
getting solid theoretical underpinnings. I am going back through
"Declarations" and building a crib sheet (it follows). And then I will
move on with confidence through the next two sections.
- 0-cell: this *is* an atom. this is *not* an array
- 1-cell: rank-1 array, possibly containing 0 elements
- frame: a shape which, when the shape of the n-cell is concatenated,
will yield the shape of the noun
- negative-cell: an n-cell where abs(n) is the frame length
- If exactly one character is between the quotes, the value is an atom;
if none or more than one, the result is a list.
- scalar == atom == rank 0 array
- shape of 0 is for an array. an atom's shape is an empty list
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm