From: bill@gpu.utcs.utoronto.ca (Bill Lauriston)
Subject: Workshop on J
Summary: Hands-on introduction to J, a new programming language
Keywords: J, languages, workshop
Organization: UTCS Public Access
Distribution: tor
Date: Fri, 11 Sep 1992 21:31:57 GMT

                             The Workshop on J

                     with Professor Donald B. McIntyre

                    Sponsored by the Toronto ACM SIGAPL
                with assistance from Iverson Software Inc.
                       and The University of Toronto

J is an exciting new programming language developed by Roger Hui and 
Turing Award winner Kenneth Iverson.  Participants will enjoy a hands-on 
introduction to J under the lively direction of Professor McIntyre.

In the words of a participant in an earlier McIntyre workshop
sponsored by The British Computer Society:

  "The enthusiasm among the audience was such that no time was taken 
  for a tea break. ... There was a standing ovation at the end."

Date:     Monday, September 28, 1992

Time:     6:30 PM to 9:30 PM

Place:    Robarts Library
          St. George Street & Harbord Street
          CDS/PC Computing Facility - Room 1061
          The University of Toronto
          Toronto, Ontario

Tickets:  Admission is free, but as wide interest is expected and space is
          limited, admission will be by ticket only.  If you wish to
          attend, we ask that you phone any of the following to order your
          ticket.

               Bruce Bolin         (416) 364-5361 
               Cameron Linton      (416) 364-5361
               Margaret Murphy     (416) 364-5361

          If at some later time your plans change and you are unable to
          attend, please notify one of the above so that the space may be
          made available to someone on the waiting list.


Directions:  The Robarts Library is located at the main downtown campus of
          the University of Toronto.  The CDS/PC Computing Facility is
          located downstairs, and is accessible via the down escalator.


Workshop: Professor McIntyre's foils will be projected on one screen;  the
          entries at each computer will be made by someone new to J,
          following Donald's instructions.

          There will be a computer equipped with J at each table, so that
          people will be able to try experiments suggested by McIntyre's
          foils.  Roving experts in J will be able to help out a the
          tables.

          Those who have them are invited to bring lap top Macintoshes or
          PCs, as there will be disks with copies of J available for these
          machines for $2.00 each.  These disks will also contain a copy of
          the material Professor McIntyre has prepared for the workshop.

          Publications of J will also be available for purchase, by cash or
          check only.

Donald B. McIntyre is the former chairman of the Department of Geology at
          Pomona College in Claremont, California, and is now retired in
          his native Scotland.  He continues his interest in programming
          and teaching.  He has championed J from its beginning, with
          several recent published papers and presentations to professional
          societies, school teachers and students.  Audiences know him as a
          lively, entertaining, and informative speaker.  Moreover, a
          personal, interactive tutorial given from Donald's experience is
          a big help in getting started with J's many new concepts.  In
          March 1992, Donald gave an enthusiastically received J workshop
          in London, England, hosted by the British APL Association.  He
          was then invited to give this J workshop in Toronto, and has also
          been invited to give this at several other locations in Canada
          and the United States while he is in North America.  

          He was educated in Scotland, receiving B.Sc., Ph.D., and D.Sc
          degrees from Edinburgh University where he was a member of the
          faculty from 1948-1954.  He did postdoctoral research at the
          University of Neuchatel, the University of California at
          Berkeley, and the Dominion Observatory, Canada.

          From 1954 until 1989, he was Professor of Geology at Pomona
          College.  He has lectured around the world for Sigma Xi, the
          America Association of Petroleum Geologists, the British Museum,
          the Geological Society of America, the State Seismological Bureau
          in Beijing, the University of Nanjing in China, and numerous
          universities in the United States, Canada, Britain, and Europe. 
          He has received a Fulbright Award, a John Simon Guggenheim
          Memorial Fellowship, and in 1985 was named California College and
          University Professor of the Year by the Council for the
          Advancement and Support of Education.  He is an Honourary Fellow
          at the Universities of Edinburgh and St. Andrews.

          In addition to teaching geology, he has been active for over 30
          years in computing.  In 1971, he was a consultant with the APL
          group at the IBM Scientific Center in Philadelphia, and he has
          served the ACM as a Distinguished Lecturer.


