Write a program that always prints N when it is shifted N times up the ASCII alphabet

16

Write a program using only printable ASCII characters that takes no input. For reference, here are the 95 printable ASCII characters in order:

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

When your program is run it should print 0 (plus an optional trailing newline) to stdout, then terminate normally.

When each character in your program is replaced by the character N spaces to its right in printable ASCII, looping around from ~ to space, the resulting printable ASCII string will ideally be a program runnable in the same language that takes no input and outputs N (plus an optional trailing newline) to stdout, then terminates normally, for N = 1 to 94.

For example, if your original program was

@Cat~(88 !)

running it should output 0 and shifting all the characters up the printable ASCII scale by one

ADbu )99!"*

should result in another program that outputs 1. Doing so again will ideally result in another program that outputs 2

BEcv!*::"#+

and so on with 3 and 4, etc. up to the point of shifting 94 times

?B`s}'77~ (

which ideally is a program that outputs 94.

The relief is that this is only the ideal behavior. Your program and its 94 derivatives do not all need to work, but the more that consecutively do from the start the better. (Programs that do not work may have any behavior whatsoever.)

Scoring

Your score is the number of consecutive programs starting from the original (the one that outputs 0) that do work, i.e. correctly output their corresponding N. The answer with the highest score (a maximum of 95) wins. If there's a tie then the program with the shortest length in bytes wins.

For example, if @Cat~(88 !) output 0 and ADbu )99!"* output 1 but BEcv!*::"#+ errored, then your score would be 2. It's 2 even if ?B`s}'77~ ( accurately outputs 94 and even if all the programs for N = 30 to 40 worked. Only the consecutive number of working programs, starting at zero, are counted.

Notes

  • To combat potential contention and loopholes, competing answers must output their numbers in decimal with no leading zeroes or signs or decimal points (i.e. plain 0 1 2 ... 94).
  • Languages that use different bases or number formats are allowed but are not eligible to win.
  • The presence of an optional trailing newline does not need to be consistent across programs.
  • Functions and REPL commands are not allowed, only full programs.

Calvin's Hobbies

Posted 2016-06-09T08:27:47.893

Reputation: 84 000

Is it OK to have ans = 0? – Stewie Griffin – 2016-06-10T07:32:47.357

@StewieGriffin Sorry but to go along with the first note it should be plain 0 printed to stdout. You can do a noncompetitive answer though. – Calvin's Hobbies – 2016-06-10T08:21:47.720

1I think we should repost this problem with the following two additional restrictions: 1) The program must be written in a language whose compiler or interpreter does not ignore invalid syntax without explicit comment delimiters, and 2) every iteration of the program must use an explicit print statement to write out the answer. This would make the challenge more meaningful and, I would suspect, result in more answers in C-like languages, which I assume was what you desired from this challenge. – Joe Z. – 2016-06-10T13:31:12.037

1As it is, all the answers seem to be some variation of "repeat the same statement 95 times except 94 of them are ignored due to some syntactic quirk". That's not interesting. – Joe Z. – 2016-06-10T13:36:21.583

@JoeZ. Yeah. When writing it I didn't consider that type of program. You're welcome to post a new similar challenge. – Calvin's Hobbies – 2016-06-10T20:36:14.583

Answers

29

Ook!, 95 programs, 19992 14066 bytes

