On Fri, Sep 1, 2017 at 2:24 PM, Masayuki Hatta <[email protected]> wrote:

>
>
>> Yes, that would be correct.  Try removing the "scm hush" and see what
>> happens.
>>
>
> I removed "scm hush" (or "hush", the same result) from cmdline in
> nlp/irc/go-irc.cc, then I got
>
> 04:13 (cogita-bot) ola
> 04:13 (cogita-bot) here we are
> 04:13 (mhatta) cogita-bot: hello
> 04:13 (cogita-bot) Entering scheme shell; use ^D or a single . on a line
> by itself to exit.
> 04:13 (cogita-bot) [0;34mguile [1;34m> [0m
>
> (the last line is a decorated guile prompt, seems "ANSI_PROMPT=" " in
> opencog-chatbot.conf doesn't work.  if you want a plain prompt, need to set
> "ANSI_ENABLED = false", but anyway basically the same result)
>

Yes, that's OK, that's just for debugging. We need to put back the `scm
hush` after
the bug is solved...

>
> So cogita is successfully communicating with a local cogserver:17004,
>
Yes.


> but this "welcoming message" (?) might confuse it.
>

No, its fine.


> What is it supposed to be?
>

All that cogita does is to take whatever is printed to stdout by the
cogserver, and send it to IRC. It does not process this text in any way
(except maybe to remove newline chars or something trivial like that)

The fact that you are seeing the `Entering scheme shell` is a very good
thing.  It means that there is a connection to the cogserver, and that
stdout really is being returned to IRC.  So that's good.

So now, if you hack cogita to send `(+ 2 2)` to the cogserver, you should
seem something like:

04:13 (cogita-bot) Entering scheme shell; use ^D or a single . on a line by
itself to exit.
04:13 (cogita-bot) [0;34mguile [1;34m> [0m (+ 2 2)
04:13 (cogita-bot) 4
04:13 (cogita-bot) [0;34mguile [1;34m> [0m

or something close to that.  Sending `(display "this is a test\n")` should
result in

04:13 (cogita-bot) Entering scheme shell; use ^D or a single . on a line by
itself to exit.
04:13 (cogita-bot) [0;34mguile [1;34m> [0m (display "this is a test\n")
04:13 (cogita-bot) this is a test
04:13 (cogita-bot) [0;34mguile [1;34m> [0m

and sending  ` scm hush\n (display "this is a test\n")`  should result in

04:13 (cogita-bot) this is a test

without the guile prompts.

If the above all works, then it seems that `process-query` must somehow be
broken ... even though it worked when you typed it by hand!? Maybe it
breaks when you call it a second time?

Another possibility is that the socket to the cogserver got closed, before
the reply arrived.  Its hard to guess why this would happen.  You can test
this by sending `(sleep 3) (display "after big sleep\n")`

Another possibility is that the reply was generated, but somehow, the
output buffer was not flushed, and so the guile reply was not sent back to
cogita. But if the above sleep/display works, then this does not make sense
....

Another possibility is that the reply from the cogserver was posted, but
cogita did not pick it up.  But if the above sleep/display works, then this
also does not make sense ....

Its supposed to be a super-simple send-recv interface, there's not much
that can go wrong.  I tried to keep it super-simple, for exactly this
reason -- to minimize any room for bugs.

-- linas



>
> --
> You received this message because you are subscribed to the Google Groups
> "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/opencog/cb602d69-d8ec-483d-af1e-54e63001da5c%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/cb602d69-d8ec-483d-af1e-54e63001da5c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*"The problem is not that artificial intelligence will get too smart and
take over the world," computer scientist Pedro Domingos writes, "the
problem is that it's too stupid and already has." *

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/CAHrUA34RmfKp3Vxaj6QK63zMHgnmssnX-DkD6WU1vW6tn%3DXDuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to