Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!nott!uotcsi2!news
From: cbbrowne@csi.uottawa.ca (Christopher Browne)
Subject: "Pretty" Language Summary
Message-ID: <1993Mar16.164028.29034@csi.uottawa.ca>
Sender: news@csi.uottawa.ca
Nntp-Posting-Host: prgf
Organization: Dept. of Computer Science, University of Ottawa
Date: Tue, 16 Mar 93 16:40:28 GMT


I've done up a rather "prettier" version of the Language Summary using
LaTeX.

I made various operator lists into ``proper'' LaTeX tabular
environments.  I then put formulae in more ``conventional'' form
wherever possible.

For instance, under %:, the root operator, I put in the LaTeX commands:
\sqrt{y}  and  \sqrt[x]{y}, that give an attractive (and relatively
recognizable) "root" notation.

Many of the other operators have other appropriate descriptions.
(With the unusual case of the increment/decrement operators where I
borrowed the C notation of y++ and y-- :-)).

There's FOUR tables:

i) Regular vocabulary (the "punctuation gibberish")
ii) "Special" vocabulary: dotted commands like a., b., e., i., D., and
so forth
iii) Circular functions: Descriptions of o.k for $k \in \{ 0 \ldots
12, -1, -4, -9, -10 \}$
iv) Foreign conjunctions

The tables can be printed on one double-sided sheet of paper, and make
a rather handy "quick-reference" that's better (IMHO) than the one in
the back of the Dictionary.

It has a few errors; the ones I've noticed so far are mainly visual
blemishes as opposed to factual errors.

I'll toss this out for people to bash on; fixes/improvements will be
happily received.

