J

From APL Wiki
Revision as of 22:06, 10 September 2022 by Adám Brudzewsky (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")
Jump to navigation Jump to search

J is an array language loosely following the SHARP APL tradition which uses ASCII characters for primitive functionality and builds in leading axis theory and tacit programming as foundational design principles. J discards backwards compatibility with older APLs in order to simplify and regularize its syntax, redesign primitives to work on leading axes, and disentangle reduction from scans and windowed reductions (yielding the prefix and infix operators). However, J concepts such as function trains and the Indices function have been adopted by later APLs such as NARS2000, Dyalog APL, and dzaima/APL. J breaks the APL convention of writing primitives with a single glyph: instead, they are spelled with a single ASCII character possibly followed by one or two periods (<syntaxhighlight lang=j inline>.</source>) or colons (<syntaxhighlight lang=j inline>:</source>). It is also notable for its use of terms from English grammar to describe the language. For example, functions are called "verbs" while arrays are called "nouns".

History

J was initially designed primarily by Ken Iverson and Roger Hui, with input from Arthur Whitney and Eric Iverson. Ken had been considering a new language based on A Dictionary of APL but without the backwards compatibility constraints of APL and the custom character set (which was a major technical issue at the time). In "A Personal View of APL"[1] he gives the following as the most important goals for a new language:

  • Is available as “shareware”, and is inexpensive enough to be acquired by students as well as by schools
  • Can be printed on standard printers
  • Runs on a wide variety of computers
  • Provides the simplicity and the generality of the latest thinking in APL

Iverson's phrase "the latest thinking in APL" refers to two major breakthroughs made that decade: the invention of the Rank operator by Arthur Whitney in 1982 and subsequent development of leading axis theory, and the invention of function trains by Iverson and Eugene McDonnell in 1988.

In the summer of 1989 Whitney visited Iverson, who discussed with Whitney his plans for a new array language. Whitney wrote a one-page prototype for the language in a single afternoon using C. Iverson shared the program with Roger Hui, who began working on J on August 27 and quickly produced a more complete prototype.[1][2][3] The name "J", chosen by Hui when saving the first source code file, is meaningless: in An Implementation of J, Hui remarks "Why 'J'? It is easy to type."[4] J was first presented by Hui and Iverson, including a live demo, at a meeting of the Toronto APLSIG in February 1990.[5]

In 1990 Hui and Iverson joined Iverson Software Inc. (now Jsoftware), which had been founded that year by Eric Iverson to sell a SHARP APL product. Eric converted his SHARP session to use with J as Hui continued on the core language's implementation. The J language, including Eric's session environment, was first released at APL90 in Copenhagen August 1990.[5]

Versions

J has used two numbering systems. Releases prior to 1994 used a single decimal and the naming scheme "Version X.Y", while those after used two decimals and are called "Release X.YY", or "JXYY" as in "J807".

Version Date Features
2.0 1990-08-09 (APL90)
2.7 1990-10-22 Rank with a function right operand, Under
2.8 1990-11-15
2.9 1991-02-15 Monadic <syntaxhighlight lang=j inline>+:</source> (double), <syntaxhighlight lang=j inline>-:</source> (halve), <syntaxhighlight lang=j inline>*:</source> (square), dyadic <syntaxhighlight lang=j inline>":</source> (Format), constant functions <syntaxhighlight lang=j inline>0:</source> and <syntaxhighlight lang=j inline>1:</source>
3.0 1991-03-17 Changes to spellings, Reverse with Variant to specify fill
3.1 1991-05-17 Determinant (<syntaxhighlight lang=j inline>.</source>)
3.2 1991-06-02 <syntaxhighlight lang=j inline>,.</source> for ravel items (like Table) and append lists, <syntaxhighlight lang=j inline>;</source> for Raze and Link, <syntaxhighlight lang=j inline>@.</source> for agenda, non-close compositions
3.3 1991-06-25 Dyadic <syntaxhighlight lang=j inline>,.</source> changed to append items, more types of trains
3.4 1991-07-15 <syntaxhighlight lang=j inline>NB.</source> for comments
4.0 1991-11-23 Monadic <syntaxhighlight lang=j inline>+.</source> and <syntaxhighlight lang=j inline>*.</source> for complex components and phase/magnitude with <syntaxhighlight lang=j inline>j.</source> and <syntaxhighlight lang=j inline>r.</source> to recombine, <syntaxhighlight lang=j inline>^:_</source> for power limit
4.1 1992-02-02 <syntaxhighlight lang=j inline>^!.p</source> for rising/falling factorials
4.2 1992-03-19
5.0 1992-06-22 Variant to specify comparison tolerance and fill for Take
5.1 1992-07-28 <syntaxhighlight lang=j inline>f.</source> to expand a tacit function containing names, constant functions <syntaxhighlight lang=j inline>2:</source> to <syntaxhighlight lang=j inline>9:</source>
5.1a 1992-08-11
6.0 1992-10-24 Error handling with <syntaxhighlight lang=j inline>::</source>, additional system functions
6.1 1992-11-26 Amend operator <syntaxhighlight lang=j inline>}</source>
6.2 1992-12-20 Derivative operator <syntaxhighlight lang=j inline>D.</source>
7.0 1993-11-14 Taylor series operators <syntaxhighlight lang=j inline>t.</source> and <syntaxhighlight lang=j inline>T.</source>
Release Date Features
2.01 1994-09-01 Control structures, many additional system functions
2.03 1994-09-21
2.04 1994-11-28
2.05 1995-02-26 Additional inverses, primitive array <syntaxhighlight lang=j inline>a:</source> ("ace")
2.06 1995-05-30 More inverses, hypergeometric operator <syntaxhighlight lang=j inline>H.</source>, and prime functions <syntaxhighlight lang=j inline>p.</source>, <syntaxhighlight lang=j inline>p:</source>, and <syntaxhighlight lang=j inline>q:</source>
3.01 1996-01-16 Repeatable Roll/Deal <syntaxhighlight lang=j inline>?.</source>, Depth <syntaxhighlight lang=j inline>L.</source> and Depth operator <syntaxhighlight lang=j inline>L:</source>, total array ordering
3.02 1996-06-24 Pick variant <syntaxhighlight lang=j inline>{::</source>, extended precision types
3.03 1996-12-13 Multiple assignment using a string target
3.04 1997-05-19 More operators with gerund operands, <syntaxhighlight lang=j inline>for.</source> and <syntaxhighlight lang=j inline>select.</source> control structures
3.05 1997-09-27 Extended dyad <syntaxhighlight lang=j inline>q:</source> (Factor) to take a negative left argument
4.01 1998-03-22 Find (<syntaxhighlight lang=j inline>E.</source>) and Index of Last (<syntaxhighlight lang=j inline>i:</source>)
4.02 1998-11-07 Symmetric range monad (<syntaxhighlight lang=j inline>i:</source>), infinite left arguments to Take
4.03 1999-04-21
4.04 2000-01-02 Sparse array support
4.05 2000-09-05 Comparison tolerance for Key
4.06 2001-05-09 <syntaxhighlight lang=j inline>assert.</source> and <syntaxhighlight lang=j inline>throw.</source>, Symbols (<syntaxhighlight lang=j inline>s:</source>) and Unicode (<syntaxhighlight lang=j inline>u:</source>), multiple axes in Cut operator
5.01 2002-09-10 Non-close Under <syntaxhighlight lang=j inline>&.:</source>, Bitwise Operations (<syntaxhighlight lang=j inline>b.</source>), Polynomial Derivative (<syntaxhighlight lang=j inline>p..</source>), Head (<syntaxhighlight lang=j inline>{.</source>) and Tail (<syntaxhighlight lang=j inline>{:</source>) allow empty arguments
5.02 2003-05-21
5.03 2004-03-19 Indices (<syntaxhighlight lang=j inline>I.</source>), Sequential Machine (<syntaxhighlight lang=j inline>;:</source>)
5.04 2005-03-18 J64 (64-bit version) introduced, boxed right argument for Power operator, scalar extension for left argument of Cut (<syntaxhighlight lang=j inline>;.</source>)
6.01 2006-07-21 Noun left arguments in trains (<syntaxhighlight lang=j inline>N0 V1 V2</source>), dots removed from explicit argument names (<syntaxhighlight lang=j inline>y.</source> to <syntaxhighlight lang=j inline>y</source>, etc.), Interval Index (<syntaxhighlight lang=j inline>I.</source>)
6.02 2008-02-29 Index Of (<syntaxhighlight lang=j inline>i.</source>) extended to allow unmatched cell shapes, Memoize adverb (<syntaxhighlight lang=j inline>M.</source>)
7.01 2010-08-05 GTK IDE
7.02
8.01 2014-02 Qt IDE
8.02 2014-08-02 Qt IDE improved
8.03 2014-12-09 Native read/write of jpeg and png images
8.04 2016-01-04
8.05 2016-12-19 Improved UTF-8 handling, memory allocator rewritten with more in-place argument usage
8.06 2017-11-12 Allow array right operands to Atop and Adverse (<syntaxhighlight lang=j inline>::</source>), treating as constant functions, improved vector instruction usage
8.07 2018-10-08 Removed support for dot-style explicit arguments (e.g. <syntaxhighlight lang=j inline>y.</source>)
9.01 2019-12-15 Iteration primitives <syntaxhighlight lang=j inline>F..</source>, <syntaxhighlight lang=j inline>F.:</source>, <syntaxhighlight lang=j inline>F.</source>, <syntaxhighlight lang=j inline>F:.</source>, <syntaxhighlight lang=j inline>F::</source>, <syntaxhighlight lang=j inline>F:</source>; Remove calculus operators <syntaxhighlight lang=j inline>d.</source>, <syntaxhighlight lang=j inline>D.</source>, <syntaxhighlight lang=j inline>D:</source>, <syntaxhighlight lang=j inline>t.</source>, <syntaxhighlight lang=j inline>t:</source>, <syntaxhighlight lang=j inline>T.</source>, <syntaxhighlight lang=j inline>..</source>, <syntaxhighlight lang=j inline>.:</source>; <syntaxhighlight lang=j inline>gerund"r</source>
9.02 2020-12-13 "Direct definition" syntax for explicit functions, special semidual form <syntaxhighlight lang=j inline>u&.:(a:`v)</source> added, minor incompatible changes
9.03 2021-12-17 Modifier trains and other combinations, foreigns to enable nameref caching, Kahan summation with <syntaxhighlight lang=j inline>+/!.0</source>

References

  1. 1.0 1.1 Iverson, K.E. "A Personal View of APL". IBM Systems Journal, Volume 30, Number 4. 1991-12.
  2. Hui, Roger. "Incunabulum". From An Implementation of J, Appendix A: Incunabulum, 1992-01-27.
  3. McIntyre, Donald. "A Tribute to Roger Hui, presented at APL96". 1996.
  4. Hui, Roger. An Implementation of J (pdf), Preface. 1992-01-27.
  5. 5.0 5.1 Hui, Roger. "Remembering Ken Iverson". 2004-11.
APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000Pometo
Historical A Programming LanguageA+ (A) ∙ APL#APL2CAPL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXExtended Dyalog APLIverson notationIVSYS/7090NARSngn/aplopenAPLOperators and FunctionsPATRowanSAXSHARP APLRationalized APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyK (Goal, Klong, Q) ∙ KamilaLispLang5LilNialRADUiua
Overviews Comparison of APL dialectsTimeline of array languagesTimeline of influential array languagesFamily tree of array languages