I just spent four hours writing stuff in the esoteric language FALSE. Four. Hours. That I didn't notice passing by.
Did I mention that that's also time I don't have right now?
I need to brag, though: Read integer from stdio, print binary form to stdout.
1_[^$1_=~][]#%1 0@[$1_=~][@$10*@'0-$0 10@@\$@\>~\@\>&$[%@*@+@1_]?~[\%%\@]?]#%\% $1 0@@[\$@$@\>][2*@1+@@]#%%1-1\[$0>][1-2@*\]#%[$0>][$@$@/$1=$["1"%%\$@\-1_]?~["0"%]?\2/]#%%
It's slightly suboptimal at places, because I replaced... "subroutine calls" with inline code. But it works. Unless you feed it garbage.
Good. Luck. Deciphering it. And because I'm nice I even put a newline at the most important logical demarcation point! (also, interpreter)
[Edit] The version above actually has a retarded bug (16 -> 000). I could've fixed it but it would've been bloated beyond recognition then. So, here's the clean, relatively nice version:
b [@@\$@\>~\@\>&] \: { #2 < #1 & #1 < #3 } c [\$@$@\>] \: { #1 > #2, non-destructively } l [l;\l:\1 0@@c;[l;*@1+@@]#%%\l:] \: { Log[#2](#1), rounded up } p [p;@p:\1\[$0>][1-p;@*\]#%\p:] \: { #1 ^ #2 } g [1_[^$1_=~][]#%1 0@[$1_=~][@$10*@'0-$0 10b;!$[%@*@+@1_]?~[\%%\@]?]#%\%] \: { Read num from stdin }
g;!$$$2l;!2\p;!=["1"]?2l;!1-2\p;![$0>][$@$@/$1=$["1"%%\$@\-1_]?~["0"%]?\2/]#%%
Edited 11 years ago
|