Talk:Nub Sieve

From APL Wiki
Jump to navigation Jump to search

Question: what’s meant by “pre-correction of bad meme” here?

(⍳⍤≢=⍳⍨)⍤(∪⍳1/⊢) ⍝ Pre-correction of bad meme (⍳≢⍵)=⍵⍳⍵

Also, a related question about the 1/⊢‬ part: why turn a scalar probe into a singleton vector probe before searching in the Unique/Nub? I see that doing the search without increasing the probe to rank 1, as in (∪⍳⊢)'A'‬, does not give an error… ⊂⍺m (talk)

Nub-sieve used to be computed like that, but it was a mistake. (∪⍳⊢)'A' would give a scalar, which then errors in ⍳⍨ Adám Brudzewsky 14:54, 29 June 2023 (UTC)
"Bad meme" is what Roger Hui called it. The term probably made it into some of his publications (Tolerant Unique?), and could be cited if so; otherwise it should be removed. I think I copied a lot of this page from implementor-targetted material I had from proposing Unique Mask at Dyalog, so it's not all the best presentation for a wiki. --Marshall (talk) 18:26, 29 June 2023 (UTC)
Ah. So, ok, that explains the 1/⊢… but why do index-in-nub before doing ⍳⍤≢=⍳⍨? why not just the naive (⍳⍤≢=⍳⍨)⍤(1/⊢)?" ⊂⍺m (talk)
Compare results on 3+⎕CT×⍳10: the value indicated by ⍳⍤≢=⍳⍨ doesn't match all argument elements, so it can't be said to reduce the entire argument to unique values. There's a short section on this for Unique. --Marshall (talk) 14:13, 21 July 2023 (UTC)