Shoot. I wrote the wrong thing.
Try this:

echo "(+ 2 2)" |nc -N localhost 17001

The -N flag closes the socket after getting the reply, otherwise it
hangs waiting for more input.
So you'd replace the echo by php print and pipe to command.

-- Linas

On Mon, Dec 20, 2021 at 4:10 PM Linas Vepstas <[email protected]> wrote:
>
> On Mon, Dec 20, 2021 at 3:39 PM Ivan V. <[email protected]> wrote:
> >
> > Ok, this was fun...
> >
> > I restarted the computer in the meanwhile, deleted the whole OpenCog, and 
> > recloned and rebuilt everything without any problems. This time I put all 
> > the additional assets I needed like cogserver under `opencog` directory, if 
> > that means anything.
>
> You should be able to `git clone` to anywhere  at all.  And after
> building, saying `sudo make install` puts everything under the
> `/usr/local` directory.
>
> My guess is that you had old and incompatible clones:  you would have
> to say `git pull` in all repos, to get a self-consistent version.
>
> > Cogserver is now up and running on port 17001, successfully communicating 
> > to rlwrap telnet. The initial test went fine.
> >
> > Next, the plan is to telnet it from php, and pipe it to html visualizer, if 
> > that's ok.
>
> probably the simplest way to do this is by wrapping php around netcat.
> Warning, there are two incompatible versions of netcat you can
> install. They are *almost* compatible, but not quite; one needs an
> extra flag that the other doesn't, else it hangs up too soon.
>
> I have the bsd version installed the package is `netcat-openbsd`
>
> Use it like so: `nc localhost 17001 (+ 2 2)`  or `nc localhost 17001
> (cog-prt-atomspace)` and so on.
>
> > Wish me luck :)
>
> Good luck!  and Merry Christmas, too!
>
> -- linas
>
> >
> > - ivan -
> >
> > pon, 20. pro 2021. u 20:00 Linas Vepstas <[email protected]> napisao 
> > je:
> >>
> >> On Sun, Dec 19, 2021 at 2:11 PM Ivan V. <[email protected]> wrote:
> >> >
> >> > Hi Linas and others,
> >> >
> >> > Sorry for the delay, I've been busy with my other projects. Now I tried 
> >> > to install OpenCog, made through several make steps until my machine 
> >> > started to hang. Tried several times, it always hangs on the same build 
> >> > step. I guess this is a penalty for having only 4GB on my machine, right?
> >>
> >> It builds just fine on my six-year-old 1GB laptop (which cost $200
> >> when new, so low end from the get-go.).  I can even browse the web
> >> while it's building.
> >>
> >> Open a bug report. describe the problem.
> >>
> >> > And then I tried another option: I installed OpenCog from here: 
> >> > `https://github.com/opencog/docker`. I tried to follow `README.md` 
> >> > instructions, ran `./docker-build.sh -a` (the script successfully 
> >> > completed), but then I got stuck starting cogserver because the 
> >> > `cogserver/build/` folder is empty.
> >>
> >> The docker containers are possibly stale.
> >>
> >> --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 view this discussion on the web visit 
> >> https://groups.google.com/d/msgid/opencog/CAHrUA34a2O624WCfk821t3wqUEYeg0WM%2B571AOKxGG2cCUB_xA%40mail.gmail.com.
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/opencog/CAB5%3Dj6WYVbV14e4xZPWYJm-iEnzNdi21YXQK%2BbmWRa5f%2B29j4w%40mail.gmail.com.
>
>
>
> --
> Patrick: Are they laughing at us?
> Sponge Bob: No, Patrick, they are laughing next to us.



-- 
Patrick: Are they laughing at us?
Sponge Bob: No, Patrick, they are laughing next to us.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/CAHrUA37akk%2BRSWdUWMQs7x%2Bhz02CYBN0x%2BWrVOL6qycPmtk3cA%40mail.gmail.com.

Reply via email to