Talk:APL syntax and symbols
This is the talk page for discussing improvements to the APL syntax and symbols article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1 |
![]() | This article was nominated for deletion on 11 August 2009. The result of the discussion was Withdrawn. |
Comment
APL symbols from unicode table: (Some many of these aren't in the article.)
⌶⌷⌸⌹⌺⌼⌽⌾⌿⍀⍁⍂⍃⍄⍅⍆⍈⍉⍊⍋⍌⍍⍎⍏⍐⍑⍒⍔⍕⍖⍗⍘⍙⍚⍛⍜⍝⍞⌻⍇⍓⍟⍠⍡⍢⍣⍤⍥⍦⍧⍨⍩⍪⍫⍬⍭⍮⍯⍰⍱⍲⍳⍴⍵⍶⍷⍸⍹⍺⎕
The other ones that aren't in the APL block but are APL symbols:
- ' apl quote; 0027
- ¯ apl overbar; 00AF
- ∘ apl jot; 2218
- ∣ apl stile; 2223
- ∼ apl tilde; 223C
- ⋆ star; 22C6
- ⌈ upstile; 2308
- ⌊ downstile; 230A
These are all according to Unicode 5. —porges(talk) 10:39, 15 August 2006 (UTC)
⍞ is "quote quad"; the print function [1] ⍡ = snout ⍢ = frog ⍣ = sourpuss ⍤ = hoot ⍥ = holler ⍨ = smirk/frown ⍝ = lamp (comment indicator) [2] —porges(talk) 06:39, 31 August 2006 (UTC)
"functions"
Can someone who knows APL go through and fix the nomenclature used in the article? I'm told "function" is not the right term. --Cybercobra (talk) 19:28, 13 August 2009 (UTC)
- I had a look at the raw text because it would be nice to get the operators in there as well, in their own table, bearing in mind that these tables are for the ISO 8485:1989 standard and don't include the ISO/IEC 13751:2001 enhancements. Perhaps another three table could be added for those.
- But then I saw the wiki syntax required to build tables! No doubt using the defaults is straightforward enough but ... Sorry, it's not for me. Phil Last (talk) 07:43, 14 August 2009 (UTC)
- Phil, pressing the
button above the edit window will generate a table framework for you to use. Alternatively, HTML table syntax will also work (though not usually recommended, except in templates), so that might work if you already have some APL table-generating code. Just a thought. --NSH001 (talk) 08:26, 14 August 2009 (UTC)
- Phil, pressing the
- Had a go. There is a new intro, and a sketch the rules of syntax. I'd like to see the result retitled APL syntax and symbols. 5jt (talk) 13:17, 14 August 2009 (UTC)
- I have "moved" (renamed) the page as requested, as this is clearly a better title for the page. This should not necessarily be taken as the final name of the page; it can be moved again if a consensus for change emerges in discussion here. --NSH001 (talk) 15:38, 14 August 2009 (UTC)
Structure
Cybercobra has provoked me into writing sections on syntax. They could use revision by a grown up (Roger?) but I'm pleased that they display even to a reader unacquainted with APL the source of its brevity. The tables need revision and extension.
A simple and useful organisation might be into Functions, Operators and Miscellaneous. The last should include lamp/comment and diamond/separator.
The tables should distinguish the names of the glyphs from the functions and operators they denote. For example, the glyph ⍴ is called rho and denotes the monadic function shape and the dyadic function reshape.
Glyphs implemented by only some interpreters (eg ⍷ ⍣) should be so annotated, but should appear as Functions or Operators. Glyphs assigned to APL by the Unicode standard but nowhere in use should appear in Miscellaneous. 5jt (talk) 13:17, 14 August 2009 (UTC)
- Nice work Stephen Phil Last (talk) 11:21, 15 August 2009 (UTC)
Added new table "Operators"
I've only put in the original standard operators of reduction,scan and inner/outer products. Added Symbol column to distinguish (/) from (+/B) and labelled Meaning as (oif example) because I couldn't describe the definition of reduction in 6 words. Phil Last (talk) 22:16, 16 August 2009 (UTC)
Unicode codepoints
There should be an explanation regarding the choice of Unicode code points. Characters that were specifically added to Unicode to encode APL symbols are unquestionable, but other characters in tables seem to be chosen arbitrarily and with no relevance to what actual implementations and translation tables for legacy encodings use. Is there any official source regarding these? Does Unicode standard specify what to do with them? Characters for star, stile, tilde, and minus are questionable as usually different codes are used (i.e. the simplest ASCII equivalents: asterisk, pipe, tilde, and hyphen-minus, respectively). Additionally I'm certain that epsilon should be ∊ (U+220A), not ∈ (U+2208). — mwgamera (talk) 04:27, 9 May 2013 (UTC)
Example functions etc.
I've added a flow control section, with some example functions based very loosely on an IBM manual. I've put in placeholder text for "GOTO" operations, I need to hunt out more detail for that since one of the original manuals gives Iverson's rationale which is persuasive even for those who (like me) are of an ALGOL persuasion. Please don't jump on my last para until I've had more time to research this. MarkMLl (talk) 22:50, 19 September 2014 (UTC)
- Defined function and operators are either niladic, monadic, or ambivalent. Only Dyalog and NARS2000 make, as an extension, additional distinction between ambivalent and monadic in header. I couldn't find direct contradiction of your statement regarding a possibility of having same-named functions of different adicity, but I can't find either this being explicitly left for implementations to decide in ISO 13751. I think it's incorrect to say it's implementation defined, but feel free to prove me wrong if that was so specified somewhere, especially if it was before the ISO. In meantime, here's your ambivalent CURVEAREA function. — mwgamera (talk) 05:17, 20 September 2014 (UTC)
∇ AREA←DEGREES CURVEAREA RADIUS AREA←○RADIUS*2 →(0=⎕NC'DEGREES')/0 AREA←AREA×DEGREES÷360 ∇
Header line in Dyalog and NARS2000 should be:
∇ AREA←{DEGREES} CURVEAREA RADIUS … ∇