Looks like structured variables does not support )save + )load

2020-12-14 Thread Christian Robert

$ apl -L new

SAVED 2020-12-14 04:19:00 (GMT-5)
  p.age ← 32
  p.name ← "Christian Robert"
  p.address ← "Quebec"
  )copy Util D
SAVED 2020-12-13 14:55:19 (GMT-5)
  D p
┌2───┐
8┌3──┐ 32│
││age│   │
│└───┘   │
│   ┌4───┐ ┌16──┐│
│   │name│ │Christian Robert││
│   └┘ └┘│
│┌7──┐   ┌6─┐│
││address│   │Quebec││
│└───┘   └──┘│
│0  0│
│0  0│
│0  0│
│0  0│
│0  0│
└∊───┘
  p
.age: 32

.name: ┌→───┐
   │Christian Robert│
   └┘

.address: ┌→─┐
  │Quebec│
  └──┘

  )save
2020-12-14  04:21:02 (GMT-5) new
  )load new
SAVED 2020-12-14 04:21:02 (GMT-5)
  p
 age   32
name Christian Robert
 address   Quebec
   00
   00
   00
   00
   00
  D p
┌2───┐
8┌3──┐ 32│
││age│   │
│└───┘   │
│   ┌4───┐ ┌16──┐│
│   │name│ │Christian Robert││
│   └┘ └┘│
│┌7──┐   ┌6─┐│
││address│   │Quebec││
│└───┘   └──┘│
│0  0│
│0  0│
│0  0│
│0  0│
│0  0│
└∊───┘
  p.age
DOMAIN ERROR+
  p.age
   ^^



Re: Structured variables

2020-12-14 Thread Hans-Peter Sorge

Hi,

wildest dreams come true.

Fits right into the stuff I'm working on.

Best Regards
Hans-Peter


Am 13.12.20 um 16:27 schrieb Dr. Jürgen Sauermann:

Hi,

I created a new experimental feature in GNU APL: Structured variables.

See:

*info apl*

section 3.35.1 or:

https://www.gnu.org/software/apl/apl.html#Structured-Variables

Best Regards,
Jürgen





Incomplete value at Symbol.cc:130

2020-12-14 Thread Hans-Peter Sorge

Hi,

I could not resist to experiment.

  )clear
CLEAR WS
    A←0
    A.A←1
DOMAIN ERROR+
    A.A←1
 ^ ^

  )clear
CLEAR WS
  A.A←1
  A←0  ⍝ Just replacing content of A.

  B.B←2
  A←B.B    ⍝ Generates a trace. - probably should be A.B ←→ 2

Incomplete value at Symbol.cc:130
Addr:    0x1ce1990
Rank:    0
..


⍝ A structured variable of any depth can be replaced by an assignment to 
the root variable.

  A.B.C.D←4
  A
.B:
.B.C:
.B.C.D: 4

  A←1   ⍝ Consistent with current assignment: replace variable 
content with RV. No DOMAIN ERROR.

  A
1


⍝ Assignment working one time only ..

  A.B.C ←1
  X.Y.Z ←2
  A.B.C←X.Y
  A
.B:
.B.C:
.B.C.Z: 2

⍝ should be repeatable:
  A.B.C←X.Y
DOMAIN ERROR+
  A.B.C←X.Y
 ^   ^

Proposal:

Allow a non-leaf node to be replaced by a RV. it would then be 
consistent with how the current assignment works.


The assignment above "A.B.C ← X.Y" is actually an append -> A.B.C.Z 
rather than a replace,  what a "←" normally does.


I think the assignment should result in A.B.C ← X.Y.  ←→ A.B.Z

The append could be covered by the idiom  A.B.C. ← X.Y. ←→ A.B.C.Z

.. just my thoughts.

  A.B.C ←1
  X.Y.Z ←2
  K.L.M ←3

  A.B.C ← X.Y K.L
DOMAIN ERROR+
  A.B.C←X.Y K.L
 ^   ^
'Idea:'
  A.B.C ← X.Y. K.L.   ←→ A.B.Z  A.B.M
and:
  A.B.C. ← X.Y. K.L.   ←→ A.B.C.Z  A.B.C.M


Basically saying:
Using a trailing dots lets operators work with a structured name element.
A.B. ←→ C

