Quines (again)

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 :wink:

p eval _=“print 'p eval =’;

Bill

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 :wink:

p eval _=“print 'p eval =';

Dude, that’s tubular. (Sorry, I’m from CA.)

Is that the smallest ruby quine that anyone’s seen?

Cool!

Always good to know some clever quines.

– Shanko

“Bill Kelly” billk@cts.com wrote in message
news:001101c2487e$6d657500$fa7b1b42@musicbox…

···

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 :wink:

p eval _=“print 'p eval =';

Bill

What’s the definition of a quine?

···

On Tuesday 20 August 2002 02:29 pm, 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 :wink:

p eval _=“print 'p eval =';

Bill

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 :wink:

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 :wink:

(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
:wink:

Regards,

Bill

···

From: “Joel VanderWerf” vjoel@PATH.Berkeley.EDU

Hi,

Joel VanderWerf vjoel@PATH.Berkeley.EDU writes:

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 :wink:

p eval _=“print 'p eval =';

Dude, that’s tubular. (Sorry, I’m from CA.)

Is that the smallest ruby quine that anyone’s seen?

% cp /dev/null zero
% ls -l zero
-rw-r–r-- 1 watanabe ruby 0 Aug 21 10:55 zero
% cat zero
% ruby zero

···


eban

> What's the definition of a quine?

Sorry. I just saw this answered farther down the list.

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

···

----- 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 :wink:

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 :wink:

(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
:wink:

Ha ha! Brilliant, brilliant.

Hal

···

----- Original Message -----
From: “WATANABE Hirofumi” eban@os.rim.or.jp
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Tuesday, August 20, 2002 9:06 PM
Subject: Re: quines (again)

Hi,

Joel VanderWerf vjoel@PATH.Berkeley.EDU writes:

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 :wink:

p eval _=“print 'p eval =';

Dude, that’s tubular. (Sorry, I’m from CA.)

Is that the smallest ruby quine that anyone’s seen?

% cp /dev/null zero
% ls -l zero
-rw-r–r-- 1 watanabe ruby 0 Aug 21 10:55 zero
% cat zero
% ruby zero

There’s just one problem. It also works for perl.
% perl zero
%
:slight_smile:

···

On Wed, Aug 21, 2002 at 11:06:38AM +0900, WATANABE Hirofumi wrote:

% cp /dev/null zero
% ls -l zero
-rw-r–r-- 1 watanabe ruby 0 Aug 21 10:55 zero
% cat zero
% ruby zero


Jim Freeze
If only I had something clever to say for my comment…
~

Hal E. Fulton wrote:

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:

Gee, foo is extensible (you’ve still got a, c, d, …). It’s also
type-safe and structured (no goto). Quite an achievement, Hal :wink:

Even better; it’s a polyglot!

···

On Wed, Aug 21, 2002 at 11:06:38AM +0900, WATANABE Hirofumi wrote:

% cp /dev/null zero
% ls -l zero
-rw-r–r-- 1 watanabe ruby 0 Aug 21 10:55 zero
% cat zero
% ruby zero

There’s just one problem. It also works for perl.
% perl zero
%

“Hal E. Fulton” hal9000@hypermetrics.com writes:

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.

I bet my submission of your article to alt.humor.best-of-usenet is the
first ever from comp.lang.ruby. Here’s hoping it gets accepted.

Jim

···


Jim Menard, jimm@io.com, http://www.io.com/~jimm/
“The Be staff…went to see the movie ‘Men in Black.’ …The movie makes
a point that is somehow appropriate – It is impossible to completely rid
the universe of bugs, but at least you can drive something fast, arm
yourself with powerful tools, and look good doing it.” – markg@be.com