Squad indexing seems to have stopped working

If we don't know about 'em, we can't fix 'em.

Squad indexing seems to have stopped working

PostPosted by ItzRav » Sat Mar 18, 2017 9:22 am

Code: Select all
      ⎕SYSVER
0.5.1.49  Sat Mar 18 00:40:14 2017  Win/64

      2⌷⍳3
DOMAIN ERROR
      2⌷⍳3
       ∧

      (⊂1 3)⌷⍳3
DOMAIN ERROR
      (⊂1 3)⌷⍳3
            ∧
ItzRav
 
Posts: 26
Joined: Wed Jan 01, 2014 2:02 pm
Location: Bethesda, MD

Re: Squad indexing seems to have stopped working

PostPosted by forummaster » Sat Mar 18, 2017 10:04 am

Thanks for the bug report. Please try the latest Alpha version and let me know how it works:

http://www.nars2000.org/download/binaries/alpha/
forummaster
 
Posts: 567
Joined: Wed Jan 23, 2013 1:00 pm

Re: Squad indexing seems to have stopped working

PostPosted by ItzRav » Sat Mar 18, 2017 10:21 am

forummaster wrote:Thanks for the bug report. Please try the latest Alpha version and let me know how it works:

http://www.nars2000.org/download/binaries/alpha/

Thanks, that fixes it. If I understand your reply in a previous recent thread on Squad correctly, I assume you're going to make (⊂⍬)⌷0 work (rather than a RANK ERROR) just as 0[] works?
ItzRav
 
Posts: 26
Joined: Wed Jan 01, 2014 2:02 pm
Location: Bethesda, MD

Re: Squad indexing seems to have stopped working

PostPosted by forummaster » Thu Mar 23, 2017 2:55 pm

ItzRav wrote:
forummaster wrote:Thanks for the bug report. Please try the latest Alpha version and let me know how it works:

http://www.nars2000.org/download/binaries/alpha/

Thanks, that fixes it. If I understand your reply in a previous recent thread on Squad correctly, I assume you're going to make (⊂⍬)⌷0 work (rather than a RANK ERROR) just as 0[] works?

For reference, here are identities I use:

Reach Indexing:
1: If both L⊃R and ⊃R[⊂L] are valid, they match
2: If both L⊃¨⊂R and R[L] are valid, they match

Scatter Indexing:
3: If both L⌷R and R[⊃∘.,/L] are valid, they match
4: If both L⌷¨⊂R and ⊂¨R[⊂¨L] are valid, they match

General Indexing
5: R≡(⍳¨⍴R)⌷R
6: R[]≡R[⍳⍴R]

The two expressions you mention are similar to #3, but not quite. That is,
E1: 0[] ←→ 0[⍳⍴0] ←→ 0[⍳⍬] ←→ 0[⊂⍬] ←→ ⊂⍬⊃0 ←→ ⊂0 ←→ 0, and
E2: (⊂⍬)⌷0 ←→ 0[⊃∘.,/⊂⍬] ←→ error because ∘.,/⊂⍬ is an error (although ,/⊂⍬ ←→ ⊂⍬).

Note that ∘.,/⊂⊂⍬ ←→ ⊂⊂⍬, and so (⊂⊂⍬)⌷0 ←→ 0[⊃∘.,/⊂⊂⍬] ←→ 0[⊃⊂⊂⍬] ←→ 0[] from E1. So, instead of (⊂⍬)⌷0 ←→ 0[] it's (⊂⊂⍬)⌷0 ←→ 0[].

BTW, if you are interested in how the Squad function is implemented, see ⎕VR '#DydSquad'.
forummaster
 
Posts: 567
Joined: Wed Jan 23, 2013 1:00 pm


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests

cron