umm im a bit of a beginner how can i polish my sb code to make it noice?
Spoiler
whoever tells me what it does behind the scenes (preferably via pm) gets my eternal respect and kudos
big doubt you're still hanging around, so this is not getting pm'ed
i wasted a few hours extracting the characters from the image programmatically, since there's no way i was going to type in every character and have to find my inevitable mistakes
?CALL(CHR$((((!.<<(""<.))<<((""<.)-!.)<<(!.))*
(((""<.)-!.)))-(((""<.)-!.)*(((((""<.)-!.)<<(!
.)<<((""<.)-!.)<<(!.))*(((""<.)-!.)))-(((""<.)
-!.)*(((((""<.)-!.)<<((""<.)-!.)<<(!.))*(((""<
.)-!.)))-(((""<.)-!.)*((((!.)<<((""<.)-!.)<<(!
.))*(((""<.)-!.)))-((!.<<(""<.))+((""<.)-!.)))
))))))+CHR$((((((!.<<(""<.))<<((""<.)-!.)<<(!.
))*(((""<.)-!.)))-(((""<.)-!.)*(((((""<.)-!.)<
<(!.)<<((""<.)-!.)<<(!.))*(((""<.)-!.)))-(((""
<.)-!.)*(((((""<.)-!.)<<((""<.)-!.)<<(!.))*(((
""<.)-!.)))-(((""<.)-!.)*((((!.)<<((""<.)-!.)<
<(!.))*(((""<.)-!.)))-((!.<<(""<.))+((""<.)-!.
)))))))))-!.))+CHR$((((((!.<<(""<.))<<((""<.)-
!.)<<(!.))*(((""<.)-!.)))-(((""<.)-!.)*(((((""
<.)-!.)<<(!.)<<((""<.)-!.)<<(!.))*(((""<.)-!.)
))-(((""<.)-!.)*(((((""<.)-!.)<<((""<.)-!.)<<(
!.))*(((""<.)-!.)))-(((""<.)-!.)*((((!.)<<((""
<.)-!.)<<(!.))*(((""<.)-!.)))-((!.<<(""<.))+((
""<.)-!.)))))))))+((!.<<(""<.)))-!.)),!.<<!.,!
.<<!.)
guess what. im a gamer. i can see code like no other. the code flows through my veins and so i can ctrl-f in vscode 30 minutes into the future and see that this sequence is repeated in each
CHR$ after noticing that a lot of things were showing up as 'out of 3' in the find and replace dialog and i'm completely rewriting this post which is causing me unbearable amounts of pain, such that i will cease talking about it at once:
(((!.<<(""<.))<<((""<.)-!.)<<(!.))*(((""<.)-!.
)))-(((""<.)-!.)*(((((""<.)-!.)<<(!.)<<((""<.)
-!.)<<(!.))*(((""<.)-!.)))-(((""<.)-!.)*((((("
"<.)-!.)<<((""<.)-!.)<<(!.))*(((""<.)-!.)))-((
(""<.)-!.)*((((!.)<<((""<.)-!.)<<(!.))*(((""<.
)-!.)))-((!.<<(""<.))+((""<.)-!.))))))))
code repetition is a sin none must commit. let's fix that real quick
A=(((!.<<(""<.))<<((""<.)-!.)<<(!.))*(((""<.)-
!.)))-(((""<.)-!.)*(((((""<.)-!.)<<(!.)<<((""<
.)-!.)<<(!.))*(((""<.)-!.)))-(((""<.)-!.)*((((
(""<.)-!.)<<((""<.)-!.)<<(!.))*(((""<.)-!.)))-
(((""<.)-!.)*((((!.)<<((""<.)-!.)<<(!.))*(((""
<.)-!.)))-((!.<<(""<.))+((""<.)-!.))))))))
?CALL(CHR$(A)+CHR$(((A)-!.))+CHR$(((A)+((!.<<(
""<.)))-!.)),!.<<!.,!.<<!.)
wow. so beautiful. so much smaller. what a perfect solution
so let's do it again. again and again, until there is no more, and we have reduced this program to its basic form.
this
(""<.) guy is lookin a little sus.
!. as well. vote them off
B=!.
C=""<.
A=(((B<<C)<<(C-B)<<B)*((C-B)))-((C-B)*((((C-B)
<<B<<(C-B)<<B)*((C-B)))-((C-B)*((((C-B)<<(C-B)
<<B)*((C-B)))-((C-B)*(((B<<(C-B)<<B)*((C-B)))-
((B<<C)+(C-B))))))))
?CALL(CHR$(A)+CHR$(((A)-B))+CHR$(((A)+((B<<C))
-B)),B<<B,B<<B)
intruders spotted:
(C-B) and
(B<<C) and
B<<B
B=!.
C=""<.
D=C-B
E=B<<C
F=B<<B
A=((E<<D<<B)*D)-(D*(((D<<B<<D<<B)*D)-(D*(((D<<
D<<B)*D)-(D*(((B<<D<<B)*D)-(E+D)))))))
?CALL(CHR$(A)+CHR$(A-B)+CHR$(A+E-B),F,F)
those bit shifts are looking a lil shady over there. chaining them is a no-no, let's simplify that
B=!.
C=""<.
D=C-B
E=B<<C
F=B<<B
A=((E<<(D+B))*D)-(D*(((D<<(B+D+B))*D)-(D*(((D<
<(D+B))*D)-(D*(((B<<(D+B))*D)-(E+D)))))))
?CALL(CHR$(A)+CHR$(A-B)+CHR$(A+E-B),F,F)
hey... are you thinking what i'm thinking...
B=!.
C=""<.
D=C-B
E=B<<C
F=B<<B
G=D+B
A=((E<<G)*D)-(D*(((D<<(B+G))*D)-(D*(((D<<G)*D)
-(D*(((B<<G)*D)-(E+D)))))))
?CALL(CHR$(A)+CHR$(A-B)+CHR$(A+E-B),F,F)
ok while i'm at it i'll catch
A-B and remove excess parens
B=!.
C=""<.
D=C-B
E=B<<C
F=B<<B
G=D+B
A=(E<<G)*D-D*((D<<(B+G))*D-D*((D<<G)*D-D*((B<<
G)*D-(E+D))))
H=A-B
?CALL(CHR$(A)+CHR$(H)+CHR$(H+E),F,F)
yea
alright i'm looking at this and it's... well, it's not quite good enough. there's so much multiplication by D, let's turn it into a function!
B=!.
C=""<.
D=C-B
E=B<<C
F=B<<B
G=D+B
A=I(E<<G)-I(I(D<<(B+G))-I(I(D<<G)-I(I(B<<G)-(
E+D))))
H=A-B
?CALL(CHR$(A)+CHR$(H)+CHR$(H+E),F,F)
DEF I(X)
RETURN D*X
END
beautiful. actually, i think i'll keep it that way.
just kidding
?CALL(CHR$(80)+CHR$(79)+CHR$(87),2,2)
?CALL("POW",2,2)
?POW(2,2)
4
i still expect eternal respect and kudos, btw