J:        The J language is an exciting development in computer languages,
          designed by Turing award winner Kenneth Iverson and his associate
          Roger Hui, who also provided the elegant implementation.  It will
          appeal to all those whose interest in computing goes beyond the
          use of packaged programs.  Its salient characteristics are that
          it is shareware, written in C, and the source code is available.
          It runs on a variety of machines (PC, Mac, SUN Sparc, Sun 3,
          MIPS, SGI, Atari ST, NeXT, IBM RS 6000 and others).  Although
          very APL-like, it omits everything Iverson was in doubt about in
          APL and adds many new features, particularly new combining forms
          and control structures that greatly increase its expressive power
          over that of APL.  It uses the standard ASCII character set,
          discarding the special characters that APL featured.  It includes
          boxed arrays, complex arithmetic, composition and trains of
          functions.  Its logic is clean and consistent, and its
          straightforward syntax is ideally suited to parallel processing.

          It is specified by Iverson's 'Dictionary of J'.  The dictionary
          describes nouns (arrays), verbs (functions), adverbs (monadic
          operators), and conjunctions (dyadic operators).  This
          terminology is readily understandable by a wide audience, and has
          also been helpful in suggesting concepts from natural languages
          which are fruitful for investigation.  The primitive words in J
          are spelled with one or two letters from the ASCII alphabet; 
          two-letter words end in a period (.) or colon (:).  The spelling
          scheme is mnemonic;  for example,

          =  equal            <  less than             >  larger than
          =. is (local)       <. lessor of             >. larger of 
          =: is (global)      <: lesser or equal       >: larger or equal

          Verbs in J deal with structured operands.  Two conforming numeric
          arrays A and B of any shape and any internal type can be divided
          by A % B;  the items of an array can be rotated left by the verb
          |.  (1 |. 'abcde' is 'bcdea');  the binary representation of an
          integer is given by the verb #: (#: 6 is 1 1 0) and the verb #
          gives the number of items in an array (# #: 6 is 3).

          Those familiar with APL already know some adverbs.  For example,
          / is an adverb, and f/ is a derived verb which inserts f between
          the items of its argument.  Thus +/ is the sum verb:

               +/ 3 4 5 6   is    3+4+5+6   is 18

          and */ is the product verb:

               */ 3 4 5 6   is    3x4x5x6   is 360

          A conjunction takes two arguments and (usually) results in a
          verb.  For example, the g y is equivalent to f g y, and this seemingly
          inconsequential operator has been shown to be of fundamental
          importance.

          The " (rank) conjunction is used in the form f"n, where n
          determines the ranks of the subarrays that are affected by the
          verb f.  Thus, to multiply the rows of a 2 by 3 table M by a 3
          element list V, one would write M * "1 V, meaning multiply each
          row (rank 1 object) on the left by the list on the right.

          The & (with) conjunction may be used to fix one of the arguments
          to a dyadic verb, effectively making a new monadic verb.  For
          example, the dyadic rotate verb |. used in the form x |. y
          rotates the items of array y left by the amount specified by the
          integer x;  thus 1&. is a monadic verb which rotates each item of
          its argument one place to the left (1|. 'abcde' is 'bcdea');  and
          the verb 1.8&* multiplies the items of its argument by 1.8
          (1.8&*_40 0 100 is _72 0 180).
               The ^: (power) conjunction applies to a verb and an integer;  the
          integer gives the number of times the verb is applied;  for
          example, f ^: 3 y means f f f y.  A negative integer is permitted
          and its magnitude indicates the number of times the inverse verb
          is to apply.  For example, if FfC =. (32&+)@(1.8&*) is a verb
          yielding Fahrenheit from Celsius temperatures (FfC _40 0 100 is
          _40 32 212), then FfC ^: _1 yields Celsius from Fahrenheit
          temperatures (FfC ^:_1 (-40 32 212) is _40 0 100).

          The &. (under, or dual) conjunction, as in (u &. v) y, applies v
          to y, then u to this result and then applies v ^: _1 to this. 
          For example, recall that #: gives the binary representation of
          its integer argument and 1&|. rotates its argument one to the
          left;  so Josephus =. 1&|. &. #: solves the problem of
          determining the original (1-origin) position of the last captive
          standing for the case wher n captives are arranged in a circle
          and every second captive is slain: Josephus 100 is 73.

          A fork is a sequence of three verbs, and a hook is sequence of
          two verbs:

              (g h) y     is    y g h y
            x (g h) y     is    x g h y
              (f g h) y   is    (f y) g (h y)
            x (f g h) y   is    (x f y) g (x h y)

          For example, (+%)/1 1 1 1 1  computes a continued fraction
          approximation to the golden ration, and mean=.+/ % # computes
          averages.

          Adverbs, conjunctions, and forks and hooks make possible a style
          of programming called tacit definition, so called because a verb
          defined in this way makes no explicit reference to its arguments. 
          Other authors call this "functional programming".

          In natural languages, a gerund is a verbal form that can be used
          as a noun, as "singing" in "singing is an art".  The ` (tie)
          conjunction converts verb arguments into nouns.  Gerunds are
          arrays of such representations, and can be manipulated by verbs,
          thus making verbs "first class objects".





-- 
W J Lauriston           Manager, Systems Support
(416) 978-3579		University of Toronto Computing Services
Xref: sparky ont.events:414 wny.events:14 wny.seminar:20