% \let~\catcode~`?`\
% \let?\the~`#?~`~~`]?~`~\let]\let~`\.?~`~~`,?~`~~`\%?~`~~`=?~`~]=\def
% ],\expandafter~`[?~`~][{=%{\message[}~`\$?~`~=${\uccode`'.\uppercase
% {,=,%,{%'}}}~`*?~`~=*{\advance.by}]#\number~`/?~`~=/{*-1}\newcount.
% =\-{*-}~`-?~`~]-\-~`^?~`~=^{*1}~`\ ?~`~= {.`\ $}~`@?~`~=@{,.,"#`@^$}
% .`#*`'$.?~`~0-?~`~$//$^$ .``^$*?~`~$^$.?~`~0-?~`~/$-?~`~^$@*?~`~$ *
% ?~`~*?~`~*?~`~*?~`~$@-?~`~$ .?~`~0-?~`~-?~`~$.``^$^^$.`<-?~`~*`<$@*
% ?~`~$*?~`~-`(-`+$%}\batchmode


% We want to create

% \message{Just another TeX hacker,}\batchmode

% That's the same as

% \csname message\endcsname\bgroup Just another TeX hacker,\egroup
% \csname batchmode\endcsname

% Or even

% \csname message\endcsname
% {Just another TeX hacker,}
% \csname batchmode\endcsname

% Now, assume that we have a macro \foo (which, of course, we'll
% rename later). We need a macro to append a token to \foo:

% \let\ea\expandafter
% \def\append#1{\ea\def\ea\foo\ea{\foo#1}}
% \def\foo{}
 
% \append{\csname}
% \append{message}
% \append{\endcsname}
% \append{{Just another TeX hacker,}}
% \append{\csname}
% \append{batchmode}
% \append{\endcsname}

% \foo

% Now we'll start to get clever about adding characters. As with the
% old method, we'll need another macro

% \def\foo{}
% \newcount\n
% \let\ea\expandafter
% \def\append#1{\ea\def\ea\foo\ea{\foo#1}}
% \def\ac{\uccode`a\n \uppercase{\append{a}}} % appendchar
% 
% \append{\csname}
% \n109\ac % m
% \n101\ac % e
% \n115\ac % s
% \n115\ac % s
% \n97\ac  % a
% \n103\ac % g
% \n101\ac % e
% \append{\endcsname}
% \append{\csname}
% \n98\ac  % b
% \n103\ac % g
% \n114\ac % r
% \n111\ac % o
% \n117\ac % u
% \n112\ac % p
% \append{\endcsname}
% \n74\ac  % J
% \n117\ac % u
% \n115\ac % s
% \n116\ac % t
% \n32\ac  % space
% \n97\ac  % a
% \n110\ac % n
% \n111\ac % o
% \n116\ac % t
% \n104\ac % h
% \n101\ac % e
% \n114\ac % r
% \n32\ac  % space
% \n84\ac  % T
% \n101\ac % e
% \n88\ac  % X
% \n32\ac  % space
% \n104\ac % h
% \n97\ac  % a
% \n99\ac  % c
% \n107\ac % k
% \n101\ac % e
% \n114\ac % r
% \n44\ac  % ,
% \foo}\def\foo{}
% \append{\csname}
% \n98\ac  % b
% \n97\ac  % a
% \n116\ac % t
% \n99\ac  % c
% \n104\ac % h
% \n109\ac % m
% \n111\ac % o
% \n100\ac % d
% \n101\ac % e
% \append{\endcsname}
% 
% \foo

% OK, let's simplify and begin obfuscating:

% \def\foo{}
% \catcode`\#13
% \newcount#
% \let\ea\expandafter
% \def\ac{\uccode`a# \uppercase{\ea\def\ea\foo\ea{\foo a}}}
% \def\apc{\ea\def\ea\foo\ea{\foo\csname}}
% \def\ape{\ea\def\ea\foo\ea{\foo\endcsname}}
% 
% \apc #109\ac #101\ac #115\ac #115\ac #97\ac  #103\ac #101\ac \ape
% \apc #98\ac  #103\ac #114\ac #111\ac #117\ac #112\ac \ape
% #74\ac #117\ac #115\ac #116\ac #32\ac 
% #97\ac #110\ac #111\ac #116\ac #104\ac #101\ac #114\ac #32\ac 
% #84\ac #101\ac #88\ac  #32\ac  
% #104\ac #97\ac  #99\ac  #107\ac #101\ac #114\ac #44\ac 
% \foo}\def\foo{}
% \apc #98\ac  #97\ac  #116\ac #99\ac #104\ac #109\ac #111\ac #100\ac #101\ac
% \ape\foo

% We turn them into relatives:

% \catcode`\#13
% \newcount#
% \let\ea\expandafter
% \def\ac{\uccode`a# \uppercase{\ea\def\ea\foo\ea{\foo a}}}
% \def\apc{\ea\def\ea\foo\ea{\foo\csname}}
% \def\ape{\ea\def\ea\foo\ea{\foo\endcsname}}
% \def\a{\advance#by}
% \def\foo{}
% 
% \apc \a109\ac \a-8\ac \a14\ac \ac \a-18\ac \a6\ac \a-2\ac \ape
% \apc \a-3\ac \a5\ac \a11\ac \a-3\ac \a6\ac \a-5\ac \ape
% \a-38\ac \a43\ac \a-2\ac \a1\ac \a-84\ac
% \a65\ac \a13\ac \a1\ac \a5\ac \a-12\ac \a-3\ac \a13\ac \a-82\ac
% \a52\ac \a17\ac \a-13\ac \a-56\ac
% \a72\ac \a-7\ac \a2\ac \a8\ac \a-6\ac \a13\ac \a-70\ac
% \foo}\def\foo{}
% \apc \a54\ac \a-1\ac \a19\ac \a-17\ac \a5\ac \a5\ac \a2\ac \a-11\ac \a1\ac \ape
% \foo

% Yet more compression:

% \catcode`\#13
% \newcount#
% \let\ea\expandafter
% \def\ac{\uccode`a# \uppercase{\ea\def\ea\foo\ea{\foo a}}}
% \def\apc{\ea\def\ea\foo\ea{\foo\csname}}
% \def\ape{\ea\def\ea\foo\ea{\foo\endcsname}}
% \def\a{\ac\advance#by}
% \def\foo{}
% 
% \apc #109\a-8\a14\a0\a-18\a6\a-2\a-3\ape
% \apc \a5\a11\a-3\a6\a-5\a-38\ape
% \a43\a-2\a1\a-84\a65\a13\a1\a5\a-12\a-3\a13\a-82
% \a52\a17\a-13\a-56\a72\a-7\a2\a8\a-6\a13\a-70\a54
% \foo}\def\foo{}
% \apc\a-1\a19\a-17\a5\a5\a2\a-11\a1\a0\ape\foo
% 

% Now we reuse some of the earlier obfuscations:
% We'll replace the counter with \\ since it occurs so infrequently
% We'll replace \ea (\expandafter) with #
% We'll combine \ac with \a, since that's the only place it's now used
% We'll replace \a with ~
% We'll replace the 13 at the end of the first line with `\<newline>
% We'll replace \foo with \~ (This requires a syntactic change to \foo a)

% \catcode`\#`\
% \newcount\\
% \let#\expandafter
% \def\apc{#\def#\~#{\~\csname}}
% \def\ape{#\def#\~#{\~\endcsname}}
% \def~{\uccode`a\\\uppercase{#\def#\~#{\~a}}\advance\\by}
% \def\~{}
% 
% \apc\\109~-8~14~0~-18~6~-2~-3\ape
% \apc~5~11~-3~6~-5~-38\ape
% ~43~-2~1~-84~65~13~1~5~-12~-3~13~-82
% ~52~17~-13~-56~72~-7~2~8~-6~13~-70~54
% \~}\def\~{}
% \apc~-1~19~-17~5~5~2~-11~1~0\ape\~

% OK, now for some real fun.
% We can move the let of # to \expandafter happen after all our early
% stuff, which frees up # for other use in the preamble (such as \let)
% We'll set \= to \def
% We'll map ? to \the and ! to \catcode
% We'll replace 13 with \the\catcode`!  (or ?!`! )
% That even works for -13 (which becomes -?!`! )
% Similar tricks work for 3 ($), 7 (^), and 8 (_)
% Since we've changed the catcode of #, we can't do this for 6.

% \catcode`\!`\
% \let!\catcode
% !`\#`\
% \let#\let
% !`\?`\
% #?\the
% #\=\def
% \newcount\\
% \=\apc{#\=#\~#{\~\csname}}
% \=\ape{#\=#\~#{\~\endcsname}}
% \=~{\uccode`a\\\uppercase{#\=#\~#{\~a}}\advance\\by}
% \=\~{}
% ##\expandafter
% 
% \apc\\109~-?!`_~14~0~-18~6~-2~-?!`$\ape
% \apc~5~11~-?!`$~6~-5~-38\ape
% ~43~-2~1~-84~65~?!`!~1~5~-12~-?!`$~?!`!~-82
% ~52~17~-?!`!~-56~72~-?!`^~2~?!`_~-6~?!`!~-70~54
% \~}\=\~{}\apc~-1~19~-17~5~5~2~-11~1~?!` \ape\~

% Now what? We should rename \apc and \ape, the last two words that
% we have control over. How about \} and \{ just to confuse things?
% And we can replace the character a (in \appendchar) with .
% We can eliminate a \let or a \catcode by using ~ to bootstrap
% the process: Let's use \let...
% Now, for some real fun (and obfuscation) let's swap { and }
% Having done that, we can use the same trick as above to replace
% 1 with ?!`\} and 2 with ?!`\{
% And, of course, 0 can become ?!`\\
% What if we move the second \def\foo{} into the first one? Hey, it worked!
% Replaced 38 with `\& and 43 with `+
% Did some more single-digit replaecment, and 12 became ?!`\`
% So the remaining problems are 5, 6, and 9

% \let~\let\catcode`\!`\
% ~!\catcode!`\#`\
% ~#~!`\?`\
% #?\the!`\%?!`\{!`\{?!`\}!`\}?!`\%#\=\def\newcount\\
% \=\}}#\=#\~#}\~\csname{{\=\{}#\=#\~#}\~\endcsname{{
% \=~}\uccode`.\\\uppercase}#\=#\~#}\~.{{\advance\\by{\=\~}\=\~}{{##\expandafter
% 
% \}\\?!`\}?!`\\9~-?!`_~?!`\}?!`\&~?!`\\~-?!`\}?!`\_~6~-?!`\{~-?!`$\{
% \}~5~?!`\}?!`\}~-?!`$~6~-5~-`\&\{
% ~`+~-?!`\{~?!`\}~-?!`\_?!`\&~65~?!`!~?!`\}~5~-?!`\`~-?!`$~?!`!~-?!`\_?!`\{
% ~5?!`\{~?!`\}?!`\^~-?!`!~-56
% ~?!`\^?!`\{~-?!`^~?!`\{~?!`_~-6~?!`!~-?!`\^?!`\\~5?!`\&
% \~{\}~-?!`\}~?!`\}9~-?!`\}?!`\^~5~5~?!`\{~-?!`\}?!`\}~?!`\}~?!` \{\~

% So the remaining problems are 5, 6, and 9
% We can eliminate 6 as a problem by using @ instead of #
% and then 6 becomes ?!`\# Unfortunately, this deobfuscates the code.


\let~\let\catcode`\!`\
~!\catcode!`\#`\
~#~!`\?`\
#?\the!`\%?!`\{!`\{?!`\}!`\}?!`\%#\=\def\newcount\\
\=\}}#\=#\~#}\~\csname{{\=\{}#\=#\~#}\~\endcsname{{
\=~}\uccode`.\\\uppercase}#\=#\~#}\~.{{\advance\\by{\=\~}\=\~}{{##\expandafter

\}\\?!`\}?!`\\9~-?!`_~?!`\}?!`\&~?!`\\~-?!`\}?!`\_~6~-?!`\{~-?!`$\{
\}~5~?!`\}?!`\}~-?!`$~6~-5~-`\&\{
~`+~-?!`\{~?!`\}~-?!`\_?!`\&~65~?!`!~?!`\}~5~-?!`\`~-?!`$~?!`!~-?!`\_?!`\{
~5?!`\{~?!`\}?!`\^~-?!`!~-56
~?!`\^?!`\{~-?!`^~?!`\{~?!`_~-6~?!`!~-?!`\^?!`\\~5?!`\&
\~{\}~-?!`\}~?!`\}9~-?!`\}?!`\^~5~5~?!`\{~-?!`\}?!`\}~?!`\}~?!` \{\~

