Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!rpi!bu.edu!wang!wdr From: wdr@wang.com (William Ricker) Newsgroups: comp.software-eng Subject: Re: AvAaA: Try APL descendant "J" Message-ID: Date: 16 May 91 15:48:02 GMT References: <16281.281f708f@levels.sait.edu.au> <16309.282b0e06@levels.sait.edu.au> Organization: Wang Labs, Lowell MA, USA Lines: 146 xtbjh@levels.sait.edu.au (behoffski) writes: >In article , wdr@wang.com (William Ricker) writes: >> Take a look in comp.lang.apl. The new language J, by Iverson Software Inc >> (yes, that Ken Iverson) has a regularized grammar modeled on Verbs,Nouns, >> Adverbs/adjectives, Conjunctions -- rather than Functors, Operators, Things. >> Refernces ACM SigAPL QuoteQuod a/k/a Proceedings APL'90, Iverson & Hui, >> "APL\?". >Interesting. You will be pleased to know that *the* first language >that I ever programmed in was a version of APL running on an IBM-370. ... >I'll try and find a copy of the APL proceedings that you referenced; >in the mean time, could you post a summary of Iverson's ideas, and >possibly even a summary of "Functors, Operators, Things?" I didn't dare try, so I sent a request off to the folks at Iverson Software, Inc., and received the following reply. I hope this helps. Roger Hui is the public spokesman and primary co-author (with Ken Iverson) of Iverson Software, Inc.'s software and journal articles. (Their domain address is an artifact more of their corporate ancestry & mail routing than current ownership, if I understand aright.) To get your own copy of J, FTP watserv1.waterloo.edu USER anonymous CD languages/apl/j DIR cd pc DIR BINARY GET j_pc_30.arc QUIT (there are other j/[machine] directories ... sun3, sun4, mips, 386ix etc.; a list of which are up-to-date is in the status document in apl/j.) --- bill wdr@[wang.]wang.com >From: hui@yrloc.ipsa.reuter.com (Roger Hui) Subject: J To: xtbjh@levels.sait.edu.au Date: Thu, 16 May 91 5:39:21 GMT Cc: ljdickey@watmath.waterloo.edu, wdr@elf.wang.com, rbe@yrloc.ipsa.reuter.com J is a dialect of APL specified by Ken Iverson's "A Dictionary of J" (21 pp.). The salient characteristics are that it is shareware, runs on a variety of machines (PC, Mac, Sun Sparc, Sun 3, MIPS, SGI, Atari ST, NeXT, IBM RS 6000, ...), uses only ASCII characters 0-127, and removes anomalous constructs from existing APL (e.g. bracket-semicolon indexing, del function defn) to result in a simple and consistent syntax. It has equivalents to data, functions, and operators found in existing APLs. The dictionary describes nouns (arrays), verbs (functions), adverbs (monadic operators), and conjunctions (dyadic operators). The new terminology is readily understandable by a wider audience, and has also been helpful in suggesting concepts from natural languages which are fruitful for investigation. Words in J are spelled with one or two letters from the ASCII alphabet; 2-letter words end in a period (.) or colon (:). The spelling scheme is more mnemonic that those in other APL dialects using special characters. For example, = equal < less than > larger than =. is (local assignment) <. lesser of >. larger of =: is (global assignment) <: lesser or equal >: larger or equal Those familiar with older APLs would already know some adverbs. For example, / is an adverb, and f/ is a derived verb which inserts f between the items of its argument. Thus +/ 3 4 5 6 is 3+4+5+6 is 18 */ 3 4 5 6 is 3*4*5*6 is 360 A conjunction takes 2 arguments and (usually) results in a verb. For example, one of the cases of the conjunction " is rank, wherein f"n is a verb which applies f to cells (subarrays) of the arguments according to n. A recent query to comp.lang.apl was on multiplying a 2 3 matrix M by a 2-element vector V. This can be accomplished by M *"1 0 V , meaning multiply the rank-1 objects on the left by the rank-0 objects on the right. & is another example of a conjunction, defined as follows (f,g are verbs; m,n,x,y are nouns): m&g y is m f y g&n y is y g n f&g y is f g y x f&g y is (g x) f g y Here are some common verbs defined using & : halve =. 0.5&* square =. ^&2 sqrt =. ^&0.5 norm =. sqrt & (+/) & square As the last example indicates, J permits any verb to be used as an argument to an adverb or conjunction. A fork is a sequence of 3 verbs, and a hook one of 2 verbs: (g h) y is y g h y x (g h) y is x g h y (f g h) y is (f y) g (h y) x (f g h) y is (x f y) g (x h y) For example, (+%)/1 1 1 1 1 computes a continued fractions approximation to the golden ratio, and mean=.+/ % # computes averages. Adverbs, conjunctions, and forks and hooks make possible a style of programming called tacit definition, so-called because verbs defined in this way makes no explicit reference to its arguments. Other authors call this functional programming or adverbial programming. See "Tacit Definition" by Hui/Iverson/McDonnell, to appear in APL91. In natural languages, a gerund is a verbal forms that can be used as a noun, as "programming" in "programming is an art". The ` (accent) conjunction converts verb arguments into their atomic representations. Gerunds are arrays of such atomic representations. Since gerunds are nouns, they can be manipulated by verbs, thus making verbs "first class objects". The conjunction `: derives a variety of useful verbs from gerunds, including if-then-else, do-until, case, and recursion. See "Gerunds and Representations", by Bernecky and Hui, to appear in APL91. The following publications are also relevant: K.E. Iverson, "A Dictionary of APL", APL Quote-Quad, Volume 18, Number 1, September 1987. Precursor to J. Hui/Iverson/McDonnell/Whitney, "APL\?", APL90 Conference Proceedings, APL Quote-Quad, Volumn 20, Number 4, July 1990. Introduced J; discussed some of the reasoning behind the design. Iverson, "Tangible Math and the ISI Dictionary of J", Iverson Software Inc. March 1991. Tangible Math is a set of math lessions using J. The dictionary is the language specification. Iverson, "Programming in J", Iverson Software Inc., March 1991. Introduction to programming. Includes J dictionary. McIntyre, "Mastering J", APL91 Conference Proceedings, to appear. Describes one long-time APLer's experience in learning J. ----------------------------------------------------------------- Roger Hui Iverson Software Inc., 33 Major Street, Toronto, Ontario M5S 2K9 (416) 925 6096 -- /s/ Bill Ricker wdr@wang.wang.com "The Freedom of the Press belongs to those who own one." *** Warning: This account is not authorized to express opinions. ***