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

  1. Newsgroups: comp.lang.apl
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!linac!att!att!dptg!ulysses!allegra!princeton!phoenix.Princeton.EDU!bathurst
  3. From: bathurst@phoenix.Princeton.EDU (Bruce Bathurst)
  4. Subject: Re: Weaning  myself from Matlab: is APL a viable alternative for scientific programming and signal processing?
  5. Message-ID: <1993Jan20.160000.10660@Princeton.EDU>
  6. Originator: news@nimaster
  7. Sender: news@Princeton.EDU (USENET News System)
  8. Nntp-Posting-Host: phoenix.princeton.edu
  9. Organization: Princeton University
  10. References: <IBE1109.93Jan17152519@etbsun1.draper.com> <1993Jan19.012451.9402@csi.jpl.nasa.gov> <WEG.93Jan19140548@mace.cc.purdue.edu>
  11. Date: Wed, 20 Jan 1993 16:00:00 GMT
  12. Lines: 49
  13.  
  14. In article <WEG.93Jan19140548@mace.cc.purdue.edu>
  15. weg@mace.cc.purdue.edu (Eythan Weg) writes:
  16.  
  17. >Can someone try to build a linear algebra (for example) version of J?
  18.  
  19. The one aspect of APL (or J) that I haven't seen mentioned in this
  20. thread is its flexibility.  If one is dealing with a limited class of
  21. problems, such as those described with linear algebra or linguistic
  22. rules, there is often a language designed for those problems.  APL is
  23. a language designed to describe more general algorithms.
  24.  
  25. Conventional mathematical notation beautifully describes algebraic and
  26. geometric structures, and the application of logic to them; but the
  27. notation does not uniquely describe algorithms for constructing these
  28. objects from numbers or truth values (T or F).  (Notice the large
  29. number of algorithms published on constructing the inner product of
  30. two vectors.)  APL notation describes algorithms "uniquely", in terms
  31. of operations for which numerically stable algorithms are well known.
  32.  
  33. I use APL in two ways.  When I work on new mathematical solutions to
  34. problems in my field (metamorphic petrology), I don't know where the
  35. mathematics will lead.  APL is then not just the language of choice;
  36. it's the only language I can use.  (The APL can not only follow the
  37. mathematics, the APL notation sometimes suggests the next step to
  38. take.)
  39.  
  40. My second use of APL is to write what B. Kernighan has called "little
  41. languages", languages designed to express and solve a limited class of
  42. problems.  Here efficiency becomes an issue; so after writing the
  43. prototype in APL, I sometimes replace the slower lines or functions
  44. with links to compiled routines from NetLib.  
  45.  
  46. One way to write a "linear algebra" APL for real numbers would be to
  47. replace the QR matrix operation with an SVD.  Easier, however, would
  48. be to write this as a little language.  Choose a set of matrix
  49. factorizations, and write these as (closed) functions in a workspace,
  50. linked to compiled Fortran code.
  51.  
  52. IMO, J has not discarded the one feature impeding APL's popularity:
  53. its intimate link with an interpretive environment from the 1960's.
  54. APL might be seen in a better light if it were far more closely
  55. connected to each computer's native operating system, the was AWK is
  56. connected to UNIX and C.  (The code itself would still be portable.)
  57.  
  58. Bruce (Gypsy Scholar)
  59. -- 
  60. Department of Geological and Geophysical Sciences
  61. Princeton University, Princeton, NJ 08544
  62. bathurst@phoenix.princeton.edu bathurst@pucc.bitnet !princeton!phoenix!bathurst
  63.