Path: utzoo!mnetor!tmsoft!itcyyz!yrloc!rbe From: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) Newsgroups: comp.lang.apl Subject: Re: Some General Questions about J Keywords: n Message-ID: <1991Feb26.210503.2798@yrloc.ipsa.reuter.COM> Date: 26 Feb 91 21:05:03 GMT References: <1991Feb23.234505.5960@csi.uottawa.ca> Reply-To: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) Organization: I P Sharp Associates, Toronto Lines: 40 I won't try to deal with all your concerns about J vs apl, but here are two comments: a. character set: The apl character set is an ONGOING problem: Every new editor, printer, keyboard, etc., would need special tinkering to support it. Ergo, we give up and go ascii. b. hard-to-read squiggles: You get used to them, just as you got used to apl squiggles. For example, x#y is replicate or compression. $ is reshape (with slightly different semantics due to "item" orientation of J. c. (ok, so I can't count- that's why I use computers). how do I do reductions along specific axes, etc? Like this. Assume T is your rank 3 array: +/t gives you first axis summation +/"3 t would be the same. +/"2 t gives you second axis summation. Basically, it says: "apply plus reduction to the rank-2 objects of t". +/"1 t gives last axis reduction (sum each row of t). There are two reasons for abandoning the +/[k] approach of apl: a. brackets are syntactically anomalous, and are not functions, operators, or anything else that is generally applicable to apl. b. brackets have special and unique meanings for EACH primitive. You can't tell someone: foo[k] means thus and such. In J, the rank adverb ("k) has a specific and CONSISTENT meaning for all verbs, including user defined ones: Apply the verb/function to the rank k objects of the argument. Simple, straightforward, and consistent. See my paper on "An Introduction to Function Rank" in the acm sigapl apl88 conference proceedings (apl quote quad vol 18, no 2) for discussion of function rank in an apl environment. Bob Bernecky Snake Island Research Inc.