%% Cut Here %%
%% j.tex %%
\documentstyle[fullpage]{article}
\title{J Version 6.2\\Language Summary}
\author{}%Christopher Browne}
\date{}
\begin{document}
\maketitle
\def\bs{\backslash}
\def\df{\dotfill}
\begin{table}[h]
\caption{Vocabulary List}
\begin{center}
\begin{tabular}{||l|c|c|c|r||} \hline \hline
OP        & OP $y$ \df $x$ OP $y$                       &  OP. $y$ \df $x$ OP. $y$          & OP: $y$ \df $x$ OP: $y$       & Page  \\ \hline
=         & $y=y^{t}$ \df $x=y$                         &  Is (Local) \df                   & Is (Global) \df               &  71   \\
$<$       & $\Box y$ \df $<$                            &  $\lfloor x\rfloor$ \df $\min{}$  & $y--$ \df $x \leq y$          &  71   \\
$>$       & Open $\Box$ \df $>$                         &  $\lceil x \rceil$ \df $\max{}$   & $y++$\df $x \geq y$           &  72   \\
\_        & $-y$ \df $\infty$                           &  Indeterminate \df                & $\infty$ \df                  &  72   \\
+         & $\bar{y}$ \df $x+y$                         &  Real/Imag \df GCD (Or)           & $2 y$ \df NOR                 &  73   \\
$\star$   & $sgn(y)$ \df $x \times y$                   &  Polar \df LCM (And)              & $y^2$ \df NAND                &  73   \\
$-$       & $-y$ \df $x-y$                              &  Not (1-) \df Less                & $y/2$ \df Match               &  73   \\
\%        & $\frac{1}{y}$ \df $x/y$                     &  Mat $y^{-1}$ \df Mat $x\div y$   & $\sqrt{y}$ \df $\sqrt[x]{y}$  &  74   \\
\^{}      & $e^y$ \df $x^y$                             &  $\ln{x}$ \df $\log_{x}{y}$       & \df $x^{y}(z)$ \df Chain      &  75   \\
\$        & Shape \df Shape                             &  Suite \df                        & Self-Reference \df            &  75   \\
\~{}      & Both \df Cross                              &  Nub \df                          & Nub Sieve \df Not-Equal       &  76   \\
$|$       & $|y|$ \df $y (\hbox{mod} x)$                &  Reverse \df Rotate $y$ by $x$    & $y^{T}$ \df Axis Transpose    &  77   \\
.         & $\det{y}$ \df $x \cdot y$                   &  \df Even                         & \df Odd                       &  78   \\
:         & \df Explicit Def'n                          &  \df Obverse                      & \df Adverse                   &  78   \\
,         & Ravel \df Append                            &  Ravel \df Items                  & Itemize \df Laminate          &  80   \\
;         & Raze \df Link                               &  \df Cut                          & Formation \df                 &  81   \\
\#        & Tally \df Copy                              &  $y_{2}$ \df $y${Base}$_{x}$      & Antibase 2 \df Antibase       &  83   \\
!         & $y!$ \df $\left( x \atop y\right)$          &  Customize \df                    & \df Foreign                   &  84   \\
/         & Insert \df Table                            &  Oblique \df Key                  & Grae Up \df Sort             &  84   \\
$\bs$     & Prefix \df Infix                            &  Suffix \df Outfix                & Grade Down \df Sort           &  86   \\
$[$       & Same \df Left                               &  Lev \df                          & Same \df                      &  87   \\
$]$       & Same \df Right                              &  Dex \df                          & Same \df                      &  87   \\
\{        & Catalog \df From                            &  Head \df Take                    & Tail \df                      &  88   \\
\}        & Amend \df                                   &  Behead \df Drop                  & Curtail \df                   &  88   \\
"         & \df Rank                                    &  Do \df Do Left If Error          & \df Format                    &  89   \\
`         & \df Gerund                                  &  \df                              & \df Evoke Gerund              &  91   \\
@         & \df Atop                                    &  \df Agenda                       & \df At                        &  91   \\
\&        & Bond \df Compose                            &  \df Under (Dual)                 & \df Appose                    &  91   \\
?         & Roll \df Deal                               &                                   &                               &  92   \\
\hline
\end{tabular}
\end{center}
\end{table}

\begin{table}[h]
\caption{Special vocabulary}
\begin{center}
\begin{tabular}{||c|l||c|l|c||l|r||} \hline \hline
OP & Description & OP & Description & OP & Description & Page \\ \hline
$)$  &  Label \df                           &  a.  &  Alphabet \df              & A.   &  Atomic Permute \df            & 92    \\
b.   &  Boolean \df                         &  c.  &  Characteristic \df        & C.   &  Cycle-Direct \df Permute      & 93    \\
e.   &  Raze In \df Member (In)             &  E.  &  \df Member of Interval    & f.   &  Fix              \df          & 95, 96 \\
i.   &  Integers \df Index Of               &  j.  &  Imaginary \df Complex     & NB.  &  Comment        \df            & 96    \\
o.   &  $\pi \times y$ \df Circular fun.    &  p.  &  Polynomial \df $P_{x}(y)$ & r.   &  Angle \df Complex             & 96, 97 \\
x.   &  Left Argument \df                   &  y.  &  Right Argument \df        & 0:   &  Zero         \df              & 97    \\
1:   &  One \df                             &  D.  &  $\frac{d^{n}F(x)}{dx^{n}}$ \df & &                                & 97    \\
\hline
\end{tabular}
\end{center}
\end{table}


\begin{table}[h]
\caption{Circular/Hyperbolic/Pythagorean Functions}
\begin{center}
\begin{tabular}{||r|l|r|l||} \hline
$k$ & Function  & $k$ & Function \\ \hline
0 & $\frac{1}{1 - y^{2}}$    &     9     & $ \frac{y + \bar{y}}{2}$     \\
1 & $\sin{y}$                &     10    & $ | y | $                    \\
2 & $\cos{y}$                &     11    & $ \frac{y - \bar{y}}{(0,2)} $ \\
3 & $\tan{y}$                &     12    & $ \ln{e^{y}}/(0,1)$          \\
4 & $\frac{1}{1+y^{2}}$      &     \_$k$ & $k o.^{-1} y$                \\
5 & $\sinh{y}$               &     \_1   & $ \arcsin{y} $               \\
6 & $\cosh{y}$               &     \_4   & $ \sqrt{1+y^{2}}$            \\
7 & $\tanh{y}$               &     \_9   & $y$                          \\
8 & $\sqrt{-1-y^{2}}$        &     \_10  & $\bar{y}$                    \\
\hline
\end{tabular}
\end{center}
\end{table}

Trigonometric arguments are always in radians.

E.g: {\tt 3 o. 3.1415926 0 7.8539816} $= (\tan{\pi}, \tan{0}, \tan{      
\frac{5} {2} \pi}) = 0 0 -\infty $                                       

\begin{table}[h]
\caption{Foreign Conjunctions}
\begin{center}
\begin{tabular}{||r|l||r|l||r|l||}
\hline
Conj.    &    Description            & Conj.  & Description & Conj.  & Description \\ \hline
0!:0     &    Host                   &     2!:55    &    WS Erase Object        &      7!:2     &    Space to Execute       \\
0!:1     &    Host (No Result)       &     3!:0     &    Internal Type          &      8!:0     &    Qry CGA Mode           \\
0!:2     &    Script                 &     3!:1     &    To   Internal Rep      &      8!:1     &    Set CGA Mode           \\
0!:3     &    Silent Script          &     3!:2     &    From Internal Rep      &      8!:4     &    Qry Screen Attr        \\
0!:4     &    Lines                  &     4!:0     &    Name Class             &      8!:5     &    Set Screen Attr        \\
0!:5     &    Silent Lines           &     4!:1     &    Name List              &      8!:7     &    Refresh Screen         \\
0!:55    &    Terminate Session      &     4!:55    &    Erase                  &      8!:9     &    Edit                   \\
1!:1     &    File Read              &     4!:56    &    Erase Given Name       &      9!:0     &    Qry Random Link        \\
1!:2     &    File Write             &     5!:0     &    Fix                    &      9!:1     &    Set Random Link        \\
1!:3     &    File Append            &     5!:1     &    Atomic  Rep            &      9!:2     &    Qry Display Reps       \\
1!:4     &    File Size              &     5!:2     &    Display Rep            &      9!:3     &    Set Display Reps       \\
1!:11    &    File Indexed Read\footnote{$y = $ \begin{tabular}{|c|c|c|}\hline FILENAME & INDEX & LENGTH \\ \hline\end{tabular}}
                                     &     5!:3     &    String  Rep            &      9!:4     &    Qry Prompt             \\
1!:12    &    File Indexed Write     &     5!:4     &    Tree    Rep            &      9!:5     &    Set Prompt             \\
1!:55    &    File Erase             &     5!:5     &    Linear  Rep            &      9!:6     &    Qry Box Chars          \\
2!:0     &    WS Name Class          &     6!:0     &    Time Now               &      9!:7     &    Set Box Chars          \\
2!:1     &    WS Name List           &     6!:1     &    Time Since Start       &      9!:8     &    Qry Error Msgs         \\
2!:2     &    WS Save                &     6!:2     &    Time to Execute        &      9!:9     &    Set Error Msgs         \\
2!:3     &    WS PSave               &     6!:3     &    Delay                  &      10!:k    &    (LinkJ) C Function     \\
2!:4     &    WS Copy                &     7!:0     &    Space Now              &      128!:0   &    QR Decomposition       \\
2!:5     &    WS PCopy               &     7!:1     &    Space Since Start      &      128!:1   &    R Inverse              \\
\hline
\end{tabular}
\end{center}
\end{table}

\end{document}

-- 
Christopher Browne                |     PGP 2.0 key available
cbbrowne@csi.uottawa.ca           |======================================
University of Ottawa              | Genius may have its limitations, but
Master of System Science Program  | stupidity is not thus handicapped.
