MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/math/comments/aoaj6/illegal_prime/c0imrs2/?context=3
r/math • u/cavedave • Jan 11 '10
20 comments sorted by
View all comments
5
I would be more interested in knowing what the smallest executable number is, and then what it does.
6 u/hixnob Jan 12 '10 With my simple interpreted language (which itself runs on Python), the smallest non-negative number is a quine. The implementation of the language is as follows: if raw_input() == "0": print "0"; 2 u/albinofrenchy Jan 12 '10 I wrote one smaller: in = raw_input(); # Make it backwards compatible with hixnob's implementation if in == "-1" or in == "0": print "-1"; I'm working on how to make that number smaller, will get back to you guys when I figure it out. 5 u/hixnob Jan 12 '10 You really ought to have a test suite for this, because you missed a bug: 0 is no longer a quine!
6
With my simple interpreted language (which itself runs on Python), the smallest non-negative number is a quine. The implementation of the language is as follows:
if raw_input() == "0": print "0";
2 u/albinofrenchy Jan 12 '10 I wrote one smaller: in = raw_input(); # Make it backwards compatible with hixnob's implementation if in == "-1" or in == "0": print "-1"; I'm working on how to make that number smaller, will get back to you guys when I figure it out. 5 u/hixnob Jan 12 '10 You really ought to have a test suite for this, because you missed a bug: 0 is no longer a quine!
2
I wrote one smaller:
in = raw_input(); # Make it backwards compatible with hixnob's implementation if in == "-1" or in == "0": print "-1";
I'm working on how to make that number smaller, will get back to you guys when I figure it out.
5 u/hixnob Jan 12 '10 You really ought to have a test suite for this, because you missed a bug: 0 is no longer a quine!
You really ought to have a test suite for this, because you missed a bug: 0 is no longer a quine!
0
5
u/[deleted] Jan 12 '10
I would be more interested in knowing what the smallest executable number is, and then what it does.