José Antonio Riaza Valverde
José Antonio Riaza Valverde
The `set_timeout/3` predicate from the `os` module allows you to call predicates "in parallel" (if goals perform asynchronous tasks): ```prolog :- use_module(library(os)). top :- set_timeout(0, (sleep(3000), write(a)), _), set_timeout(0, (sleep(2000),...
I just added the basic predicates for the library: * `future(?Template, +Goal, -Future)` * `await(+Future, ?Result)` * `future_all(+ListOfFutures, -Future)` * `future_any(+ListOfFutures, -Future)` Example: http://tau-prolog.org/sandbox/I6q4S1lY ```prolog :- use_module(library(os)). :- use_module(library(concurrent)). top(X)...
Oh, I think I misunderstood your predicates. If `suggested_package_range/4` provides an answer for each answer to `workspace_has_dependency/4`, you should do something like this: ```prolog ?- findall(Future, ( workspace_has_dependency(Cwd, Ident, Range,...
If the `Promise` object exists, Tau Prolog futures are translated to JavaScript promises, and JavaScript promises can be translated to Tau Prolog futures. Example (from JavaScript): ```javascript var p =...
You can add `Cwd`, `Ident` and `Range` to the template of the `future/3` call (you must modify `suggested_package_range/4` as indicated in the [previous message](https://github.com/tau-prolog/tau-prolog/issues/325#issuecomment-1164551399)): ```prolog ?- findall(Future, ( workspace_has_dependency(Cwd, Ident,...
The `answer` method just looks for the next answer. If you need more than one answer, you must call `answer` again in the callback of the first answer. So if...
@UWN Does the ISO Prolog standard allow this?
In Tau Prolog, in each resolution step a substitution is created and composed with the substitution of the previous state, without taking into account that a cyclic term can be...
But note that Tau Prolog can detect if it's an acyclic term or not, so it's not really a problem. 
I think it's computationally expensive for Tau Prolog to detect by default cyclic terms in the answers (because it is not very frequent), but I guess I could create another...