Yutaka Ichibangase
Yutaka Ichibangase
@Jean-Luc-Picard-2021 Hi! Both `embed` and `io/fs` are introduced in go1.16. Could you run `$ go version` and see if it's newer than 1.16, please? If it's older, upgrading Go will...
How about creating instances for each A, B, C, ...? `prolog.Interpreter` is not goroutine safe so we should keep them inside of their own goroutines and feed them facts via...
Thank you very much for reporting this! I think this is because of a bug in the parser. This implementation does special treatment to `:-` in a couple of places:...
@enoperm Could you try the latest release `v0.10.1`, please? I fixed all the syntax bugs known so far including the ones regarding operators. The problem you're seeing here might have...
An efficient string representation will be a huge improvement! Currently, we have one `Term` representation for each value for simplicity. By introducing specialized representations, we have plenty of room for...
I've been thinking about this. It could be better if we generalize compound terms, not lists. ```go type Compound interface { Term Arg(n int) Term } type Term interface {...
As of `v0.11.0`, any Go values that implement `engine.Compound` are compound terms. This allows us to introduce efficient internal representations for lists and strings. ```go type Compound interface { Functor()...
@triska Thank you! 1. I wonder if a Prolog programmer would write `[a, b, c]` to mean a string in practice. They might be emphasizing its `list` aspect- expecting O(1)...
@UWN It's constant. A Go string is a slice of bytes and the slice points to a section of the underlying array of bytes. > In Go, a string is...
It's stored in the heap in this case but it's not because it's a slice. In Go, the compiler decides whether an object gets stored in the heap or the...