Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!utzoo!censor!geac!itcyyz!yrloc!hui
From: hui@yrloc.ipsa.reuter.COM (Roger Hui)
Subject: Re: learning  apl and j
Message-ID: <1992Nov1.153704.2263@yrloc.ipsa.reuter.COM>
Organization: Iverson Software Inc.
References: <BwvqCp.KFC@news.cso.uiuc.edu>
Date: Sun, 1 Nov 92 15:37:04 GMT

Richard J. Gaylord writes:
 
> ken iverson's spiral bound manuals for j are very nice looking. i also am
> enjoying them now since i'm taking a better attitude towards them then i
> did before [ie., i quit bitchingabout what his books are not and i'm
> focusing on using them to learn about j]
 
> however they have two problems:
 
> (1) although iverson says it is important to know how to read a language
> in order to learn out to write it [and i agree], ironically his j books
> require you to be sitting at a computer while you read them because there
> are exercises with no solutions given. i want to be able to read a book
> wherever i am . even if i have a pocket computer, i don't want to be
> staring at a screen or punching keys while i'm trying to read and think
> about what i'm reading. ...
 
By "reading" Ken probably meant "thoughtful reading", and exercises
with no provided solutions should provoke more thought than simply
laying everything out.  It would be helpful if you can point to
specific places in the books where you feel exercises are overdone.
The "Dictionary of J" has examples throughout, and 14 pages of complete
dialogs with the computer.  "An Introduction to J" and "Programming in J" 
do have lots of exercises, but they also contain many complete dialogs.  
"Introduction" has 15 pages of exercises collected at the back, and 30 
pages of exposition and dialogs; "Programming" has exercises interspersed 
with exposition and dialogs, with at least as much of the latter as of 
the former.  Surely you don't argue that exercises should be eliminated 
altogether?
 
Moreover, although it would be helpful to have a computer when doing
the exercises, there is nothing to say that the exercises _require_
a computer.  If the reader has understood what has gone on before,
s/he should be able to make a good stab at the answers unaided by automata.
Chapter 5 of "Programming in J" is entitled "Experiments"; during the
times when a computer is unavailable, one can fruitfully make them
thought experiments.  (For example, the experiments are not random,
and reflecting on the progression of them gives an idea of what the
author is trying to get across.)
 
> (2) the j books really only show code fragements illustrating  functions
> and operators [this is also true of most apl books]. there is little code
> given for more complicated programs [like the game of life or neural nets
> or other interesting things]. since the literature of j and even apl, is
> pretty sparse, it is difficult to find examples of real programs [its one
> of the reasons i like smillie's statistics and j paper].
 
> this is also a bit ironic since iverson says [and i emphatically agree]
> that the language determines how one thinks.  what is needed is examples
> of using j and apl to solve non-one line problems [ i love one-liners but
> many problems require more than just one-liner programs]
 
One-liners and "code fragments" in J often solve problems which require
pages of code in other languages.  For example, the Game of Life that
you mentioned can be solved in one line (E.E. McDonnell, "Life: Nasty,
Brutish, and Short", APL88 Conference Proceedings).  In any case,
I disagree that there is little code in the books for more complicated
programs.  The tutorials in the dictionary solve non-trivial problems.
Chapter 6 of "Programming in J", entitled "Writing Programs",
guides the reader through the developing of several applications.
"An Implementaton of J" has numerous examples of complete, non-trivial
programs, in the form of models of primitives (": on boxed arrays,
boxed/string/tree/linear representations, matrix inverse, monad and
dyad ?, etc.)
 
> finally, to contribute to another thread in this group, , if you want to
> know the state of health of any language just go to the bookstore and
> check out the books written in or about the language. we all know what it
> says about apl and j.
 
> tutorials and conferences and technical articles and netgroups just don't
> reach enough people. there needs to be books written in about apl and j
> [with  good code showing how to solve problems people want to solve] if
> these languages are going to stay alive of come alive. perhaps people who
> want to maintain or improve the health of their language of choice should
> write a book on that language [that's what i'm doing].
 
To criticize Ken for writing only a certain kind of books is like criticizing 
Shakespeare for writing only plays and sonnets.  Iverson Software Inc. does 
not have a monopoly on books on J.  If you feel that you have a book in you, 
esp. if it is a "better" book, we encourage you to proceed.

------------------------------------
Roger Hui, Iverson Software Inc., 33 Major Street, Toronto, Ontario  M5S 2K9
Phone: (416) 925 6096;  Fax: (416) 488 7559
