pemo said:
Certain that it's been linked to before from c.l.c, but I've only just
noticed it ... so I thought I'd post a link for others that haven't seen it.
http://www.acm.org/classics/sep95/
It has, I think, but all discussions of it I've seen miss the obvious
work-around...
Write your C implementation in another language. By preference an
interpreted language, as a cross-compiler on another platform. E.g., use
a Lisp interpreter on a Mac to write a compiler for C that targets MS
Windows. Now compile your original C compiler on that platform. Good
luck to anyone who manages to infect _all_ alternative languages on all
possible platforms, from Befunge 'terps hand-hacked in machine language,
up to full-scale Ada implementations compiled from Modula.
Bonus points if your intermediate language was designed specifically for
this exercise. Extra bonus if you use two or more intermediates.
The problem with Trusting Trust exists only if you assume a single
language and a single platform (or limited numbers of both). In reality
we have a plethora of languages and quite a few platforms (even if only
a few are common), and of the former we can create as many as we want,
as exotic as we want.
Richard