Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Short quines

by ambrus (Abbot)
on Jan 29, 2008 at 07:33 UTC ( [id://664859]=note: print w/replies, xml ) Need Help??


in reply to Re: Short quines
in thread Short quines

I think print<DATA> is not cheating as you're only reading the part of the file that's not interpreted as a program, so it's not much different from printing a here document. On the other hand, if you seek DATA,0,0, that's cheating just like open 0 is, because you're reading what was already interpretted as a program. At least that is my opinion.

Replies are listed 'Best First'.
Re^3: Short quines
by mr_mischief (Monsignor) on Jan 29, 2008 at 15:53 UTC
    That's my first impression of it, too, but I didn't know exactly where others would draw the line. I think the line is at any form of accessing the program text or a parsed representation of it directly. Reading the DATA section clearly doesn't do that.

    Part of the challenge of producing a quine in many languages is the careful formatting and escaping required. Reading a special section of data that can look like code without consequence makes that much easier. Perl's always been good at making things easier though (or rather, to give proper credit, Larry and the Porters have been good at it). That your language makes something easier (without going to the point of having a built-in quine() subroutine, anyway) probably shouldn't be considered cheating.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://664859]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found