home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / apl / 1181 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  3.7 KB

  1. Path: sparky!uunet!know!mips2!news.bbn.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!usc!rpi!psinntp!psinntp!kepler1!andrew
  2. From: andrew@rentec.com (Andrew Mullhaupt)
  3. Newsgroups: comp.lang.apl
  4. Subject: Re: APL and IDL
  5. Message-ID: <1336@kepler1.rentec.com>
  6. Date: 16 Nov 92 16:32:57 GMT
  7. References: <16946@umd5.umd.edu>
  8. Organization: Renaissance Technologies Corp., Setauket, NY.
  9. Lines: 85
  10.  
  11. In article <16946@umd5.umd.edu> jph@astro.umd.edu (J. Patrick Harrington) writes:
  12. >
  13. >  When I first looked at IDL (Interactive Data Language), which is becoming
  14. >the language of choice among astronomers for data reduction and image processing
  15. >tasks, I was struck by the similarity to features of APL. In the latest manual
  16. >they make it quite explicit: From the "IDL User's Guide" Version 3.0, Sept 1992:
  17. >
  18. >"IDL owes much of its semantics to the programming language APL. The power
  19. > and conciseness of IDL is due to this APL influence. The main departure
  20. > from APL is in syntax and in control mechanisms. Because scientists write
  21. > their formulas using infix notation with parentheses, IDL has an expression
  22. > syntax that resembles FORTRAN or BASIC, where infix operators are evaluated
  23. > according to precedence and left-to-right sequence. ... "
  24. >
  25.  
  26. You could say that S is an APL type interpreter with syntax based on C.
  27. I'll interpolate your IDL lines with S to show the similarity:
  28.  
  29. >Here are a couple of lines of IDL dialog:
  30. >
  31. >IDL> a= findgen(10)
  32.  
  33. S> a <- 0:9
  34.  
  35. >IDL> print, a
  36. >      0.00000      1.00000      2.00000      3.00000      4.00000      5.00000
  37. >      6.100000      7.00000      8.00000      9.00000
  38.  
  39. S> a
  40.  [1] 0 1 2 3 4 5 6 7 8 9
  41.  
  42. >IDL> b= 0.2 * a
  43.  
  44. S> b <- 0.2*a
  45.  
  46. >IDL> print, b
  47. >      0.00000     0.200000     0.400000     0.600000     0.800000      1.00000
  48. >      1.20000      1.40000      1.60000      1.80000
  49.  
  50. S> b
  51.  [1] 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8
  52.  
  53. >IDL> c= sin(b)
  54.  
  55. S> c <- sin(b)
  56.  
  57. >IDL> print, c
  58. >      0.00000     0.198669     0.389418     0.564642     0.717356     0.841471
  59. >      0.932039     0.985450     0.999574     0.973848
  60.  
  61. S> c
  62.  [1] 0.0000000 0.1986693 0.3894183 0.5646425 0.7173561 0.8414710 0.9320391
  63.  [8] 0.9854497 0.9995736 0.9738476
  64.  
  65. >
  66. >You see that  findgen <-> floating index generator <-> iota <-> i.
  67. >
  68. >It is interesting how the IDL developers acknowledge their debt to APL. The adoption
  69. >of the ideas in APL is a good thing for users, but probably a bad thing for APL, as
  70. >some of these features will no longer be unique to APL. Of course APL (and J) can
  71. >do so much more, but the potential audience for the "more exotic" features is not
  72. >as broad.
  73. >            
  74.  
  75. S has been available from AT&T since the late '70's.  It does `more' than APL
  76. does, but a lot of its exotic features are not obviously desirable. There are
  77. a bunch of these type of languages out there and they all generally suffer from
  78. not being as well implemented as APL interpreters. However, almost all of them
  79. avoid the runic confusion of APL and its cousins, and some provide really high
  80. bandwidth interfaces to compiled code. (This is the most redeeming feature of
  81. S). There are also more sophisticated interpreters than APL out there, such
  82. as Maple and (when it works) Mathematica.
  83.  
  84. As for operations like these on arrays, you can do that in standard FORTRAN 90
  85. and C++ and in standard Pascal. (Remember that the Pascal standard changed in
  86. 1990!)
  87.  
  88. So there hasn't been much uniqueness to this kind of feature in APL for a long
  89. time. APL is certainly of tremendous importance in the history of programming
  90. languages, but in its purest form, the APL ideas are not the answer. Generally
  91. the problems people have with APL are related to the triage which is forced
  92. between clarity and speed.
  93.  
  94. Later,
  95. Andrew Mullhaupt
  96.