MSM, 31 bytes
MSM is stack based, so the two input numbers are expected to be on top of the stack, i.e. on the right of the string. MSM has neither numbers nor booleans so we are free to choose a (reasonable) representation:
123 numbers are just sequences of ascii digits. There's no literal
representation in MSM source code, so you have to construct them
digit by digit: 321.. -> 123 (remember: . is concatenation)
TIO doesn't support MSM out of the box, so I've included the JS interpreter from the esolang page.
Try it online!
How it works: (I use
b for the two numbers on the stack).
Excerpt from the MSM command reference:
' quote, push next char on the stack, even if it is a command
? skip next command if the two top elements of the stack are equal
: expand string at top of the stack and push each char of it on the stack
. concatenate two top elements
everything else is pushed
' ? d d F ' , ' , ' , . . . . . T ' , ' , ' : ' ? . . . . ' : a b
d d F ' , ' , ' , . . . . . T ' , ' , ' : ' ? . . . . ' : a b ?
The next 6 chars are pushed on the stack and concatenated with 5 dots
T ' , ' , ' : ' ? . . . . ' : a b ? ,,,Fdd
The next 5 chars are pushed on the stack and concatenated with 4 dots
' : a b ? ,,,Fdd ?:,,T
: and the two numbers are pushed
? ,,,Fdd ?:,,T : a b
Now it gets interesting. If the two numbers are equal,
,,,Fdd is skipped
?:,,T : a b -- ?:,,T as a whole is not a command, so it's pushed
: a b ?:,,T -- expand
a b ? : , , T -- push a b
? : , , T a b -- a b are still equal, so skip :
, , T a b -- drop a b
T -- MSM stops, output is True
If the two numbers are not equal, don't skip
,,,Fdd, but push it:
,,,Fdd ?:,,T : a b
: a b ,,,Fdd ?:,,T -- expand
a b ,,,Fdd ? : , , T -- push up to ?
? : , , T a b ,,,Fdd -- number b is never equal to ,,,Fdd so expand
, , T a b , , , F d d -- drop two dummy values
T a b , , , F -- push T a b
, , , F T a b -- drop b a T
F -- stop