« first day (2081 days earlier)      last day (563 days later) » 

10:20 AM
Is ↓[x]Y equivalent to ,/[x]Y for all Y?
 
Should be. There may be some edge case
↓ is ⊂⍤1 and ,/ on flat data is a no-op along vectors, except that / encloses.
Of course, on nested data they differ
 
10:47 AM
@Adám for aplcart: ⊃∘⊆⍣≡ strip all enclosures
 
 
2 hours later…
12:35 PM
@awagga Doesn't this fail on 'ab' 'cd' or is that intentionally a first?
 
Oh, yes, I hadn't considered that
 
You want disclose if scalar?
 
Yeah
⊃⍤,⍥⊆/⍣≡ works
 
My other possible meaning for ⊇Y
 
Or not...
 
12:38 PM
@awagga No, your previous version did.
(⊃,⍥⊆/)⍣≡ is not the same as ⊃⍤,⍥⊆/⍣≡
 
Yeah, thanks!
 
You don't want the included in the reduction.
 
Not thinking straight :)
 
(⊃,⍥⊆/)⍣≡ fails on 'abc'
 
{⊃,⍥⊆/⊆⍵} is an option then. Not one I like
Note that this will disclose ,⊂X whereas ⍬≡⍴⍵: ⊃⍵ won't
 
12:47 PM
⊃⍣(((0=≡)∨⍬≢⍴)⊣)⊂
{⊃⍣(⍬≡⍴⍵)⊢⍵}⍣≡
 
 
2 hours later…
3:00 PM
Welcome to APL Quest 2016-6! Today's quest is Shorter Ones to the Front:
> Write a function that takes a vector of vectors as its right argument and returns it sorted by the length of each element.
Note that we'll start 2 hours earlier, beginning next week, 14 October.
This problem should be trivial, and there's probably only one good solution.
I have {⍵[⍋≢¨⍵]}
Using instead of would be a potential pitfall: ⎕←{⍵[⍋⍴¨⍵]} 'one' 2 'three' '' 'four'(5 6 7 8)
 
@Adám
┌─┬┬───┬────┬───────┬─────┐
│2││one│four│5 6 7 8│three│
└─┴┴───┴────┴───────┴─────┘
 
This is because lexicographical sorting rules include that "nothing" comes before "something". The shape of a scalar (e.g. 2) is "nothing () while the shape of an empty vector is "something (,0).
For a generalisation to higher-ranked elements, we could sort by number of elements: {⍵[⍋×/⍤⍴¨⍵]}
And finally, there's shortlex order proper, which I'll leave as an exercise for the reader — or you could just look it up on APLcart ;-)
See you next week for 2016-7: 3s and 5s, but don't forget that it'll be two hours earlier, at 13:00 UTC!
 
3:16 PM
tacit form is a contribution i think...
⊢⌷⍨∘⊂∘⍋≢¨
 
But really ugly, and same length.
 
yes :/
 
With Select as and Behind as , It'll be fine: ≢¨⍋⍛⊇⊢ or (⍋≢¨)⍛⊇
 
4:02 PM
That first expression is a fork with ⍋⍛⊇ as the middle tine right? Took me a moment to spot where the ⍺ Beside needs came from
 
 
2 hours later…
6:10 PM
When is Adam's Friday APL demo?
I remember stumbling on something about it on the APL wiki but I can't find the link again...
Ah, APL Quest, and it was 4 hours ago :sweat-smile: -- I'll try again next week!
 

« first day (2081 days earlier)      last day (563 days later) »