Created
December 12, 2020 04:30
-
-
Save ilyakurdyukov/3f08160450a1d6c471c7712029886f09 to your computer and use it in GitHub Desktop.
That's just another Hello World. But with heavy restrictions, no keywords, no numbers, no strings or literals, only 3 operations: x(!=0), x++, x+=y. Inspired by the "addleq" OISC.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
P,o,S,i,t,I,v,E; | |
main(){v?(o+=o)?i+=i,i++:( | |
o+=t,S?E? P?i+=v:(o | |
+=i,o+= o,o+=o) | |
,o++:( (I?P?o | |
+=i:o ,o+=o | |
,o+=t ,o+=o | |
,o+=o :(o+= | |
o,o+= t,P?++ o,o+=o ,o++, | |
o+=o: (o+=o,++ o,o+=o,o ++))) | |
):(E ?(I?P?++ o,o+=o,o ++,o | |
+=o,o ++,o+= o,o++, S++:( | |
o+=i ,o+= | |
o,(o +=o) | |
):(o +=o, | |
P?(o +=o, | |
o+=t, o+=i) | |
:((o +=t, o+=o ,o++ | |
,o+=o ),o++ ))):( I?o+= | |
o,o+= t,(o+= o,o+=o ):(P? | |
o+=i, o+=o,o+=t,o+=o,o +=o,o | |
++:(o +=o,o+=o ,o+=o | |
)))), P+=(P | |
)?I+=( I?E+=E | |
?i:v,i: v),i:v, | |
putchar(o )):(t++,v | |
+=++o,t+=t,t+=t,t+=t,t++,i | |
++),i?main():o;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can suppress compiler warnings by replacing the first line with this:
Also the square version: