On Sun, Sep 3, 2017 at 5:23 AM, Masayuki Hatta <[email protected]> wrote:
> Hi, > > I may be completely wrong, but is this the expected behavior? > > 1) touch test.txt and edit something like: > > scm > (process-query "mhatta" "Hello now!) > (+ 2 2) > > 2) > > $ cat test.txt | netcat localhost 17004 > Entering scheme shell; use ^D or a single . on a line by itself to exit. > guile> ... ... > Yes, that should work. And it should reply like the chatbot does. > > If I change "scm" to "scm hush", then the prompt is not shown, so seems > the first line is evaluated somehow. > Yes. The only thing that "scm hush" does is to hide the prompt. That way, the text output from scheme/guile can be sent directly to IRC. That is, if you call some scheme function, and that scheme funcction prints some text, that text goes to IRC without any changes. So "scm hush" just prevents the prompt from being printed, so that it does not garbage up IRC. Otherwise, there should be no difference at all between what IRC does, and what telnet to port 17004 does. what version of guile are you using? Version 2.2 works best. Be careful not to compile with 2.0 and then use the 2.2 guile libraries, strange things will happen. Don't forget to experiment with "make clean" ... --linas -- *"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/CAHrUA36%3DO34g-9i-Yj_1F3Tnw8QULazwsomiNiMMNg169RuOfw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