given
A.B.a←1 ⋄ A.B.b←2 ⋄ A.B.c←3
X.Y.x←10 ⋄ X.Y.y←20 ⋄ X.Y.z←30

A.B. could result in structured name elements a b c. That is listing the 
leaf-node names.

A.B. ← X.Y. could result in structured names A.B.x, A.B.y, A.B.z



Without trailing dots we get the content of a variable.
A.B.C  ←→ 1

  A.B.a←1
  A.B.b←2
  A.B.c←3
  A
  A.B
.a: 1

.b: 2

.c: 3

  A.B + 1
DOMAIN ERROR
  A.B+1
   ^ ^
⍝ could be
  A.B + 1
2 3 4


Sorry for the lengthy note.

Best Regards
Hans-Peter



Re: Looks like structured variables does not support )save + )load

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

  
  
Hi Christian,
  
  thanks, fixed in SVN 1376.

Best Regards,
Jürgen


On 12/14/20 10:26 AM, Christian Robert
  wrote:

$ apl
  -L new
  
  
  SAVED 2020-12-14 04:19:00 (GMT-5)
  
    p.age ← 32
  
    p.name ← "Christian Robert"
  
    p.address ← "Quebec"
  
    )copy Util D
  
  SAVED 2020-12-13 14:55:19 (GMT-5)
  
    D p
  
  ┌2───┐
  
  8    ┌3──┐ 32│
  
  │    │age│   │
  
  │    └───┘   │
  
  │   ┌4───┐ ┌16──┐│
  
  │   │name│ │Christian Robert││
  
  │   └┘ └┘│
  
  │┌7──┐   ┌6─┐│
  
  ││address│   │Quebec││
  
  │└───┘   └──┘│
  
  │    0  0│
  
  │    0  0│
  
  │    0  0│
  
  │    0  0│
  
  │    0  0│
  
  └∊───┘
  
    p
  
  .age: 32
  
  
  .name: ┌→───┐
  
     │Christian Robert│
  
     └┘
  
  
  .address: ┌→─┐
  
    │Quebec│
  
    └──┘
  
  
    )save
  
  2020-12-14  04:21:02 (GMT-5) new
  
    )load new
  
  SAVED 2020-12-14 04:21:02 (GMT-5)
  
    p
  
   age   32
  
      name Christian Robert
  
   address   Quebec
  
     0    0
  
     0    0
  
     0    0
  
     0    0
  
     0    0
  
    D p
  
  ┌2───┐
  
  8    ┌3──┐ 32│
  
  │    │age│   │
  
  │    └───┘   │
  
  │   ┌4───┐ ┌16──┐│
  
  │   │name│ │Christian Robert││
  
  │   └┘ └┘│
  
  │┌7──┐   ┌6─┐│
  
  ││address│   │Quebec││
  
  │└───┘   └──┘│
  
  │    0  0│
  
  │    0  0│
  
  │    0  0│
  
  │    0  0│
  
  │    0  0│
  
  └∊───┘
  
    p.age
  
  DOMAIN ERROR+
  
    p.age
  
     ^^
  
  


  




Re: Incomplete value at Symbol.cc:130

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

  
  
Hi Hans-Peter,
  
  thanks a lot for your feedback. See my comments below.
  
  Best Regards,
  Jürgen
  

On 12/14/20 4:39 PM, Hans-Peter Sorge
  wrote:


  
  Hi,
  
  I could not resist to experiment.
  
    )clear
  CLEAR WS     
      A←0
      A.A←1
  DOMAIN ERROR+
      A.A←1
   ^ ^
  
    )clear
  CLEAR WS
    A.A←1
    A←0  ⍝ Just replacing content of A.    
       
    B.B←2
    A←B.B    ⍝ Generates a trace. - probably should be A.B ←→ 2 
   
  
  Incomplete value at Symbol.cc:130
Addr:    0x1ce1990
Rank:    0
..
  

Fixed in SVN 1377.

 ⍝ A
  structured variable of any depth can be replaced by an assignment
  to the root variable.
    A.B.C.D←4
    A
  .B:
  .B.C:
  .B.C.D: 4
  
    A←1   ⍝ Consistent with current assignment: replace variable
  content with RV. No DOMAIN ERROR.
    A
  1
  
  
  ⍝ Assignment working one time only ..
  
    A.B.C ←1
    X.Y.Z ←2
    A.B.C←X.Y
    A
  .B:
  .B.C:
  .B.C.Z: 2
  
  ⍝ should be repeatable:
    A.B.C←X.Y
  DOMAIN ERROR+
    A.B.C←X.Y
   ^   ^
  

