A
Agent Spikes
I just improved upon the 64-byte implementation of Rot13 as listed
here and got it down 2 more characters:
http://hea-www.harvard.edu/~fine/Tech/rot13.html
The updated line is:
main(a){while(a=getchar())putchar(a-1/((a&~32)/13*2-11)*13);}
The improvements were achieved by:
- Get the NOT off of the getchar() and adjust throughout the equation
[1 byte]
- Apply De Morgan's laws newly created "~(~a|32)", leaving us with "(a|
~32)" [1 byte]
Feel free to rip it apart and let me know what you think.
here and got it down 2 more characters:
http://hea-www.harvard.edu/~fine/Tech/rot13.html
The updated line is:
main(a){while(a=getchar())putchar(a-1/((a&~32)/13*2-11)*13);}
The improvements were achieved by:
- Get the NOT off of the getchar() and adjust throughout the equation
[1 byte]
- Apply De Morgan's laws newly created "~(~a|32)", leaving us with "(a|
~32)" [1 byte]
Feel free to rip it apart and let me know what you think.