Ook!Ook!Ook!Ook?Ook.Ook?Ook.Ook.Ook?Ook.Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook?Ook!Ook.Ook?Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook.NJ_.NJ_.NJ_.NJ}.NJl.NJ}.NJl.NJl.NJ}.NJl.NJ_.NJ_.NJ_.NJ_.NJ_.NJ_.NJ_.NJ_.NJ_.NJ_.NJ}.NJ_.NJl.NJ}.NJ_.NJl.NJ_.NJl-)>l-)>l-)>l-)\l-)Kl-)\l-)Kl-)Kl-)\l-)Kl-)>l-)>l-)>l-)>l-)>l-)>l-)>l-)>l-)>l-)>l-)\l-)>l-)Kl-)\l-)Kl-)Kl-)Kl-)Kl-)Kl-)Kl-)>l-)Kl-)>l-)Kkg|Kkg|Kkg|Kkg;Kkg*Kkg;Kkg*Kkg*Kkg;Kkg*Kkg|Kkg|Kkg|Kkg|Kkg|Kkg|Kkg|Kkg|Kkg|Kkg|Kkg;Kkg|Kkg*Kkg;Kkg*Kkg*Kkg|Kkg*JF[*JF[*JF[*JFy*JFh*JFy*JFh*JFh*JFy*JFh*JF[*JF[*JF[*JF[*JF[*JF[*JF[*JF[*JF[*JF[*JFy*JF[*JFh*JFy*JF[*JFh*JFh*JFh*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wx95Wx95Wx95Wx95Jx95Wx95Jx95Jx95Jx95Wws6WwsGWws)Wws)Wws)WwsGWws6Wws6Wws6Wws6Wws6WwsGWws6Wws6Wws)WwsGWws6Wws6WwsGWws6WwsGWws)Wws6WwsGWwsGWws)Wws6WwsGWws)Wws6Wws)Wws)Wws)Wws6VRg6VRg6VRg6VR&6VRt6VR&6VRt6VRt6VR&6VRt6VRg6VRg6VRg6VRg6VRg6VRg6VRg6VRg6VRg6VRg6VR&6VRg6VRt6VR&6VRg6VRg6VRg6VRt6VRt6VRt6VRt6VRt6VRt6VRt6VRg6VRt51Ft51Ft51Ft51dt51St51dt51St51St51dt51St51Ft51Ft51Ft51Ft51Ft51Ft51Ft51Ft51Ft51Ft51dt51Ft51St51dt51St51St51St51St51Ft51St51St51St51St51St51St51St51Ft51Sso2SsoCSso%Sso%Sso%SsoCSso2Sso2Sso2Sso2Sso2SsoCSso2Sso2Sso%SsoCSso2Sso2SsoCSso2SsoCSso%Sso2SsoCSsoCSso%Sso2SsoCSso2Sso2Sso%Sso2Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso%Sso2RNc2RNc2RNc2RN"2RNp2RN"2RNp2RNp2RN"2RNp2RNc2RNc2RNc2RNc2RNc2RNc2RNc2RNc2RNc2RNc2RN"2RNc2RNp2RN"2RNc2RNc2RNc2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNp2RNc2RNp1-Bp1-Bp1-Bp1-`p1-Op1-`p1-Op1-Op1-`p1-Op1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-`p1-Bp1-Op1-`p1-Op1-Op1-Op1-Op1-Op1-Op1-Bp1-Op1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-Bp1-O

The easy way to do this challenge is with a tokenised language which doesn't need newlines and ignores invalid tokens.

Tested using this interpreter*. Assumes 8-bit cells for extra golfiness. Programs are also overlapped slightly to save some bytes.

*This interpreter has a strange quirk whereby the last token needs a char after it to be registered, which affects n = 62. There's offline 8-bit interpreters without this quirk, but this was the best online one I could find.

Sp3000

Posted 2016-06-09T08:27:47.893

Reputation: 58 729

2Well... so much for a race to 95 :| – Calvin's Hobbies – 2016-06-09T09:28:41.283

I was in the midst of doing something similar in Brainfuck… oh well. Wouldn't have been as good as in Ook! – Fatalize – 2016-06-09T09:29:49.800

I was also working on BF when I realized it didnt work I started looking for BF derivatives. – flawr – 2016-06-09T09:42:21.273

6Not often we see an improvement of over 5000 bytes in an optimization step... #awkward – corsiKa – 2016-06-09T19:47:21.257

6

PHP, 95 programs, 2439 2063 bytes

<?=0;die?>;></*na^bkd`m'(:chd>=:=;/)m`]ajc_l&'9bgc=<9<:/(l_\`ib^k%&8afb<;8;9/'k^[_ha]j$%7`ea;:7:8/&j]Z^g`\i#$6_d`:9697/%i\Y]f_[h"#5^c_98586/$h[X\e^Zg!"4]b^87475/#gZW[d]Yf !3\a]76364/"fYVZc\Xe~ 2[`\65253/!eXUYb[Wd}~1Z_[54142&% dWTXaZVc|}0Y^Z43031%%~cVSW`YUb{|/X]Y32/20$%}bURV_XTaz{.W\X21.1/#%|aTQU^WS`yz-V[W10-0."'}`SPT]VR_xy,UZV0/,/-!%z_ROS\UQ^wx+TYU/.+., %y^QNR[TP]vw*SXT.-*-+~%x]PMQZSO\uv)RWS-,),*}%w\OLPYRN[tu(QVR,+(+)|%v[NKOXQMZst'PUQ+*'*(|zuZMJNWPLYrs&OTP*)&)'{ztYLIMVOKXqr%NSO)(%(&zzsXKHLUNJWpq$MRN('$'%yzrWJGKTMIVop#LQM'&#&$xzqVIFJSLHUno"KPL&%"%#w|rUHEIRKGTmn!JOK%$!$"vzoTGDHQJFSlm INJ$# #!uznSFCGPIERkl~HMI#"~" tzmREBFOHDQjk}GLH"!}!~szlQDAENGCPij|FKG! | }spkPC@DMFBOhi{EJF ~{~|rpj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56HqvrLKHKID>7{nkoxqmz45GpuqKJGJHC>6zmjnwply34FotpJIFIGB>5ylimvokx23EnsoIHEHFA>4xkhlunjw12DmrnHGDGE@>3wjgktmiv01ClqmGFCFD?>2vifjslhu/0BkplFEBEC>>1uheirkgt./AjokEDADB=>0tgdhqjfs-.@injDC@CA=4/sfcgpier,-?hmiCB?B@<4.rebfohdq+,>glhBA>A?;4-qdaengcp*+=fkgA@=@>:4,pc`dmfbo)*<

Requires the option output_buffering to be On or some values such as 4096. It defaults to 4096 for the web service (but not CLI) at least for my installation.

The doc says ob_clean doesn't return anything. But it returned true nevertheless.

Shifted programs look like these:

9:  ...dmfbo)*<ejf@?<?=8+ob_clean();die?>;><8*na^bkd`m(:chd>=:=;/.)...
15: ...dmfbo)*<ejf@?<?=16-ob_clean();die?>;><04*na^bkd`m'(:chd>=:=;...
94: ...dmfbo)*<ejf@?<?=93+ob_clean();

Generated using this CJam program:

"<?=0;die?>"95,(;{["<?="1$(_Ab:--3={))'-}'+?"ob_clean();die?>"]sf{i\- 95+ 32- 95% ' +}}%s-5<

jimmy23013

Posted 2016-06-09T08:27:47.893

Reputation: 34 042

My first tries were Foo and Gammaplex. Then I realized that I should find a language with 2 or more characters denoting the starting point... – jimmy23013 – 2016-06-10T08:32:25.363

5

CJam, 10 programs, 1 byte

I thought I'd better add this right off the bat before someone else gets cheeky and does it :P

0

A CJam program with just a plain number outputs that number, so this is an easy way to get 10 programs that work, namely:

0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

The next program : unsurprisingly does not output 10 but gives an "unfinished operator" error.

This undoubtedly works in many languages.

Calvin's Hobbies

Posted 2016-06-09T08:27:47.893

Reputation: 84 000

1You can also add MATL to the title of your submission=) – flawr – 2016-06-09T08:56:01.750

5And Pyth, and GolfScript, and looooots of other golfing langs. =) You can just say: "Polyglot". – user48538 – 2016-06-09T08:58:17.513

1Works in non-golfing languages, too. For example, this is completely valid PowerShell. – AdmBorkBork – 2016-06-09T12:48:28.163

Works in Seriously and Actually, also. – Mego – 2016-06-10T08:34:13.030

Mathematica too. – A Simmons – 2016-06-10T09:19:58.547

Also Jelly and 05AB1E work too. – Erik the Outgolfer – 2017-03-01T12:09:24.353