2 ms·
This reminds me of my favorite "bug" in my language. I was trying to show off string representations of arithmetic expressions, so I typed in this. <feep>
by FeepingCreature 9y ago
This reminds me of my favorite "bug" in my language. I was trying to show off string representations of arithmetic expressions, so I typed in this.
<feep> .neatex string-of 2+2
<feepbot> 23
That took a little figuring! Turns out, I'd forgotten my own precedence rules, and it'd interpreted it as (string-of 2) + 2; string-of, being a compile-time operator, yielded a string literal "2", which then implicitly cast to a string pointer, which then got incremented by two right past the end and into the next string, which happened to be "23".