Then, trying to run the example given in datalog, simply swapping "racklog" in place of "datalog"
#lang racklog
(racket/base). % here the parenthesis are not required, correct is racket/base. I remove those but then...
fib(0, 0). % from here onward, numbers are not recognized
fib(1, 1).
fib(N, F) :- N != 1,
N != 0,
N1 :- -(N, 1),
N2 :- -(N, 2),
fib(N1, F1),
fib(N2, F2),
F :- +(F1, F2).
fib(30, F)?
Specifically, the message of error regarding the first number is
match-lambda: no matching clause for '#s(constant (14-unsaved-editor 6 4 39 1) 0)
The example works in #lang datalog (which should be a subset of #lang racklog)
Thanks, but I think that, yes, the problem is that the package is bugged, at least for the parser for the pure #lang racklog (maybe the module to use inside #lang racket works, instead).
Thanks for your time.
I wrote a comment on reddit, just now, I copy it here, to close the question.
Eventually I think that simply the part of the code which should read the pure #lang racklog has been neglected and doesn't work.
For example, going on I discovered that while
fib(0, 0).
fib(1, 1).
gave errors, nstead this
fib(+0, +0).
fib(+1, +1).
didn't.
But then, again, for the rest of the code this trick doesn't work.
Probably the mantainer was more interested to have it to work inside #lang racket and not as a language in itself (which after all makes sense, since Prolog is a thing).
The syntax is the same. The semantics are different.
The problem is that bindings from racket/base overrides what racklog expects.
This leads to the curious errors you see.
It may or may not have been an oversight.
The examples in the repo uses: