Re: APL Christmas 2020 doodle: Tree

2020-12-24 Thread Russtopia
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  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
>


Re: Library settings fail

2020-12-24 Thread Dr . Jürgen Sauermann

  
  
Hi Hans-Peter,
  
  thanks, see below.
  
  Best Regards,
  Jürgen
  

On 12/24/20 12:25 AM, Hans-Peter Sorge
  wrote:

Hi,
  
  
  A bit strange, as I did not notice it up to now.
  
  
  This is the starting point 
  
  [joy@joyw520 WSTEST]$ ll
  
  insgesamt 4
  
  drwxrwxr-x. 2 joy joy 4096 23. Dez 23:34 wslib2
  
  
  
  Creating a name .
  
  [joy@joyw520 WSTEST]$ touch wslib2/LLLTTT.apl
  
  
  
  Starting APL 
  
  [joy@joyw520 WSTEST]$ apl -q
  
  
  ⍝ works as expected ... )libs
  
  Library root: /home/joy/WSTEST
  
  
  Library reference number to (absolute) path mapping:
  
  
╔═══╤═╤═╤══╗
  
  ║Ref│Conf │State (errno)│ Path to the directory containing the
  workspace files ║
  
╟───┼─┼─┼──╢
  
  ║ 0 │PUSER│ present │
  /home/joy/workspaces ║
  
  ║ 1 │PUSER│ present │
  /home/joy/GNUAPL ║
  
  ║ 2 │PWD  │ present │
  /home/joy/WSTEST/wslib2  ║
  
  ║ 3 │PUSER│ present │
  /usr/local/lib/apl/wslib3    ║
  
  ║ 4 │PUSER│ present │
  /usr/local/lib/apl/wslib4    ║
  
  ║ 5 │PUSER│ present │
  /usr/local/lib/apl/wslib5    ║
  
  ║ 6 │PWD  │ missing (2) │
  /home/joy/WSTEST/wslib6  ║
  
  ║ 7 │PWD  │ missing (2) │
  /home/joy/WSTEST/wslib7  ║
  
  ║ 8 │PWD  │ missing (2) │
  /home/joy/WSTEST/wslib8  ║
  
  ║ 9 │PWD  │ missing (2) │
  /home/joy/WSTEST/wslib9  ║
  
╚═══╧══╤══╧═╧══╝
  
     │
  
     ├── NONE:  found no method to compute the library path
  
     ├── CMD:   the path was set with )LIBS N path
  
     ├── ENV:   the path came from environment variable
  $APL_LIB_ROOT
  
     ├── PSYS:  the path came from the system preferences in
  file
  
     │   /usr/local/etc/gnu-apl.d/preferences
  
     ├── PUSER: the path came from user preferences in file
  
     │   $HOME/.config/gnu-apl or $HOME/.gnu-apl
  
     └── PWD:   the path is relative to current directory $PWD
  (last resort)
  
  
  
  ⍝ I got the name. OK 
  
    )lib /home/joy/WSTEST/wslib2
  
  LLLTTT
  
  
  
  ⍝ 2 works too ..
  
    )lib 2
  
  LLLTTT
  
  
  ⍝
  
  ⍝ Next seems to be a bug
  
  
  ⍝ I want to use the library path  /home/joy/WSTEST/wslib2 ..
  
    )libs 2
  
  LIBRARY ROOT SET TO 2
  
  

But what you are actually doing is to set the library root (= the
path to the
directory which contains all libraries) to 2. You probably meant to
say

  )libs /home/joy/WSTEST

 
  )lib 2
  
  IMPROPER LIBRARY REFERENCE '2': No such file or directory
  
  

So you want to display the content of .../2/wslib2 ?

⍝
  Thats not expected ..
  
    )libs
  
  Library root: /home/joy/WSTEST/2
  
  
  
  ⍝ The library path /home/joy/WSTEST/wslib2 can NOT be set
  ...
  
  ⍝
  
  
  Library reference number to (absolute) path mapping:
  
  
  ╔═══╤═╤═╤══╗
  
  ║Ref│Conf │State (errno)│ Path to the directory
containing the workspace files ║
  
  ╟───┼─┼─┼──╢
  
  ║ 0 │PUSER│ present │
/home/joy/workspaces ║
  
  ║ 1 │PUSER│ present │
/home/joy/GNUAPL ║
  
  ║ 2 │PWD  │ missing (2) │
/home/joy/WSTEST/2/wslib2    ║
  
  ║ 3 │PUSER│ present │
/usr/local/lib/apl/wslib3    ║
  
  ║ 4 │PUSER│ present │
/usr/local/lib/apl/wslib4    ║
  
  ║ 5 │PUSER│ presen

Re: Library settings fail

2020-12-24 Thread Hans-Peter Sorge

Hi Jürgen,

sorry for the noise.

Before I tried )LIBS 2 MYNAME and it failed - no idea why. Ok now.

But that failure let me try the other thingies - obsolete now.


Best Regards a Merry Christmas and a Happy New Year
Hans-Peter



Am 24.12.20 um 12:31 schrieb Dr. Jürgen Sauermann:

Hi Hans-Peter,

thanks, see below.

Best Regards,
Jürgen


On 12/24/20 12:25 AM, Hans-Peter Sorge wrote:

Hi,

A bit strange, as I did not notice it up to now.

This is the starting point 
[joy@joyw520 WSTEST]$ ll
insgesamt 4
drwxrwxr-x. 2 joy joy 4096 23. Dez 23:34 wslib2


Creating a name .
[joy@joyw520 WSTEST]$ touch wslib2/LLLTTT.apl


Starting APL 
[joy@joyw520 WSTEST]$ apl -q

⍝ works as expected ... )libs
Library root: /home/joy/WSTEST

Library reference number to (absolute) path mapping:

╔═══╤═╤═╤══╗ 

║Ref│Conf │State (errno)│ Path to the directory containing the 
workspace files ║
╟───┼─┼─┼──╢ 

║ 0 │PUSER│ present │ 
/home/joy/workspaces ║
║ 1 │PUSER│ present │ 
/home/joy/GNUAPL ║
║ 2 │PWD  │ present │ 
/home/joy/WSTEST/wslib2  ║
║ 3 │PUSER│ present │ 
/usr/local/lib/apl/wslib3    ║
║ 4 │PUSER│ present │ 
/usr/local/lib/apl/wslib4    ║
║ 5 │PUSER│ present │ 
/usr/local/lib/apl/wslib5    ║
║ 6 │PWD  │ missing (2) │ 
/home/joy/WSTEST/wslib6  ║
║ 7 │PWD  │ missing (2) │ 
/home/joy/WSTEST/wslib7  ║
║ 8 │PWD  │ missing (2) │ 
/home/joy/WSTEST/wslib8  ║
║ 9 │PWD  │ missing (2) │ 
/home/joy/WSTEST/wslib9  ║
╚═══╧══╤══╧═╧══╝ 


   │
   ├── NONE:  found no method to compute the library path
   ├── CMD:   the path was set with )LIBS N path
   ├── ENV:   the path came from environment variable $APL_LIB_ROOT
   ├── PSYS:  the path came from the system preferences in file
   │   /usr/local/etc/gnu-apl.d/preferences
   ├── PUSER: the path came from user preferences in file
   │   $HOME/.config/gnu-apl or $HOME/.gnu-apl
   └── PWD:   the path is relative to current directory $PWD 
(last resort)



⍝ I got the name. OK 
  )lib /home/joy/WSTEST/wslib2
LLLTTT


⍝ 2 works too ..
  )lib 2
LLLTTT

⍝
⍝ Next seems to be a bug

⍝ I want to use the library path  /home/joy/WSTEST/wslib2 ..
  )libs 2
LIBRARY ROOT SET TO 2

But what you are actually doing is to set the library root (= the path 
to the

directory which contains all libraries) to 2. You probably meant to say

  )libs /home/joy/WSTEST


)lib 2
IMPROPER LIBRARY REFERENCE '2': No such file or directory


So you want to display the content of .../2/wslib2 ?


⍝ Thats not expected ..
  )libs
Library root: /home/joy/WSTEST/2


⍝ The library path /home/joy/WSTEST/wslib2 can NOT be set 
...

⍝

Library reference number to (absolute) path mapping:

╔═══╤═╤═╤══╗ 

║Ref│Conf │State (errno)│ Path to the directory containing the 
workspace files ║
╟───┼─┼─┼──╢ 

║ 0 │PUSER│ present │ 
/home/joy/workspaces ║
║ 1 │PUSER│ present │ 
/home/joy/GNUAPL ║
║ 2 │PWD  │ missing (2) │ 
/home/joy/WSTEST/2/wslib2    ║
║ 3 │PUSER│ present │ 
/usr/local/lib/apl/wslib3    ║
║ 4 │PUSER│ present │ 
/usr/local/lib/apl/wslib4    ║
║ 5 │PUSER│ present │ 
/usr/local/lib/apl/wslib5    ║
║ 6 │PWD  │ missing (2) │ 
/home/joy/WSTEST/2/wslib6    ║
║ 7 │PWD  │ missing (2) │ 
/home/joy/WSTEST/2/wslib7    ║
║ 8 │PWD  │ missing (2) │ 
/home/joy/WSTEST/2/wslib8    ║
║ 9 │PWD  │ missing (2) │ 
/home/joy/WSTEST/2/wslib9    ║
╚═══╧══╤══╧═╧══╝ 


   │
   ├── NONE:  found no method to compute the library path
   ├── CMD:   the path was set with )LIBS N path
   ├── ENV:   the path came from environment variable $APL_LIB_ROOT
   ├── PSYS:  the path came from the system preferences in file
   │   /usr/local/etc/gnu-apl.d/preferences
   ├── PUSER: the path came from user preferences in file