|
From: | Hans-Peter Sorge |
Subject: | Re: APL Christmas 2020 doodle: Tree |
Date: | Fri, 25 Dec 2020 22:14:21 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
Thank you so much for a rapid answer. With no background into the history of the language, I would not have known where to look for this sort of thing.
I see now in Dyalog's "Mastering Dyalog APL, 1st Ed.", ~p372 "Specialists Section" there are discussions about this and related language differences.There are a few items to digest there in regards to their ⎕ML System Variable and how it handles APL2 (IBM) vs. Dyalog APL dialects.
The more I explore, the more I question whether I must choose to study "the APL2 path" or "the Dyalog APL path" ... :) I hope I do not have to choose!So far, trying both dialects while learning has illuminated some concepts for me, but I fear I might confuse myself with implementation differences.
Again, thank you very much for the insight.
-Russ
On Wed, 23 Dec 2020 at 23:21, Kacper Gutowski <mwgamera@gmail.com> wrote:
On Wed, Dec 23, 2020 at 10:46:13PM -0800, Russtopia wrote:
> [Dyalog]
> 9 2 9/↑'∘⌹∘' ' ⌹ '
> ∘∘∘∘∘∘∘∘∘⌹⌹∘∘∘∘∘∘∘∘∘
> ⌹⌹
>
> [GNU]
> 9 2 9/↑'∘⌹∘' ' ⌹ '
> ∘∘∘∘∘∘∘∘∘⌹⌹∘∘∘∘∘∘∘∘∘
>
> Is it unexpected that GNU APL does not apply the Compress (/) across
> multiple right-hand items?
There are some subtle differences in how / works in Dyalog and in GNU APL,
but here the reason is much more prosaic.
By default the monadic ↑ and ⊃ are swapped in Dyalog. It has a setting
called ⎕ML that controls it, and if you set ⎕ML←2, it will interpret
this _expression_ the same way GNU APL does:
9 2 9/⊃'∘⌹∘' ' ⌹ '
∘∘∘∘∘∘∘∘∘⌹⌹∘∘∘∘∘∘∘∘∘
⌹⌹
-k
[Prev in Thread] | Current Thread | [Next in Thread] |