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

learn more… | top users | synonyms

0
votes
1answer
123 views

Tell Me about yourself [closed]

Your task is to write a self referential program similar to a quine. The objective is to write a program that will generally print to stdout twice whatever the input is. But when it receives the input ...
31
votes
13answers
2k views

Stack Exchange Vote Counter

Write a program/function that returns the vote count of its own Stack Exchange answer at the time of its execution. Your program/function may access this page (codegolf.stackexchange.com/questions/...
17
votes
10answers
926 views

Compress your code in an image

This is a quine variation. Introduction We all write short code, because some obscure reasons, but whatever we do, the'll take up at least 144 pixels/byte (with a 12px font). But what would happen, ...
1
vote
1answer
126 views

Continuously expanding code [duplicate]

Your job is to write a program that rewrites and makes itself longer on each run of the program. Challenge The program will print Hello, World!\n (\n denotes a newline). Then, it will modify its own ...
6
votes
1answer
329 views

QWERTY Quine Creation

Challenge Create a quine, that instead of outputting it's source, output's it's source QWERTY-sorted. What is QWERTY sorting? QWERTY sorting is sorting code by the QWERTY keyboard. Anything higher ...
0
votes
0answers
69 views

A cycle of quine-like programs [duplicate]

This question asks you to write n programs, such that program 1 outputs program 2, program 2 outputs program 3, ... program n-1 outputs program n and program n outputs program 1. However, not all of ...
1
vote
1answer
137 views

Write a narcissist program! [duplicate]

A narcissist program is simple. It is related to a quine. If the input is equal to it's source code, it prints a truthy value, if not it prints a falsy one. That is it. Rules: It can't read it's ...
13
votes
11answers
1k views

Double-duty quine: quine!dlroW ,olleH

Write a program that will output its own source code when run, and nothing else. Seems easy, right? The catch is that when the source code is reversed, your program must output "Hello, World!" ...
-3
votes
1answer
162 views

Self Rewriting Code [closed]

The Challenge Imagine this as a quine, but instead of outputting its source code, it rewrites the source code with what the output would be. The objective is to make the code as short as possible. ...
26
votes
2answers
559 views

Radiation softened quine

It's simple: Make a proper quine where if you remove any character, it's still a quine. The difference between this and a radiation hardened quine is that if your program is AB, in a radiation ...
4
votes
2answers
171 views

ROT-128 oscillating quine (Mutual Quine)

ROT-128 is a variant of ROT-13, where instead of cycling through the 26 letters, you cycle through the 256 possible bytes. Your task is to create a program that outputs the ROT-128 of its own source. ...
7
votes
4answers
174 views

Transpose quine

In this quine variant, your program must output its source code transposed across the diagonal from the top left to the bottom right. For example: your program on four lines outputs yof ono u ...
30
votes
11answers
2k views

1-up your average quine

A 1-up quine is a program which is very similar to a quine. The one major difference is that instead of printing itself once, when n copies of the program are concatenated, the result prints the ...
14
votes
9answers
1k views

Write a Metaquine

A metaquine is a program which is not a quine, but whose output, when run as a program in the same language, is a quine. The goal of this challenge is to write a metaquine. This is code-golf, so ...
3
votes
0answers
78 views

Cyclic prime number program generator

Challenge Your submission should consist of 2 or more programs each written in distinct languages. They can be arbitrarily numbered from 1 to k. Each program p, given a natural number n should ...
7
votes
2answers
171 views

Write a Semiquine

Suppose you have 2 languages, A and B. A string s is a semiquine in A and B if it satisfies the following conditions: s is a quine in language A. s is a polyglot in A and B. The output of running s ...
11
votes
8answers
940 views

Indexable quine

The goal of this challenge is to make a program that outputs the nth letter of its source code where n is given as input to the program. Like most quine challenges, you are not allowed to read your ...
5
votes
4answers
153 views

Write a program to output the nth fibonacci number in quinary

Quinary is like binary, except that 1 is represented by the text of the program, and 0 is represented as the backwards text of the program. The Fibonacci Sequence is the well known sequence F(0) = 0,...
18
votes
7answers
757 views

Generate Programs in Increasing size

In this challenge, you will write a program which outputs a program which is the double the length of the original program. The outputted program should output a new program a program double its ...
13
votes
9answers
993 views

Quinean Regex Tester

This challenge is pretty simple. As input, you take in a regular expression. Then, you output a truthy/falsey of whether or not your source code matches the regular expression. It's that simple! Just ...
16
votes
4answers
702 views

Growing Quine Sequence

You are to write a sequence of 10 programs p1 p2 ... p10 that satisfy the following properties: pK prints pK+1 for K from 1 to 9 p10 prints p10 When the first K programs are concatenated, the ...
26
votes
2answers
515 views

Lipogram “quine”

Task Take a single Unicode character as input. Output a program in the same language that also obeys this specification, but which does not contain the input character. If your program is run with ...
18
votes
9answers
1k views

Quat. Quine + Cat

A Quat is a combination of a quine and the popular esolang cat program. Challenge The challenge is to write a standard cat program. Whatever the user inputs, the program will echo the input to ...
2
votes
0answers
181 views

Make a program that outputs its own MD5 hash [duplicate]

Challenge: make a program that outputs a MD5 hash of its source code. You should not use tricks that would be considered cheating in a quine sense (discussed here). Using built-in functions and ...
2
votes
1answer
204 views

Quine Pride Parade!

These days, I watched on TV a Gay Pride parade; at the time, I was thinking about quines and how they're a bit queer, outputting themselves (out of the closet?) and, well, why not combine both things ...
20
votes
1answer
408 views

Three mutual quines

The task In this challenge, your task is to write three programs that form a kind of mutual quine-like system. Let's call the programs A, B and C. If one of the programs is given the source of ...
22
votes
4answers
426 views

Multiple program Quinecatenate!

Your task is to give three different languages A, B, C, and write two different programs P and Q such that: P is a quine in language A, but not a quine in B nor C; Q is a quine in language B, but ...
11
votes
7answers
596 views

Signal-Interrupting Quines

Quining has a long history - if you haven't heard of it, click the tag and read up a little on it. Your Task Output an infinite series of 1s (with no other spacing [newlines, spaces, etc.]) UNTIL ...
17
votes
12answers
3k views

“Hello world” that creates a different “Hello world” program

Create a program, that outputs a hello world string ("Hello world", "Hello, World" etc.), and source code. Output is written to stdout or equivalent. Hello world string is embedded in the source code. ...
16
votes
5answers
584 views

Quine multiple times

Your task is make program that do following: You should take number. (Positive, negative, fraction is possible input) If it is negative, you reverse the quine. and negate that number (Become ...
23
votes
11answers
1k views

Quine / Reverse Quine

Write a complete program that takes a boolean or non-negative integer input. It must: Output its own source code if the input value is falsy Output its own source code in reverse if the input value ...
43
votes
49answers
6k views

A “cheating” quine

Long-time lurker, first-time poster. So here goes. In the Wikipedia page for quine, it says that "a quine is considered to be 'cheating' if it looks at its own source code." Your task is to make one ...
20
votes
2answers
736 views

N-queen-and-equine quine

There is a variant of the well-known N-queens problem which involves queens and knights and is said to be "considerably more difficult" 1. The problem statement is as follows: You must place an ...
21
votes
4answers
837 views

Write a time machine quine

Write a program that takes as input a string and an integer n, and outputs: The string that was passed to the program n times ago; A new program that will be used for the next invocation. You ...
-4
votes
1answer
222 views

Curse you Turing!!! Make a partial halting solver that yells at Turing when he tries to break it

Here goes a quick proof by Alan Turing that there is no program H that can solve the halting problem. If there was, you could make a program X such that X(n) = if H(n,n) == Halt then output X(n) else ...
2
votes
0answers
148 views

Self-validating quine [closed]

Quines have been around forever. It's a fun challenge: write a program that, when executed, generates its own source code as output. But how do you know it's actually producing its own source code? ...
42
votes
133answers
9k views

Create output twice the length of the code

The Challenge Write a complete program that writes twice as many bytes to standard output as the length of the program. Rules The program must write ASCII characters to the standard output. The ...
19
votes
19answers
1k views

A Quine on Every Line

Your goal is to create a program that prints itself indefinitely, with a new line after each one. Thus, if your program is a one-liner, it would be repeated on every line of the output. Example ...
17
votes
1answer
566 views

Radiation Hardened Quine

As you should (hopefully) know, a radiation hardened quine is a quine that you can remove any one character from and still print its original, pre-modified source. The thing is, with most of these you ...
18
votes
2answers
382 views

Mutant pangolin

This is a code-golf challenge whereby you need to devise a program that acts like a quine or a quine that modifies itself to illustrate machine learning. Background There is a basic artificial ...
2
votes
2answers
415 views

Quit Whining; Start Quining

Quit Whining; Start Quining Goal: Write a function or program that, given an integer n, will output a program in the same language that is a quine with a period of n. Description of Output Program: ...
2
votes
2answers
275 views

Quine permutation group

Write a program or function which, when run, outputs another program or function which is valid in the same language as the original program, and which itself will output another program or function ...
2
votes
0answers
198 views

Recursive zipper reincarnation

Recursive zipper reincarnation Objective: Code two separate programs A and B that when concatenating their respective outputs OA + OB creates a third program: C. When program C runs it should ...
26
votes
9answers
1k views

Make a slow error quine maker!

As part of his answer to Make an Error Quine!, @Falko proposed the following algorithm: How to create your own solution in 2 minutes? Open a new file in an IDE of your choice. Bang your ...
7
votes
3answers
349 views

Double-slit Quine

Objective: Code two programs where each of the programs outputs both source codes interlaced per character like a zipper, a Double-slit Quine. The output from a Double-slit Quine is starting ...
12
votes
7answers
981 views

Character counts in source code

Write a program that outputs a list of the number of occurrences of each unique character in its source code. For example, this hypothetical program {Source_Print_1}; should produce this output: ; 1 ...
20
votes
6answers
605 views

Sourcecode selfie

Objective: A guru once said a perfect code selfie is best shot diagonally from upper left corner. A code selfie is almost like a Quine - but rotated 45 degree clockwise. Your mission is to code a ...
26
votes
7answers
2k views

Multiplication by Self-Modification

...at least for some definition of "self-modification". The Task In this challenge, your task is to write three strings A, B and C that satisfy the following properties. The string B has length at ...
0
votes
1answer
150 views

METAscii Code Golf

Introduction Here at code colf SE, we appear to love meta-problems. Here, I've tried to compose a meta-problem that's an interesting, not-straightforward challenge. Challenge Using no inputs, your ...
12
votes
3answers
397 views

Make an almost quine

I wanted to fool a friend by giving him a quine that almost worked, but became sloppier and sloppier. Create a program that, when run, will output the program, but one character off. Either one ...