Actually no.

A.B.C←X.Y turns leaf A.B.C into a non-leaf, therefore an assignment
to it it gives you DOMAIN ERROR.

  Proposal:
  
  Allow a non-leaf node to be replaced by a RV. it would then be
  consistent with how the current assignment works.    
  

I was thinking of this myself quite a bit. My current thoughts are
that overriding a non-leaf can
destroy an arbitrary number of sub-variables, just like rm -R /
and common *nix- wisdom has it that
this should be refused and that rm -Rf should be required
instead. I actually spent a very long
night at the end of the 1970s after my boss did rm -R / by
mistake. The counter-argument is that
you can erase arbitrary large non-structured values with an
assignment in APL.

I also believe that assignment to a non-leaf is an implicit ⎕EX of
the non-leaf which is not
consistent with plain variable assignment. In plain variable
assignments, you can create a
variable and change a variable, but not erase a variable. That
requires an explicit ⎕EX or )ERASE.

Above A.B.C is a (sub-) variable with value Z, so you can change it
as long as it is a leaf (including
changing it to the value of another structured variable X.Y ←→ Z).
But overriding it after it has
become a non-leaf is not allowed because that would implicitly ⎕EX
it (which in the case of
plain variables is not possible resp. requires ⎕EX or )ERASE).

The model here is that ABC behaves like a variable but A.B does not
(it is a collection of variables
and the questions is essentially whether it should be possible to
override several (sub-) variables
by a single assignment).

I belive both alternatives have arguments speaking for them and I
would like to hear more opinions
before allowing assignments to non-leaf sub-variables.
 The
  assignment above "A.B.C ← X.Y" is actually an append -> A.B.C.Z
  rather than a replace,  what a "←" normally does.
  
  I think the assignment should result in A.B.C ← X.Y.  ←→ A.B.Z
  

It probably would if the assignment were legal.
 The
  append could be covered by the idiom  A.B.C. ← X.Y.   ←→ A.B.C.Z

  .. just my thoughts.
    
    A.B.C ←1
  X.Y.Z ←2
  K.L.M ←3

  A.B.C ← X.Y K.L
DOMAIN ERROR+
  A.B.C←X.Y K.L
 ^   ^
'Idea:'
  A.B.C ← X.Y. K.L.   ←→ A.B.Z  A.B.M
and:  
  A.B.C. ← X.Y. K.L.   ←→ A.B.C.Z  A.B.C.M 
  
  
  Basically saying:
  Using a trailing dots lets operators work with a structured name
  element.
  A.B. ←→ C
  
  given
  A.B.a←1 ⋄ A.B.b←2 ⋄ A.B.c←3
X.Y.x←10 ⋄ X.Y.y←20 ⋄
  X.Y.z←30

  A.B. could result in structured name elements a b c. That is
  listing the leaf-node names.  
  A.B. ← X.Y.  could
  result in structured names A.B.x, A.B.y, A.B.z

  
  
  Without trailing dots we get the content of a variable.
  A.B.C  ←→ 1 
   
    A.B.a←1
    A.B.b←2
    A.B.c←3
    A
    A.B
  .a: 1
  
  .b: 2
  
  .c: 3
  
    A.B + 1
  DOMAIN ERROR
    A.B+1
     ^ ^
  ⍝ could be
    A.B + 1
  2 3 4
  
  
  Sorry for the l

Re: Build 1374: one warning left on Mac OS X

2020-12-14 Thread Peter Teeson
Maybe I am wrong but I don’t think it has anything to do with the LLVM/Clang 
compiler.
Rather it’s because Gatekeeper is checking for code signing and notarization.

There has always been the opportunity to override the defaults.
> but you take responsibility for 
your action.

The other alternative is to code sign using Apple certificates, Developer ID’s, 
and then notarize.


> On Dec 13, 2020, at 10:09 AM, Dr. Jürgen Sauermann 
>  wrote:

> BTW: if you use clang because you are on macOS, please be aware of the 
> following:
> 
> https://www.fsf.org/news/the-problems-with-apple-arent-just-outages-they-are-injustices
>  
> 
> It could mean that the days are counted where you can use GNU APL on Apple 
> machines.