I think I need to make a section, that, when run forwards: given one, passes with stack value one out the right side, and given 0, passes with stack value 0 out the right side
but run backwards, given -1, passes with stack value 0 out the left side
I think I did it
pa pa id id op op
nice symmetry, I think
also I realised this might be a good language for that hyperquine challenge
wait
soz, this is actually it
pa pa id el op op
how it works: el is essentially a nop, it gets skipped first time, and the values are decremented and incremented twice
the other way, as op op el id pa pa
it increments to one, skips the first pa, and decrements on pa
Actually I think I made this to complex. Also I just realised how noisy I am right now :( soz
op pa id el is the version I'm thinking of as the proper simple way
@ASCII-only I've noticed... I have written a solution in MATLAB, but it's not really golfed yet...
I was looking for a pattern in the indices of the red elements, but 2 minutes didn't lead to anything useful... Maybe I'll find something if I look a bit more...
It's readable, and that means it's not ready to be posted :P
@ASCII-only I have each of the indices written manually in a list now... It's a large part of the code... If I could do something like: 400-23*(1:10), instead of 377 354 ... , it would help a lot...
Moorhen (buggy, working interpreter available here), 38 bytes
op pa id el pa id el ai op id ai pi ai
Note this doesn't print, because printing only happens at halting, so it just puts infinite ones on stack
Explanation:
Commands can be (most of) all english words, and the command they execut...
The linear index for the first and last red element on each row. The first indices will be: 90 92 98 100 109 115 ...
90 = 5*21+5 (The first red number is the fifth element on the fifth row). 92 = 5*21+7 (The last red number (of that chunk of numbers) is the seventh element on the fifth row etc)
It's not pretty, but it works :) But I got to go :)
@ASCII-only, hope you try to write up a solution to it :)
Perl, 216 215 bytes
Includes +2 for -0p
Give input on STDIN. Use % for external walls, # for internal walls, 0 for empty spaces, 8 for mice and r for the starting position. You can transform and run the examples as:
cat dynamite.txt | perl -p0e 's/.+/$a^=$&/egr;s//sprintf"%-*s",length$a,$&/eg;...
@Geobits Really? Interesting (AFAIK the only non-esolangs made by people here are Cheddar, Pytek, Elegance and Zephyr, and none of them are finished, it's a really small number compared to the number of esolangs PPCG has)
@DestructibleWatermelon Thanks for the PR/ Nice Truth Machine! I think I need to add runtime output and a proper no-op. It might destroy your truth machine for the time being but hopefully it will make it easier to program in overall.
I would use parameter, since you're talking from the point of view of the method. Parameters are what the code expects, arguments are what gets passed.
First call: "Here are your results. This message was generated at Jan 1, 1900 XX:XX." Second call: "Here are your results. This message was generated at Jan 1, 1900 XX:XX. This message was generated at Jan 1, 1900 XX:XX."
CMC Time!!! Given a string composed of solely lowercase ASCII and space, output the letters [a-z] that are not in the input string (in any order). code-golf Example -- 'The quick brown fox jumped over the lazy dog' --> '' ... 'bcdfghjklmnpqrstvwxyz' --> 'aeiou'
Current buds go inside my ear. When I got them I asked my cubicle mates to tell me if they could hear it, because I can't listen to myself from outside of myself obviously. Three months later they told me they could hear me.
Well it was more of the fact that I didn't know why it wasn't working before until I realized the guy who did it before me had sleep calls on the main thread that caused the RDC that was open to sleep, too, so they were basically useless.
Now it's a lot more consistent, just passed test 36 with no failures so far, the one before probably would've failed a quarter or so.
Heh, luckily I don't need anything complex for this app, just an alternate thread that waits for the server to do stuff since it's a bit slow. Using events wasn't working cause apparently windows sends window creation events before the window actually appeared on the server, which made it very inconsistent.
@Sherlock9 You'll still have issues if b is mutable. Either use an immutable object like a tuple, or use a sentinel value like None and assign the default in the function body