lambdabot hoogle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

lambdabot hoogle

Jacek Generowicz
I have recenly installed lambdabot. Its response to *each* *and*  
*every* hoogle command is *always*

     A Hoogle error occurred.

I'm hoping that someone on Cafe might be able to offer a more helpful  
diagnosis than this ... erm ... terse ... error message.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Mark Wright
On Wed, 25 May 2011 02:20:39 +0200, Jacek Generowicz <[hidden email]> wrote:
> I have recenly installed lambdabot. Its response to *each* *and*  
> *every* hoogle command is *always*
>
>      A Hoogle error occurred.
>
> I'm hoping that someone on Cafe might be able to offer a more helpful  
> diagnosis than this ... erm ... terse ... error message.

Hi Jacek,

The lambdabot hoogle command requires hoogle to be installed locally,
and to work.  Hence the first thing to ty is to run the hoogle command
line version, something like:

hoogle '[a] -> a'

If that doesn't work, maybe try building some hoogle databases.  One way to
do that is to run (on gentoo this needs to be run as root):

hoogle data

And if that works, to try it again:

hoogle '[a] -> a'

And if all that works hopefully it should work in lambdabot.  It
works in the gentoo-haskell overlay.

Regards, Mark

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Jacek Generowicz

On 2011 May 25, at 05:53, Mark Wright wrote:

> On Wed, 25 May 2011 02:20:39 +0200, Jacek Generowicz <[hidden email]
> > wrote:
>> I have recenly installed lambdabot. Its response to *each* *and*
>> *every* hoogle command is *always*
>>
>>     A Hoogle error occurred.
>>
>> I'm hoping that someone on Cafe might be able to offer a more helpful
>> diagnosis than this ... erm ... terse ... error message.
>
> Hi Jacek,

Hi Mark,

> The lambdabot hoogle command requires hoogle to be installed locally,
> and to work.

Ah. Thank you. I had assumed that it connected to a server.

(Maybe my assumption was not entirely unfounded, given that the  
installation instructions for lambdabot blithely state that you "just  
cabal install lambdabot", nowhere suggesting that you might need to  
*manually* install some of its dependencies.)

> Hence the first thing to ty is to run the hoogle command
> line version, something like:
>
> hoogle '[a] -> a'
>
> If that doesn't work, maybe try building some hoogle databases.

First I needed to 'cabal install hoogle'. Having done that, I needed  
to do what you suggested:

> hoogle data

Which works swimmingly on Ubuntu, but fails on OS X, because wget  
seems to be hard-wired. I seem to recall that at least one of the  
packages that I installed over the last 2 days, automatically selected  
wget on Ubuntu, and curl on OS X.

Any pointers to the least painful way of getting 'hoogle data' to work  
on OS X?

Once I have the hoogle command line version working, it seems that  
lambdabot truncates its output to just the first 3 lines. Is this  
normal? Is there a way of customizing or changing this behaviour?


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Mark Wright
On Wed, 25 May 2011 12:22:24 +0200, Jacek Generowicz <[hidden email]> wrote:

>
> On 2011 May 25, at 05:53, Mark Wright wrote:
>
> > On Wed, 25 May 2011 02:20:39 +0200, Jacek Generowicz <[hidden email]
> > > wrote:
> >> I have recenly installed lambdabot. Its response to *each* *and*
> >> *every* hoogle command is *always*
> >>
> >>     A Hoogle error occurred.
> >>
> >> I'm hoping that someone on Cafe might be able to offer a more helpful
> >> diagnosis than this ... erm ... terse ... error message.
> >
> > Hi Jacek,
>
> Hi Mark,
>
> > The lambdabot hoogle command requires hoogle to be installed locally,
> > and to work.
>
> Ah. Thank you. I had assumed that it connected to a server.
>
> (Maybe my assumption was not entirely unfounded, given that the  
> installation instructions for lambdabot blithely state that you "just  
> cabal install lambdabot", nowhere suggesting that you might need to  
> *manually* install some of its dependencies.)
>
> > Hence the first thing to ty is to run the hoogle command
> > line version, something like:
> >
> > hoogle '[a] -> a'
> >
> > If that doesn't work, maybe try building some hoogle databases.
>
> First I needed to 'cabal install hoogle'. Having done that, I needed  
> to do what you suggested:
>
> > hoogle data
>
> Which works swimmingly on Ubuntu, but fails on OS X, because wget  
> seems to be hard-wired. I seem to recall that at least one of the  
> packages that I installed over the last 2 days, automatically selected  
> wget on Ubuntu, and curl on OS X.
>
> Any pointers to the least painful way of getting 'hoogle data' to work  
> on OS X?

