Re: [QUIZ] Quine (#207)
- From: Jorrel <jorrel@xxxxxxxxx>
- Date: Sun, 31 May 2009 22:59:14 -0500
[Note: parts of this message were removed to make it a legal post.]
Is using File considered cheating?
puts File.readlines __FILE__
On Mon, Jun 1, 2009 at 11:17 AM, Aureliano Calvo
<aurelianocalvo@xxxxxxxxx>wrote:
And I did one with a carriage return:
s="s=%c%s%c;printf(s,34,s,34,13,10)%c%c";printf(s,34,s,34,13,10)
A little longer but looks nicer
On Mon, Jun 1, 2009 at 12:16 AM, Aureliano Calvo
<aurelianocalvo@xxxxxxxxx>wrote:
I did something like that, but with parenthesis.
s="s=%c%s%c;printf(s,34,s,34)";printf(s,34,s,34)
It is based on the C quine that uses printf on the wikipedia page.
On Sun, May 31, 2009 at 2:10 PM, Pascal J. Bourguignon <
pjb@xxxxxxxxxxxxxxxxx> wrote:
Robert Dober <robert.dober@xxxxxxxxx> writes:
Ok, the shortest solution did not have much success, what about a long
one then ;)
http://pastie.org/495692
$ echo ----- ; cat quine.rb ; echo ----- ; ruby quine.rb ; echo -----
-----
q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts
-----
q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts
-----
--
__Pascal Bourguignon__
--
jorrel
.
- Follow-Ups:
- Re: [QUIZ] Quine (#207)
- From: James Gray
- Re: [QUIZ] Quine (#207)
- From: Matthew Williams
- Re: [QUIZ] Quine (#207)
- References:
- [QUIZ] Quine (#207)
- From: Daniel Moore
- Re: [QUIZ] Quine (#207)
- From: Sebastian Hungerecker
- Re: [QUIZ] Quine (#207)
- From: Bill Kelly
- Re: [QUIZ] Quine (#207)
- From: Robert Dober
- Re: [QUIZ] Quine (#207)
- From: Rick DeNatale
- Re: [QUIZ] Quine (#207)
- From: Robert Dober
- Re: [QUIZ] Quine (#207)
- From: Robert Dober
- Re: [QUIZ] Quine (#207)
- From: Pascal J. Bourguignon
- Re: [QUIZ] Quine (#207)
- From: Aureliano Calvo
- Re: [QUIZ] Quine (#207)
- From: Aureliano Calvo
- [QUIZ] Quine (#207)
- Prev by Date: Re: [QUIZ] Quine (#207)
- Next by Date: Re: Ruby LDAP SSL thingy won't go.
- Previous by thread: Re: [QUIZ] Quine (#207)
- Next by thread: Re: [QUIZ] Quine (#207)
- Index(es):