@Dennis Anyway, I noticed some weird behavior on V.tio. I've been looking into it, and some if it is my end (and fixed now) but some if it is working fine locally. For example, the ladder and slide program works fine locally but not on TIO. I'm guessing it might be because I switched encodings, but I'm not positive.
Well, I just submitted a Cops answer, realized that I should check my answer with the current Github interpreter rather than the current development interpreter, learned that the Github interpreter had a glitch that the development interpreter didn't, and now am not sure whether I can submit a Cops/Robbers challenge for a language version created after the challenge existed. If not, I guess I'll just wait for the next one...
I don't know exactly what the problem is, but it seems like the ò command (start/end a recursive loop) is being entered but not being exited on the second one.
For reference, this is the output that this should be giving.
Taken from this question at Stack Overflow.
The challenge
Given an array of integer values, remove all zeros that are not flanked by some nonzero value.
Equivalently, an entry should be kept either if it's nonzero or a if it's a zero that is immediately close to a nonzero value.
The entries t...
@Dennis there was a bug in that version of wrapper too >_> can you replace it with this version? (i'll try to integrate wrapper with cheddar npm module ASAP so i dont have to pester you with this >_>)
@Dennis I suppose it's possible, although I doubt that's what's causing it since it was working previously, and this isn't a particularly advanced feature of nvim.
The thing that is strange to me is that it enters the recursive loop just fine with the first ò and it exits it just fine when the program ends, but it doesn't end with the second ò
Python, 55 bytes
lambda l:[t[1]for t in zip([0]+l,l,l[1:]+[0])if any(t)]
Generates all length-3 chunks of the list, first putting zeroes on the start and end, and takes the middles elements of those that are not all zero.
An iterative approach turned out longer (58 bytes)
a=0;b,*l=input()
...
@LuisMendo They like being weird. Since a couple of days ago, I can only login when tethering my phone. From my DSL connection, all I get is an obscure error message.
@LuisMendo how about a test case like [-5 0 5], I noticed that in my answer I could reduce the size 3 subarrays using addition and it would work for your test cases