Eleanor McHugh wrote:
> On 15 Oct 2006, at 10:30, 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?
> 
> I've been considering implementing Icon-style backtracking for some
> time, but I'm always too busy with less interesting (but paid) projects.
> Ruby with goal-oriented convenience would certainly rock :)
> 
> Ellie
> 
> Eleanor McHugh
> Games With Brains
> ----
> raise ArgumentError unless @reality.responds_to? :reason
> 
> 
> 
> 

I'm starting to wonder, with about half a dozen open-source Prolog
compilers/interpreters, plus the performance tuned Mercury environment,
why one would want to "do Prolog tasks in Ruby?" The original poster was
interested mostly in integrating Ruby with a specific Prolog app, and
most likely could accomplish his goal with either "system" or something
enclosed in backticks.

And for people who want to truly marry Ruby with Prolog, or for that
matter any other open-source language, most of them are written in C and
have well-defined interfaces to other things written in C, such as the
Ruby interpreter. Of course, a lot of this magic only works on
GNU/Linux, but hey, that's why a lot of us *love* GNU/Linux!

Render unto Ruby what is Ruby's ... render unto Prolog what is Prolog's
(or Mercury's), and render unto R what is R's. They're *all* better than
Java! :)