How would one accomplish the following in DrRacket?
"apropos" (CL/shell) or "lookfor" (Matlab)
Given a search string, return a list of symbols with matching name or documentation.
I found that XRepl has the ,apropos command; but I haven't figured out an easy way to invoke it in DrRacket.
Finding the source of definitions.
a la ctags or http://common-lisp.net/project/slime/doc/html/Finding-definitions.html Given a function or global parameter, open the file that defined it and scroll to the definition.
I found documentation for storing source locations, but nothing on how to query the information.
> How would one accomplish the following in DrRacket?
> "apropos" (CL/shell) or "lookfor" (Matlab)
> Given a search string, return a list of symbols with matching name or documentation.
> I found that XRepl has the ,apropos command; but I haven't figured out an easy way to invoke it in DrRacket.
Do you mean: do that within Racket, or from Racket?
You can use the shell with (system "apropos ..."), but I don't know how useful that is for Racket docs.
Within Racket you can use the F1 key to get to the docs that tell you where a function lives. That opens a web browser that allows you to type strings for more searching (locally and not).
I fear I am telling you things that you already know. :O)
rac
> Finding the source of definitions.
> a la ctags or http://common-lisp.net/project/slime/doc/html/Finding-definitions.html > Given a function or global parameter, open the file that defined it and scroll to the definition.
> I found documentation for storing source locations, but nothing on how to query the information.
>> How would one accomplish the following in DrRacket?
>> "apropos" (CL/shell) or "lookfor" (Matlab)
>> Given a search string, return a list of symbols with matching name or documentation.
>> I found that XRepl has the ,apropos command; but I haven't figured out an easy way to invoke it in DrRacket.
> Do you mean: do that within Racket, or from Racket?
> You can use the shell with (system "apropos ..."), but I don't know how useful that is for Racket docs.
> Within Racket you can use the F1 key to get to the docs that tell you where a function lives. That
> opens a web browser that allows you to type strings for more searching (locally and not).
> I fear I am telling you things that you already know. :O)
Thanks for the quick response. Unfortunately, I had found the web browser thingy (and had to enable javascript for it to work). :)
I am looking for functions that search for racket functions and return racket data structures that describe them. The key pieces of information is the name (so it can be used) and the source location (so the implementation can be learned and possibly modified).
>> Finding the source of definitions.
>> a la ctags or http://common-lisp.net/project/slime/doc/html/Finding-definitions.html >> Given a function or global parameter, open the file that defined it and scroll to the definition.
>> I found documentation for storing source locations, but nothing on how to query the information.
On Tue, Jul 31, 2012 at 7:52 AM, D Herring <dherr...@tentpost.com> wrote:
> On 07/31/2012 01:15 AM, Richard Cleis wrote:
> I am looking for functions that search for racket functions and return
> racket data structures that describe them. The key pieces of information is
> the name (so it can be used) and the source location (so the implementation
> can be learned and possibly modified).
I don't know about the return data structures part, but, if finding
manually the definition of functions suffices you, you can "check
syntax" and then right clicking on a symbol offers the "jump to
definition" command.
> Thanks for the quick response. Unfortunately, I had found the web browser thingy (and had to enable javascript for it to work). :)
> I am looking for functions that search for racket functions and return racket data structures that describe them. The key pieces of information is the name (so it can be used) and the source location (so the implementation can be learned and possibly modified).
As someone mentioned, DrRacket provides a GUI-version of this functionality with 'check syntax'. In #lang programs, 'check syntax' is always on and the information is always available.
If you want a programmatic way to access this information, you'd have to hook into 'check syntax' before it colors the editor.
Since no one mentioned it yet: if you want a shell-script based way to
tell the docs what to search for, you can use 'raco docs lambda' to
search for 'lambda'.
Robby
On Tue, Jul 31, 2012 at 7:38 AM, Matthias Felleisen
>> Thanks for the quick response. Unfortunately, I had found the web browser thingy (and had to enable javascript for it to work). :)
>> I am looking for functions that search for racket functions and return racket data structures that describe them. The key pieces of information is the name (so it can be used) and the source location (so the implementation can be learned and possibly modified).
> As someone mentioned, DrRacket provides a GUI-version of this functionality with 'check syntax'. In #lang programs, 'check syntax' is always on and the information is always available.
> If you want a programmatic way to access this information, you'd have to hook into 'check syntax' before it colors the editor.
> I don't know about the return data structures part, but, if finding
> manually the definition of functions suffices you, you can "check
> syntax" and then right clicking on a symbol offers the "jump to
> definition" command.
Thanks to everyone for their help. Together with the documentation, this check-syntax technique satisfies my current needs.