25
4
(Inspired by ASCII's 95 Characters...95 Movie Quotes)
The Challenge
Given input n
, output the nth
Fibonacci number. You can use either 0
or 1
indexing, please state which in your submission. Simple, yeah? The catch is you must take the character set of the immediate previous answer, remove two characters from it, and add a separate character. The separate character must
- not be from the immediate previous answer's character set
- be from the set of (printable ASCII, space, newline, horizontal tab)
and thus your total character set size will be exactly one smaller than the immediate previous answer's set.
The initial answer
The first submission must contain a subset of (all printable ASCII, space, newline, and horizontal tab) with two characters removed. Every submission thereafter must restrict their answers to this original ASCII-only format (meaning you can't add a Unicode or extended-ASCII character ... sorry Jelly, APL, et al.).
Examples and Clarifications
- Suppose the first answer is in C and contains (almost all printable ASCII, newline, and horizontal tab), and omits the
%
and^
from its character set. The second submission, then, must remove two characters from the previous (almost all printable ASCII, newline, and horizontal tab) character set and add in either the%
or^
. Perhaps it's a one-liner PowerShell answer that omits the newline. And so on. - If the previous answer had
print(){}!*+
as its character set (12 characters), your submission could haveprint(){}!
(10 characters) and one additional character,print(){!+
(10 characters) and one additional character, etc. - If the previous answer had
print(){}!*+
as its character set (12 characters), your submission could not haveprint()
and&
(8 characters) as its character set, since12 - 8 > 1
. - If the previous answer had
print(){}!*+
as its character set (12 characters), your submission could not haveprint(){}!
(10 characters) plus additional character*
as its character set, since even though that's 11 characters, the*
is included in the previous set. - Not every character in your character set must do something useful for your submission. For example, if the previous answer had
print(){}!*+
as its character set, and your language has a built-in!
that calculates the Fibonacci sequence and#
that starts a comment, your submission could be!#print(){}
and still be valid. - You can use the same character from your character set multiple times. For example, suppose your character set was
!*#_
, your answer could be!!!**#**#_!!
and would be acceptable. - In addition to your code (and an explanation is nice, too!) please also explicitly list your character set, to make it easier for future submissions.
Winning
The winner of the challenge will be the person who posted the second most-recent submission (i.e., not the person who posted last, since they broke the chain).
Final Rules
Usual answer-chaining rules apply:
- The same person can't post twice in a row
- If an answer is deemed invalid (for example, it used a forbidden character, or doesn't calculate correctly), it needs to be deleted (and any subsequent answers that chain off of it also)
- Two users who post "at the same time" will have to let the earlier submission stand
- The same language cannot be posted twice in a row. For the purposes of this rule, languages of the same family (e.g., Python 2 and Python 3) count as "the same language."
Final things:
- This post works best if you sort by "Oldest" so that the answers are in proper order.
- Kyle Gullion constructed a code checker in Python here to verify if you're missing or using wrong characters.
Just a few quick clarifications: 1) Does our program have to actually contain the full set we're using, or we can use a smaller set of characters? (Important for minimalist languages, like brain(fuck|flak), unary, etc.) 2) You say that the same language cannot be posted twice in a row. Can the same language be posted any number of times as long as it's not in a row? – James – 2017-04-06T17:30:00.020
Why do we remove 2 characters, but add only one? Also, can I post first answer with enormous comment with lots of characters, so next 100500 entries won't be lacking any character? – Dead Possum – 2017-04-06T17:30:30.233
@DJMcMayhem 1) Yes, it has to contain the full set. If the extraneous characters are just junk or comments (like, suppose the first answer was in Whitespace), that's perfectly fine. That may mean the BFs may need to wait a while to answer. 2) Yes, languages can be used any number of times, so long as it's not twice in a row. Going Java-Python-Java-Python-Java-Python, is perfectly acceptable. – AdmBorkBork – 2017-04-06T17:37:41.637
1I suggest you add the first one, because one can destroy this challenge if it posts the first one – Mr. Xcoder – 2017-04-06T17:37:55.323
1@DeadPossum It's based on character set, not overall character count. Removing two and adding one ensures that the eventual pool of available characters dwindles and forces creativity on future answers. – AdmBorkBork – 2017-04-06T17:39:01.390
3@Mr.Xcoder I have faith in the PPCG community, and if someone purposefully messes it up I reserve the right to call them a doody-head in chat. – AdmBorkBork – 2017-04-06T17:39:45.627
@AdmBorkBork I for sure will use that right as I need – Christopher – 2017-04-06T20:41:48.560
3
Threw a code checker up to make life a bit easier for anyone interested.
– Kyle G – 2017-04-07T01:58:38.803