Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [quine]

A quine is a program which produces its source as output. This tag indicates that the challenge is related to quines.

10
votes
4answers
905 views

Christmas quine!

In the language of your choice, write a program that is arranged in the shape of a Christmas tree that prints itself in the same shape. What is not allowed: Printing out the source file Code that is ...
7
votes
7answers
457 views

Write a program to compose a quine of a specified length

Write a program, in a language of your choice, that will compose a quine program of a requested size. The generated program may be in the same or a different language, if desired. Programs are scored ...
31
votes
6answers
2k views

Mirror quine (or my head hurts)

I was reading Print your code backwards - reverse quine And I thought, this could be more interesting if your backwards code is also executable. So this challenge will have all the rules and ...
80
votes
62answers
13k views

Print your code backwards - reverse quine

Write a program that prints its own source code out backwards, in other words an eniuq. Scoring: +50 if you use pull data from the Internet. +25 if you read your own source code. +1 point per ...
7
votes
5answers
648 views

Shortest Mirror Quine Challenge [closed]

Find the shortest mirror quine in a language of your choice. A mirror quine is a quine whose source code is equal to the reverse of its own source code. Note: 1) Length of source code should be ...
17
votes
1answer
630 views

Golf you a Double Quine for greater good!

Good Evening Ladies and Gentleman. Tonight - we have a code challenge. A competition that will be defined not in the amount of points (a la Asteroids) but simply whether you can finish it (a la ...
52
votes
33answers
4k views

Write the shortest self-identifying program (a quine variant)

Write a program that will generate a "true" output iff the input matches the source code of the program, and which generates a "false" output iff the input does not match the source code of the ...
5
votes
3answers
654 views

Compiled quine variant

Thinking about various quine puzzles here, I got an idea for another one: Compose a program that outputs its own compiled code to a file (or multiple files, if the compiled code is). (This means that ...
21
votes
5answers
882 views

Cryptographic quine variant

Create a program that prints the MD5 sum of its source in the form: MD5 sum of my source is: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx No cheating - you can't just read ...
24
votes
6answers
2k views

Can you Meta Quine?

Similar to other quine puzzles (more specifically, this one), write a program that produces the source for itself. Here's the new twist: The code produced should NOT be identical to the source. ...
25
votes
3answers
1k views

Create a rotating quine

A rotation of a string is made by splitting a string into two pieces and reversing their order, for example "world! Hello," is a rotation of ...
17
votes
3answers
910 views

Write a third order quine

This challenge is an extension of 'Golf a mutual quine'. Using three languages of your choice, create a third order Ouroboros program. That is, in language A, write a program pA which outputs ...
21
votes
11answers
2k views

Interpret your lang, but not yourself?

There are many challenges that say "interpret X", where X is a simple language. In my opinion, that is way too boring. To give all the procrastinating people on the internet something interesting to ...
12
votes
3answers
375 views

Session-Saving Quine

Inspired by this question. Create a program that prompts the user to store some data, and when the program is quitting, spit out the program itself, except the session data changed. The user then ...
2
votes
0answers
203 views

Proving the shortest quine in a particular language [duplicate]

Possible Duplicate: Golf you a quine for great good! People have proposed short quines in various languages. Puzzle: Find the shortest non-trivial quine in a language of your choice, and prove ...
16
votes
3answers
1k views

Compose a Vim quine! [closed]

Goal: Create and save file in Vim containing at least 25 ASCII characters. The exact keystrokes used during the creation and saving of this file must also produce identical contents in Windows ...
11
votes
7answers
5k views

Write a self-replicating program.

Write a simple program that copies itself when executed. Your program should be some kind of executable file on Windows, Linux, etc.., should generate new executable file, which is identical to your ...
38
votes
13answers
3k views

Golf a mutual quine

Using two languages of your choice, write the smallest “mutual quine” you can. That is, write a program P in language A that outputs the source code for a program Q in language B, such ...
11
votes
6answers
1k views

Code-Golf: Quine Challenge I

Challenge In this task you have to write a program that will take input an integer N (-1e9 <= N < 0 && 0 < N <= +1e9), then compute T = (abs(N) % M+1),if N is positive ...
18
votes
11answers
4k views

Assembly Language Quine

Write the shortest possible assembly-language quine. Use any ISA you want, unless it has a print-quine instruction or equivalent. Examples include x86, MIPS, ...
15
votes
2answers
679 views

Quine that takes as input the name of a language and outputs the same thing implemented in the input language

From Quine central: Write a quine that takes as input the name of a language and outputs the same thing implemented in the input language. The source article has something you can work from, but as ...
188
votes
304answers
39k views

Golf you a quine for great good!

Using your language of choice, golf a quine. A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. No cheating -- that means ...