« first day (569 days earlier)      last day (2086 days later) » 

1:22 PM
Hey @Adám, is there a way to apply a function pairwise without overlapping? As in 2+/⍳4 = 3 7 instead of 3 5 7?
 
⍞←{+/⍵}⌺(⍪2 2)⍳4
 
@Adám 3 7
 
@J.Sallé ^^ Stencil is for more than just GoL.
 
Ah, Stencil! Nice, I'll try to do that
 
2:18 PM
@Adám another one: can I use @ with a binary vector somehow? I want to append a character at the truthy indexes of the given vector, something like 0,@(0 1 0 1)⍳4 → 1 02 3 04
 
⎕←0,¨@{0 1 0 1}⍳4
 
@Adám
┌─┬───┬─┬───┐
│1│0 2│3│0 4│
└─┴───┴─┴───┘
 
@J.Sallé ^^
 
ah, I gotta use braces instead of parens, I see
 
@J.Sallé Not exactly; f ⍵⍵ is a function, it must return a binary mask, if ⍵⍵ is an array, it must be indices.
 
2:22 PM
Yeah, this is gonna get very convoluted >.>
I'm having trouble just padding odd length integers with a 0
 
@J.Sallé What is an odd length integer?
 
@Adám odd number of digits is what I mean
 
@J.Sallé Remember that the number of digits is 1+⌊10⍟?
 
Also the input is not very flexible so I have to take a list of integers instead of a list of list of digits or a list of strings
@Adám I most certainly did not remember that. I don't think I've used at all since the lesson about it >.>
 
@Adám ≢⍕ is golfier
 
2:30 PM
I think the trouble I'm having is with adding the 0 to the specific integers in the input
 
@dzaima You mean ≢∘⍕¨.
 
I've got {0,¨@{2|≢∘⍕¨⍵}⍵⊢⍵}(19)(91)(234)(2023) at the moment
And that still doesn't do what I need exactly
 
@J.Sallé ⍵⊢⍵
 
@Adám that was a derp
I thought I had to use one for the inner dfn and one for @ operator
 
@J.Sallé {⍵↑⍨-2×⌈.5×≢⍵}¨⍎¨¨⍕¨ 19 91 234 2023 is what I've got, but that outputs a list of digits
 
2:36 PM
@dzaima yeah, I had a similar one that also did that
 
You want to add a leading 0 if odd-digited?
 
@Adám yeah, that was what I needed. I just noticed dzaima already answered the challenge in APL though, so I think I'm gonna try doing it in K or J
About time I learned some of that
 

« first day (569 days earlier)      last day (2086 days later) »