Questions tagged [pristine-programming]

For challenges about pristine-programming or requiring that answers be pristine programs.

Filter by
Sorted by
Tagged with
19 votes
11 answers
2k views

Write a near crystalline program

A pristine program is a program that does not have any errors itself but will error if you modify it by removing any contiguous substring other than the entire program. A crystalline program is sort ...
  • 94k
8 votes
3 answers
390 views

Shortest pristine truth machine

In this challenge, the goal is to create a pristine truth machine in as few bytes as possible. For reference, a truth machine does the following: Takes input, which is always 0 or 1 If the input is 0,...
15 votes
2 answers
641 views

Pristine Polyglots

As the title says, you are to create a pristine program in as many languages as possible. A pristine program, taken from here, is: Let's define a pristine program as a program that does not have any ...
23 votes
19 answers
23k views

99 ways to say "I love you"

Inspired by this blog post. Write a program that outputs 99 distinct programs (in the same language) that output the string I love you. How the programs are ...
  • 2,117
22 votes
19 answers
2k views

Smallest Fibonacci Multiples

Sandbox Background (not necessary for the challenge) A standard number theory result using the pigeonhole principle is the fact that given any natural number k, there is a Fibonacci number that is a ...
3 votes
3 answers
344 views

Longest pristine(ish) codepoint run

Your challenge is to create the longest run of characters with incrementing Unicode codepoints in a pristine program as you can. To keep things simple, I'll abridge the definition for this challenge ...
29 votes
14 answers
3k views

Pristine Bit Checking

Write a program/function that takes two integers in the range \$0\$ to \$255\$ inclusive, and returns whether the binary forms of the numbers are exactly one bit different. For example, \$1\$ and \$...
  • 46.6k
27 votes
8 answers
3k views

Filthy and Unique

In this question I will talk about programs as strings, this is strings of bytes, not characters. How your resultant program is rendered or displayed is not important to this challenge, only how it ...
  • 94k
88 votes
20 answers
7k views

Pristine and Unique Code Bowling

Your challenge is simple: write as long of a pristine program as possible in the language of your choice using only unique bytes. (The full definition of a pristine program, copied from that link, is ...
  • 1,445
17 votes
4 answers
685 views

Quining a Pristine World

This challenge is based off of Helka Homba's question Programming a Pristine World. From that question, the definition of a pristine program is: Let's define a pristine program as a program that ...
  • 715
92 votes
23 answers
12k views

Programming a Pristine World

Let's define a pristine program as a program that does not have any errors itself but will error if you modify it by removing any contiguous substring of \$N\$ characters, where \$1 \le N < \text{...