Hi Jacek,

Sorry I have no idea about OS X, hopefully someone else might know.

I assume your test on OS X was with the latest hoogle version so that
old issues would no longer be relevant:

http://code.google.com/p/ndmitchell/issues/detail?id=429
 
> Once I have the hoogle command line version working, it seems that  
> lambdabot truncates its output to just the first 3 lines. Is this  
> normal?

Yes.

> Is there a way of customizing or changing this behaviour?

No (other than patching lambdabot), so the obvious workaround is to run
the hoogle from the command line.

Regards, Mark

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Jacek Generowicz

On 2011 May 25, at 13:10, Mark Wright wrote:

> I assume your test on OS X was with the latest hoogle version so that
> old issues would no longer be relevant:

I would be surprised if it weren't the latest, as I started installing  
everything from scratch a couple of days ago.

Anyway, my hoogle version is 4.2.3, which is the most recent, AFAICT  
(ie, it's the highest version number on hackage) but I have tripped  
over so many things on this trip, that I wouldn't be surprised by  
anything any more.

>
>> Once I have the hoogle command line version working, it seems that
>> lambdabot truncates its output to just the first 3 lines. Is this
>> normal?
>
> Yes.
>
>> Is there a way of customizing or changing this behaviour?
>
> No (other than patching lambdabot), so the obvious workaround is to  
> run
> the hoogle from the command line.

Understood.

Thank you.




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Gwern Branwen
In reply to this post by Jacek Generowicz
On Wed, May 25, 2011 at 6:22 AM, Jacek Generowicz
<[hidden email]> wrote:
> I had assumed that it connected to a server.

It did at one point, but Hoogle had downtime and the local hoogle
command was just as good and worked offline.

> (Maybe my assumption was not entirely unfounded, given that the installation
> instructions for lambdabot blithely state that you "just cabal install
> lambdabot", nowhere suggesting that you might need to *manually* install
> some of its dependencies.)

Well, does every lambdabot user want mueval and hoogle installed? In
those specific cases because they export libraries as well, I could
add a dependency on the library; but cabal doesn't support
dependencies for pure executable packages.

> Once I have the hoogle command line version working, it seems that lambdabot
> truncates its output to just the first 3 lines. Is this normal? Is there a
> way of customizing or changing this behaviour?

It's normal, yeah. Don't want to spam #haskell with 100 lines of
useless matches. Configurable? Not really.

--
gwern
http://www.gwern.net

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Jacek Generowicz

On 2011 May 25, at 16:41, Gwern Branwen wrote:

> On Wed, May 25, 2011 at 6:22 AM, Jacek Generowicz
> <[hidden email]> wrote:
>> I had assumed that it connected to a server.
>
> It did at one point, but Hoogle had downtime and the local hoogle
> command was just as good and worked offline.

Makes sense.

>
>> (Maybe my assumption was not entirely unfounded, given that the  
>> installation
>> instructions for lambdabot blithely state that you "just cabal  
>> install
>> lambdabot", nowhere suggesting that you might need to *manually*  
>> install
>> some of its dependencies.)
>
> Well, does every lambdabot user want mueval and hoogle installed?

Quite possibly not, but it would it be too much to ask, to have the  
documentation mention that they need to be installed separately if you  
intend to use them through lambdabot?

I've already stumbled across mueval and hoogle as things that need to  
be installed separately before the full advertized features of  
lambdabot work.

With this experience under my belt and the benefit of hindsight, I  
vaguely, almost, kinda, maybe see how I could have guessed that the  
stubborn response "A Hoogle error occurred." to any hoogle command in  
lambdabot, means that I need to install hoogle locally:

'hoogle ...' --> "A Hoogle error occurred." ==> install hoogle.

But how on earth was I supposed to guess that in order to make 'check'  
work, the package to install was 'mueval', given that the error  
message was "Terminated"?

'check ...' --> "Terminated" ==> install mueval.

Hmmm.

What other lambdabot features rely on packages that need to be  
installed separately?

>
>> Once I have the hoogle command line version working, it seems that  
>> lambdabot
>> truncates its output to just the first 3 lines. Is this normal? Is  
>> there a
>> way of customizing or changing this behaviour?
>
> It's normal, yeah. Don't want to spam #haskell with 100 lines of
> useless matches.

Agreed. I guessed that this would be the motivation.

> Configurable? Not really.

OK.

Thank you.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Gwern Branwen
On Wed, May 25, 2011 at 11:08 AM, Jacek Generowicz
<[hidden email]> wrote:
> Quite possibly not, but it would it be too much to ask, to have the
> documentation mention that they need to be installed separately if you
> intend to use them through lambdabot?

I've just added them to the dependencies.

> I've already stumbled across mueval and hoogle as things that need to be
> installed separately before the full advertized features of lambdabot work.
>
> With this experience under my belt and the benefit of hindsight, I vaguely,
> almost, kinda, maybe see how I could have guessed that the stubborn response
> "A Hoogle error occurred." to any hoogle command in lambdabot, means that I
> need to install hoogle locally:
>
> 'hoogle ...' --> "A Hoogle error occurred." ==> install hoogle.
>
> But how on earth was I supposed to guess that in order to make 'check' work,
> the package to install was 'mueval', given that the error message was
> "Terminated"?
>
> 'check ...' --> "Terminated" ==> install mueval.

You weren't really meant to - lambdabot isn't exactly meant for anyone
who won't look at the source when something goes wrong. It's only
half-maintained by me; I do easy fixes but nothing else since the
lambdabot codebase is large and IMO rotten.

> Hmmm.
>
> What other lambdabot features rely on packages that need to be installed
> separately?

Brainfuck and unlambda are separate executables, but they already have deps.

--
gwern
http://www.gwern.net

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Neil Mitchell
In reply to this post by Jacek Generowicz
Hi Jacek,

> Which works swimmingly on Ubuntu, but fails on OS X, because wget seems to
> be hard-wired. I seem to recall that at least one of the packages that I
> installed over the last 2 days, automatically selected wget on Ubuntu, and
> curl on OS X.

I see someone raised a bug for this:
http://code.google.com/p/ndmitchell/issues/detail?id=434 - it's a very
reasonable idea, which I'll include in the next version. Then if you
have either wget or curl it will work.

> Any pointers to the least painful way of getting 'hoogle data' to work on OS
> X?

Set up a shell alias so wget just calls curl? Install wget on OS X? If
neither of these is feasible let me know and I'll rush out a new
version of Hoogle.

Thanks, Neil

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Jacek Generowicz

On 2011 May 25, at 21:04, Neil Mitchell wrote:

> Hi Jacek,

Hi Neil,

>> Any pointers to the least painful way of getting 'hoogle data' to  
>> work on OS
>> X?
>
> Set up a shell alias so wget just calls curl?

Their interfaces are different. (Though maybe there's some option  
which makes curl sufficiently similar to wget, but I haven't bothered  
to look because ...)

> Install wget on OS X?

Yes. Download, untar, configure, make, sudo make install ... did the  
trick in about two minutes.

(Kinda obvious really, wasn't it! I plead mitigating circumstances  
because my brain has been beaten to a pulp by all the stumbling  
through installations I have been doing over the last 3 days.)

Thanks.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Jacek Generowicz
In reply to this post by Gwern Branwen

On 2011 May 25, at 17:42, Gwern Branwen wrote:

> On Wed, May 25, 2011 at 11:08 AM, Jacek Generowicz
> <[hidden email]> wrote:
>
>> I've already stumbled across mueval and hoogle as things that need  
>> to be
>> installed separately before the full advertized features of  
>> lambdabot work.
>>
>> With this experience under my belt and the benefit of hindsight, I  
>> vaguely,
>> almost, kinda, maybe see how I could have guessed that the stubborn  
>> response
>> "A Hoogle error occurred." to any hoogle command in lambdabot,  
>> means that I
>> need to install hoogle locally:
>>
>> 'hoogle ...' --> "A Hoogle error occurred." ==> install hoogle.
>>
>> But how on earth was I supposed to guess that in order to make  
>> 'check' work,
>> the package to install was 'mueval', given that the error message was
>> "Terminated"?
>>
>> 'check ...' --> "Terminated" ==> install mueval.
>
> You weren't really meant to - lambdabot isn't exactly meant for anyone
> who won't look at the source when something goes wrong.

Understood. Fair enough.

I feel a bit guilty about spamming the list with all my stupid  
problems: I would prefer to find my own way around, but if I had to  
dive in and rummage around the source for every problem that I  
encounter, I would not get very far.

>> What other lambdabot features rely on packages that need to be  
>> installed
>> separately?
>
> Brainfuck and unlambda are separate executables, but they already  
> have deps.

I must admit that hoogle and check were far stronger incentives to try  
to intstall lambdabot, than brainfuck and unlambda :-)


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Brandon Moore-2
> From: Jacek Generowicz Sent: May 25, 2011 2:45 PM

