Gol><>, score 34 - 33 = 1
"mrllssslssscsmzpdsmzprrrrrrtsuota
Try it online!
Outputs the following and exits by error, which is every char uppercased except the leading "
.
"MRLLSSSLSSSCSMZPDSMZPRRRRRRTSUOTA
How it works
The lines marked with *
are the differences from the previous version.
"..." Push every char except `"`
mrl Push -1, reverse stack, push stack length (34 = `"`)
* lsss Push stack length (35) and add 16 three times (83 = S)
* lsss Push stack length (36) and add 16 three times (84 = T)
* csmzp Push 13, add 16 (29), push -1, boolean negate (0), and
replace the command at (29,0) by T
* dsmzp Push 14, add 16 (30), push -1, boolean negate (0), and
replace the command at (30,0) by S
* rrrrrr Reverse the stack 6 times;
no-op to move the positions to overwrite
TSuot Infinite uppercase-print loop; halt by error at -1
a Not executed
Gol><>, score 34 - 31 = 3
"mrlTSuotaaaaaaaaaaaaaaaaaaaaaaaaa
Try it online!
Outputs the following and exits by error.
"MRLTSUOTAAAAAAAAAAAAAAAAAAAAAAAAA
Every lowercase letters are uppercased, so the only chars that are not modified are "TS
.
How it works
"..." Start string literal, push every char in the source code (except `"`),
wrap around and end string literal
mr Push -1 and reverse the stack
(setup the chars for printing from top, and bury the trap at the bottom)
l Push length of stack, which gives 34 == `"`
T...t Infinite loop until it errors in the middle:
Su Uppercase the char at the top (errors when trying to uppercase -1)
o Pop and print as char
a... Not reached
I suspect 2 or lower might be possible.
invert the case of as many ascii characters
Does that mean that if a unicode character has its case inverted complement, we aren't expected to count that unicode character if we invert it in our output? \$\endgroup\$ – user96495 Aug 19 '20 at 9:40Gol><>
wins over><>
). OP didn't have access to the sandbox when they wrote the challenge (see OP's first comment). \$\endgroup\$ – Bubbler Aug 20 '20 at 2:24