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

  1. Newsgroups: comp.lang.apl
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!decwrl!csus.edu!sfsuvax1.sfsu.edu!emclean
  3. From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
  4. Subject: Re: J is NOT APL (was Re: Interpreter advice sought.)
  5. Message-ID: <1993Jan23.183243.18514@csus.edu>
  6. Sender: news@csus.edu
  7. Organization: San Francisco State University
  8. References: <1993Jan21.160604.7887@lth.se> <1993Jan23.100553.21973@lth.se>
  9. Date: Sat, 23 Jan 1993 18:32:43 GMT
  10. Lines: 92
  11.  
  12.  Here is the case for J:
  13.  
  14.  1. Price:
  15.  
  16.     a.) Not everyone has the resources to purchase powerful
  17.         APL software. For example, I understand that Manugistics 
  18.         APL for the PC retails at $1700. 
  19.  
  20.            Now $1700 is a great deal. This product has *lots* of nice 
  21.            features associated with communicating with other software 
  22.            like Excell, Paradox,  and DBase. And fast performance too.
  23.  
  24.          But with J you can't beat the price. And you've got to like the
  25.          fact that it provides users plenty of capabilities to create
  26.          Windows applications on the PC which look professional.
  27.  
  28.     b.) No matter what machine I'm on, J is just an ftp away.
  29.  
  30.  3. J's Enhancements
  31.  
  32.     a.) The fundamental control structure (as of today) in APL
  33.         is the branch. J provides constructs for "if" and "case
  34.         statments" (via agenda), "do", "while", and most cases
  35.         of "for" (via power and chain), and recursion (via  
  36.         self-reference).  These modifications alone make J
  37.         different than APL.
  38.  
  39.     b.) J's functional nature makes it more modular than APL.
  40.  
  41.   4. Readibility
  42.  
  43.    a.) J can be made as readable as one would like it to be by
  44.        renaming J's primitives english spellings.  One
  45.        can argue that it is easier to read than APL, eventhough
  46.        APL has nice mathematical symbols.  I turned in the
  47.        program (below) in a class where the instructor  was
  48.        very sceptical about J and really only keen on C and Modula.
  49.        He may have heard some disparaging remarks on comp.lang.misc
  50.        about how cryptic J can be.  But without having seen APL or J before,
  51.        he was able to easily follow the logic of the program and 
  52.        was impressed that I was the first person to complete the 
  53.        assignment. 
  54.  
  55.     b.) Even with it's mathematical symbols APL can be *pretty* terse.
  56.  
  57.     c.) If you are working in an environment where you are the *only*
  58.         person using a non-imperative language, you won't be at a loss
  59.         if the printer you must use does not print APL symbols.
  60.  
  61.    5. J is not APL.
  62.  
  63.     a.) OK. What is J like?  It's more like APL than like more
  64.         frequently sited functional software like FP, or Haskel.
  65.  
  66.    6. Negatives (from the point of view of a J'er) 
  67.  
  68.     a.) The J community is small and there is no body of literature
  69.         to reference like Quote Quad.
  70.  
  71.     b.) There are not many people like Roger Hui who can answer 
  72.         intermediate and advanced questions about programming in
  73.         the language.
  74.  
  75. +--------+-+-------------------------------------------------------------------+
  76. |+-+-+--+|:|NB. Kohonen self-organizing network program for csc671 project 1 |
  77. ||2|&|$:|| |target_vectors =: y. NB. y. is the right argument                  |
  78. |+-+-+--+| |number_simulations =. square x. NB. x. is the left argument        |
  79. |        | |NB. x. is 2 if khn is used as a monad                              |
  80. |        | |training_vectors=.random_sort add_deviations target_vectors        |
  81. |        | |j =. 0 NB. counts simulations                                      |
  82. |        | |output =.''                                                        |
  83. |        | |sim_loop)                                                          |
  84. |        | |w =: unit_col_vector 5 - ? 3 25 $ 10 NB. initial weights matrix    |
  85. |        | |i  =. 0                      NB. interation index                  |
  86. |        | |n  =. tally training_vectors NB. data pass counter                 |
  87. |        | |n3 =. n*3  NB. sentiel (pass thru data 3 times)                    |
  88. |        | |alpha_set=. 0.5 ,0.333 , 0.166                                     |
  89. |        | |loop) alpha_beta=.(append half)(take(n,n)antibase i) from alpha_set|
  90. |       | |dmy=.((n residue i) from training_vectors) adjust_weights alpha_beta|
  91. |        | |i =. inc i                                                         |
  92. |        | |$.=. open  (n3 = i)  catalogue loop link cont                      |
  93. |        | |cont)                                                              |
  94. |        | |neural_responses=.(transpose w) mat_mult (transpose target_vectors)|
  95. |        | |neural_responses =. 5 5 shape row_max_index neural_responses       |
  96. |        | |output =. output, box neural_responses from 'abcd'                 |
  97. |       | |$.=.open(number_simulations = j=.inc j ) catalogue sim_loop link end|
  98. |        | |end)                                                               |
  99. |      | |y. =. (,open(target_vectors&match)underopen cases) copy cases_header |
  100. |        | |y.=. y. append box target_vectors                                  |
  101. |        | |y. =. ravel_items y. append box (x. append x.) shape output        |
  102. +--------+-+-------------------------------------------------------------------+
  103.    
  104.