« first day (944 days earlier)      last day (451 days later) » 

12:35 PM
@Adnan @EriktheOutgolfer @Mr.Xcoder What would be the easiest way to create an overlapping paired list? So [1,2,3,4,5] to [[1,2],[2,3],[3,4],[4,5]]?
 
you mean the continuous sublists in order?
(@KevinCruijssen)
 
A list that stays in the same order, but is paired (with overlap). Another example perhaps: [4,-6,0,9] -> [[4,-6],[-6,0],[0,9]]
 
yeah, in Jelly that's (well, ṡ2$)
however, I don't think 05AB1E has it so easily
 
05AB1E indeed doesn't have it that easy. Hence my question ;)
 
hm, it's zipping the list with the last element removed with the same list but with the last element kept and the first one removed, in this order
like, zip(a[:-1], a[1:])
however, this can spell trouble for even-length lists
 
12:42 PM
Well, if it's easier ` [[4,-6],[-6,0],[0,9],[9]]` would be fine as output as well in what I want to use it for. Maybe even better for my purpose I think.
 
ø trims the excess, and ζ appends a space in some cases and in others not
@KevinCruijssen actually, I don't think there's any trouble here; D¨s¦‚ø
and no, it's not easier to do your other suggested output
 
@EriktheOutgolfer Thanks
 
@KevinCruijssen How about
D¦‚ø
Or even without D if you use implicit input?
 
shorter: DÀ‚ø¨
oh, clever
 
Or even better, Œ2ù
 
12:53 PM
@Mr.Xcoder Ah, ¦‚ø indeed works great as well. I now realize my approach doesn't work for what I want to accomplish, but it's certainly useful for in the future. :)
 
Glad to have helped.
 
@Mr.Xcoder Oh, Œ2ù is pretty smart as well!
 
Now I gtg, since I don't have much mobile data in Roaming. Been in 5 different countries in the last 3 days lol
 
Completely different question. Why is there a Add to global array; Push global array; and Clear global array, but no Pop from global array?
 
because 05AB1E is a mess :P
also, the global array is quite limited, there's no Set global array
 
12:57 PM
lol, don't let @Adnan hear it. ;p
Yeah, the global array seems to be mostly used in combination with Insert a into global array and after quit, print array[input_1] and Insert a into global array with immediate sorting and after quit, print array[input_1]
 
hm (psst, I don't want @Kevin to hear this, but Java sucks for golfing :P)
 
Don't worry, Kevin already knows this for years XD
Why do you think I'm now here at 05AB1E ;)
 
1:09 PM
Hmm codegolf.meta.stackexchange.com/a/16692/52210 looks easier than it is (in 05AB1E), which is why I would have liked a pop from global array lol. I'll take another look later on. Currently have to get back to work. Luckily it's still in the Sandbox. My approach with overlapping pairs, and filtering out products of 0 is obviously flawed for test cases with two adjacent zeroes I now realize..
 

« first day (944 days earlier)      last day (451 days later) »