uiua-lang/uiua

Should the REPL store the original input text in history, rather than the formatted version?

vxern opened this issue · 3 comments

When I first tried the uiua repl command, I noticed that once I've written my expression in, say add 1 pick 0 windows 2 [1 2 3 4 5], and then navigated through the REPL history (arrow up, arrow down), the text that would be restored would be the formatted output of what I originally put in, say + 1 ⊡ 0 ◫ 2 [1 2 3 4 5], rather than the original text.

Screen.Recording.2024-05-24.at.10.36.22.mov

Although this makes some sense when looking at it from the 'building my expression up and incrementally adding to the final, formatted result', it arguably messes with the dynamic of typing expressions in because what feels intuitive is that what you originally put in is what you should get back, not an alternative variant of it.

Does this hurt the experience in some way?
I would think you'd want to left-arrow through fewer characters.
The glyph representation is considered canonical. The words are just an entry method.

I wouldn't go as far as to say as it hurting the experience, just being a tad bit unexpected.

I'm okay with it being unexpected. The little I use the repl, it's what I would want. I want my code to be unformatted as little as possible.