Yes, Desmos.com counts as a programming language
Scoring is the "normal" bytecount without special rules
The examples above of Desmos.com's programming language demonstrate that it is a fully-functional programming language capable of solving a wide range of problems (probably all primitive recursive functions). We should accept it as a programming language the same way we allow TI-BASIC and Mathematica.
Although the language may have limited input/output functionality, I believe we should treat this as a "feature" of the language (accepting the language as limited in this regard). A lack of string operations has no impact on whether or not it counts as a language.
Scoring should be calculated normally, without a special encoding. For example, your "adding two numbers" program should count as 35 bytes.
TI-BASIC's special encoding is based off of several reasons:
- Each command is a single token which takes up either 1 or 2 bytes in memory.
binomcdf( is a single token taking up 2 bytes. You can directly measure the bytecount of any program from within the calculator.
- Programming is performed token-wise. You select
binomcdf( from a menu instead of typing each letter. You are unable to edit it in way (such as typing other letters in the middle of it). Even if you type the individual lowercase letters
b i n o m c d f ( it would not function, even though it would look the same (it would also have more bytes).
- When run, the TI-BASIC interpreter receives
binomcdf( as two bytes because that's how it's stored.
On the other hand, in the case of Desmos.com:
- Although you can enter functions via menu, you can also type them out by hand and backspace in the middle of them. This demonstrates how the editor treats the program as a series of individual characters.
- I strongly doubt the existence of any special tokenization or character encoding that exists when storing the program.
I believe that the string you get from copying the program out of Desmos (like the OP's examples) is the most reproducible/verifiable option for measuring program size.
I have become aware, however, of some auto-formatting done by the Desmos editor. For example, pasting in
y=sinx is the same as pasting in
y=\sin x. This may open up other, more editor-specific ways to measure size. Somewhat interestingly, copying the function will always result in
y=\sin x but typing out
y=\sin x doesn't work (typing
y=sinx does work).