Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2009-12-30 14:00:35
Size: 3664
Editor: anonymous
Comment: No content yet...
Revision 11 as of 2009-12-31 10:32:59
Size: 2944
Editor: anonymous
Comment: Clarification?
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from SamplePage
= SamplePage =
= Left, Right, or the Same? =
Something that was talked about at the November 2009 meeting of London-based APL users was that it might be useful for the APL Wiki to contain summaries of online discussions which had happened at places like comp.lang.apl and the dyalogusers mailing list. This is a first attempt at such a summarisation, brought about by suggestions that Dyalog might introduce some new primitive functions. If you don't like it, feel free to change it - if you really don't like it, feel free to delete it.
Line 4: Line 4:
~-<<SeeSaw(section="table-of-contents", show="true", seesaw="false", toshow="<<(Show>> table-of-contents)", tohide="<<(Hide>> table-of-contents)", speed="Slow")>>-~
<<TableOfContents>>
== Left, Right Dyadic Forms ==
Both Sharp APL and J have for some time included primitive functions which returned either their left or right arguments (unchanged). There was little contention about these dyadics aside from naming, some preferring to follow the Sharp APL "lev" and "dex", others preferring J's "left" and "right".
Line 7: Line 7:
== Overview ==
First thing to note is that this page is useful only when displayed in the Text editor.
The symbols proposed are ⊣ and ⊢ respectively.
Line 10: Line 9:
This page contains examples of the most common (but not all) formatting tasks. It is probably the easiest way to find out how to solve every-day formatting problems. Notice that these functions are quite different from APL2's "left" and "right".
||Could someone explain how lev and dex differ from the APL2 implementation? We just added APL2-compatible support for ⊣ and ⊢ in APLX Version 5. Sounds wrong to have an incompatible implementation in Dyalog if it can be avoided (-- SimonMarsden <<DateTime(2009-12-31T10:14:51Z)>>) ||
Line 12: Line 12:
For a complete reference see HelpOnEditing As I hinted, APL2's  ⎕L and ⎕R are something completely different (hiding under a similar name) - I don't think APL2 recognises the ⊣ and ⊢ characters (I just got a SYNTAX ERROR when I tried 2 ⊣ 3 (APL2 V2 SL 14 on Windows 7).
Line 14: Line 14:
== Paragraphs without and with embedded APL code ==
When writing a paragraph, remember that in HTML whitespace is ignored. So this is shown as an ordinary paragraph while when editing it you will see that it is not. Not exactly at least.
== Monadic Form ==
Agreement on the monadic(s) was less uniform, partly because Sharp APL offered a different model from J.
Line 17: Line 17:
 . Note that a blank at the beginning of a line provokes indention. Some participants preferred the Sharp model, where monadic "lev" offered a black hole into which unwanted results could be thrown.
Line 19: Line 19:
You can embed APL code in a paragraph: `{{⍵/⍨2=+⌿0=⍵∘.|⍵}⍳⍵}` is an example. Others preferred the J model, where monadic ] and monadic [ are both called "same" and do nothing.
Line 21: Line 21:
One paragraph is separated from another by a blank line. Some participants found it hard to see much utility for the monadic form.
Line 23: Line 23:
== APL Code ==
To enter a block of APL code:
== A Related Issue ==
While most versions of APL react to monadic + and a non-numeric argument with DOMAIN ERROR (consistent with dyadic + and non-numeric arguments), Dyalog has long allowed this case and returns the argument unchanged - it is equivalent to "same" in this case. Monadic + on an numeric argument is also an identity, for real numbers.
Line 26: Line 26:
{{{
    Prim←{{⍵/⍨2=+⌿0=⍵∘.|⍵}⍳⍵}
    Prim 10
2 3 5 7
}}}
Note that a blank at the beginning provokes indention as it does with ordinary paragraphs:
What makes this matter is that Dyalog might at some point introduce complex numbers, meaning that monadic + should no longer be an identity. Going forward (as we dynamic business leaders say) this ought not be a problem, because monadic "same" offers identity for all arguments.
Line 33: Line 28:
 . {{{
    Prim←{{⍵/⍨2=+⌿0=⍵∘.|⍵}⍳⍵}
    Prim 10
2 3 5 7
}}}
But, some code exploits Dyalog's specific domain extension and may begin to fail if and when complex numbers are introduced. At this point there has been no resolution of this issue - opinions are divided about whether backward compatibility to what might be considered a design error should be adopted.
Line 39: Line 30:
== Links ==
There are all sorts of different links available. See HelpOnLinking for all details. The most common links can be divided into three categroies:

 * '''Local links''', e.g. links to pages within the same wiki
 * '''Interwiki links''', e.g. links to pages in other wikis
 * '''Ordinary links''', e.g. links to other places on the web

=== Local Links ===
==== CamelCase links ====
By using !CamelCase one creates an '''''implicit ''''' or '''''automatic''''' link in !MoinMoin. This is by far the easiest way to create a link.

==== Pages with blanks in their name ====
If their is a page with the name "This is a valid Page name", you can link to it: [[This is a valid Page name]]

==== Other local links ====
This is an example of a [[SamplePage|fully-fledged description]] (don't click at this link!) of where a link will point to but without showing the page name at all. This kind of link is called a '''free link'''.

=== Interwiki links ===
To link to the APL-related page in the Wikipedia: WikiPedia:APL_programming_language

This can also be a free link: [[WikiPedia:APL_programming_language|Information about APL in the Wikipedia]]

=== Ordinary links ===
If you want the URL itself to be the link text: http://www.vector.org.uk/

Or as a free link: [[http://www.vector.org.uk/|Vector, the respected magazine of BAA]]

=== Preventing links ===
The fact that !CamelCasing creates a link automatically is sometimes unwanted. For example, when you refer to the software package !SubVersion, you might or might not want it to become a link.

== Bold, italic und stuff ==
This is '''bold''', this is ''italic'' and this is '''''both'''''.

You can also --(cross out)-- pieces of text; nice feature to emphasize a change.

== Lists ==
Note the blank at the beginning of each line in the editor - won't work without it!

=== Ordered Lists ===
 1. First entry
 1. Second entry

=== Unordered Lists ===
 * An entry
 * Another entry

== Tables ==
Table are not exactly easy in !MoinMoin I am afraid.
||||||||<rowclass="odd">'''Main Customers''' ||
||VW ||Germany ||
||<rowclass="odd">BMW ||Germany ||
||Vauxhall ||UK ||
||<rowclass="odd">Toyota ||Japan ||
||Saab ||Sweden ||




== Headings ==
=== Sub Headings ===
==== Sub-sub Headings ====
----
CategoryEssays

Left, Right, or the Same?

Something that was talked about at the November 2009 meeting of London-based APL users was that it might be useful for the APL Wiki to contain summaries of online discussions which had happened at places like comp.lang.apl and the dyalogusers mailing list. This is a first attempt at such a summarisation, brought about by suggestions that Dyalog might introduce some new primitive functions. If you don't like it, feel free to change it - if you really don't like it, feel free to delete it.

Left, Right Dyadic Forms

Both Sharp APL and J have for some time included primitive functions which returned either their left or right arguments (unchanged). There was little contention about these dyadics aside from naming, some preferring to follow the Sharp APL "lev" and "dex", others preferring J's "left" and "right".

The symbols proposed are ⊣ and ⊢ respectively.

Notice that these functions are quite different from APL2's "left" and "right".

Could someone explain how lev and dex differ from the APL2 implementation? We just added APL2-compatible support for ⊣ and ⊢ in APLX Version 5. Sounds wrong to have an incompatible implementation in Dyalog if it can be avoided (-- SimonMarsden 2009-12-31 10:14:51)

As I hinted, APL2's  ⎕L and ⎕R are something completely different (hiding under a similar name) - I don't think APL2 recognises the ⊣ and ⊢ characters (I just got a SYNTAX ERROR when I tried 2 ⊣ 3 (APL2 V2 SL 14 on Windows 7).

Monadic Form

Agreement on the monadic(s) was less uniform, partly because Sharp APL offered a different model from J.

Some participants preferred the Sharp model, where monadic "lev" offered a black hole into which unwanted results could be thrown.

Others preferred the J model, where monadic ] and monadic [ are both called "same" and do nothing.

Some participants found it hard to see much utility for the monadic form.

While most versions of APL react to monadic + and a non-numeric argument with DOMAIN ERROR (consistent with dyadic + and non-numeric arguments), Dyalog has long allowed this case and returns the argument unchanged - it is equivalent to "same" in this case. Monadic + on an numeric argument is also an identity, for real numbers.

What makes this matter is that Dyalog might at some point introduce complex numbers, meaning that monadic + should no longer be an identity. Going forward (as we dynamic business leaders say) this ought not be a problem, because monadic "same" offers identity for all arguments.

But, some code exploits Dyalog's specific domain extension and may begin to fail if and when complex numbers are introduced. At this point there has been no resolution of this issue - opinions are divided about whether backward compatibility to what might be considered a design error should be adopted.


CategoryEssays

Left, Right, or the Same? (last edited 2015-02-09 20:29:13 by KaiJaeger)