Kevin
10/15/2006 12:52:00 PM
On Oct 15, 5:51 am, "M. Edward (Ed) Borasky" <z...@cesmail.net> wrote:
> Yacao Wang wrote:
> > Actually I've been thinking of creating an auto-backtracking engine for
> > ruby
> > based on the Prolog engine, because it's so much fun to play with
> > non-deterministic programming. But I haven't got the time to do it. Has
> > anyone have similar ideas or implementations?
>
> > On 15/10/06, _Kevin <kevin.olbr...@gmail.com> wrote:
>
> >> On Oct 14, 7:54 pm, "M. Edward (Ed) Borasky" <z...@cesmail.net> wrote:
> >> > _Kevin wrote:
> >> > > Anyone had any experience interfacing Prolog with Ruby?
>
> >> > > _KevinWhat is it you're trying to accomplish? It seems to me, at
> >> least
> >> on an
> >> > open source platform, all you'd need to do would be to install a Prolog
> >> > interpreter/compiler, and then build Prolog source with Ruby and "shell
> >> > out" to Prolog. Is there something more "intimately interconnected" you
> >> > had in mind?
>
> >> Probably not. I anticipate that I may need to interface with a
> >> particular Prolog application that a colleague has developed, and since
> >> the extent of my knowlege of prolog consists mostly of how to spell it,
> >> I thought I might enquire about how well it plays with ruby.
>
> >> Shelling out might be all I need.
>
> >> Thanks Ed.
>
> >> _KevinWell ... I just took a look at all the Prolog implementations in
> Gentoo's Portage repository. There are about five of them, plus another
> package for logic programming called "mercury". All of them appear to be
> callable as libraries from C, which means you could wrap them as C
> extensions fairly easily with SWIG, or even by hand. As usual, a lot of
> this magic works well on Linux, probably almost as well on MacOS and
> Solaris, possibly on CygWin and probably with some heavy lifting on
> native Windows.
Thanks again, Ed. That helps.
_Kevin