Fork me on GitHub
#unrepl
<
2017-07-05
>
pesterhazy15:07:20

next unravel version will indicate unreadable forms (mismatched parentheses etc.) live and in red

pesterhazy15:07:49

not sure I like the red prompt as an indicator - any ideas about an unobtrusive signal to the user?

cgrand15:07:09

What can you do?

pesterhazy15:07:54

what do you mean?

cgrand15:07:28

can you add a character that’s always displayed after the cursor?

cgrand15:07:39

maybe not a good idea anyway

pesterhazy15:07:46

I can print anything, then reprompt

pesterhazy15:07:49

I can change the prompt

pesterhazy15:07:55

I can clear the screen below the prompt

pesterhazy15:07:04

I can move the cursor around

cgrand15:07:11

what about a glyph like 🚫

pesterhazy15:07:44

ah! a unicode character

cgrand15:07:03

an emoji sadly

cgrand16:07:19

(but a combining caharacter so may print on top of the previous one when unicode moons align)

pesterhazy16:07:39

yeah I had the combining char problem

cgrand16:07:43

what about making it a trailing character?

cgrand16:07:13

usually my eyes are at the end of the form (notwithstanding heavy edits)

pesterhazy16:07:26

the problem with a trailing char is that I'll need to re-prompt for every keystroke I think

pesterhazy16:07:58

note sure how important it is to limit redraws

pesterhazy16:07:58

can you change the color of the caret/block cursor?

dominicm16:07:23

fwiw, I liked the red

pesterhazy16:07:58

@dominicm changing the prompt color is definitely the simplest option

volrath18:07:27

super cool @pesterhazy, I also like the emoji, maybe you can substitute the => for a red 🚫

pesterhazy18:07:48

yeah exactly. I've seen actual colorful emojis in iterm2 so there must be a way to show those

dominicm20:07:47

be careful though, because emojis don't work well across most linux terms

richiardiandrea21:07:39

Do you have the error info? Can you highlight the char that breaks? In paredit it is usually like that (where it can)...I know it is maybe more work 😀

richiardiandrea21:07:23

Also the classic clue that is universally recognized is that it does not evaluate but goes newline waiting for a correct terminator...I am not saying it is the best, but it would be consistent with readline (I guess?)

richiardiandrea21:07:29

Sorry not sure readline is the culprit there but I hope you got the idea

pesterhazy21:07:12

Right, yeah the change will not affect pressing return. But it will give you a visual clue that the form is incomplete even before pressing return

pesterhazy21:07:07

Highliting the location of the exception would be best, I agree