« first day (2023 days earlier)      last day (58 days later) » 

8:18 AM
@Adám I didn't... I probably should've
@Adám how is this different from using ?
 
It is the same as using (array⊣⊢)
However, this is pretty arcane, with little chance of anyone but expert APLers figuring it out.
Note that it isn't the same as array∘⊣ because that doesn't work dyadically.
Also, X⍨¨Y is neat enough, but (X⊣⊢)¨Y is awkward. At that point, one might as well just use (⍴Y)⍴⊂X
 
I just remember from Conor's videos that he uses ⊣ quite a lot and refers to it as both an identity and a constant function (iirc)
 
Yeah, that terminology comes from combinator logic. I'd call identity and constant.
 
but you say selfie can be used dyadically? does it ignore the inputs on both sides and just returns the array?
 
Yes, but "selfie" is the nickname I give for a very specific use of Tilde Diaeresis, namely with a function operand, and the derived function applied monadically only.
 
8:25 AM
ah, I thought it was the nickname of the glyph :P
 
I call X f⍨ Y "commute" (or better: "swap"), f⍨ Y "self" or "selfie", and both monadic and dyadic A⍨ "constant".
 
doesn't the vast number of overloads to a single glyph get confusing sometimes?
I guess with decades of APL experience you'd be used to it
 
IMO, APL doesn't really overload much.
Agh and fgh trains are really the same, just with A acting as a constant function, and so too, A⍨ and f⍨ are really the same, just with A acting as a constant function.
A@ vs f@ is exactly the same.
 
/ comes to mind as not being exactly the same
A/ vs f/
 
Right, that is a real and very unfortunate overload.
. is also way overloaded. Easily the most overloaded glyph.
 
8:35 AM
guess it's also why bqn decided it should be two different symbols
@Adám what does it do aside from inner/outer product?
decimal separator too...
 
@ElectricCoffee Oh yes, and J and K before it. Even Dyalog has considered adding replacement glyphs for the function meanings.
And namespace "dotting".
Sharp APL even added a monadic form of f.g
 
J's use of # for replication is nicely congruent with # as tally
 
And array.function — but then they didn't have namespace dotting.
@ElectricCoffee I don't see the connection much. Can you explain?
 
well # is the number sign right?
so #A asks "number of items in A"
while 2#A says "I want 2 A"
the mental model of having to do with counting stuff is self-similar
same with using dyadic f/ to do the outer product is nice for the same reason imo; because while monadic f/ still performs a reduce operation, the mental model of A f/ B creating a table of all the possible combinations of A and B over f somehow makes sense to me
 
I don't see any reduction going on in an outer product.
 
8:46 AM
inner product may have been the better choice here
 
Yes.
 
I just think of it as "repeated application over a large amount of data"
 
I think BQN's pairing of replicate with indices () makes much more sense. That's X/Y and Y/⍳⍴Y
 
interesting
 
I've a couple of times aired the idea of X f\ Y becoming X ∘.f Y to deprecate the anomalous syntax.
 
8:47 AM
I can see that
 
At least scan is something about all the possibilities (all prefixes) while outer product is "all combos".
 
on more than one occasion I've found myself writing it like f.∘ because I couldn't remember the order
@Adám but so is reduce if you do it dyadically: 2 +/A for example
every pair separately applied
 
f.g is f/ over diagonals of ∘.g so conversely, ∘.g is the no-diagonals-reduction of f.g. The stands for a null-function.
@ElectricCoffee Yes, every contiguous length-N subsequence.
      3 1 4+.×2 7 1
17
      +/1 1⍉3 1 4∘.×2 7 1
17
 
random aside, which is more idiomatic for rolling 5 dice?
`?5/6` or `?5⍴6`
 
Either is perfectly fine. I think is more common, and I prefer it to avoid function-usage of /.
 
8:54 AM
I've always preferred using / because it doesn't require me to fish for a non-ascii glyph
even if ⍴ is just option-r
 
For me, ASCII glyphs are no harder to type than APL glyphs.
You can make the latter into an atop 5(?⍴)6 but the former will fail: 5(?/)6
 
right because reduce takes precedence?
 
Yes. Slashes prefer being operators if at all possible.
 
      ((⍳3)⍨)/⍳8
┌─────┐
│0 1 2│
└~───→┘
I honestly don't know what I expected
 
9:41 AM
@ElectricCoffee But you understand why that's the result, right?
 
9:56 AM
yea
after giving it a second of thought it makes perfect sense
 
10:20 AM
0 (⍳3)⍨ 1 (⍳3)⍨ 2 (⍳3)⍨ 3 (⍳3)⍨ 4 (⍳3)⍨ 5 (⍳3)⍨ 6 (⍳3)⍨ 7
0 (⍳3)⍨ 1 (⍳3)⍨ 2 (⍳3)⍨ 3 (⍳3)⍨ 4 (⍳3)⍨ 5 (⍳3)⍨ (0 1 2)
0 (⍳3)⍨ 1 (⍳3)⍨ 2 (⍳3)⍨ 3 (⍳3)⍨ 4 (⍳3)⍨ (0 1 2)
0 (⍳3)⍨ 1 (⍳3)⍨ 2 (⍳3)⍨ 3 (⍳3)⍨ (0 1 2)
0 (⍳3)⍨ 1 (⍳3)⍨ 2 (⍳3)⍨ (0 1 2)
0 (⍳3)⍨ 1 (⍳3)⍨ (0 1 2)
0 (⍳3)⍨ (0 1 2)
(0 1 2)
 
 
2 hours later…
12:03 PM
@ElectricCoffee Yes, other than the fact that reduction has to reduce the rank from 1 to 0, by enclosing, so the result becomes ⊂0 1 2
 
 
2 hours later…
2:18 PM
@Adám A fun consequence of making slashes prefer to be functions. Is that (+/⊢) would be a fork
Hybrids are disastrous for trains either way :)
 
3:02 PM
@awagga +⌿÷≢ would break.
 
 
5 hours later…
8:24 PM
I came across this list of collected APL(ish) resources: wiki.nikiv.dev/programming-languages/apl
 

« first day (2023 days earlier)      last day (58 days later) »