Skip to main content

Questions tagged [quine]

A quine is a program which produces its source as output. This tag indicates that the challenge is related to quines. [self-referential] should be used for challenges that, while having the output have some relation to the source code, do not require fully reproducing the source.

9 votes
2 answers
441 views

Write a program with the following properties: it must be a quine, i.e. running it outputs precisely the program itself; it must take no input; for at least one integer k, it must be the case that ...
aeh5040's user avatar
  • 2,072
15 votes
6 answers
937 views

Oh dear. An overzealous cleaner has separated out the punctuation in your source code. Write a program or function that, when passed its source code separated into punctuation and non-punctuation (but ...
Steve Bennett's user avatar
1 vote
0 answers
90 views

Write a piece of code that is compatible with both C and Python compilers/interpreters, which can output its own source code. Quine is quite easy, but how about this double language version? Hint: To ...
NoNormalCreeper's user avatar
5 votes
3 answers
422 views

https://mihaly.barasz.com/compressed-loop/game.html You have a simple, line-oriented “compression” language. The language works as follows: The document must start with the ...
programjames's user avatar
1 vote
0 answers
102 views

Your program should print the following: **Language, XXX bytes** ``` CODE ``` or its equivalent. XXX should be substituted by ...
Sunny's user avatar
  • 2,004
4 votes
7 answers
599 views

What am I? As a plant cell, your program/function/etc. must undergo photosynthesis: When the input is 6CO2+6H2O+light in any order, output ...
smots-18's user avatar
  • 583
7 votes
6 answers
1k views

Write an irreducible proper quine, i.e. a program that prints its own source code, which can't be reduced by removing characters to a shorter program with the same constraints. Eg. the python quine: <...
math scat's user avatar
  • 9,538
19 votes
11 answers
3k views

Write a program that accepts HTTP requests on any port of your choice above 1024, and responds to requests on any URL of your choice with its own source code. It must work with, at least, Firefox and ...
Someone's user avatar
  • 1,252
3 votes
1 answer
262 views

Write a program that outputs its source code in reverse when run, and outputs its source forwards when I reverse the source. If your program is "abcd", when run with no arguments it should ...
noodle person's user avatar
13 votes
5 answers
1k views

In this challenge, you'll take an answer as input, and print the answer before it. If the answer passed as input is the first answer, print your own submission's source. You'll be passed any answer in ...
rydwolf's user avatar
  • 19.3k
5 votes
11 answers
1k views

Your task is to make a program in L that takes n as an input number, output a program p in <...
Fmbalbuena's user avatar
  • 5,085
13 votes
10 answers
1k views

This is a quine challenge related to Write the shortest self-identifying program (a quine variant) Write a function or a full program that compares lexicographically its source code and input, that is,...
AZTECCO's user avatar
  • 11k
26 votes
8 answers
2k views

In this challenge, you'll create some programs which behave similarly to genes. When you run one, it will return one of its two "alleles" (a half of its source code), and concatenating any ...
rydwolf's user avatar
  • 19.3k
12 votes
8 answers
1k views

Create a program which prints itself, followed by an additional program. This additional program should print the first program, itself, and then a third program. This continues until the nth program, ...
thejonymyster's user avatar
12 votes
3 answers
946 views

The golfing language Jelly has a very complex and clever string compression system which I'm not going to go into depth about here. You can find a very good explanation here. Basically, Jelly's string ...
emanresu A's user avatar
  • 46.2k

15 30 50 per page
1
2 3 4 5
18