0

About a year ago on Dec 31, 2015, I had the idea that:

We should make a time capsule string. Everybody gets to add one character and next new years we’ll see who can make the best program out of all the characters with the esolangs that exist then.

Doorknob graciously collected characters from the PPCG community and kept them safe for a year.

A whopping 74 people participated so we have a spiffing 74 printable-ASCII characters to play with!

Here are the 74 characters of the 2016 time capsule string in the order they were submitted:

[email protected]~*^).`~+1A|Q)p~`Z!IQ~e:O.~@``#|9@)TfeT`=(!``|`~!y!`) Q~x.4|m4~~&!L{%

Here are the 74 characters of the 2016 time capsule string in ASCII order (note leading space):

 !!!!!#%&())))*+...1449:[email protected]@@AHILOQQQTTZ\^`````````eefmpxy{||||~~~~~~~~~

It’s not a whole lot to work with, but round here we like a challenge.

The Challenge

To determine what language is "best" with the time capsule string we’ll have 6 (for 2016) challenges that increase in difficulty where in each you must use a subset of the 74 time capsule characters.

Having 6 distinct challenges helps ensure more languages can compete, but only the best languages will be able to answer all of them and score high.

Scoring:

  • Each challenge will be scored from 0 to 74 depending on how many characters are used.
  • Higher scores are better.
  • If your language cannot complete a challenge, your score for that challenge is 0.
  • Any nonempty subset of the challenges may be completed.
  • Your final score is the sum of scores from all 6 challenges.
  • The best final score possible is 6Γ—74 or 444.

The Challenges

1. Run

If a language’s code can’t run in the first place it won’t be able to do anything at all.

Write the longest full program possible (using only the 74 time capsule characters, remember) that runs/executes without compile-time or runtime errors.

It doesn’t matter what the program does, it doesn’t matter if it has input/output or enters an infinite loop, it only matters that it runs without errors. (Warnings are ok, as are errors caused by bad user input.)

Comments are allowed, so this could be as simple as

#[email protected]~*^).`~+1A|Q)p~`Z!IQ~e:O.~@``|9@)TfeT`=(!``|`~!y!`) Q~x.4|m4~~&!L{%

in Python for a score of 74.

(Don’t be afraid to answer if this is the only challenge your language can complete, but don’t expect lots of votes either.)

Score = program length (longer program is better)

2. I/O

A language that has no form of input or output is almost as useless as one that can’t run.

Given a printable ASCII character from

!
(0x33) to
}
(0x7D) inclusive, output the printable ASCII character before and after it.

The output can be a length two string or list, or the characters separated by a space or newline.

For example if the input is

}
the output might be
|~
or
["|", "~"]
or
| ~
or
|n~
.

Likewise,

 "
is the output for
!
and
AC
is the output for
B
.

Score = 74 – program length (shorter program is better)

3. Branchability

Conditionals are often a requirement for Turing completeness, which is often a requirement for a language being useful.

Given a positive integer, if it ends in the decimal digits

16
then change the
6
to a
7
and output the result; otherwise, output the input unchanged. You may use strings for input/output if preferred.

Examples:

2016 -> 2017
16 -> 17
116 -> 117
1616 -> 1617
6 -> 6
15 -> 15
17 -> 17
106 -> 106
2106 -> 2106

Score = 74 – program length (shorter program is better)

4. Loopability

A language that can’t do loops will spawn repetitive code so tedious you’ll need to take a programming break for a while.

Given a positive integer, output an ASCII-art square of that side length filled with a pattern of concentric smaller squares that alternates between any two distinct printable ASCII characters. They don’t have to be the same two characters for different inputs.

For example:

1    <- input
X    <- output

2
XX
XX

3
XXX
X-X
XXX

4
XXXX
X--X
X--X
XXXX

5
YYYYY
Y...Y
Y.Y.Y
Y...Y
YYYYY

6
XXXXXX
X----X
X-XX-X
X-XX-X
X----X
XXXXXX

7
ZZZZZZZ
Z-----Z
Z-ZZZ-Z
Z-Z-Z-Z
Z-ZZZ-Z
Z-----Z
ZZZZZZZ

Score = 74 – program length (shorter program is better)

5. Math

A language that’s not good with numbers and math may as well be for humanities majors.

Take no input but output the 72 integer divisors of 2016, positive and negative, in any order. The output can be formatted as a string or list in a reasonable way.

Example:

-1, -2, -3, -4, -6, -7, -8, -9, -12, -14, -16, -18, -21, -24, -28, -32, -36, -42, -48, -56, -63, -72, -84, -96, -112, -126, -144, -168, -224, -252, -288, -336, -504, -672, -1008, -2016, 1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 16, 18, 21, 24, 28, 32, 36, 42, 48, 56, 63, 72, 84, 96, 112, 126, 144, 168, 224, 252, 288, 336, 504, 672, 1008, 2016

Score = 74 – program length (shorter program is better)

6. Esotericism

(No, not that.) We at PPCG like our esoteric stuff, and quines are a good example of that.

Write the longest quine you can, according to usual quine rules. A quine is a program that takes no input and outputs itself.

Score = program length (longer program is better)

Specific Rules

  • In each of the 6 challenges your program must be a subset of the 74 time capsule characters rearranged any way you like. It may be an empty subset or an improper subset, so each of your programs could have as few as 0 and as many as 74 characters.
  • A single trailing newline at the end of input/output/code is alright anywhere since some languages require this or it cannot be easily avoided.
  • Unless otherwise specified, each challenge may be completed as a function or full program according to our defaults.
  • All challenges must be completed in the same language.
  • You must use a language (or version of a language) made before it was 2017 anywhere on Earth.
  • Anyone is welcome to answer, whether you added a character to the time capsule or not.

Feel free to use the 2016 time capsule characters in your own challenges.