Article View: comp.std.c
Article #5893Re: Portable Self-Replicating C Contest
From: Karl Heuer
Date: Tue, 11 Apr 1989 16:33
Date: Tue, 11 Apr 1989 16:33
18 lines
1477 bytes
1477 bytes
In article <6647@bsu-cs.bsu.edu> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes:
>In article <12593@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer)
>writes [that contest entries must use trigraphs]
>
>I'm curious to know: What is the purpose of the rule above? All
>it will do is make submitted programs harder to read, and nearly
>impossible to make sense of in a casual scan.
It makes the problem more challenging. Note that a program which satisfies
all of the rules except this one is not self-reproducing after a naive
conversion to trigraphs, because `printf("??=")' will output `#', not `??='.
(One correct fix is to use `printf("?\?=")', but since `\' is itself a
trigraphable character, this must be written `printf("???/?=")'!)
Yes, it's hard to read, but one pass through a detrigraphing sed script will
fix that, as I did with your text before quoting it above.
Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
Technical Details
Message-ID:
<12629@haddock.ima.isc.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!ima!haddock!karlReferences:
<12144@haddock.ima.isc.com> <12593@haddock.ima.isc.com> <6647@bsu-cs.bsu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: Portable Self-Replicating C Contest Message-ID: <12629@haddock.ima.isc.com> Date: 11 Apr 89 16:33:36 GMT References: <12144@haddock.ima.isc.com> <12593@haddock.ima.isc.com> <6647@bsu-cs.bsu.edu> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 18