Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [pristine-programming]

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

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

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 ...
Wheat Wizard's user avatar
  • 103k
9 votes
3 answers
470 views

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,...
rydwolf's user avatar
  • 19.3k
16 votes
4 answers
974 views

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 ...
caird coinheringaahing's user avatar
24 votes
19 answers
26k views

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 ...
Mason's user avatar
  • 2,175
22 votes
19 answers
3k views

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 ...
Rushabh Mehta's user avatar
3 votes
3 answers
449 views

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 ...
rydwolf's user avatar
  • 19.3k
29 votes
14 answers
3k views

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 \$...
Jo King's user avatar
  • 48.1k
27 votes
8 answers
3k views

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 ...
Wheat Wizard's user avatar
  • 103k
95 votes
20 answers
8k views

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 ...
praosylen's user avatar
  • 1,525
17 votes
4 answers
776 views

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 ...
Shelvacu's user avatar
  • 735
92 votes
23 answers
12k views

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{...
Calvin's Hobbies's user avatar