home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / apl / 1389 < prev    next >
Encoding:
Text File  |  1993-01-27  |  5.4 KB  |  112 lines

  1. Newsgroups: comp.lang.apl
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!mailgzrz.TU-Berlin.DE!math.fu-berlin.de!ira.uka.de!yale.edu!newsserver.jvnc.net!darwin.sura.net!gatech!purdue!mentor.cc.purdue.edu!mentor!weg
  3. From: weg@mace.cc.purdue.edu (Eythan Weg)
  4. Subject: Re: Weaning  myself from Matlab: is APL a viable alternative for scientific programming and signal processing?
  5. In-Reply-To: andrew@rentec.com's message of 20 Jan 93 22:33:21 GMT
  6. Message-ID: <WEG.93Jan26115205@mace.cc.purdue.edu>
  7. Sender: news@mentor.cc.purdue.edu (USENET News)
  8. Organization: Purdue University
  9. References: <IBE1109.93Jan17152519@etbsun1.draper.com>
  10.     <1993Jan19.012451.9402@csi.jpl.nasa.gov>
  11.     <WEG.93Jan19140548@mace.cc.purdue.edu> <1502@kepler1.rentec.com>
  12. Date: Tue, 26 Jan 1993 16:52:05 GMT
  13. Lines: 97
  14.  
  15. In article <1502@kepler1.rentec.com> andrew@rentec.com (Andrew Mullhaupt) writes:
  16.  
  17.    In article <WEG.93Jan19140548@mace.cc.purdue.edu> weg@mace.cc.purdue.edu (Eythan Weg) writes:
  18.  
  19.    >Can someone try to build a linear algebra (for example) version of J?
  20.    >It seems to be very simple had I known C.  The components are there,
  21.    >free, as I am told by this group.  Is it not a matter of compilation
  22.    >with few extra defintions for LinkJ?  So, where is your hacking
  23.    >spirit?  Any volunteers?
  24.  
  25.  
  26.    This may require a little more than ability to program in C. The best
  27.    widely available code for numerical linear algebra is in FORTRAN, and
  28.    it is quite possible to add these as linked routines to J, but this is
  29.    not really the desired effect. What is presumably a better goal is to
  30.    integrate these functions into J in a way sensible to J, (if possible).
  31.  
  32.    For example, matrix division is a very useful way of using a least
  33.    squares algorithm from within APl, but not an ideal way. Often, it would
  34.    be nice to have the QR decomposition itself, or the SVD. The point here is
  35.    that lots of numerical linear algebra comes in functions with more than
  36.    one input and output - often the outputs have structure. This means
  37.    thinking through the numerical linear algebra _and_ the useful ways of
  38.    manipulating the result structures.
  39.  
  40.    Another issue is the transpose/performance issue derived from the column
  41.    major orientation of FORTRAN. It is trivial to transpose (out of place)
  42.    the inputs and outputs of all arguments to the outboard functions, but this
  43.    is often a big waste of time and space. This can be tricky if you want
  44.    to do a real nice job.
  45.  
  46. The context of the original post was Matlab saying, if I recall
  47. correctly, that APL is powerful in expression but weak in certain
  48. standard computing tasks.  Hence my suggestion was guided by practical
  49. considerations. I certainly agree that integration of a new feature
  50. into the language should be in the latter spirit.  But the external
  51. facilities in J (and in particular 10!:) are provided (in my view) in
  52. provisional manner, inviting the type of patches I suggested.  What I
  53. mean is that there are or perhaps should be two layers in J: the
  54. cannonized (blessed by ISI) and the more opportunistic or
  55. cannibalistic.
  56.  
  57. As for the rows vs. columns issue, if the implementor cares enough
  58. she/he would be more careful in translating.  After all the two
  59. representations are isomorphic.
  60.  
  61.    And no. I don't volunteer.
  62.  
  63. This is really too bad.  From your posting history I would have
  64. thought, a contribution on your part would be a tasty piece of cake.
  65.  
  66.  
  67. In article <1993Jan20.160000.10660@Princeton.EDU> bathurst@phoenix.Princeton.EDU (Bruce Bathurst) writes:
  68.  
  69.    weg@mace.cc.purdue.edu (Eythan Weg) writes:
  70.  
  71.    >Can someone try to build a linear algebra (for example) version of J?
  72.  
  73.    The one aspect of APL (or J) that I haven't seen mentioned in this
  74.    thread is its flexibility.  If one is dealing with a limited class of
  75.    problems, such as those described with linear algebra or linguistic
  76.    rules, there is often a language designed for those problems.  APL is
  77.    a language designed to describe more general algorithms.
  78.  
  79. Correct.  But then again familiarity with an environment has some
  80. influence in the choice of language.  If your problem does not require
  81. state of the art execution speed, or is not too esoteric, requiring
  82. special tools then you are justifyably tempted to work with the
  83. familiar.  
  84.    .
  85.    .
  86.    .
  87.    .
  88.    ........
  89.    IMO, J has not discarded the one feature impeding APL's popularity:
  90.    its intimate link with an interpretive environment from the 1960's.
  91.    APL might be seen in a better light if it were far more closely
  92.    connected to each computer's native operating system, the was AWK is
  93.    connected to UNIX and C.  (The code itself would still be portable.)
  94.  
  95. I am not sure I got your exact point here, but here are my anecdotes
  96. in the hope they are related.  The other day I have generated some
  97. data that was later mailed after *written* into a file.  I wished I
  98. could have filtered it through `mail'.  We read and write but do not
  99. pipe.  Is this an instance of the J's insulation?  Here is another
  100. example.  I needed to provide a facility to allow people to interact
  101. through terminals.  I had to do it through sockets.  J could not be
  102. used just for this reason.  I noticed that Perl inserted just about
  103. anything you want to do in the system from within (Perl) itself.  Can
  104. this be done through 10!: ?  And here is another one.  There is no
  105. regular expression matching in J.  I am sure other people can provide
  106. their own examples.  I would like to be convinced that my views are
  107. really nonsense, inherently worthless...
  108.  
  109.  
  110.  
  111. Eythan
  112.