Open grych opened 11 years ago
Hi! Thanks a lot for the feedback!
Unfortunately, currently it only works in 1.9.2. I use this mechanism to use constants for variables:
class << self
def self.const_missing name
:hello
end
end
Something # => :hello
This has worked in 1.9.2 and does not work in 1.9.3 and 2.0. I hope I can find a different solution with refinements for 2.0, but until mid July I cannot work much on it.
Is it possible for you to use it on 1.9.2? If not, I'll try to find a workaround.
By the way, I've just released 2.0pre1, so could you please use that version, as it has many new features and many differences in the DSL.
This has worked in 1.9.2 and does not work in 1.9.3 and 2.0. I hope I can find a different solution with refinements for 2.0, but until mid July I cannot work much on it.
Is it possible for you to use it on 1.9.2? If not, I'll try to find a workaround.
No problem, I will use 1.9.2. By the way, I've just released 2.0pre1, so could you please use that version, as it has many new features and many differences in the DSL.
I will take a look. Thx again!
Grych
As I can see for now, I have this problem too on Ruby 2.0.0-p195
if I use the rubylog do
syntax.
However, with the extend Rubylog::Context
one, it seems to work like a charm (on my own code at least, I did not run the examples).
Hi!
Great that you are interested in Rubylog. Unfortunately Ruby 1.9.3 and 2 include an improvement that makes implemememting the rubylog do
syntax impossible. So in this sense it is deprecated.
I got it :) I think it will be worth the mention in the readme, no? Great job anyway.
Hello, it has been a while.
Do you plan to support Ruby 2 on day or do you know a alternative to rubylog?
Unfortunately, every stuff I've found are either too old or not as powerful :(
For instance, I have predicates attack(a,b), attack(b,c)
but I cannot express a rule like
dominated(X) :- attack(Y,X), a_way_to_say_there_is_no_Z_such_as_attack(Z,Y)
Hello,
First of all, I'm so happy that someone is using my language! I'm not using it currently in any active project, so I'm not working on it for my own benefit. However, if I can help you with any answers, bug fixes or small features, I'd be happy to do so.
Rubylog does support Ruby 2, I just didn't update the Readme until now (now I did). But I'm not sure I understand your concern. Did this cause you a block? Then sorry for my lack of communication. As I understood from your comment, you managed to use Rubylog with the extend Rubylog::Context
. The standard way to use it is this:
require "rubylog"
module MyRubylogCode
extend Rubylog::Context
# your rubylog code here
end
Another way is to use the rubylog
executable with a file that contains Rubylog code:
$ rubylog myfile.rb
This is the way you can run the examples too.
Rubylog is quite under-documented because this was my BSc thesis work, and as I got closer to the deadline, I rather worked on the code and the thesis, not the documentation. And now, as I don't use Rubylog anymore, it's a bit orphaned :)
BTW, is your project Open Source? I would be happy to see your Rubylog code, and maybe I could give you some suggestions too.
You're right, I'm sorry.
I had the uninitialized constant
stuff while using the extend way, so I assumed it was a version problem but it may have been a human problem.
Anyway, this is working!
My code is open sourced but the Rubylog is not inside yet, i'll drop the link here when it will be.
Thanks very much :)
You're welcome :)
Hi, This is a great idea to implement Prolog in Ruby! However, when I am trying to run the examples, I am having uninitialized constant error, like:
I am running ruby 1.9.3p385