SHARP APL: Difference between revisions
Miraheze>Adám Brudzewsky No edit summary |
No edit summary |
||
(26 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox array language | {{Infobox array language | ||
| logo = [[File:Sharp APL logo.png]] | |||
| array model = [[Flat array model|flat]] with [[Box|boxes]] | | array model = [[Flat array model|flat]] with [[Box|boxes]] | ||
| index origin = 0 or 1 | | index origin = 0 or 1 | ||
| function styles = [[defined | | function styles = [[defined function]]s | ||
| numeric types = | | numeric types = [[complex]] floats | ||
| unicode support = none | | unicode support = none | ||
| released = around 1979 | | released = 1976 via [[time-sharing]]; around 1979 as a product | ||
| withdrawn = around 1993 | |||
| latest release = 002.140 / 1988 | |||
| platforms = S/370, x86 | |||
| operating systems = DOS/390, DOS, UNIX (AIX, Solaris), Linux | |||
| license = Free for personal use / Proprietary commercial software | |||
| developer = [[I.P. Sharp Associates]] | | developer = [[I.P. Sharp Associates]] | ||
| influenced by = [[APL\360]] | | influenced by = [[APL\360]] | ||
| influenced = [[J]], [[A+]], [[K]], [[Dyalog APL]] | | influenced = [[SAX]], [[J]], [[A+]], [[K]], [[Dyalog APL]], [[SHARP APL/HP]] | ||
| file ext = .saw, .saf, .sam | |||
| download = [http://www.sigapl.org/Archives/waterloo_archive/apl/sharp.apl/index.html SIGAPL] | |||
}} | }} | ||
[[File:Old SHARP APL.png|thumb|right|SHARP APL running under DOSBox]] | |||
'''SHARP APL''' | '''SHARP APL''' was an APL implementation offered by [[I.P. Sharp Associates]] (IPSA), originally as part of its [[time-sharing]] service and later as a stand-alone product. It was split off from [[STSC]]'s [[APL*PLUS]], which until then had been sold jointly by the two companies. SHARP APL was the source of many developments in [[flat array theory]], driven by [[Ken Iverson]] and other APL designers at IPSA. | ||
== Primitive functions == | == Primitive functions == | ||
Line 104: | Line 112: | ||
| <source lang=apl inline>@</source> || || See [[#Miscellaneous|Miscellaneous]] || 0 ∞ || [[Squad Index|From]] | | <source lang=apl inline>@</source> || || See [[#Miscellaneous|Miscellaneous]] || 0 ∞ || [[Squad Index|From]] | ||
|- | |- | ||
| <source lang=apl inline>⍳</source> || 1 || [[ | | <source lang=apl inline>⍳</source> || 1 || [[Index Generator|Count]] || 1 0 || [[Index Of]] | ||
|- | |- | ||
| <source lang=apl inline>⍸</source> || || || ∞ ∞ || [[Indices of Match|Index]] | | <source lang=apl inline>⍸</source> || || || ∞ ∞ || [[Indices of Match|Index]] | ||
Line 200: | Line 208: | ||
| <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| [[close Under|Under]] | | <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| [[close Under|Under]] | ||
|- | |- | ||
| <source lang=apl inline>¨</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || || [[ | | <source lang=apl inline>¨</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || ||rowspan="2"|With ([[Bind]]) || | ||
|- | |- | ||
| <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>n</source> || <source lang=apl inline>mf</source> || | | <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>n</source> || <source lang=apl inline>mf</source> || || | ||
|- | |- | ||
| <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>2</source> || <source lang=apl inline>∞ ∞</source> || [[Alternant]] || [[Inner Product|Inner-product]] | | <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>2</source> || <source lang=apl inline>∞ ∞</source> || [[Alternant]] || [[Inner Product|Inner-product]] | ||
|- | |- | ||
| <source lang=apl inline>.</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || || <source lang=apl inline>∞ ∞</source> || || [[Tie]], [[Outer | | <source lang=apl inline>.</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || || <source lang=apl inline>∞ ∞</source> || || [[Tie]], [[Outer Product|Outer-product]] | ||
|- | |- | ||
| <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>m</source> || <source lang=apl inline>mf</source> || || [[Ply]] || | | <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>m</source> || <source lang=apl inline>mf</source> || || [[Ply]] || | ||
Line 222: | Line 230: | ||
[https://www.jsoftware.com/papers/satn40.htm SATN-40] describes the addition of complex numbers to SHARP APL. | [https://www.jsoftware.com/papers/satn40.htm SATN-40] describes the addition of complex numbers to SHARP APL. | ||
== | == SHARP APL Technical Notes == | ||
Features of SHARP APL were documented in "technical notes" issued by IPSA. These notes are numbered following the scheme "SATN-0". Earlier notes typically had no author listed. A [https://www.jsoftware.com/papers/SATN.pdf pdf collection] of SHARP APL Technical Notes is hosted at jsoftware.com, as are html transcriptions of some notes, linked in the table below. | |||
[https:// | {|class=wikitable | ||
! Number !! Issued !!colspan=2| Revised !! Author !! Title | |||
|- | |||
| 0 || 1976-01-01 || || || || SATN Introduction | |||
|- | |||
| 1 || 1976-01-01 || || || || TASKID | |||
|- | |||
| 2 || || 5 || 1979-02-14 || || Control Messages | |||
|- | |||
| 3 || 1976-01-01 || || || || ⎕OUT | |||
|- | |||
| 4 || || 2 || 1978-04-01 || || N-tasks and B-tasks | |||
|- | |||
| 5 || || 2 || 1978-08-01 || || Batch APL | |||
|- | |||
| 6 || 1976-01-01 || || || || [[Execute]] | |||
|- | |||
| 7 || 1976-01-01 || || || || Latent Expression | |||
|- | |||
| 8 || || 2 || 1978-03-01 || || HSPRINT | |||
|- | |||
| 9 || || 1 || 1979-08-01 || John D. Burger || Usage Inquiry System | |||
|- | |||
| 10 || || 2 || 1978-06-01 || || SORTREQ | |||
|- | |||
| 11 || 1976-01-01 || || || || )RESET | |||
|- | |||
| 12 || 1976-01-01 || || || || )COPY | |||
|- | |||
| 13 || 1978-03-10 || || || || Early Warnings | |||
|- | |||
| 14 || || 2 || 1978-08-15 || || Package - A New Variable Type | |||
|- | |||
| 15 || || || || || Index | |||
|- | |||
| 16 || 1976-04-20 || || || || File System Must-Write Buffers | |||
|- | |||
| 17 || 1976-06-01 || || || || Formatting Primitive | |||
|- | |||
| 18 || 1976-07-01 || || || || ⎕FMT | |||
|- | |||
| 19 || 1977-01-01 || || || || Fileprint | |||
|- | |||
| 20 || || 4 || 1978-06-01 || || System Variables, Session Variables and System Functions | |||
|- | |||
| 21 || || 1 || 1978-06-01 || || ⎕WS and ⎕FD | |||
|- | |||
| 22 || || 2 || 1979-01-01 || [[Bob Bernecky]] and Mike Symes || APL Worspace Transfer | |||
|- | |||
| 23 || 1977-06-10 || 1 || 1978-07-15 || [[Bob Bernecky]] || [[Comparison tolerance|Comparison Tolerance]] ([https://www.jsoftware.com/papers/satn23.htm web]) | |||
|- | |||
| 24 || 1977-03-23 || || || || Symbol Table | |||
|- | |||
| 25 || 1977-05-15 || || || || Extensions to Argument Passing | |||
|- | |||
| 26 || 1977-09-10 || || || || Enhancements to the File System | |||
|- | |||
| 28 || 1977-07-11 || || || || Terminal Control | |||
|- | |||
| 29 || 1978-06-15 || || || || System Time and Timestamps | |||
|- | |||
| 30 || 1979-01-01 || || || || Numeric Display | |||
|- | |||
| 31 || 1979-02-01 || || || || [[Line editor|Line Editing]] in SHARP APL | |||
|- | |||
| 32 || 1979-03-30 || || || || Shared Variables | |||
|- | |||
| 33 || 1979-03-26 || || || || Event Trapping | |||
|- | |||
| 34 || 1980-08-15 || || || [[Bob Bernecky]] || [[Replicate|Replication]] | |||
|- | |||
| 35 || 1980-08-15 || || || Peter Wooster || Extended [[Grade|Upgrade and Downgrade]] | |||
|- | |||
| 36 || 1980-04-20 || || || [[Ken Iverson]] || [[Direct definition|Direct Definition]] | |||
|- | |||
| 37 || || 1 || 1982-06-01 || John D. Burger || IBM 3270 User Guide | |||
|- | |||
| 39 || 1981-06-01 || || || [[Richard Lathwell]] || [https://www.jsoftware.com/papers/satn39.htm The SHARP APL S-task Interface] | |||
|- | |||
| 40 || 1981-06-20 || || || [[Eugene McDonnell]] || [[Complex number|Complex Numbers]] ([https://www.jsoftware.com/papers/satn40.htm web]) | |||
|- | |||
| 41 || 1981-06-20 || || || [[Ken Iverson]] || [[Close composition|Composition]] and [[Box function|Enclosure]] ([https://www.jsoftware.com/papers/satn41.htm web]) | |||
|- | |||
| 42 || 1982-04-01 || || || [[Ken Iverson]] || [[Determinant]]-Like Functions Produced by the Dot-Operator ([https://www.jsoftware.com/papers/satn42.htm web]) | |||
|- | |||
| 43 || 1982-11-05 || || || Peter Wooster || Improved Display for Enclosed Arrays and a New System Variable ⎕PS | |||
|- | |||
| 44 || 1983-04-02 || || || Robert C. Metzger || Enhancements to Event Handling | |||
|- | |||
| 45 || 1983-05-02 || || || Various || [https://www.jsoftware.com/papers/satn45.htm Language Extensions of May 1983] | |||
|- | |||
| 46 || 1983-08-05 || || || [[Eric Iverson]] || Enhancements Provided in Update #1 to the May 1983 Release of SHARP APL | |||
|- | |||
| 47 || 1983-10-01 || || || Mike Symes || IBM 3270 User Guide (IDSH) | |||
|- | |||
| 48 || 1983-11-30 || || || John D. Burger || Workspace 1 HCPRINT | |||
|} | |||
{{APL | {{APL dialects}}[[Category:APL dialects]][[Category:Flat array languages]][[Category:Leading axis languages]] |
Revision as of 08:36, 24 May 2021
SHARP APL was an APL implementation offered by I.P. Sharp Associates (IPSA), originally as part of its time-sharing service and later as a stand-alone product. It was split off from STSC's APL*PLUS, which until then had been sold jointly by the two companies. SHARP APL was the source of many developments in flat array theory, driven by Ken Iverson and other APL designers at IPSA.
Primitive functions
Arithmetic
Scalar
All scalar functions have rank zero.
Glyph | Monadic | Dyadic |
---|---|---|
+ |
Conjugate/Identity | Addition |
- |
Negate | Subtraction |
× |
Signum | Multiplication |
÷ |
Reciprocal | Division |
* |
Exponential | Power |
⍟ |
Natural Logarithm | Base-⍺ Logarithm |
| |
Magnitude | Residue |
! |
Factorial | Out-Of/Combinations |
⌊ |
Floor | Minimum |
⌈ |
Ceiling | Maximum |
○ |
Pi Times | Circle functions |
∧ |
And/Least Common Multiple (LCM) | |
∨ |
Or/Greatest Common Divisor (GCD) | |
⍲ |
Nand | |
⍱ |
Nor | |
~ |
Not | See Miscellaneous |
? |
Roll | See Non-scalar |
Non-scalar
Glyph | Rank | Monadic | Ranks | Dyadic |
---|---|---|---|---|
⌹ |
2 | Matrix inverse | ∞ 2 | Matrix divide |
? |
See Scalar | * * | Deal | |
⊤ |
∞ ∞ | Encode | ||
⊥ |
∞ ∞ | Decode |
Relational
Glyph | Rank | Monadic | Ranks | Dyadic |
---|---|---|---|---|
= |
See Miscellaneous | 0 0 | Equals | |
≠ |
See Miscellaneous | 0 0 | Not Equals | |
< |
See Structural | 0 0 | Less Than | |
≤ |
0 0 | Less Than or Equal | ||
≥ |
0 0 | Greater Than or Equal | ||
> |
See Structural | 0 0 | Greater Than | |
≡ |
∞ ∞ | Match | ||
∊ |
0 ∞ | Membership | ||
⍷ |
∞ ∞ | Find |
Indexing
Glyph | Rank | Monadic | Ranks | Dyadic |
---|---|---|---|---|
@ |
See Miscellaneous | 0 ∞ | From | |
⍳ |
1 | Count | 1 0 | Index Of |
⍸ |
∞ ∞ | Index | ||
⍋ |
∞ | Numeric Grade up | ∞ ∞ | Character Grade up |
⍒ |
∞ | Numeric Grade down | ∞ ∞ | Character Grade down |
Structural
Glyph | Rank | Monadic | Ranks | Dyadic |
---|---|---|---|---|
⍴ |
∞ | Shape of | 1 ∞ | Reshape |
↑ |
See Miscellaneous | 1 ∞ | Take | |
↓ |
∞ | Raze | 1 ∞ | Drop |
< |
∞ | Enclose/Box | See Relational | |
⊃ |
∞ | Conditional Enclose | ∞ ∞ | Link |
> |
0 | Disclose/Open | See Relational | |
, |
∞ | Ravel | ∞ ∞ | Catenate |
⍪ |
∞ | Table | ∞ ∞ | Catenate-Down |
⌽ |
1 | Reverse | 0 1 | Rotate |
⊖ |
∞ | Reverse-Down | ∞ ∞ | Rotate-Down |
⍉ |
∞ | Monadic Transpose | 0 ∞ | Dyadic Transpose |
Miscellaneous
Glyph | Rank | Monadic | Ranks | Dyadic |
---|---|---|---|---|
⊣ |
∞ | Stop | ∞ ∞ | Left |
⊢ |
∞ | Pass | ∞ ∞ | Right |
≠ |
∞ | Nubsieve | See Relational | |
↑ |
∞ | Nub | See Structural | |
= |
∞ | Nubin | See Relational | |
~ |
See Scalar | ∞ ∞ | Less | |
@ |
1 | All | See Indexing | |
⍕ |
∞ | Monadic Format | * ∞ | Dyadic Format |
⍎ |
* | Execute |
Primitive Operators
Glyph | Operands | Ranks | Monadic Call | Dyadic Call | ||
---|---|---|---|---|---|---|
/ |
f |
∞ |
Reduce | |||
⌿ |
f |
∞ |
Reduce-down | |||
\ |
f |
∞ |
Scan | |||
⍀ |
f |
∞ |
Scan-down | |||
/ |
m |
∞ |
Copy/Compress | |||
⌿ |
m |
∞ |
Copy-down/Compress-down | |||
\ |
m |
∞ |
Expand | |||
⍀ |
m |
∞ |
Expand-down | |||
⊂ |
f |
∞ |
rf lf |
Swap | ||
& |
f |
∞ |
∞ ∞ |
Select | ||
⍤ |
f |
g |
mg |
mg mg |
On (close Over) | |
⍤ |
f |
n |
n |
n n |
Rank | |
⍤ |
m |
g |
mg |
mg mg |
Cut | |
⍥ |
f |
g |
mg |
mg mg |
Upon (close Atop) | |
¨ |
f |
g |
mg |
mg mg |
Under | |
¨ |
m |
g |
mg |
With (Bind) | ||
¨ |
f |
n |
mf |
|||
. |
f |
g |
2 |
∞ ∞ |
Alternant | Inner-product |
. |
m |
g |
∞ ∞ |
Tie, Outer-product | ||
. |
f |
m |
mf |
Ply |
Implementation
Numeric types
SHARP originally supported only real numbers using double (8-byte) precision. Numbers were stored in one of three types:
- Boolean, with one bit per value
- Integer, with four bytes per value
- Floating, with eight bytes per value
SATN-40 describes the addition of complex numbers to SHARP APL.
SHARP APL Technical Notes
Features of SHARP APL were documented in "technical notes" issued by IPSA. These notes are numbered following the scheme "SATN-0". Earlier notes typically had no author listed. A pdf collection of SHARP APL Technical Notes is hosted at jsoftware.com, as are html transcriptions of some notes, linked in the table below.
Number | Issued | Revised | Author | Title | |
---|---|---|---|---|---|
0 | 1976-01-01 | SATN Introduction | |||
1 | 1976-01-01 | TASKID | |||
2 | 5 | 1979-02-14 | Control Messages | ||
3 | 1976-01-01 | ⎕OUT | |||
4 | 2 | 1978-04-01 | N-tasks and B-tasks | ||
5 | 2 | 1978-08-01 | Batch APL | ||
6 | 1976-01-01 | Execute | |||
7 | 1976-01-01 | Latent Expression | |||
8 | 2 | 1978-03-01 | HSPRINT | ||
9 | 1 | 1979-08-01 | John D. Burger | Usage Inquiry System | |
10 | 2 | 1978-06-01 | SORTREQ | ||
11 | 1976-01-01 | )RESET | |||
12 | 1976-01-01 | )COPY | |||
13 | 1978-03-10 | Early Warnings | |||
14 | 2 | 1978-08-15 | Package - A New Variable Type | ||
15 | Index | ||||
16 | 1976-04-20 | File System Must-Write Buffers | |||
17 | 1976-06-01 | Formatting Primitive | |||
18 | 1976-07-01 | ⎕FMT | |||
19 | 1977-01-01 | Fileprint | |||
20 | 4 | 1978-06-01 | System Variables, Session Variables and System Functions | ||
21 | 1 | 1978-06-01 | ⎕WS and ⎕FD | ||
22 | 2 | 1979-01-01 | Bob Bernecky and Mike Symes | APL Worspace Transfer | |
23 | 1977-06-10 | 1 | 1978-07-15 | Bob Bernecky | Comparison Tolerance (web) |
24 | 1977-03-23 | Symbol Table | |||
25 | 1977-05-15 | Extensions to Argument Passing | |||
26 | 1977-09-10 | Enhancements to the File System | |||
28 | 1977-07-11 | Terminal Control | |||
29 | 1978-06-15 | System Time and Timestamps | |||
30 | 1979-01-01 | Numeric Display | |||
31 | 1979-02-01 | Line Editing in SHARP APL | |||
32 | 1979-03-30 | Shared Variables | |||
33 | 1979-03-26 | Event Trapping | |||
34 | 1980-08-15 | Bob Bernecky | Replication | ||
35 | 1980-08-15 | Peter Wooster | Extended Upgrade and Downgrade | ||
36 | 1980-04-20 | Ken Iverson | Direct Definition | ||
37 | 1 | 1982-06-01 | John D. Burger | IBM 3270 User Guide | |
39 | 1981-06-01 | Richard Lathwell | The SHARP APL S-task Interface | ||
40 | 1981-06-20 | Eugene McDonnell | Complex Numbers (web) | ||
41 | 1981-06-20 | Ken Iverson | Composition and Enclosure (web) | ||
42 | 1982-04-01 | Ken Iverson | Determinant-Like Functions Produced by the Dot-Operator (web) | ||
43 | 1982-11-05 | Peter Wooster | Improved Display for Enclosed Arrays and a New System Variable ⎕PS | ||
44 | 1983-04-02 | Robert C. Metzger | Enhancements to Event Handling | ||
45 | 1983-05-02 | Various | Language Extensions of May 1983 | ||
46 | 1983-08-05 | Eric Iverson | Enhancements Provided in Update #1 to the May 1983 Release of SHARP APL | ||
47 | 1983-10-01 | Mike Symes | IBM 3270 User Guide (IDSH) | ||
48 | 1983-11-30 | John D. Burger | Workspace 1 HCPRINT |
APL dialects [edit] | |
---|---|
Maintained | APL+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ Dyalog APL Vision ∙ dzaima/APL ∙ GNU APL ∙ Kap ∙ NARS2000 ∙ Pometo |
Historical | A Programming Language ∙ A+ (A) ∙ APL# ∙ APL2C ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Extended Dyalog APL ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Goal, Klong, Q) ∙ KamilaLisp ∙ Lang5 ∙ Lil ∙ Nial ∙ RAD ∙ Uiua |
Overviews | Comparison of APL dialects ∙ Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages |