Skip to main content

Timeline for Reverse and Invert a String

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
Nov 7, 2015 at 3:53 comment added Glen O And if the concern is on the other side of it (that it displays as \x04 and the like), then print() costs seven, which would bring 56 up to 63.
Nov 7, 2015 at 3:50 comment added Glen O "If an character results to be an unprintable, you may optionally output it but they do not have to be removed."
Nov 6, 2015 at 21:03 comment added Alex A. @GlenO Thanks for the suggestions, but that approach leaves in unprintables as hex codes, which the OP said is not allowed. Using filter(isprint,) both qualifies it for the bonus and makes it compliant with the rules.
Nov 6, 2015 at 15:06 comment added Glen O And if you give up the filter step, you can avoid the comprehension and join by using map directly on the string. s->map(c->Char(parse(Int,join(1-digits(Int(c),2)),2)),s) (for 56 bytes)
Nov 6, 2015 at 15:03 comment added Glen O While it certainly qualifies it for the bonus, it also costs more than the bonus saves. 16 bytes to filter(isprint,) and only 11.55 bytes saved through the bonus.
Nov 6, 2015 at 4:28 history edited Alex A. CC BY-SA 3.0
added 50 characters in body
Nov 6, 2015 at 3:28 history edited Alex A. CC BY-SA 3.0
deleted 2 characters in body
Nov 6, 2015 at 2:37 history answered Alex A. CC BY-SA 3.0