« first day (726 days earlier)      last day (1921 days later) » 

7:21 AM
@Adám You could argue that Matlab lacks that distinction since even scalars are 1x1 matrices (I believe).
 
@DevonMcC Well, often APL is very lenient about singletons as well. For good and bad.
⎕←(⍪1)+2 3⍴⍳6
 
@Adám
2 3 4
5 6 7
 
 
1 hour later…
8:36 AM
I saw an old challenge about determining if a number is an abundant number and I thought to try it in APL
⎕←⊢<(+/¯1↓∘∪⊢∨⍳)24
 
@Sherlock9
SYNTAX ERROR
 
Welp one second
⎕←f←⊢<(+/¯1↓∘∪⊢∨⍳) ⋄ f 24
 
@Sherlock9
┌─┼───┐
⊢ < ┌─┴──┐
    / ┌──┼────┐
  ┌─┘ ¯1 ∘  ┌─┼─┐
  +     ┌┴┐ ⊢ ∨ ⍳
        ↓ ∪
 
⍞← f←⊢<(+/¯1↓∘∪⊢∨⍳) ⋄ f 24
 
@Sherlock9 ⊢<  +/  ¯1  ↓∘∪  ⊢∨⍳
 
8:38 AM
⎕←{⊢<(+/¯1↓∘∪⊢∨⍳)}24
 
@Sherlock9
SYNTAX ERROR
 
Okay my idea was something like that, but I'm not sure how to write it here
 
⎕←(⊢<(+/¯1↓∘∪⊢∨⍳))24
 
@H.PWiz
1
 
Ah... Magnificent! So it works! Thanks H.PWiz
⎕←(⊢<+/¯1↓∘∪⊢∨⍳)24
 
8:40 AM
@Sherlock9
SYNTAX ERROR
 
That, on the other hand, is a syntax error and I'm not sure why
Or how else I could golf this
 
⎕←(⊢<⍳+.×0=⍳|⊢)24
 
@H.PWiz
1
 
Is one way
(with ⎕io←0)
 
Ooh, that's very nice
 
 
1 hour later…
10:07 AM
Is there a shorter way to get the sum of squares of a list than (+.×)⍨?
Ok different question. How does know to commute all of +.× in +.×⍨? Is it magic?
Will in fail in a larger expression?
 
@Sherlock9 operators are parsed left-to-right, so . is evaluated & bound before gets to do anything
 
Ahh
 

« first day (726 days earlier)      last day (1921 days later) »