Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: Re: ROT13



>>>>> Dennis McMurchy writes:  (on 25 May 99)

>   Not a bad joke at all, but you know that I searched in TkMan with
> no luck, checked the indices of three Lignux books, and even looked
> in Kernighan and Pike's old _Unix Programming Environment_, before
> finally finding a number of references to the decryption of ROT13
> in O'Reilly's _The Usenet Handbook_ (it's a real handicap being
> as old-fashioned and book-oriented as I am ;-)

<laugh>

Sorry to put you through all that effort!  It wasn't *that* funny. ;-)

>   This was really the first time I'd ever run into this ROT13,

Sorry, one gets a little parochial.  Way back when I used to actually
read usenet news daily (as opposed to occasional jaunts to dejanews
today).  The humor newsgroups used rot13 regularly.  ROT13 is an
extremely rare example of a valid technical solution to a "moral" issue.

Just to really go off on a tangent: ROT13 is an example of a "Caesar
Cypher".  Read somewhere that the original Caesar cypher used a strip of
paper wound spirally around a staff to encode/decode.

>                            For anyone who doesn't live in the 
> stratospheric realms of Emacs and had a similar problem, this
> will do the trick:
>    
> tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" < $1

Gnu tr (linux tr) doesn't require you use regexp character classes.  The
following also works and is far easier to type:

    cat file | tr a-zA-Z n-za-mN-ZA-M

I've the following macro in my ~/.exrc (I'm of the vi persuasion):

    map \R :%!tr a-zA-Z n-za-mN-ZA-M
                                    ^^
				    Literal "ctl-M" (newline)

Typing "\R" in vi then automagically rot13's the entire file (another
"\R" or simply "u" to revert back).

Most newsreaders still include commands to decrypt rot13 (^X in trn) as
do a few mail readers, I believe.

Back to our regularly scheduled programming ....

Regards,
-- 
Rex
-------------------------------------------------------------------
Next Nomikai: May 26 (Wed), 19:00 Tengu TokyoEkiMae 03-3275-3691
*** Special guest: Eric S. Raymond
Next Technical Meeting: June 19 (Sat), 18:30  place: Temple Univ.
Topic: Linux SMP and the Intel SC450NX Quad Xeon Server platform
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links