> On 2011 May 25, at 17:42, Gwern Branwen wrote:
>
>>  On Wed, May 25, 2011 at 11:08 AM, Jacek Generowicz
>>  <[hidden email]> wrote:
>>
>>>  I've already stumbled across mueval and hoogle as things that need
> to be
>>>  installed separately before the full advertized features of lambdabot
> work.
>>>
>>>  With this experience under my belt and the benefit of hindsight, I
> vaguely,
>>>  almost, kinda, maybe see how I could have guessed that the stubborn
> response
>>>  "A Hoogle error occurred." to any hoogle command in
> lambdabot, means that I
>>>  need to install hoogle locally:
>>>
>>>  'hoogle ...' --> "A Hoogle error occurred." ==>
> install hoogle.
>>>
>>>  But how on earth was I supposed to guess that in order to make
> 'check' work,
>>>  the package to install was 'mueval', given that the error
> message was
>>>  "Terminated"?
>>>
>>>  'check ...' --> "Terminated" ==> install
> mueval.
>>
>>  You weren't really meant to - lambdabot isn't exactly meant for
> anyone
>>  who won't look at the source when something goes wrong.
>
> Understood. Fair enough.
>
> I feel a bit guilty about spamming the list with all my stupid problems: I would
> prefer to find my own way around, but if I had to dive in and rummage around the
> source for every problem that I encounter, I would not get very far.

