a. In J "noun" is a synonym for "array".  
A statement such as "every noun is an array" is 
misleading as it leaves open the possibility that 
there are some arrays which are not nouns, like 
saying "every man is an animal".

b. The proposed use of "dimension" to denote the 
rank of an array and also a particular axis of an 
array conflicts with its usage in mathematics, 
physics, and everyday life.  It is worse than if you 
choose a totally unrelated word, such as "foosbuz". 
As proposed, 

   dimension 4 array            dimension 4 x
   dimension 4 of the array     dimension 4 of x

are all valid statements but require careful
interpretation (and sharp ears) to distinguish.

As well, it leads to ambiguity in a phrase like 
"the dimensions of the arrays".  If the reader can 
assume that the writer has written carefully, then 
in the phrase "dimensions" means what we now call 
the ranks of the arrays.  If not, then it can also 
mean what we now call the shapes of the arrays.  
(See g. below.)

c. The description contains the following statements
which are inapplicable to atoms:

   A dimension n noun is simply a list of dimension 
   n-1 nouns of the same shape.  

   the shape of an array is the number of items 
   in the list catenated with shape of the items

d. I don't understand what is meant by:

   Each time we form a list, we add to the set 
   of axes over which the array is defined.

Let's say I form a list by doing  i.5  or  3 4 5 6 .
How have I added to the sets of axes over which 
the arrays are defined?  What are the arrays 
whose axes are being added to?

e. In the dictionary "frame" is part of the shape
of an array.  The proposed usage is different,
and leads to repetitions of the phrases "the shape 
of the frame", "frame shape", etc.

f. The description has the statement:

   In general, the result shape is shape (shape 
   of frame), (shape of result applied to the 
   cell shape).

- Is there a typo?  That is, should the word "shape"
immediately before the first left paren be omitted?
- How does "result" or "shape of result" apply to 
"the cell shape"?

g. The description has the statement:

   The dimensions of the result will depend
   on the verbs, the rank specification and the 
   dimensions of the data arrays.

Is there a typo?  In the proposed usage of
dimension "the result" can only have one dimension
(what we now call rank), but in common everyday 
usage it can have dimensions (what we now call 
shape).



----- Original Message -----
From: Fraser Jackson <[EMAIL PROTECTED]>
Date: Tuesday, April 3, 2007 5:26 pm
Subject: Re: [Jgeneral] "J for C programmers" editorial corrections

> I recently attempted to describe some features of J to a group of 
> expert R 
> programmers.  In the process it seemed essential to emphasize two 
> things.
> 
> 
> (1) In J every noun is an array
> 
> (2) The concept of rank provides an extraordinary, powerful, 
> consistent 
> mechanism for controlling all interactions between functions and data.
> 
> 
> 
> When every data object is an array the number of axes or the 
> conventional 
> concept of dimension of the array specifies an important attribute 
> of the 
> data.  Oleg suggested we should give more emphasis to both the 
> terms, axes 
> and dimension.  I agree.
> 
> 
> 
> The atoms - numbers, characters, boxes have attributes of their 
> own.  In J 
> it is their type.
> 
> 
> 
> An atom is a noun of dimension 0.  It has empty shape.
> 
> 
> 
> A vector is defined in the DoJ as a list of atoms.  It has 
> dimension 1.  Its 
> items have an empty shape.
> 
> Its shape is a single element vector, which is simply the number 
> of items 
> (tally) in the list.
> 
> 
> 
> A dimension n noun is simply a list of dimension n-1 nouns of the 
> same 
> shape.  Each time we form a list, we add to the set of axes over 
> which the 
> array is defined.  Each atom in the array becomes a value at some 
> point in a 
> discrete n dimensional space.
> 
> 
> 
> I think Oleg suggests referring to the location in the shape 
> vector as the 
> axis.  For most high dimensional nouns it is essential to be able 
> to refer 
> to specific axes.  Using axis for that is consistent with common 
> usage in 
> many contexts.
> 
> 
> 
> In the recursive style above the shape of an array is the number 
> of items in 
> the list  catenated with shape of the items.
> 
> 
> 
> Using dimension, axis and shape in this way enables a clear 
> specification of 
> different attributes of an array.  It is different from the DoJ 
> which uses 
> the term rank for what I have called dimension.  That causes some 
> confusion 
> for reasons outlined below.
> 
> 
> 
> Second, the rank conjunction (and I believe the rank concept) 
> should be 
> regarded as the means of specifying exactly how any verb(function) 
> is 
> applied to the array(s) in its argument(s).  It provides a clear 
> tool for 
> identifying how elements from an array are used in function 
> execution, and 
> for determining the shape of the result of the function.
> 
> 
> 
> In the DoJ rank is used three ways.  It is used for the 
> conjunction, it is 
> used to specify the dimension in the sense above (II.A) and it is 
> used to 
> specify the dimension of a function argument or arguments(II.B).  
> I have the 
> greatest respect for the years of careful work which Ken and Roger 
> have put 
> into the DoJ but I think the word rank is used for too many 
> related but 
> distinct ideas.
> 
> 
> 
> The rank conjunction specifies the cells to which a verb is 
> applied.  In DoJ 
> II.B the rank of a verb specifies the dimension of cells to which 
> it is 
> applied with  "The ranks of a verb merely place upper limits on 
> the ranks of 
> the cells to which it applies; its domain may include arguments of 
> lower 
> rank."    Extension to higher dimension arrays is automatic.  If 
> the verb is 
> of rank k  and the dimension of the array is n then the shape of 
> the frame 
> is a prefix of  the shape vector of the result.
> 
> 
> 
> The frame and the cell create a partition of the axes of the 
> array.  The 
> dimension of the frame is the number of axes not in the cell.  By 
> permitting 
> both positive and negative numbers in the rank specification the 
> method of 
> selecting elements from the arrays is enriched and avoids prior 
> specification of the dimension of an array.
> 
> 
> 
> The rank _ means the frame has an empty shape.
> 
> Rank _1 means it has shape the first element of the shape of the array
> 
> Rank _2 means it has the shape of the first two elements of the 
> shape array.
> 
> There are clear conventions when    (-the frame dimension) exceeds 
> the array 
> dimension.
> 
> 
> 
> In general, the result shape is shape (shape of frame), (shape of 
> result 
> applied to the cell shape).
> 
> 
> 
> For the application of any verb the ranks specify how elements 
> will be 
> selected from the arguments.  The elements selected are arrays of 
> specific 
> dimensions.  Keeping the dimension, axes and shape of the 
> arguments with 
> their own specific terms is important if we want to simplify the 
> discussion 
> of the way in which verbs interact with them.  For that the 
> concepts of 
> rank, frame and cell are central.
> 
> 
> 
> In the context of a J sentence both the rank of the verb and the 
> dimensions 
> of the data arrays are important.  The dimensions of the result 
> will depend 
> on the verbs, the rank specification and the dimensions of the 
> data arrays. 
> Restricting rank to refer to ways in which elements are selected 
> and 
> processed by our verbs helps clarify detailed specification of the 
> algorithms we want executed.   Of course one of the great features 
> of J is 
> that for many verbs the default specification of the ranks is 
> exactly what 
> we want.
> 
> 
> 
> Fraser
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to