TeX quines
Quine
is a program, which outputs its own source code.
I wrote several quines in Plain TeX.
The shortest one I found is q. (64 characters + banner).
IniTeX version: i.
Some older attempts:
q.1, q.2, q.3,
q.4.
Here's one which prints itself to the dvi
file. It too has an iniTeX variant.
Unlambda resources
I wrote several interpreters for the wonderful
Unlambda
programming language by
David Madore.
- unl.c: this one is written in C. It
is the fastest Unlambda interpreter I know about, and I also tried to
make it less buggy than other extant Unlambda interpreters in C.
It is accompanied
by unlc,
a simplistic Unlambda-to-C compiler (written in Perl).
- unl.lisp,
unlt.lisp: these are written in
Common Lisp. The first one is as simple as possible, it may serve as
an inspiration if you want to write an interpreter yourself (in fact,
all of my Unlambda interpreters are based on this one). The second one
implements a handy debugging extension. It understands new primitive
functions “
t
” and “n
”, which behave as “i
”, except that `tF
evaluates
the form F
in a tracing mode, while `nF
disables tracing during
evaluation of F
.
- unl.pl: this one is written in Perl,
and is not particularly interesting.
- unl.pro: and this one is in Prolog.
- unl.ps: yes, this is an Unlambda
interpreter written in PostScript.
I also wrote an Unlambda interpreter in Unlambda, which you can
find on the
Comprehensive
Unlambda Archive Network.
Some Unlambda programs:
Finally, eliminate
is a lambda elimination tool (written in Perl).