Differences between revisions 1 and 32 (spanning 31 versions)
Revision 1 as of 2008-09-23 12:53:01
Size: 3299
Editor: SimonMarsden
Comment:
Revision 32 as of 2009-08-21 12:42:57
Size: 6347
Editor: KaiJaeger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
***************************************************************************** #acl AutoAdminGroup:read,write,admin,delete,revert All:read
Line 3: Line 3:
* UNDER CONSTRUCTION

* The material in this tutorial is currently being converted to Wiki format

*****************************************************************************
{{{#!html
<div class="borderlesstable">
}}}
||<tableclass="borderlesstable">Back ||[[LearnApl/TutorialContents|Contents]] ||[[LearnApl/TutorialContents|Next]]> ||
Line 10: Line 9:
{{{#!html
</div>
}}}
Line 11: Line 13:
<<TableOfContents>>
||'''Note to contributors:''' Additions and corrections to this tutorial are welcome. Please note that it tries to be vendor neutral : where possible examples should work in any version of APL. <<BR>><<BR>> All pages of the tutorial are immutable - they can only be changed by admins. Add any suggestions for changes/additons to [[LearnApl/Discussion]] first||
Line 13: Line 18:
It was originally written to accompany MicroAPL's APLX interpreter, and is available in PDF form [[http://www.microapl.co.uk/apl/|here]]. It is adapted from an original version written to accompany MicroAPL's APLX interpreter which is available in [[http://www.microapl.co.uk/apl/LearningAPLwithAPLX.pdf|PDF form]].
Line 16: Line 21:
||<tablebgcolor="#ffe" tablestyle="margin-top: 1em">'''Dialect''' ||'''Checked''' ||'''By''' ||
||[[http://www.microapl.co.uk/apl/|APLX]] from MicroAPL || (./) ||SimonMarsden ||
||[[http://www.dyalog.com/|Dyalog from Dyalog]] APL ^1^ || (./) ||KaiJaeger ||
||[[http://www-01.ibm.com/software/awdtools/apl/|APL2]] from IBM || || ||
||[[http://www.apl2000.com/|APL+Win]] from APL2000 || (./) ||JoeBlaze||
||[[http://www.nars2000.org/|NARS2000]] see [[Nars2000]] || (./) ||KaiJaeger ||
Line 17: Line 28:
 * [[http://www.microapl.co.uk/apl/|APLX]] from MicroAPL ^1^ Note that with a default installation of Dyalog, some of the examples won't work: Dyalog offers the system variable `⎕ML` which can be set to various values. Only with `⎕ML←3` all examples will work. See DyalogMigrationLevels for details.
Line 19: Line 30:
 * [[http://www.dyalog.com/|Dyalog]] APL The core APL language is similar in all these products, although each vendor has added proprietory extensions. Where code is specific to a particular APL interpreter it will usually be indicated in the text.
Line 21: Line 32:
 * [[http://www-01.ibm.com/software/awdtools/apl/|APL2]] from IBM Once you're familiar with the material covered here, you might also want to check out [[LearnMoreApl/FurtherTopics|Further Topics in APL]] which covers some more advanced topics.
Line 23: Line 34:
 * [[http://www.apl2000.com/|APL+Win]] from APL2000 There is an exception, however:
Line 25: Line 36:
The core APL language is similar in all these products, although each vendor has added proprietory extensions. Where code is specific to a particular APL interpreter it will be indicated in the text. == VisualAPL ==

Note that one dialect, VisualAPL from APL2000, is fundamentally different from the other APLs. It follows a completely different paradigm, and for that reason doesn't fit into this tutorial.

In particular it

 * requires Visual Studio 2008.
 * fits fully into the .NET languages family.
 * offers truly managed code.
 * compiles APL code.

For more information about VisualAPL, see WhatMakesVisualAplOutstanding. There is also a [[http://forum.apl2000.com/viewtopic.php?t=325 | VisualAPL-specific tutorial]] available.
Line 28: Line 50:
The APL tutorial will be most effective if you actually try the example code in an APL interpreter. The APL tutorial will be most effective if you actually try the example code in an APL interpreter. Several vendors provide free or low cost evaluation licenses:
Line 30: Line 52:
To download a time-limited evaluation copy of APLX for Windows, Macintosh or Linux, visit MicroAPL's [[http://www.microapl.co.uk/apl/aplx_downloads.html|Download page]] === APLX ===

To download a time-limited evaluation copy of APLX for Windows, Macintosh or Linux, visit MicroAPL's [[http://www.microapl.co.uk/apl/aplx_downloads.html|Download page]]. You can also download an older Linux version which is free for personal use.

=== Dyalog ===
To apply for a free educational license, or a cheap (£50/€75) non-commercial copy of Dyalog APL visit Dyalog's [[http://www.dyalog.com/download-zone.htm|Download zone]]

=== NARS2000 ===
NARS2000, an Open Source APL, does not compete against the commercially available APL implementations, but it is a fully-fledged APL implementation. Apart from the last chapter (15) you can do everything mentioned in this tutorial with NARS2000.

=== APL+Win and APL2 ===
APL2000 and IBM offer their respective interpreters 'free' to educational establishments - contact them via their web site.

The [[FinnAplIdiomLibrary|Finn APL Idiom library]] (for first generation APL) and IBM's APL2 Phrases (for second generation APL) are useful references for students and professionals alike.
Line 33: Line 68:
To display the material in this tutorial properly, you need to ensure that (a) your browser can correctly handle Unicode (UTF-8) encoding, and (b) that you have a suitable APL Unicode font installed on your system. To display the material in this tutorial properly, you need to ensure that

 *
your browser can correctly handle Unicode (UTF-8) encoding
 *
you have a suitable APL '''Unicode''' font installed on your system. Note that non-Unicode APL fonts like "Dyalog Std" or "Causeway" won't work!
Line 37: Line 75:
APL code on this Wiki is encoded using Unicode. It should display correctly provided you have at least one of these APL fonts installed on your system: APL code on this Wiki is encoded using Unicode UTF-8. It should display correctly provided you have at least one of these APL fonts installed on your system:
Line 39: Line 77:
 * Adrian Smith's APL385 Unicode font (http://www.vector.org.uk/resource/apl385.ttf)
Line 40: Line 79:
 * MicroAPL's APLX Upright Unicode font (http://www.microapl.co.uk/download/aplx_unicode.ttf). If you have installed a desktop version of APLX (full or evaluation copy), you will have this font installed already.
Line 41: Line 81:
 * MicroAPL's APLX Upright Unicode font ([[http://www.microapl.co.uk/download/aplx_unicode.ttf|http://www.microapl.co.uk/download/aplx_unicode.ttf]]). If you have installed a desktop version of APLX (full or evaluation copy), you will have this font installed already.  * IBM's "Courier APL2" font which comes with APL2.
Line 43: Line 83:
 * Adrian Smith's APL385 Unicode font ([[http://www.vector.org.uk/resource/apl385.ttf|http://www.vector.org.uk/resource/apl385.ttf]])  * Phil Chastney's "SiMPL" font.
Line 45: Line 85:
 * Phil Chastney's "SiMPL medium" font which can be downloaded from the AplCharacters page. NARS2000 is using this font.
Line 46: Line 87:
The fonts are listed in the order in which the APL wiki tries to make use of them. Of course this has an impact only if you have installed more than one font.
Line 47: Line 89:
If you don't have either of these fonts installed, the Wiki's style sheets are set to fall back on Microsoft's Arial font, which does have the APL characters but is not a monospaced font. This means that code samples will display the correct characters, but may not be aligned correctly.

If you do not have any of the APL fonts listed nor Microsoft's Arial font, APL characters will not display properly.
If you don't have either of these fonts installed, the Wiki's style sheets are set to fall back on "Arial Unicode MS", "Lucida Sans Unicode" and, finally "monospace". This gives you a very good chance to see AplCharacters. Check here:
Line 54: Line 94:
    X 3 3½÷¼9  ª Y DATA[DATA] © A comment     X 3 3÷9 Y DATA[DATA] A comment
Line 57: Line 97:
|| {{attachment:apl_font_ok.jpg}} ||
Line 58: Line 99:
||{{attachment:apl_font_ok.jpg}}||
Line 60: Line 100:
If it looks more like this then you do not have the APL font installed:
Line 62: Line 101:
||{{attachment:apl_font_bad.jpg}}||
Line 64: Line 102:
(this is a picture, not text; it will '''always''' display APL chars)

If it looks more like this then you do not have an appropriate APL font installed:
|| {{attachment:apl_font_bad.jpg}} ||




{{{#!html
<div class="borderlesstable">
}}}
||<tableclass="borderlesstable">Back ||[[LearnApl/TutorialContents|Contents]] ||[[LearnApl/TutorialContents|Next]]> ||


{{{#!html
</div>
}}}
Line 65: Line 120:
[[LearnApl/TutorialContents|Next]] >
Line 67: Line 121:
&nbsp;
&nbsp;

CategoryAboutApl&nbsp;&nbsp;CategoryGuides&nbsp;&nbsp;CategoryAplX
CategoryAboutApl CategoryGuides CategoryAplx

Back

Contents

Next>

Learning APL

Note to contributors: Additions and corrections to this tutorial are welcome. Please note that it tries to be vendor neutral : where possible examples should work in any version of APL.

All pages of the tutorial are immutable - they can only be changed by admins. Add any suggestions for changes/additons to LearnApl/Discussion first

This tutorial aims to teach some of the basics of the APL language.

It is adapted from an original version written to accompany MicroAPL's APLX interpreter which is available in PDF form.

The present version has been slightly modified so that examples should work with a number of APLs, including:

Dialect

Checked

By

APLX from MicroAPL

(./)

SimonMarsden

Dyalog from Dyalog APL 1

(./)

KaiJaeger

APL2 from IBM

APL+Win from APL2000

(./)

JoeBlaze

NARS2000 see Nars2000

(./)

KaiJaeger

1 Note that with a default installation of Dyalog, some of the examples won't work: Dyalog offers the system variable ⎕ML which can be set to various values. Only with ⎕ML←3 all examples will work. See DyalogMigrationLevels for details.

The core APL language is similar in all these products, although each vendor has added proprietory extensions. Where code is specific to a particular APL interpreter it will usually be indicated in the text.

Once you're familiar with the material covered here, you might also want to check out Further Topics in APL which covers some more advanced topics.

There is an exception, however:

VisualAPL

Note that one dialect, VisualAPL from APL2000, is fundamentally different from the other APLs. It follows a completely different paradigm, and for that reason doesn't fit into this tutorial.

In particular it

  • requires Visual Studio 2008.
  • fits fully into the .NET languages family.
  • offers truly managed code.
  • compiles APL code.

For more information about VisualAPL, see WhatMakesVisualAplOutstanding. There is also a VisualAPL-specific tutorial available.

Trying APL

The APL tutorial will be most effective if you actually try the example code in an APL interpreter. Several vendors provide free or low cost evaluation licenses:

APLX

To download a time-limited evaluation copy of APLX for Windows, Macintosh or Linux, visit MicroAPL's Download page. You can also download an older Linux version which is free for personal use.

Dyalog

To apply for a free educational license, or a cheap (£50/€75) non-commercial copy of Dyalog APL visit Dyalog's Download zone

NARS2000

NARS2000, an Open Source APL, does not compete against the commercially available APL implementations, but it is a fully-fledged APL implementation. Apart from the last chapter (15) you can do everything mentioned in this tutorial with NARS2000.

APL+Win and APL2

APL2000 and IBM offer their respective interpreters 'free' to educational establishments - contact them via their web site.

The Finn APL Idiom library (for first generation APL) and IBM's APL2 Phrases (for second generation APL) are useful references for students and professionals alike.

Installing the APL font

To display the material in this tutorial properly, you need to ensure that

  • your browser can correctly handle Unicode (UTF-8) encoding
  • you have a suitable APL Unicode font installed on your system. Note that non-Unicode APL fonts like "Dyalog Std" or "Causeway" won't work!

Most modern Browsers (such as Internet Explorer 6 or later, Firefox v2 or later, Safari v3 or later) should be fine. However, we have found problems using Firefox v2 on the Macintosh (the Windows version is OK, and Firefox v3 on the Macintosh is OK).

APL code on this Wiki is encoded using Unicode UTF-8. It should display correctly provided you have at least one of these APL fonts installed on your system:

The fonts are listed in the order in which the APL wiki tries to make use of them. Of course this has an impact only if you have installed more than one font.

If you don't have either of these fonts installed, the Wiki's style sheets are set to fall back on "Arial Unicode MS", "Lucida Sans Unicode" and, finally "monospace". This gives you a very good chance to see AplCharacters. Check here:

Here's a sample of text which should display in the APL font:

    X ← 3 3⍴÷⍳9 ⋄ Y ← DATA[⍋DATA] ⍝ A comment

It should appear in your browser something like this:

apl_font_ok.jpg

(this is a picture, not text; it will always display APL chars)

If it looks more like this then you do not have an appropriate APL font installed:

apl_font_bad.jpg

Back

Contents

Next>


CategoryAboutApl CategoryGuides CategoryAplx

LearnApl/LearningApl (last edited 2018-01-17 09:25:47 by ErikKonstantopoulos)