As it happens, I have been writing a paper which begins with that topic.
Sixteen APL Amuse-Bouches, by Roger Hui


The amuse-bouche is the best way … to express big ideas in small bites.—
Jean-Georges Vongerichten, 2002
Such were the vagaries of what may have been the most powerful computer
language ever hatched by a Canadian. Yes, I know that James Gosling, an
alumnus
of the University of Calgary, was the “father of Java.” He and I have
talked about it.
And yes, there is a now a game called “Perl Golf” in which you try to do
the most
work in that scripting language with the fewest number of (key-) strokes.
Java and
Perl are good and useful and popular, but APL was … beautiful.— Tom
Keenan, *Business
Edge* <http://keiapl.org/rhui/passage.htm#businessedge>, 2004
0. (x>0)-(x<0)


Signum of x for real x , assuming the values 1 , 0 , or ¯1 according as x
is strictly positive, 0, or strictly negative. The phrase dates from the
earliest days
of APL, being found in section 1.4 of *A Programming Language* [0]. Three
decades later, the idea was adopted by Knuth [1], who wrote that “Iverson’s
convention” led to improvements in exposition and technique. Some writers
call
these “data-driven conditionals” [2]; during a discussion between Phil
Last, John
Scholes, and myself it was suggested that they be called “array logic” [3].

The usefulness of array logic in APL is due to the following:
• Boolean functions have value 0 and 1 rather than true and false
[4, #implementers2].•Functions apply to entire arrays, as in, for example,
 +/x>100 to compute
the number of elements of vector x greater than 100 [4, #Maple].•A simple
function precedence (“right to left”).

Amuse-bouches 0, 2, 4, D, and E use array logic.

...

*References*
[0]Iverson, K.E., *A Programming Language*
<http://www.jsoftware.com/papers/APL.htm>, Wiley, 1962-05.[1]Knuth, Donald
E., *Two Notes on Notation*
<http://arxiv.org/PS_cache/math/pdf/9205/9205211v1.pdf>, American
Mathematical Monthly, Volume 99, Number 5, 1992-05-01.[2]Scholes,
John, *Data-driven
Conditionals*
<http://www.dyalog.com/blog/2014/10/data-driven-conditionals-2/>, Dyalog
Blog, 2014-10-13.[3]Hui, Roger K.W., Phil Last, and John Scholes, e-mail
discussion, 2014-10-18 to -20.[4]Hui, Roger K.W., editor, *Ken Iverson
Quotations and Anecdotes* <http://keiapl.org/anec>, 2014-10-10.

...



On Thu, Oct 23, 2014 at 10:29 AM, Devon McCormick <[email protected]>
wrote:

> Hi -
>
> While looking at the Wikipedia entry on "Boolean data type" recently, I
> noticed that the APL family is - as usual - unrepresented.  Since I was
> looking here because of the maddening arbitrariness with which Booleans are
> handled in other languages, it occurs to me that the much cleverer handling
> of Booleans characteristic of the APL world should be given a higher
> profile.
>
> So, any ideas on a Wikipedia entry for "APL, J" handling of Booleans?
>
> Thanks,
>
> Devon
>
> --
> Devon McCormick, CFA
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to