[racket] Suggestion for DrRacket

From: Piotr Kalinowski (pitkali at gmail.com)
Date: Mon Feb 17 10:54:28 EST 2014

Erich Rast <erich at snafu.de> writes:

> When debugging is enabled, DrRacket could display on-line help for
> functions in the status line while the user is typing - rather than a
> red line with errors that usually just concern unclosed parens. What I
> mean is a one-line autocomplete in the status line that provides the
> first matching definition. Like this:
> You type: (hash-rem 
> It says: (hash-remove hash key) <2>
> The <2> indicates that this is just one out of two possibilities.
> You type: (hash-remove! 
> It says: (hash-remove! hash key) 
> You type: (hash-del
> It says (in red): (hash-del     <not defined>

I like this. It might make someone do something to reduce the large time
overhead of running completion for the first time that I keep getting in

I'd actually suggest implementing full eldoc experience, so that when
you type:

(hash-remove! the-map |< the cursors is one space after

You get that status line for hash-remove! but with name of the current
argument in bold.

Then only 2 things would be missing:

* Completion of symbols defined in current module.

* Searching for symbol to document. Consider the following expression:

(/ 2 (* a 2))

If you put your cursor on * you'll get online help for multiplication.
If you then move the cursor right, the help for * stays. But if you move
left, it also stays on, despite moving out of application of *, until
you actually land at the boundary of /.

When you're actually typing, it's worse, because as soon as you move out
of /, it's documentation disappears entirely.

What eldoc would do, is that if you land inside a function application,
it goes to the first position of the list, and if it is a symbol, it
shows its documentation. I'd like if DrRacket's help bubble could do the
same, instead of relying on the poor user to move the cursor manually.

It could then work almost as well as eldoc while typing something like
the following:

(/ (* a 2) 2)

When I type / I get its documentation, then I type space, and it
disappears, never coming back until I come back there.

But it would so much more useful if it stayed on until a different
symbol comes up (like * in this case), and after typing the inner
closing parenthesis, when you go back into level of the application of
/, the bubble would yet again display help for /, rather than nothing.

Piotr Kalinowski
Intelligence is like a river: the deeper it is, the less noise it makes.

Posted on the users mailing list.