[racket-dev] full tree text search

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Dec 9 02:06:45 EST 2010

40 minutes ago, Jon Rafkind wrote:
> On 12/08/2010 10:12 PM, Eli Barzilay wrote:
> > Is this different from a recursive grep?
> >
> > (See also `git grep' -- and there's a web interface for that,
> > http://git.racket-lang.org//plt?a=search&h=HEAD&st=grep&s=foo )
> 
> Oh I had no idea git grep existed. Well that looks good enough for now.

It's a little more useful than a plain grep because it searches only
the repository contents.


> (BTW, recursive grep on the command line is not so trivial..
> $ find . -name "*.rkt" | xargs grep foo
> )

1. Get http://barzilay.org/misc/sgrep,
   and then: sgrep foo .rkt

2. Use zsh, and: grep foo **/*.rkt

3. Or just use grep: grep -r foo --include="*.rkt" .


15 minutes ago, Noel Welsh wrote:
> Depending on how it is setup, it could be. There should be some
> processing to find words with similar meanings, for example. I
> expect your wife knows more :-)

Yeah, but all of that stuff is useful for searching the documentation
search, and IIUC Jon wants a code searching tool.

(And with documentation searches I think that Google will be hard to
beat.)


> BTW,I think this is a really interesting and possibly useful thing to
> experiment with. Just storing the search logs on docs.racket-lang.org
> would provide a mine of useful information. Mining it is, of course,
> the issue.

(It's a plain apache setup...)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.