No, I don't mean "array or scalar", I meant "array".
Let me cite two sources:  

0. Dyalog APL Language Reference/Variables/Arrays: - 
A Dyalog APL data structure is called an array. ... An array 
may have 0 or more axes.

1. ISO/IEC 13751-2001, ISO Standard on Extended APL,
Section 5.3.2: Scalar: An array whose rank is zero.

As well, in practice, if a scalar in APL is if not an array, 
then when you talk about APL you'd be constantly saying
"array or scalar" rather than just "array".   (I was
once asked by non-mathematicians why 1 is not
a prime.  After 5 seconds of thought I said, 
"because it makes lots of statements simpler".  
(As it is, you already have statements in math of the 
sort "let n be an odd prime".))

In APL, if a "value" can only be an array, what word or
words would you use when you need to say "the x of
a phrase", when the phrase can be +/ or +/ 1 2 3
or . or ¨?

Reading your statements about "variable" in APL,
with descriptions of quad-nc, artificial restrictions on
reassignment, quad-ex, etc. etc.,   it strikes me that
in contrast the meanings of "noun" and "pronoun"
are simpler and more precise (less variable ...) than
in APL. Even more so in any APLs which do not
allow names be assigned to a function via ← .
(Then functions can only be named as a side effect
of ⎕fx or of an edit session.)  One more thing:
Dyalog APL, which does allow sum←+/, does not
allow each←¨ .  Explain that one.



----- Original Message -----
From: Ian Clark <[email protected]>
Date: Monday, October 25, 2010 0:38
Subject: Re: [Jgeneral] "J In A Day" --crits please
To: General forum <[email protected]>

> Roger,
> 
> I'd call sum a "variable" in APL if-and-only-if ([]NC 'sum') 
> returns 2.
> 
> In Dyalog APL (I don't have it installed on my Mac) I seem to recall
> you can indeed write:
>       sum←+
> but  []NC 'sum' would afterwards return 3, telling me it's 
> a function
> (...whatever else it might have been before).
> 
> So... "what do you call a name in APL whose referent is a function?"
> -- A function name.
> 
> Moreover I think most APLs won't let you change "sum", say, from a
> variable name to a function name by reassigning it. Even if functional
> assignment is permitted. The statement (sum←+) causes an error 
> if sum
> is already defined in the workspace as a variable, and you haven't
> freed-up the name 'sum' for reuse by localisation or []EX.
> 
> I use "value" (...but only in an APL context, let me emphasise) to
> mean "something that can be assigned to a variable" (...and it still
> remains a variable). I think a lot of APLers would agree with that.
> It's a more restricted meaning of "value" than you imply in the J
> context, which it seems to me means anything acceptable to the right
> of a copula. Or, more precisely, any entity that is returned by
> evaluating a phrase which can validly stand to the right of a copula.
> 
> You say that "noun" in J corresponds directly and exactly with "array"
> in APL. Was that a mistake... don't you mean "array or scalar"?
> (...commonly expressed as "vector or scalar" -- "array" not 
> being a
> proper APL term, and [APL] "vector" not being restricted to 1-D
> arrays.) Surely you don't mean me to infer that 99 is not a noun 
> in J
> because it is not an "array" in APL?
> 
> I'm not interested in challenging Ken's appeal to his implicit
> understanding of English Grammar (which I deny is necessarily 
> mine, or
> indeed anyone else's) to convey programming ideas. He's allowed 
> to do
> that. I just want a precise enough notion of "noun/pronoun" -- 
> as it
> applies to J -- so I can point to something in J code and say with
> confidence "that's a noun" or "that's a pronoun".
> 
> Ian
> 
> 
> 2010/10/25 Roger Hui <[email protected]>:
> >> But Ken talks of "analogies", and seems to use the word "noun"
> >> to mean a value or quantity: the result of an expression, not the
> >> variable -- or named memory location -- it's stored in. What, 
> in J,
> >> corresponds to an APL "variable"?
> >
> > "Noun" in J does not mean value.  It corresponds
> > directly and exactly to "array" in APL.  A value can
> > be a verb (function), for example, "the value of the
> > sentence +/ is a verb that does summation".
> >
> > Regarding your last question, It depends on how
> > "variable" is used in APL.  If you say sum←+/ 2 3 4,
> > I think you'd call "sum" a variable.  But if you say
> > sum←+/, is "sum" still a variable?  If not, what is
> > the difference, and what do you call a name in APL
> > whose referent is a function?  If yes, doesn't it
> > sound jarring to your ears?  (It does to mine.)
> >
> > And, a question Ken used to ask:  if sum←1 2 3,
> > what is variable about "sum"?
> >
> > Some APL texts also calls .5 and 1 2 3 and 'abc'
> > "variables, that is, used "variable" and "array"
> > as synonyms.  Ken's question is even more pertinent
> > in those cases:  If ever .5 has a different value
> > ("varied"), I expect to get system errors shortly
> > thereafter.
> >
> > There is a table in the dictionary section II. Grammar:
> > http://www.jsoftware.com/help/dictionary/dict2.htm
> >
> > PARTS of SPEECH
> >
> > 50 fahrenheit           Nouns/Pronouns
> > + - * % bump    Verbs/Proverbs
> > / \     Adverbs
> > &       Conjunction
> > ( )     Punctuation
> > =:      Copula
> >
> >
> >
> > ----- Original Message -----
> > From: Ian Clark <[email protected]>
> > Date: Sunday, October 24, 2010 12:21
> > Subject: [Jgeneral] "J In A Day" --crits please
> > To: General forum <[email protected]>
> >
> >> First draft of an article for eventual submission to VECTOR 
> entitled>> "J In A Day".
> >>
> >> http://www.jsoftware.com/jwiki/JinaDay
> >>
> >> It is "work-in-progress". It represents an "alpha" offering, 
> not a
> >> "release" or "publication". It's aimed squarely at the APLer who
> >> doesn't know any J.
> >>
> >> There won't be many such on this list. But right now I'm keen 
> to get
> >> the J right.
> >>
> >> The prevalent message to APLers coming to J is: un-learn everything
> >> you know about APL (it's not helpful) and learn J from first
> >> principles. I think this erects an unnecessary barrier to the
> >> dwindling(?) band of APLers ignorant of J.
> >>
> >> Of course the barriers may be there anyway. I recall my first 
> exposure>> to J aroused antipathy in me. I can't quite remember 
> why. A Kuhnian
> >> paradigm-shift may be inescapable--or at least the need for 
> one. The
> >> article deliberately avoids being starry-eyed so as not to 
> raise the
> >> APLer's hackles. But this is not meant as provocation to the 
> J-er.
> >>
> >> There's a fairly defiant "admonition" (as MoinMoin calls it) 
> to J
> >> experts -- but don't be put off. I would really appreciate your
> >> comments. So get your anoraks on... ;)
> >>
> >> Of course, if an APL-er knowing absolutely no J were to work 
> through>> it, and confirm (or deny) it was of use to them... 
> that would
> >> get me
> >> on like 7-league boots.
> >>
> >> BTW I use the J terms "proverb" and "pronoun" in it. I need to
> >> know if
> >> I'm using them correctly. See my separate posting.
> >>
> >> Thanks, Brian, for the Iverson ref. From the horse's mouth, 
> so to
> >> speak. But Ken talks of "analogies", and seems to use the 
> word "noun"
> >> to mean a value or quantity: the result of an expression, not the
> >> variable -- or named memory location -- it's stored in. What, 
> in J,
> >> corresponds to an APL "variable"?
> >>
> >> Ian
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to