I'm not particularly interested in lambdabot myself, but this seems like a reasonable
conversation for this list, and the sort of thing that's nice to have recorded in the
mailing list archives - and hopefully folded back into appropriate package descriptions
and wiki pages.

I wonder a few quick greps for error messages in the source code might have turned
up something useful without too much trouble, but from skimming messages it seems
your efforts have been at least as much as can reasonably be expected for installing a
cabal package without big giant disclaimers.

Brandon

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

Jacek Generowicz

On 2011 May 25, at 23:20, Brandon Moore wrote:

>> From: Jacek Generowicz Sent: May 25, 2011 2:45 PM
>>
>> I feel a bit guilty about spamming the list with all my stupid  
>> problems: I would
>> prefer to find my own way around, but if I had to dive in and  
>> rummage around the
>> source for every problem that I encounter, I would not get very far.
>
> I'm not particularly interested in lambdabot myself, but this seems  
> like a reasonable
> conversation for this list, and the sort of thing that's nice to  
> have recorded in the
> mailing list archives - and hopefully folded back into appropriate  
> package descriptions
> and wiki pages.

I'm hoping to find some time at the end of this journey to gather  
together what I have learned on the way, and to try to feed some of  
the information back into relevant places. (Any pointers on how to do  
this most productively would be welcome.) But my fear is that by the  
time I am done, I will have used up all my Haskell time for this  
quarter.

> I wonder a few quick greps for error messages in the source code  
> might have turned
> up something useful without too much trouble,

I wonder myself too. From my point of complete ignorance about how the  
packages are put together, and almost complete ignorance about cabal,  
it's difficult to judge when (and for how long) it's worth digging in  
with grep etc.: sometimes it will be a fruitful exercise, and  
sometimes not. Sometimes someone else will understand my problem  
faster than I can type "grep", and sometimes not.

So my tactic is to dig a little, then send out a cry for help, before  
digging further.

> but from skimming messages it seems
> your efforts have been at least as much as can reasonably be  
> expected for installing a
> cabal package without big giant disclaimers.

Thank you for your kind words. I hope that most others find my spam as  
inoffensive as you do.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: lambdabot hoogle

wren ng thornton
In reply to this post by Brandon Moore-2
On 5/25/11 5:20 PM, Brandon Moore wrote:

>> From: Jacek Generowicz Sent: May 25, 2011 2:45 PM
>> On 2011 May 25, at 17:42, Gwern Branwen wrote:
>> I feel a bit guilty about spamming the list with all my stupid problems: I would
>> prefer to find my own way around, but if I had to dive in and rummage around the
>> source for every problem that I encounter, I would not get very far.
>
> I'm not particularly interested in lambdabot myself, but this seems like a reasonable
> conversation for this list, and the sort of thing that's nice to have recorded in the
> mailing list archives - and hopefully folded back into appropriate package descriptions
> and wiki pages.

I've been curious to try installing lambdabot before, but could never
get it working due to stuff like this. So it's nice to see the questions
and solutions all laid out :)

--
Live well,
~wren

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe