Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Being a complete noob, how do you get the helpful tools in DrRacket?

Tags:

racket

My brother wanted to introduce me to lisp languages, so he showed me DrRacket on his computer. Everything looked awesome, including arrows that point to where a function is being imported from, and a documentation bubble of sorts that tells you the syntax for a function.

I downloaded DrRacket onto my computer, however I don't have either of these. They are definitely not required, but they would make learning much easier.

According to my brother, he "spammed a bunch of Emacs shortcuts by accident, and it just sort of happened."

If anyone could help me, it would be much appreciated.

like image 372
Mattstir Avatar asked Feb 16 '15 04:02

Mattstir


1 Answers

These features are provided as part of DrRacket's background expansion, which can be enabled or disabled in the "Background Expansion" tab of DrRacket's preferences.

Background expansion preferences panel

Enabling background expansion causes DrRacket to constantly perform macro-expansion as you edit your program, which will automatically detect syntax errors as a helpful side-effect.

Once background expansion has completed for a program, binding arrows and documentation blueboxes will be enabled (provided you've checked the relevant checkboxes in the background expansion preferences).


In some especially complex programs that employ a large number of macros, background expansion can take a non-trivial amount of time, though it shouldn't take any more than a few moments for all but the most complicated of programs. The current state of background expansion is displayed in the bottom-right corner of DrRacket's editor window.

Background expansion in progress

Once background expansion has completed, the indicator circle will turn green, and all program analysis tools such as arrows, documentation bubbles, and refactoring will become available.


If you don't want to use background expansion for some reason, you can manually trigger the syntax analysis DrRacket provides by pressing the "Check Syntax" button in the DrRacket toolbar.

Check Syntax button

This enables the binding arrows and documentation bubbles, and it also colorizes the source code using more advanced syntax highlighting that provides some additional information about the way bindings are used (this feature is only provided by Check Syntax, not background expansion).

like image 75
Alexis King Avatar answered Jan 01 '23 10:01

Alexis King