[Question]
  [
Challenge: Implement [ROT-47](http://rot47.net/) in code that works as both itself and as the ROT-47 version of itself.
### Scoring:
Your score is calculated as a percentage of **used, ROT-47 eligible bytes in total of both versions of the program** divided by **total bytes (all characters) of both versions**.
A **used, ROT-47 eligible byte** is any character that would be converted by the ROT-47 cipher that is not **part of a comment** or ignored by the compiler/interpreter. For example, any character in a brainfuck program that is not `+-<>[],.`  is not considered a used byte, and any character in a C program including and after `//` or inside `/* */` is not considered a used byte. All special symbols in APL are not considered used, as are all characters in a Whitespace program (sorry).
Ties will be broken by the program with the most upvotes. If there is still a tie, then the shortest program wins.
Example scoring:
### C: 62/64 = 96.875%
Notice there is a space in this program. Obviously also, this program is not a valid entry because it doesn't even compile, but I wanted to show how scoring works.
```
main(){printf("Hello World!");}
```
  
[Answer]
# Ruby, 100% (74 characters)
Input on STDIN, output on STDOUT.
```
Vj=s=gets;puts(s.tr'!-~','P-~!-O');Vj;'lDl86EDjAFEDWD]ECVP\OV[V!\OP\~VXj;'
```
The second line is the first line ROT-47'd. Therefore, when ROT-47ing the whole program, it becomes:
```
';lDl86EDjAFEDWD]ECVP\OV[V!\OP\~VXj';jV=s=gets;puts(s.tr'!-~','P-~!-O');jV
```
My strategy here is based upon the fact that:
* `V` is `'` when ROT-47'd
* `j` is `;` when ROT-47'd
* Therefore, `Vj=...Vj;` turns into `';l...';`, which is essentially a no-op
	+ Now you can create any arbitrary code that does anything normally and no-ops when ROT-47'd. This is because `Vj=...Vj;` can support running any code as you could do `Vj=0;{INSERT ANY CODE};Vj;`, and that will become `'...';` when ROT-47'd. You just have to be careful not to use `V` in that code, since that will break it.
* Similar logic can be used in reverse to produce the second half (`jV` instead of `Vj`)
[Answer]
# C - 54.6%
```
Y;BW;XL;jNj;AW(){XL^Y;};main(int i,char**v){char*x=v[1];while(*x){if(*x>32&&*x<128)*x=(*x+15)%94+32;putchar(*x++);}}//Y^Nj>2:?W:?E :[492CYYGXL492CYIlG,`.jH9:=6WYIXL:7WYImbaUUYIk`agXYIlWYIZ`dXThcZbajAFE492CWYIZZXjNN
```
When ROT-47-translated, we get
```
*jq(j){j;};jp(WXL){/*jNj>2:?W:?E :[492CYYGXL492CYIlG,`.jH9:=6WYIXL:7WYImbaUUYIk`agXYIlWYIZ`dXThcZbajAFE492CWYIZZXjNN^^*/};main(int i,char**v){char*x=v[1];while(*x){if(*x>32&&*x<128)*x=(*x+15)%94+32;putchar(*x++);}}
```
Both programs compile, and ROT-47-translate the first argument:
```
$ ./a "hello world"
96==@ H@C=5
```
[Answer]
## GolfScript, 120 / 120 bytes = 100%
```
{:&&32>&&+254<*{7+7+94%33+}*}%LiUUbamUUZadckYLfZfZhcTbbZNYNT
```
or, in ROT-47:
```
LiUUbamUUZadckYLfZfZhcTbbZNYNT{:&&32>&&+254<*{7+7+94%33+}*}%
```
No comments or string abuse. The undefined command `LiUUbamUUZadckYLfZfZhcTbbZNYNT` (which equals the rest of the code in ROT-47) is a no-op, but it still gets executed by the interpreter, so I believe it counts as used.
This was actually a pretty easy challenge in GolfScript. The main difficulty was in avoiding the digit `1`, which is mapped by ROT-47 into the GolfScript command ```. The commands `.`, `-`, `,`, `\`, `[`, `/`, `]` and `^` also had to be avoided, but that was fairly easy in this case, since the task required no array building.
### Bonus:
Here's a GolfScript [period-2 quine](https://codegolf.stackexchange.com/questions/2582/golf-a-mutual-quine) (i.e. a program that prints a second program that prints the first program again) where the two programs are the ROT-47 transforms of each other:
```
{`'0$~'+.{7+7+94%33+}%@!{0$@@;}*}0$~L1V_SOVZ]LfZfZhcTbbZNToPL_SoojNYN_SO
```
This program outputs itself ROT-47 encoded, yielding another GolfScript program:
```
L1V_SOVZ]LfZfZhcTbbZNToPL_SoojNYN_SO{`'0$~'+.{7+7+94%33+}%@!{0$@@;}*}0$~
```
which, in turn, also outputs itself ROT-47 encoded, yielding the previous program again. Thus, this program is also a [rotating quine](https://codegolf.stackexchange.com/questions/5083/create-a-rotating-quine).
[Answer]
# python, 96.1% (?)
According to your definition, strings count as used code?
```
V=input();print("".join([chr(33+(ord(V[i])+14)%94)for i in range(len(V))]));V
'l:?AFEWXjAC:?EWQQ];@:?W,49CWbbZW@C5WD,:.XZ`cXThcX7@C : :? C2?86W=6?WDXX.XXj'
```
]