News for hackers. Stuff that matters.
Re:The Array Cast – A podcast about the array programming la... by Avshalom on Thursday May 20, 2021 @10:54PM (#27229994)
okay so it's not really smaller because it uses UTF8 also it relies on order of operations to get rid of the parens around ⍵≡'*' but

us←{('_'@(1+⍸2{(⍺≡⊃K)∧⍵≡'*'}/⍵))⍵}

is one(1) character shorter.

Re:The Array Cast – A podcast about the array programming la... by rak1507 on Friday May 21, 2021 @06:45AM (#27232429)
⍵≡'*' should be ⍵≡,'*' like in the original k

us←⊃,⍥⊆2{(⍺≡⊃K)∧⍵≡,'*':,'_'⋄⍵}/⊢ is shorter anyway

Re:The Array Cast – A podcast about the array programming la... by geocar on Friday May 21, 2021 @11:24AM (#27235246)

    us←{'_'@{¯1⌽⍵⍷⍨(⊂⊃K),'*'}⍵}
Re:The Array Cast – A podcast about the array programming la... by rak1507 on Friday May 21, 2021 @11:50AM (#27235601)
Ah, ⍷, clever, don't even need the outer {...⍵},

  us←'_'@{¯1⌽⍵⍷⍨(⊂⊃K),'*'}
Re:The Array Cast – A podcast about the array programming la... by geocar on Friday May 21, 2021 @12:28PM (#27236178)
Yes!

You could also do: ⌽'*',⊂⊃K to save another character. I don't know if that's "better" though.

Re:The Array Cast – A podcast about the array programming la... by rak1507 on Friday May 21, 2021 @12:57PM (#27236643)
Or alternatively '*',⍨⊂⊃K which I think I prefer over ⌽, but neither seem that 'better' in my mind anyway.
Re:The Array Cast – A podcast about the array programming la... by wanderer2323 on Saturday May 22, 2021 @03:17AM (#27244297)
Is this the same language or a different one?
Re:The Array Cast – A podcast about the array programming la... by rak1507 on Saturday May 22, 2021 @08:01AM (#27245687)
This is APL, k is a descendant of APL.