Linked Questions

14
votes
34answers
4k views

Write a program to print the sum of the ascii codes of the program

Your task is to write a program to print the sum of the ASCII codes of the characters of the program itself. You are not allowed to open any file (Any input such as command line arguments, standard ...
30
votes
12answers
2k views

Write a Quine Suite

We've had a lot of quine challenges, but a lot of the quine formats are similar, lets create some variance in our quines. Your task is to create a selection of programs in the same language (at least ...
17
votes
25answers
2k views

Good Old Suffix Vector

Inspired by an old manual... The challenge I define the ath suffix vector of b as the boolean list of length a with b trailing truthy values. Write a program or function that, given a and b by any ...
19
votes
11answers
3k views

Cheating Cyclic Quine

Concept Write a program that outputs code in its programming language. That code, when executed, must output the original program. Rules Since this is a cheating quine, you can read the original ...
34
votes
13answers
3k 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 ...
32
votes
12answers
2k views

Tips for golfing in vim

I've recently realized how vim works great for golfing, especially for kolmogorov-complexity. Also, according to meta vim is a perfectly acceptable 'programming language' at least, for the scope of ...
23
votes
19answers
3k views

Faux Source Code

Output one random character for each character of source code (as illustrated below). The probability of each character is its frequency in the original source code. Thus the output will be fake ...
19
votes
20answers
2k 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 ...
26
votes
12answers
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 ...
25
votes
8answers
5k views

The Bowlers-Golfers Fraction War

Introduction Let's start by arranging all fractions from 0 to 1 in order of lowest denominator, then lowest numerator: 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6, 5/6, 1/7... Note that ...
33
votes
7answers
1k views

Draw Reutersvärd's Triangle

This impossible object is Reutersvärd's triangle: Draw your own version according to these rules: Exactly 9 cubes total Each side is made up of exactly 4 cubes The cubes appear to overlap such that ...
12
votes
27answers
2k views

How many times will you have to golf a quine?

For this challenge, you must create a programme which takes an integer x and outputs its source x many times. Rules This is ...
30
votes
7answers
2k views

Tips for writing quines

A quine is a program that produces output that's identical to the program's source code. On this website, we generally only care about proper quines (at the time of writing, the current definition is "...
16
votes
23answers
2k views

Indent a string using given parentheses

Given the following input to the program: List of block start characters List of block end characters A string to format format the string with the blocks delimited by the two character sets ...
26
votes
11answers
1k views

Anagram Quines (Cops' Thread)

This is a cops-and-robbers challenge the Robbers' Thread can be found here Your challenge is to write a program that outputs an anagram of its source code but not the original source code itself. ...

15 30 50 per page