Yutaka Ichibangase
Yutaka Ichibangase
What are you going to achieve with `time/1` and `statistics/2`? Since `time/1` prints the result, it doesn't make sense to implement in this library. It might be useful in 1pl,...
You can define your own `time/1` (and also `sleep/1`) like this: ```go package main import ( "fmt" "time" "github.com/ichiban/prolog" "github.com/ichiban/prolog/engine" ) func main() { p := prolog.New(nil, nil) p.Register1(engine.NewAtom("time"), func(vm...
Atom may or may not be re-implemented as `unique.Handle[string]`. > New unique package > The new [unique](https://tip.golang.org/pkg/unique) package provides facilities for canonicalizing values (like “interning” or “hash-consing”). > > Any...
HI, @Thihup! Thank you for the request! Let me break down your request first. Let's say our version of `trace/0` being implemented, what would you expect it to do when...
Hi! This library has nothing to do with JSON. So, it doesn't know how to convert `json(_)`, `Key=Value`, nor any other compound terms other than lists. We can flatten the...
Hi! Thank you for reporting! I managed to reproduce the error with a shorter code: ```console $ cat test.pl :- ['test.pl']. $ $(go env GOPATH)/bin/1pl Top level for ichiban/prolog v1.2.1...
@Jean-Luc-Picard-2021 They're both implemented as directives. In this major version, not all the directives are backed by corresponding predicates.
Hi, you can achieve it with recursion. The basic idea is described in https://github.com/ichiban/prolog/issues/163#issuecomment-1070888679 (Thanks, @guregu!). Here's a detailed example that might work for you: ```go package main import (...