Re: [racket-dev] Roogle?

2011-08-06 Thread Casey Klein
On Thu, Aug 4, 2011 at 11:13 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 So I wonder if anyone has a
 positive experience with this kind of searching in an in anger kind
 of setting?


I've had positive experiences searching by type signature in Hoogle.

I've wished I could do the same for the Racket docs every time I try
to remember the name of the function with this signature: (a - [b])
- [a] - [b]. It's the first result in Hoogle, even if you get the
order of arguments backwards.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Eli Barzilay
Three minutes ago, Noel Welsh wrote:
 
 In conclusion, I think adding full text search (e.g. Lucene/Solr)
 would have the largest impact on the existing search and this
 doesn't even require much implementation work. Pick the low hanging
 fruit!

Changing from a simple JS search that can be installed with Racket to
a search server is not something that hangs low...

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Noel Welsh
With the power of asynchronous requests (aka ajax) it is. I've gotta
fix Myna first; maybe then I'll have a spare moment to implement it.

[Either add a stage to the build process so docs.racket-lang.org gets
a different search to the local docs or do an Ajax request to the full
text server and, update the JS index results with the full text
results if the request completes.]

(There are a bunch of really interesting problems here for machine
learning or NLP inclined people who want to work on real systems.)

N.

On Fri, Aug 5, 2011 at 8:01 AM, Eli Barzilay e...@barzilay.org wrote:
 Changing from a simple JS search that can be installed with Racket to
 a search server is not something that hangs low...
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Eli Barzilay
About a minute ago, Noel Welsh wrote:
 With the power of asynchronous requests (aka ajax) it is. I've gotta
 fix Myna first; maybe then I'll have a spare moment to implement it.

That doesn't help with the goal of standalone docs.


 [Either add a stage to the build process so docs.racket-lang.org
 gets a different search to the local docs or do an Ajax request to
 the full text server and, update the JS index results with the full
 text results if the request completes.]

Oh, you mean running something *different* on docs.racket-lang.org?
That still requires some non-low-hanging hacking of the build process
and the organization of stuff on the server.  (And the search can be
solved in an even easier way with a google custom search.)

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Noel Welsh
On Fri, Aug 5, 2011 at 8:12 AM, Eli Barzilay e...@barzilay.org wrote:
 About a minute ago, Noel Welsh wrote:
 With the power of asynchronous requests (aka ajax) it is. I've gotta
 fix Myna first; maybe then I'll have a spare moment to implement it.

 That doesn't help with the goal of standalone docs.


Sorry, don't understand this.

 Oh, you mean running something *different* on docs.racket-lang.org?

That is one possibility. The other option is to always make an ajax
request to the full text search. It's asynchronous, so it won't stop
page rendering, and if it doesn't return successfully (no Internet
connection, for example) the user experience won't be affected (beyond
not having the full text results in addition to the current javascript
index results).

 (And the search can be
 solved in an even easier way with a google custom search.)

Ok. I thought there were issues with Google, but, yeah, if it works it
is certainly easier than setting up Lucene.

N.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Eli Barzilay
About a minute ago, Noel Welsh wrote:
 On Fri, Aug 5, 2011 at 8:12 AM, Eli Barzilay e...@barzilay.org wrote:
  About a minute ago, Noel Welsh wrote:
  With the power of asynchronous requests (aka ajax) it is. I've
  gotta fix Myna first; maybe then I'll have a spare moment to
  implement it.
 
  That doesn't help with the goal of standalone docs.
 
 Sorry, don't understand this.

Having the documentation available through your installation,
off-line, and holding documentation of misc packages that you
installed.


  Oh, you mean running something *different* on
  docs.racket-lang.org?
 
 That is one possibility. The other option is to always make an ajax
 request to the full text search. It's asynchronous, so it won't stop
 page rendering, and if it doesn't return successfully (no Internet
 connection, for example) the user experience won't be affected
 (beyond not having the full text results in addition to the current
 javascript index results).

Ah, if you mean a way to have both kinds of searches work on your
installation, then that's certainly a solution.  (But my guess is that
it'll be even more difficult to set up.)


  (And the search can be solved in an even easier way with a google
  custom search.)
 
 Ok. I thought there were issues with Google, but, yeah, if it works
 it is certainly easier than setting up Lucene.

