quine

Is it possible to access the source code of a python script passed to python on standard in?

This is a bit of a random question that is more out of curiosity than any specific need. Is it possible to write some python code that will print some stuff out, including the source code itself, without having the python code stored in a file? For example, doing something like this at the Bash prompt: $ echo ' > print "The Code:" > P...

Zip-file that contains nothing but itself?

Just out of curiosity, does there exist a valid zip-file (according to format spec) that, contains nothing but itself? Put another way, does the function implemented by unzip have a fix-point? Can I write a program to search for such a fix-point in a intelligent (not-exhaustive) way? I've thought about the opposite as well, i.e. if zi...

Javascript: Execute and Quine at the same time

I have a bizarre need here, and I am unsure of it's feasibility. I can only think how I would do it using threads (To create another thread that performs a Quine function along side a thread running the script I want to Quine and execute at the same time (without manually adding alerts everywhere!!!), but javascript doesn't have that fun...

Quine Confusion.What actually does quine prints?

Does a quine print the ACTUAL code of the program i.e not obfuscated or does it print the obfuscated program? ...

How to Reverse Quine?

hi, i have written a C programme which prints itself n times, but i can't get how to reverse print the same n times.E.g, if the sample programme is : hello then the required output should be "olleh" for n=1. Here's my quine programme, #include <stdio.h> int main() { int n; char c; FILE *f; f=fopen(__FILE__,"r"); scanf("%d"...

quine (self-producing) SQL query

This is a very interesting wiki article about programs that print their own source code without any access to physical source file (in the filesystem). Examples in the articles include C and Scheme quine programs (yeah, it appears they are called like that). I remember someone asking me long ago (about 5 years) whether I could write an S...

Is the reflection namespace a building block for writing a quine in C#?

Do I need to use reflection to write a quine program for C#? I read elsewhere - quine that opening the source file from disk is "cheating" So I guess using .net reflector and/or opening the source file using System.IO is a hack. Are there other ways other than using Reflection that I should be considering. ...