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

2
votes
0answers
52 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 ...
4
votes
1answer
86 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
925 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
137 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) = ...
-2
votes
0answers
33 views

Make a Quasi-Quine [duplicate]

The goal of this challenge is to write a program that outputs a program which in turn outputs a program, etc. However, unlike a regular quine, each outputted program must be the same length as the ...
13
votes
9answers
944 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 ...
17
votes
4answers
683 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 ...
24
votes
2answers
478 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 ...
17
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
149 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
196 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 ...
19
votes
1answer
397 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 ...
21
votes
4answers
413 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
583 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 ...
14
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
567 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 ...
40
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 ...
7
votes
0answers
157 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 ...
20
votes
4answers
807 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 ...
-5
votes
1answer
196 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
134 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? ...
18
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 ...
13
votes
0answers
349 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
370 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
395 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
270 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 ...
1
vote
0answers
191 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
337 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
957 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
599 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 ...
25
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
393 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 ...
3
votes
5answers
802 views

Like a quine, but not

Very simple, write a program that at first glance appears to be a quine, but is not. Upon running, the program actually prints the source to a real quine, obviously distinct from the original program ...
17
votes
5answers
1k views

Make the largest infinity that you can!

The ordinal number system is a system with infinite numbers. A lot of infinite numbers. So many infinite numbers that it literally does not have an infinity to represent its own infiniteness. The ...
10
votes
1answer
298 views

Meta quine checker

This challenge, if you accept it, is to write three functions or programs A, B, and C: A is a quine that outputs all of A,B and C (which is also the whole content of the code in your submission). B ...
8
votes
3answers
689 views

Self-shortening Prime Tester

Let's get right in to it. Your challenge is to make a program that does these things depending on its input: If the input is a number, output "Prime" if the number is a prime number and "Not prime" ...
6
votes
1answer
349 views

Build a Twitter-quine

A short while, ago, @daniel_ernston sent the following challenge to @StackCodeGolf on Twitter: @StackCodeGolf Your task is to build a program that uses the API of your choice to tweet its own ...
35
votes
6answers
4k views

Write a Quine in Plain English

Write a quine that consists of real English words separated by single spaces. A "word" is defined as a string containing only lowercase and uppercase letters (/[a-zA-Z]+/ in regex). To be "real" your ...
9
votes
1answer
274 views

Pseudo-quine polyglot language-detection counters

Quines are fun. Polyglots are fun, too. Polyglot Quines exist, but we can raise the bar even higher. Write a file that contains a valid program for languages α, β, and γ. When the ...
7
votes
4answers
451 views

Write a binary counter in quine

Write two code fragments, which we will call s_zero and s_one. Program (l, n) consists of l copies of s_zero and s_one corresponding with the digits of n in binary, padded with s_zero on the left. ...
13
votes
14answers
2k views

Print out the first N characters of your code

You should write a program or function that receives a positive integer N as input and prints out the first N characters of your code. If N is larger than the length of your code you should continue ...
6
votes
1answer
234 views

Combinator quines

Background You have just learned what combinatory logic is. Intrigued by the various combinators you spend quite a bit of time learning about them. You finally stumble upon this particular ...
10
votes
1answer
422 views

Code a Code Slidey Puzzle!

The most recognizable sliding puzzle is the fifteen puzzle. It has a 4 by 4 grid, 15 tiles, and one empty grid space. The tiles can only move into the empty space and must always be in line with the ...
12
votes
1answer
208 views

Golf some quine stripes in different languages

You will choose m languages and write n programs in each language, each with length n*m. The kth program should output the kth character of each program, ordered by the program number. For example, ...
21
votes
6answers
2k views

Mutual Negative Quines

This was inspired by Print a Negative of your Code and Golf a mutual quine. Consider a rectangle of characters, that meet the following restrictions: Consists solely of printable ASCII characters ...
65
votes
17answers
13k views

Print a Negative of your Code

Consider a square of printable ASCII characters (code points 0x20 to 0x7E) for side length N, like the following (here, N = 6): =\ g \ 7 m+y "g L ~ e> PHq We also require each row ...
12
votes
2answers
466 views

Generalized Quine Generator

The Challenge In this challenge, you specify a source language S and a target language T. Your task is to write the following program P in the language S. If a valid program Q in the language T is ...