Well, the issue was exactly the dependency on an on-line connection
and no user-specific docs.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Noel Welsh
On Fri, Aug 5, 2011 at 8:45 AM, Eli Barzilay e...@barzilay.org wrote:
 Ah, if you mean a way to have both kinds of searches work on your
 installation

Yes.

 Well, the issue was exactly the dependency on an on-line connection
 and no user-specific docs.

For the first, the ajax request should get around it. For the second:
m'eh. You'll still get the JS index results. One could transmit the
set of installed packages to the full text server, but the great is
the enemy of the good, and it just needs to be good enough.

N.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Shriram Krishnamurthi
Noel is absolutely right.

We live in an era where Search Just Works.  I do dozens of Google
searches on most days.  To go from there to Help Desk is an incredibly
jarring experience.  I have to load new instructions into my head:
stick to one word, stem!, etc., that I haven't had to use on
search engines since the late 1990s.

Even though I like to program on flights and trains, where Eli's
concerns apply completely, I am also fully aware that I cannot get
various services while disconnected.  What is unconscionable is that
I can't do *better* while connected to the internet.

Shriram
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Matthias Felleisen

It was my Diplomarbeit finished in 1983, so that makes it 28 years now. 



On Aug 5, 2011, at 12:17 AM, Shriram Krishnamurthi wrote:

 This idea is proposed roughly every 2-3 years for at least 30 years.
 I am not aware of anyone having made this idea fly.
 
 Shriram
 
 On Fri, Aug 5, 2011 at 12:13 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 I too tried it (ages ago) and ended up roughly where Eli is, but I
 didn't want to judge since I wasn't actually trying to use it for
 something useful (and, as we all know, that can change how you use
 things and how well they work for you). So I wonder if anyone has a
 positive experience with this kind of searching in an in anger kind
 of setting?
 
 Robby
 
 On Thu, Aug 4, 2011 at 9:08 PM, Eli Barzilay e...@barzilay.org wrote:
 6 minutes ago, Asumu Takikawa wrote:
 A few of us in the lab today were discussing how the Haskell
 community has this nice tool called Hoogle
 (http://www.haskell.org/hoogle) that lets you search Haskell docs by
 type.
 
 Are there any *practical* uses for that thing?
 
 (Not a flame, I tried it a few times, and it looked like i might be
 useful in a language where you use point-free style to compose
 functions -- so you might know the type that you need `(a - b - c)
 - (b - c - a)' but not the `flip' name.  But such serches don't
 see, to work.  So from this shallow scan, it looks like one of these
 things that sound cool on paper, but are useless in practice.)
 
 
 Is it at all feasible to supplement Racket's doc search to display
 contracts
 
 That won't be hard in itself, but the real problem is huge blocks of
 text in the results which would make it much less useful.
 
 and/or search by contract? (or type for TR)
 
 That would be more difficult, since the search will need to do a lot
 more work.  I'm also guessing that given that we have much more *text*
 in contracts (as in integer and resolved-module-path?), it will
 make searching show way more false positives.
 
 --
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev
 
 
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev
 
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Shriram Krishnamurthi
I suspect your related work section missed a few. (-:

On Fri, Aug 5, 2011 at 10:06 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 It was my Diplomarbeit finished in 1983, so that makes it 28 years now.



 On Aug 5, 2011, at 12:17 AM, Shriram Krishnamurthi wrote:

 This idea is proposed roughly every 2-3 years for at least 30 years.
 I am not aware of anyone having made this idea fly.

 Shriram

 On Fri, Aug 5, 2011 at 12:13 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 I too tried it (ages ago) and ended up roughly where Eli is, but I
 didn't want to judge since I wasn't actually trying to use it for
 something useful (and, as we all know, that can change how you use
 things and how well they work for you). So I wonder if anyone has a
 positive experience with this kind of searching in an in anger kind
 of setting?

 Robby

 On Thu, Aug 4, 2011 at 9:08 PM, Eli Barzilay e...@barzilay.org wrote:
 6 minutes ago, Asumu Takikawa wrote:
 A few of us in the lab today were discussing how the Haskell
 community has this nice tool called Hoogle
 (http://www.haskell.org/hoogle) that lets you search Haskell docs by
 type.

 Are there any *practical* uses for that thing?

 (Not a flame, I tried it a few times, and it looked like i might be
 useful in a language where you use point-free style to compose
 functions -- so you might know the type that you need `(a - b - c)
 - (b - c - a)' but not the `flip' name.  But such serches don't
 see, to work.  So from this shallow scan, it looks like one of these
 things that sound cool on paper, but are useless in practice.)


 Is it at all feasible to supplement Racket's doc search to display
 contracts

 That won't be hard in itself, but the real problem is huge blocks of
 text in the results which would make it much less useful.

 and/or search by contract? (or type for TR)

 That would be more difficult, since the search will need to do a lot
 more work.  I'm also guessing that given that we have much more *text*
 in contracts (as in integer and resolved-module-path?), it will
 make searching show way more false positives.

 --
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev



_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Noel Welsh
On Fri, Aug 5, 2011 at 4:44 PM, Stephen Chang stch...@ccs.neu.edu wrote:
 For online, full-text search, couldn't one just use google and add
 site:docs.racket-lang.org to the query?

Yeah, that seems to do it. The ordering of results is a bit odd
sometimes. I don't know the details but Google offers site specific
search under certain conditions. I think the site specific search is
basically equivalent what you suggest.

N.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-05 Thread Jens Axel Søgaard
2011/8/5 Stephen Chang stch...@ccs.neu.edu

For online, full-text search, couldn't one just use google and add
 site:docs.racket-lang.org to the query?


The Google stemmer is well-suited for natural languages.
It sucks for Scheme/Racket identifiers.

Try for example to find cons* or list? .

/Jens Axel
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Roogle?

2011-08-04 Thread Eli Barzilay
6 minutes ago, Asumu Takikawa wrote:
 A few of us in the lab today were discussing how the Haskell
 community has this nice tool called Hoogle
 (http://www.haskell.org/hoogle) that lets you search Haskell docs by
 type.

Are there any *practical* uses for that thing?

(Not a flame, I tried it a few times, and it looked like i might be
useful in a language where you use point-free style to compose
functions -- so you might know the type that you need `(a - b - c)
- (b - c - a)' but not the `flip' name.  But such serches don't
see, to work.  So from this shallow scan, it looks like one of these
things that sound cool on paper, but are useless in practice.)


 Is it at all feasible to supplement Racket's doc search to display
 contracts

That won't be hard in itself, but the real problem is huge blocks of
text in the results which would make it much less useful.

 and/or search by contract? (or type for TR)

That would be more difficult, since the search will need to do a lot
more work.  I'm also guessing that given that we have much more *text*
in contracts (as in integer and resolved-module-path?), it will
make searching show way more false positives.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-04 Thread Shriram Krishnamurthi
This idea is proposed roughly every 2-3 years for at least 30 years.
I am not aware of anyone having made this idea fly.

Shriram

On Fri, Aug 5, 2011 at 12:13 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 I too tried it (ages ago) and ended up roughly where Eli is, but I
 didn't want to judge since I wasn't actually trying to use it for
 something useful (and, as we all know, that can change how you use
 things and how well they work for you). So I wonder if anyone has a
 positive experience with this kind of searching in an in anger kind
 of setting?

 Robby

 On Thu, Aug 4, 2011 at 9:08 PM, Eli Barzilay e...@barzilay.org wrote:
 6 minutes ago, Asumu Takikawa wrote:
 A few of us in the lab today were discussing how the Haskell
 community has this nice tool called Hoogle
 (http://www.haskell.org/hoogle) that lets you search Haskell docs by
 type.

 Are there any *practical* uses for that thing?

 (Not a flame, I tried it a few times, and it looked like i might be
 useful in a language where you use point-free style to compose
 functions -- so you might know the type that you need `(a - b - c)
 - (b - c - a)' but not the `flip' name.  But such serches don't
 see, to work.  So from this shallow scan, it looks like one of these
 things that sound cool on paper, but are useless in practice.)


 Is it at all feasible to supplement Racket's doc search to display
 contracts

 That won't be hard in itself, but the real problem is huge blocks of
 text in the results which would make it much less useful.

 and/or search by contract? (or type for TR)

 That would be more difficult, since the search will need to do a lot
 more work.  I'm also guessing that given that we have much more *text*
 in contracts (as in integer and resolved-module-path?), it will
 make searching show way more false positives.

 --
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-04 Thread Asumu Takikawa
On 2011-08-05 00:08:03 -0400, Eli Barzilay wrote:
 Are there any *practical* uses for that thing?

It could be useful if you have an idea of the name of the thing you're
looking for and then want to narrow it down by type. Or you know you
want a higher order function that works on a list but don't know where
it is (so you look up (a - b) - [a]). 

The first example on Hoogle for that search is in GHC.Exts so if that's
what you wanted it would be harder to find by browsing.

That said, I'm not a heavy Hoogle user so I don't know.

 That won't be hard in itself, but the real problem is huge blocks of
 text in the results which would make it much less useful.

I think this would be a more useful feature than the searching. Maybe it
could display optionally or truncated if it's too long.

Another nice thing Hoogle does is search Hackage, but I think that's
been discussed here before (and probably depends on how packages end up?).

Cheers,
Asumu
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-04 Thread Eli Barzilay
10 minutes ago, Asumu Takikawa wrote:
 On 2011-08-05 00:08:03 -0400, Eli Barzilay wrote:
  Are there any *practical* uses for that thing?
 
 It could be useful if you have an idea of the name of the thing
 you're looking for and then want to narrow it down by type.

An important difference is that we often use the same names in the
contracts.


 Or you know you want a higher order function that works on a list
 but don't know where it is (so you look up (a - b) - [a]).

(Yes, that's the use case that I thought would be common, but I doubt
that it's used for that in practice.)


  That won't be hard in itself, but the real problem is huge blocks
  of text in the results which would make it much less useful.
 
 I think this would be a more useful feature than the searching.
 Maybe it could display optionally or truncated if it's too long.

Even tiny contracts tend to be big, so a good UI will be challenging.


 Another nice thing Hoogle does is search Hackage, but I think that's
 been discussed here before (and probably depends on how packages end
 up?).

Yes.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-04 Thread Neil Van Dyke

Shriram Krishnamurthi wrote at 08/05/2011 12:17 AM:

This idea is proposed roughly every 2-3 years for at least 30 years.
I am not aware of anyone having made this idea fly.


If you have a info retrieval method with useful precisionrecall, but 
the barrier to adoption is the user's overhead in invoking the 
feature... you might help it fly by not requiring user to invoke it.


For general example, something done automatically, context-sensitive, 
that user can perceive in subtle visual annotations, or by glancing into 
another part of the window, or something.


For more specific, and potentially quite simple example: your 
editor/viewer/browser knows what bits of text you're editing or looking 
at (cursor, what's visible in window, document, movement, maybe even 
gaze-tracking), and in some little window provides a ranked list of info 
(perhaps document links/excerpts) it thinks might be relevant at the 
moment. People including myself have used this approach successfully for 
IR problems.


--
http://www.neilvandyke.org/
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Roogle?

2011-08-04 Thread Eli Barzilay
8 minutes ago, Anthony Cowley wrote:
 On Fri, Aug 5, 2011 at 1:22 AM, Eli Barzilay e...@barzilay.org wrote:
  That's not surprising -- the question is how much the
  search-by-type feature is used vs the plain by-name searches.
 
 Search-by-type is the main useful feature. Another search engine,
 hayoo, often does better on name-based searches covering
 hackage. Some people run local instances of hoogle as it is
 relatively straightforward to hook into emacs and will index all the
 types and names from all the packages you have installed locally.

OK, that sounds closer to what I asked...  (And on the positive side.)


  We already have that kind of exploratory searching, since types
  in the contract system are real functions.
 
  I guess that this is another way to make the point: in Haskell and
  other statically typed languages types are second-class, but in
  Racket they're first class so looking for a type name will get you
  information because it's also a binding.  (And the same goes for
  TR, only those are not runtime values.)
 
 Searching by type names and aliases works fine:
 http://www.haskell.org/hoogle/?hoogle=String

Yes, what I'm saying is that in Haskell, if you have a tool that
searches for bound values, you won't get types, therefore you need to
have a specific tool (or extension of one) that can search types.  In
Racket, then contract type is `string?', which is something that you
can look for even without a special by-contract search.


 Hoogle really is quite good, don't sell it short!

I'm not -- the above point is in no way saying anything bad about it,
it's just an observation about the differences between the two
language worlds.

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

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev