Timeline for Draw my downslashes
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 14, 2017 at 22:04 | history | edited | Jonathan S. | CC BY-SA 3.0 | Down to 84 bytes |
| Sep 14, 2017 at 21:53 | comment | added | Jonathan S. | @QuertyKeyboard Yup, I also tried storing gsub in a variable before the loop and then using it instead of writing gsub three time, and I was just as surprised to see it making absolutely no difference. Combining the "gsub instead of loop" and "store gsub" tricks is really neat, didn't think of that one! Thanks! :) | |
| Sep 14, 2017 at 21:22 | comment | added | QuertyKeyboard | I was disappointed to find that my gsub trick I commented in your other answer didn't quite work for this one. It actually ended up adding one byte. However, I wouldn't give up that easily. First, I tried to store gsub as a variable to shorten the code. To my surprise, my code was exactly the same amount of bytes - 88. However, I realized that with gsub being saved, my gsub trick could now work! Here's my code that shaved off 4 bytes: s=""g=s.gsub g(...,".",function(c)s=g(g(g(s,"\\"," "),"/?$",c)," /","/")print(s)end) | |
| Sep 14, 2017 at 19:19 | history | answered | Jonathan S. | CC BY-SA 3.0 |