« first day (2074 days earlier)      last day (570 days later) » 

 
7 hours later…
2:44 PM
@Adám sure
 
3:00 PM
Welcome to APL Quest 2016-5! Today's quest is You’re Unique, Just Like Everyone Else:
> Write a function that takes a vector as its right argument and returns elements that occur only once in the vector.
Is it just me, or is this really similar to 2016-3 Statistics - Mode?
Oh, btw, we'll start 2 hours earlier, beginning in 2 weeks, 14 October.
 
ovs
golfed: ∊=⍥≢⌸⊆∪
 
Oof.
 
ovs
Needs an ⍤, to pass the edge cases
 
@ovs That only works on simple vectors.
{1=≢⍵}⌸⊢⍤⌿∪ would be the general solution (for all but scalars).
 
(1=⍧⍨)⍛⌿⍨
 
3:04 PM
⊢~~∘≠⊢⍤/⊢
 
@ovs Hm, the problem spec doesn't require handling scalars.
 
ovs
@Adám But the test driver complains otherwise
@Adám Because of the ? So replacing ∊⊆ with ⊢⍤/ would fix it?
 
@dzaima (⊢⌿⍨1=⍧⍨ also using dzaima/APLs being a guaranteed functiion)
 
@ovs Fixed. (Needs time to rebuild.)
@ovs ⊢⍤⌿ but yeah.
@Razetime That's really clever. Hopefully ⊢~~∘≠⍛/ in 19.0.
… which matches @ovs's golfed but limited solution.
Now we just need to extend dyadic ~ to high-rank arrays so we can do ⊢~~∘≠⍛⌿
 
is that already in extended
 
3:14 PM
No, it has the previous definition of monadic f⍛g
Vision does have it.
 
vision. i haven't heard of it
ah, i see, there's a repository.
 
Shall we try the approach without ?
Anything better than {⊃⊢⍤⌿/,⌿{⍺,⍨1=≢⍵}⌸⍵}?
 
{⊃,/{⊂(1=≢⍵)/⍺}⌸⍵}?
 
And as {⊃,/{⊂⍺⌿⍨1=≢⍵}⌸⍵} that is even better. Nice!
Ooh, but fails on high-rank, due to ,/ not being a general merge.
Oh well, I guess that's enough.
See you next week for 2016-6: Shorter Ones to the Front, and don't forget that we'll start 2 hours earlier, beginning in 2 weeks, 14 October.
 
3:43 PM
∊~⍨.⊣⌸
stolen - I'm sure ngn posted that as a solution ages ago
 

« first day (2074 days earlier)      last day (570 days later) »