Closed bjchapm closed 4 months ago
That is an interesting problem - the kind that will be super-confusing for a new person who doesn't know what it going on (ed is confusing enough as it is!).
We could also rename ed
to something like tali-ed
to make that scenario impossible.
Technically, you can run into this other ways as well. Tali supports up to base 36, but if you set BASE to 36 then any alphanumeric utterance is a valid number if it's not in the dictionary. I do agree that it's annoying for HEX, though, which is a base I would actually expect people to be using. It would be nice if new users did not have to be aware of this.
If ed
is removed from assembling using the platform file configuration option TALI_OPTIONAL_WORDS, then it should not show up in the dictionary (the header is also removed by that option). Let me know if that's not the case. It lives in the FORTH wordlist rather than the EDITOR-WORDLIST, and changing that may be a different way to reduce the chance of people stumbling into it.
adding a non-alpha might also be good, e.g. ed:
. using one or two-letter 'hex' words [a-f]{1-2} as builtins will definitely bite people
I agree. I was thinking of moving it to the EDITOR-WORDLIST, but that just postpones the confusion until someone tries adding that wordlist to their search order. ed:
probably isn't good because :
is generally reserved for words that create something like buffer:
.... although ed
does create a string in memory as its result, so maybe ed:
does make sense. I'll let that rattle around in my head for a bit, but that's probably a good name.
The manual will need to be updated as well.
Fixed in latest commit - renamed to ed:
and updated the documentation.
I suppose this isn't really a bug, but it caught me by surprise and took me a while to figure out, so I wanted to mention it. Perhaps it would be something to add to the documentation somewhere.
I was attempting to paste in a previously generated table of CRC-16 CRCs. One of the lines in the table is
C6 c, ED c, E6 c, FD c, 86 c, CD c, A6 c, DD c,
I was already in hex mode. The digits ED will interrupt the data load and cause a cryptic '?' to appear in the console, which was confusing until I remembered the 'ed' editor word. You can enter
q
to exit ed and get back to a prompt.Workarounds are: