Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!cs.utexas.edu!zaphod.mps.ohio-state.edu!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!csus.edu!sfsuvax1.sfsu.edu!emclean
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: Weaning  myself from Matlab: is APL a viable alternative for scientific programming and signal processing?
Message-ID: <1993Jan19.010343.25361@csus.edu>
Sender: news@csus.edu
Organization: San Francisco State University
References: <IBE1109.93Jan17152519@etbsun1.draper.com>
Date: Tue, 19 Jan 1993 01:03:43 GMT
Lines: 120

NB. In article <IBE1109.93Jan17152519@etbsun1.draper.comNB.  ibe1109@draper.com (Ira Ekhaus) writes:
NB. Hello,
NB. 
NB. My only knowledge of APL is that MATLAB is "similar", and I'm curious
NB. about APL.

NB. If you are interested in experimenting, consider an 
NB. alternative to APL, J, a shareware functional dialect of APL.
NB. One can call C from J and visa versa. I hope you will ftp
NB. to watserv1.waterloo.edu and fool around with the executable
NB. version of J running on your machine. And then if you are 
NB. interested, or curious, purchase ISI's documentation. 

NB. Below is a partial list of verbs (functions). Login as "anonymous" 
NB. with password "guest" and cd into "languages/apl/j/exec/*"
NB. 
NB. Once you have J running on your machine type 
NB. "0!:2 <'thismessagefilename'" (visual load) (without the"`s)
NB. "0!:3 <'thismessagefilename'" (silent load)
NB. and explore and have fun.
NB. 
NB. I doubt that I'm giving away the store by providing this
NB. partial list of commands. (Someone tell me if I am) since you'll
NB. need to reference ISI's documentation to actually write a program.
NB. 
NB. In particular, you'll need
NB. the "Dictionary of J" which includes some explanatory stuff,
NB. and either "Calculus" or "Programming in J" , some other ISI doc.
NB. The dictionary is $24, PIJ is $15 (I think maybe it's $18)
NB. and "Calculus" is $25 (again I'm not certain ). There is a $10 charge
NB. for postage. The $24 dictionary includes a disk which has an
NB. version of J running on the machine you specify.
NB. 
NB. Send your cheque to ISI , 33 Major Street , Toronto, Canada M5S 2K9.
NB. 
NB. BTW, the version running under windows has some nice window
NB. creating capabilities. Since J can call C and visa versa,
NB. J should be of interest to PC application programmers.
NB. 
NB. (ISI sells a competetively priced APL too, BTW.)
NB. BTW, I've got no financial interest here, just like to see  
NB. J catch on!!
NB. Here is one of my favorite programs, creating the legendre polys.
NB. NB is comment

   factors =. (%~ (-@<: , <:@+:))@ {.@$ 
   last2   =. (,&0@{. , 0&,.@}.)@( _2&{.)
   legendre =. ,.&0 , +/@(last2 * factors) 
   basis =. =/~@i. 2
   legendre ^:4 basis 
NB.    1     0     0     0     0     0
NB.    0     1     0     0     0     0
NB. _0.5     0   1.5     0     0     0
NB.    0  _1.5     0   2.5     0     0
NB.0.375     0 _3.75     0 4.375     0
NB.    0 1.875     0 _8.75     0 7.875
   
NB. Cheers, Emmett

NB. left is monadic, right is dyadic.
box =. less_than =. <
floor =. lesser_of =. <.
decrem =. less_or_equal =. <:
open =. larger_than =. >
increm =. larger_or_equal
NB. negative_sign =. infinity =. _  NB.  nouns
indeterminate =. _.
infinity =. _:  NB. verb
conjugate =. plus =. +
gcd =. or =. +.
double =. not_or =. +:
signum=.times =. *
lcm =. and =. *.
square =. not_and =. *:
negate =. minus =. -
not =. less =. -.
halve =. match =. -:
reciprocal =. divide =. %
matrix_inv =. mat_divide =. %.
sqrt =. root =. %:
exponential =. power =. ^
natural_log =.  log =. ^.
power =. chain =. ^:
shape =. shape_of =. $
suite =. $.
self_reference =. $:
both=.cross=.evoke =. ~
nub =. ~.
nub_sieve =. not_equal
magnitude =. residue =. |
reverse =. rotate =. |.
transpose =. |:
ravel =. append_items =. ,
ravel_items =. append =. ,.
itemize =. laminate =. ,:
raze =. link =. ;
cut =. ;.
word_formation =. ;:
tally =. copy =. #
base2=.base =. #.
antibase2 =. antibase =. #:
factorial =. outof =. !
insert =. table =. /
prefix =. infix =. \
grade_up =. /:
grade_down =. \:
sort_asend =. /:~
sort_desend =. \:~
catalogue =. from =. {
head =. take =. {.
tail =. {:
amend =. }
behead =. drop =. }.
curtail =. }:
agenda =. @.
format =. ":
at =. @

agenda =. @.

