----- Original Message ----- 
From: "Bill Kelly" <billk / cts.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Tuesday, August 20, 2002 8:52 PM
Subject: Re: quines (again)


> 
> From: "Joel VanderWerf" <vjoel / PATH.Berkeley.EDU>
> >
> > Bill Kelly wrote:
> > > Hi,
> > > 
> > > Sorry if this is annoying, 'cause I know we've done quines before,
> > > but I just came up with this one, and was all "stoked and stuff"
> > > (to use 80's southern california vernacular ;)
> > > 
> > > p eval _="print 'p eval _=';_"
> > 
> > Dude, that's tubular. (Sorry, I'm from CA.)
> > 
> > Is that the smallest ruby quine that anyone's seen?
> 
> Just realized we could zap the space after the print.... to nitpick
> my own quine, as it were ;)
> 
> (I was also thinking, wouldn't it be funny if Matz surreptitiously,
> in some future language revision slipped the following into the core:
>   class Object
>     def quine; puts "quine"; end
>   end
> ;-)

Silly, silly. You think like me.

My language "Foo" has only four possible programs that
can be written in it. The first three are each only
one letter long, and do the following:

h   Prints "Hello, world!"
b   Prints the song "99 Bottles of Beer"
q   Prints "q"  (a one-character quine, second-shortest
    in the world)

The last is the null program, consisting of no characters
and producing no output, making it the shortest quine in
the world.

I am working on producing quines of negative length, but
will have to wait until I have a faster-than-light drive.
Hard drive, that is.


Cheers,
Hal

P.S. - Foo does not yet have Unicode support.  HF