On Wed, Sep 20, 2006 at 11:18:20AM -0400, Uri Guttman wrote:
> >> > s zzs vvxv
> >> > and s ZVZchr 122Zie
> >> > and s ZVZchr 122Zie
> >> > and s ZVZchr 122Zie
> >> > and s SxSlcfirstSe
> >> > and s YZZxZYvvxvYi and print
> >> > z
> >> > and s ZVZchr 122Zie
> >> > and s ZVZchr 122Zie
> >> > and s ZVZchr 122Zie
> >> > and s SxSlcfirstSe
> >> > and s YZZxZYvvxvYi and print
I started with the basic quine
$_ = q($_ = q(x); s/x/$_/; print); s/x/$_/; print
then set about depunctuating it:
$_ = q(foo)
becomes
s//foo/
which, using z as the delimiter, becomes
s zzfooz
Most of my problems revolved around the fact that in this case, foo itself
needs to include the z character, so the rest of the code is really about
escaping the z's (and escaping the escapes), by doing s/v/z/ three times
(but as s/V/chr 122/ie since the code can't include the z or v), then
doing the actual s/x/$_/ (as s/x/ucfirst/e), then doing a further s/// to
undo some damage done by the earlier s///'s
> and this would be cool to send to the quine site. i wonder if quines in
> other langs could be done punctuation free?
Which site is that?
--
Any [programming] language that doesn't occasionally surprise the
novice will pay for it by continually surprising the expert.
-- Larry Wall