Questions tagged [pristine-programming]

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

Filter by
Sorted by
Tagged with
17 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 ...
user avatar
  • 88.8k
8 votes
3 answers
379 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,...
user avatar
15 votes
2 answers
544 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 ...
user avatar
23 votes
19 answers
22k 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 ...
user avatar
  • 2,107
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 ...
user avatar
3 votes
3 answers
336 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 ...
user avatar
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 \$...
user avatar
  • 44.8k
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 ...
user avatar
  • 88.8k
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 ...
user avatar
  • 1,445
17 votes
4 answers
676 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 ...
user avatar
  • 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{...
user avatar