In this thread: post code that you would like other users to "improve."
Example: User A submits good binary search algorithm
User B "improves" it by replacing variable names with animals, and for some reason it doesn't halt on some inputs.
Generally this is about the opposite of positive style critique, so the program should still work correctly, but clever underhandedness is okay too.
You do not have to improve a submission before submitting code for review, but it's nice for organization.
This is 🅱️ode 🅱️ritique, so the most clever answer wins.
Unsigned 8-bit no-input BF interpreter (byte output instead of char) (@yBASIC ruleset*)
hi,, i just downloaded smilebasic. it is not a very concise language. is there anything I can do to make my code smaller?
___$="[<>+-[].]*" +"$" ___ =. __$ ="........" __% =. __ =(!.<<!.+!.+!.) _ =. ____=. @_ _=__$[__%]=="_"__%=__%+!. _=(_<<!.)+(__$[__%]=="_")__%=__%+!. _=(_<<!.)+(__$[__%]=="_")__%=__%+!. _=(_<<!.)+(__$[__%]=="_")__%=__%+!. _=(_<<!.)+(__$[__%]=="_")__%=__%+!. _=(_<<!.)+(__$[__%]=="_")__%=__%+!. _=(_<<!.)+(__$[__%]=="_")__%=__%+!. _=(_<<!.)+(__$[__%]=="_")__%=__%+!. __%=__%-(!.+!.<<!.+!.) _$=___$[___] GOTO"@________"+"_"*((_$==">")+(_$=="<")*(!.+!.)+(_$=="[")*(!.+!.+!.)+(_$=="]")*(!.+!.+!.+!.)+(_$=="+")*(!.+!.+!.+!.+!.)+(_$=="-")*(!.+!.+!.<<!.)+(_$==".")*(!.+!.+!.+!.+!.+!.+!.)) @________ __$[__%]="._"[(_<<(!.+!.+!.<<!.+!.+!.))<.]__%=__%+!. __$[__%]="._"[(_<<(!.+(!.+!.+!.<<!.+!.+!.)))<.]__%=__%+!. __$[__%]="._"[(_<<((!.<<!.)+(!.+!.+!.<<!.+!.+!.)))<.]__%=__%+!. __$[__%]="._"[(_<<(!.+!.+!.+(!.+!.+!.<<!.+!.+!.)))<.]__%=__%+!. __$[__%]="._"[(_<<(!.+!.+!.+!.+!.+!.+!.<<!.+!.))<.]__%=__%+!. __$[__%]="._"[(_<<(!.+(!.+!.+!.+!.+!.+!.+!.<<!.+!.)))<.]__%=__%+!. __$[__%]="._"[(_<<((!.<<!.+!.+!.+!.)-!.<<!.))<.]__%=__%+!. __$[__%]="._"[(_<<((!.<<!.+!.+!.+!.+!.)-!.))<.] __%=__%-!.-!.-!.-!.-!.-!.-!. @________________________________ ___=___+!. GOTO"@_"+"_"*(___$[___]=="$") @_________ __%=__%+(!.+!.<<!.+!.) __$=__$+"........"*(__%==__) __=__+(!.+!.<<!.+!.)*(__%==__) GOTO@________________________________ @__________ __%=__%-(!.+!.<<!.+!.) __$="........"*(__%<.)+__$ __=__+(!.+!.<<!.+!.)*(__%<.) __%=__%+(!.+!.<<!.+!.)*(__%<.) GOTO@________________________________ @___________ ____=!. GOTO"@____"+"_"*!!_ @____ ___=___+!. ____=____+(___$[___]=="[") ____=____-(___$[___]=="]") GOTO"@____"+"_"*!____ @_____ GOTO@________________________________ @____________ ____=. @______ ____=____+(___$[___]=="]") ____=____-(___$[___]=="[") ___=___-!. GOTO"@______"+"_"*!____ @_______ GOTO@________________________________ @_____________ _=_+!. GOTO@________ @______________ _=_-!. GOTO@________ @_______________ ?_ GOTO@________________________________ @__?annotated * @yBASIC is a Turing-complete SmileBASIC subset that only allows alphanumeric characters to be used for the goto instruction, any other occurrence of [A-Za-z0-9] or non-ASCII characters is illegal