« first day (931 days earlier)      last day (1709 days later) » 

4:16 AM
@adelidris Hi, it has been a while. What's doing?
 
 
15 hours later…
6:47 PM
@Adám question: can @ change the shape of an array? E.g.: I want to transform the vector 0 1 2 3 into 0 1 1 2 3; can I make it work with something like 2⍴@2⊢vector (this one gives me a length error)?
 
@J.Sallé no, but Adám's had ideas for how it could do so
 
@dzaima hm, thanks. I think I've found a way to work around that
an interleave primitive/function would come in handy right about now :/
 
7:03 PM
@J.Sallé Why not use replicate? (/)
⍞←∊2(⊂⍴)@2⊢0 1 2 3
 
@Adám 0 1 1 2 3
 
@Adám I don't think I can do that because I don't know what the mask (left arg)would be
@Adám this one might work though
 
⍞←{⍵/⍨2@2{1}¨⍵}0 1 2 3
 
@Adám 0 1 1 2 3
 
@J.Sallé {⍵/⍨2@2=⍨⍵} even
 
7:10 PM
@Adám Ooooo, that's good
Can I sum 1 to the value in the index before replicating?
 
@J.Sallé I don't understand. +/⍳?
 
@Adám I meant like 0 1 2 3 → 0 2 2 2 3
 
@J.Sallé I still don't get it.
@Rick Hey there. Has been a while!
 
@Adám It's just summing 1 to the value that's been replicated. So 0 1 2 3 → 0 1 1 2 3 → 0 2 2 2 3
I want to know if that's possible to do by modifying the code you provided
 
@J.Sallé Oh, adding, not summing.
 
7:17 PM
@Adám yes, that. hahahahah
I forget summing is the sigma operation, in english
 
⍞←∊2(⊂1+⍴)@2⊢0 1 2 3
 
@Adám 0 2 2 2 3
 
Easy enough
Thanks!
 
⍞←2{(2@⍺=⍨⍵)/1+@⍺⊢⍵}0 1 2 3
 
@Adám 0 2 2 2 3
 
7:18 PM
Np.
 
8:03 PM
wazup, Adam! long time no see. :-)
 
@Rick Yeah. How are your APL studies coming along?
 
I must admit, that's not where my efforts have been.
 
@Rick I have a new tool for you: APLcart.
 
9:09 PM
@user9575968 If you're interested in APL, please email me: adam@ with the same domain as www.dyalog.com
 
 
2 hours later…
10:43 PM
Any suggestions on how to golf 'b',¨⍨@1 4 8 11 15⊢'#',¨⍨@3 7 10 14 17⊢(7⍴3 2 2)/7↑⎕A for a KC challenge?
 
@J.Sallé Hardcode the literal!
 
@Adám I thought of doing that, but I didn't want to post a trivial answer
 
⍞←2↓(,¨⎕A)⎕R', &'⊢'AbAA#BbBCC#DbDD#EbEFF#GbGG#'
 
@Adám Ab, A, A#, Bb, B, C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#
 
@J.Sallé ⊢'#',¨⍨,∘'#'¨
 
10:54 PM
@Adám I like this one
 
@J.Sallé Longer, but much more interesting:
⍞←2↓(,¨⎕A)⎕R', &'⊢'[a-z]'⎕R'\u&b\u&'⊢'aA#bCC#dD#eFF#gG#'
 
@Adám Ab, A, A#, Bb, B, C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#
 
Oooooh, that's indeed very interesting
Using \u to differentiate between sharps and flats is very nice.
 
@J.Sallé Even longer and even more interesting:
⍞←2↓(,¨⎕A)⎕R', &'⊢'[ADG]' 'B|E' 'C|F'⎕R'&b&&#' '&b&' '&&#'⊢7↑⎕A
 
@Adám Ab, A, A#, Bb, B, C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#
 
11:07 PM
⍞←2↓(,¨⎕A)⎕R', &'⊢'B|E' 'C|F' '.'⎕R'&b&' '&&#' '&b&&#'⊢7↑⎕A
 
@Adám Ab, A, A#, Bb, B, C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#
 

« first day (931 days earlier)      last day (1709 days later) »