Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Houston, Tranquillity Base here. The Eagle has landed. -- Neil Armstrong


devel / comp.lang.apl / Array Notation

SubjectAuthor
* Array NotationPhil Last
`* Array NotationSam Sirlin
 `* Array NotationPhil Last
  `- Array NotationPhil Last

1
Array Notation

<c4a1e21a-f4c8-420d-864f-b0f1a5118e05n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=369&group=comp.lang.apl#369

  copy link   Newsgroups: comp.lang.apl
X-Received: by 2002:a05:6214:d0b:b0:47b:4d2b:fa53 with SMTP id 11-20020a0562140d0b00b0047b4d2bfa53mr558432qvh.13.1662505730086;
Tue, 06 Sep 2022 16:08:50 -0700 (PDT)
X-Received: by 2002:a37:2e47:0:b0:6be:72fc:3099 with SMTP id
u68-20020a372e47000000b006be72fc3099mr803825qkh.657.1662505729898; Tue, 06
Sep 2022 16:08:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.apl
Date: Tue, 6 Sep 2022 16:08:49 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=195.213.51.159; posting-account=bP696AoAAADU2J7VnHgZtI1WlqjqzveD
NNTP-Posting-Host: 195.213.51.159
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c4a1e21a-f4c8-420d-864f-b0f1a5118e05n@googlegroups.com>
Subject: Array Notation
From: phil.g.last@gmail.com (Phil Last)
Injection-Date: Tue, 06 Sep 2022 23:08:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2169
 by: Phil Last - Tue, 6 Sep 2022 23:08 UTC

Dyalog Ltd. is likely soon to embark on the development of its own version of a far-reaching enhancement to APL notation.

Referred to as "Array Notation" it's based initially on the simple premise that rather than engendering a SYNTAX ERROR, an opening bracket, "[" closed on a subsequent line or after a diamond, delimits a multi-line expression that denotes a multi-dimensional array wherein each expression defines a cell of that array:

⍴ num←[1 1 2 3
5 8 3 1]
2 4

The principle is naturally recursive:

⍴ chr←[
['zero'
'one']
['two'
'three']
]
2 2 5

Over a number of years the idea was elaborated until Dyalog adopted it and continued to modify it after 2015.

There is a couple of pages in the APL Wiki that attempt to describe it.

It has been modelled in APL several times and has been implemented as a part of the language at least once.

I'm sure Dyalog would be pleased to accept suggestions and comments in their forums to hone their design. I suggest the "Language" forum at https://forums.dyalog.com/viewforum.php?f=13 would be the place to start.

Re: Array Notation

<921757d6-d340-48a8-a26a-7e2f0b4e18a9n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=371&group=comp.lang.apl#371

  copy link   Newsgroups: comp.lang.apl
X-Received: by 2002:a05:620a:24d6:b0:6cd:f2d9:4a59 with SMTP id m22-20020a05620a24d600b006cdf2d94a59mr5344622qkn.457.1662924671867;
Sun, 11 Sep 2022 12:31:11 -0700 (PDT)
X-Received: by 2002:ac8:5c50:0:b0:35b:b246:c457 with SMTP id
j16-20020ac85c50000000b0035bb246c457mr2213713qtj.128.1662924671614; Sun, 11
Sep 2022 12:31:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.apl
Date: Sun, 11 Sep 2022 12:31:11 -0700 (PDT)
In-Reply-To: <c4a1e21a-f4c8-420d-864f-b0f1a5118e05n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=47.37.168.124; posting-account=TKmBoQoAAAD1bSNp2zQ5BCoT8-TNIDAS
NNTP-Posting-Host: 47.37.168.124
References: <c4a1e21a-f4c8-420d-864f-b0f1a5118e05n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <921757d6-d340-48a8-a26a-7e2f0b4e18a9n@googlegroups.com>
Subject: Re: Array Notation
From: sam.w.sirlin@gmail.com (Sam Sirlin)
Injection-Date: Sun, 11 Sep 2022 19:31:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3267
 by: Sam Sirlin - Sun, 11 Sep 2022 19:31 UTC

I think it is a good idea to allow native array inputs. I'm not sure why overload [] rather than use normal (). I've done this for a while (2004) in my compiler. I like the fact that the input is the same as the output with this approach (for numbers and char strings).

..rho #.is num .is ( 1 1 2 3
5 8 3 1 )
1 1 2 3
5 8 3 1
2 4

..rho #.is array .is (
1 1 2 3

5 8 3 1 )
1 1 2 3

5 8 3 1
2 1 4

..rho #.is chr .is (
<'zero'
<'one'

<'two'
<'three')
+-----+
|zero |
+-----+
|one |
+-----+

+-----+
|two |
+-----+
|three|
+-----+
2 2 1

..rho #.is ca .is ('abc
def')
abc
def
7

..rho #.is ca .is ('abc
defgh')
abc
defgh
9

Sorry for the transliteration, still using ascii; # is quad

Sam Sirlin

On Tuesday, September 6, 2022 at 4:08:50 PM UTC-7, Phil Last wrote:
> Dyalog Ltd. is likely soon to embark on the development of its own version of a far-reaching enhancement to APL notation.
>
> Referred to as "Array Notation" it's based initially on the simple premise that rather than engendering a SYNTAX ERROR, an opening bracket, "[" closed on a subsequent line or after a diamond, delimits a multi-line expression that denotes a multi-dimensional array wherein each expression defines a cell of that array:
>
> ⍴ num←[1 1 2 3
> 5 8 3 1]
> 2 4
>
> The principle is naturally recursive:
>
> ⍴ chr←[
> ['zero'
> 'one']
> ['two'
> 'three']
> ]
> 2 2 5
>
> Over a number of years the idea was elaborated until Dyalog adopted it and continued to modify it after 2015.
>
> There is a couple of pages in the APL Wiki that attempt to describe it.
>
> It has been modelled in APL several times and has been implemented as a part of the language at least once.
>
> I'm sure Dyalog would be pleased to accept suggestions and comments in their forums to hone their design. I suggest the "Language" forum at https://forums.dyalog.com/viewforum.php?f=13 would be the place to start.

Re: Array Notation

<a76b4691-d1be-4a82-b9a0-df64e2c8d85en@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=372&group=comp.lang.apl#372

  copy link   Newsgroups: comp.lang.apl
X-Received: by 2002:ac8:5896:0:b0:35b:ba98:ca56 with SMTP id t22-20020ac85896000000b0035bba98ca56mr9331777qta.465.1663143446170;
Wed, 14 Sep 2022 01:17:26 -0700 (PDT)
X-Received: by 2002:a37:b4d:0:b0:6cb:e322:876f with SMTP id
74-20020a370b4d000000b006cbe322876fmr19690812qkl.420.1663143445973; Wed, 14
Sep 2022 01:17:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.apl
Date: Wed, 14 Sep 2022 01:17:25 -0700 (PDT)
In-Reply-To: <921757d6-d340-48a8-a26a-7e2f0b4e18a9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=195.213.51.159; posting-account=bP696AoAAADU2J7VnHgZtI1WlqjqzveD
NNTP-Posting-Host: 195.213.51.159
References: <c4a1e21a-f4c8-420d-864f-b0f1a5118e05n@googlegroups.com> <921757d6-d340-48a8-a26a-7e2f0b4e18a9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a76b4691-d1be-4a82-b9a0-df64e2c8d85en@googlegroups.com>
Subject: Re: Array Notation
From: phil.g.last@gmail.com (Phil Last)
Injection-Date: Wed, 14 Sep 2022 08:17:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1672
 by: Phil Last - Wed, 14 Sep 2022 08:17 UTC

If you look at the way Adam and I have implemented it in our different platforms - Link and Acre - we've both followed the direction we agreed back in 2016-17 that "broken" brackets and "broken" parentheses denote respectively increased rank and increased depth so your examples would create differently nested vectors rather than multi-dimentional arrays. A mix of the two can then form lists of matrices and matrices of lists in any combination.

Re: Array Notation

<0a77c3e0-4ab2-4a95-b074-0ab9fbf6a56fn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=373&group=comp.lang.apl#373

  copy link   Newsgroups: comp.lang.apl
X-Received: by 2002:a05:622a:86:b0:342:f620:dc7a with SMTP id o6-20020a05622a008600b00342f620dc7amr32145674qtw.594.1663145305446;
Wed, 14 Sep 2022 01:48:25 -0700 (PDT)
X-Received: by 2002:a05:622a:138f:b0:35b:bb7b:743c with SMTP id
o15-20020a05622a138f00b0035bbb7b743cmr8256471qtk.361.1663145305253; Wed, 14
Sep 2022 01:48:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.apl
Date: Wed, 14 Sep 2022 01:48:25 -0700 (PDT)
In-Reply-To: <a76b4691-d1be-4a82-b9a0-df64e2c8d85en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=195.213.51.159; posting-account=bP696AoAAADU2J7VnHgZtI1WlqjqzveD
NNTP-Posting-Host: 195.213.51.159
References: <c4a1e21a-f4c8-420d-864f-b0f1a5118e05n@googlegroups.com>
<921757d6-d340-48a8-a26a-7e2f0b4e18a9n@googlegroups.com> <a76b4691-d1be-4a82-b9a0-df64e2c8d85en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0a77c3e0-4ab2-4a95-b074-0ab9fbf6a56fn@googlegroups.com>
Subject: Re: Array Notation
From: phil.g.last@gmail.com (Phil Last)
Injection-Date: Wed, 14 Sep 2022 08:48:25 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1343
 by: Phil Last - Wed, 14 Sep 2022 08:48 UTC

" I like the fact that the input is the same as the output " was one of my two main incentives for all the effort.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor