-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request non-blocking sandbox, ev. needs yielding engine #10
Comments
Tau Prolog is non-blocking, but as a National Department of Traffic slogan said: we can't drive for you. To release the browser you have two options: call an asynchronous predicate (such as For instance, the following code doesn't freeze the browser: :- use_module(library(os)).
p :-
sleep(0),
write(p), nl,
p. Tau Prolog allows you to create a sandbox that sleeps every x inferences, but it doesn't by default because that delays execution. |
The Tau Prolog sandbox is just that, a sandbox, and it allows you to set an inference limit to prevent the browser from freezing. It is built using the 3 main methods of Tau Prolog: http://tau-prolog.org/manual/a-simple-tutorial You can set up a sandbox that runs a query with a limit of, say, 1000 inferences. If the limit of inferences is reached, in the callback of the In our current sandbox, when the query stops the user has to explicitly request that the search continue, requesting another answer. But this behavior can be changed by modifying the callback. Regarding |
Ok, interesting, you can als cancel, by checking stop again. |
It depends on the browser and the program. Something like 1000 should be fine, but it's a matter of testing I guess. (Note that you have to reconsult after setting the limit). |
That is probably due to the browser cache. Refresh with Cntrl+F5 or clear the cache. |
Will check the browser later again. I always admire Steve Jobs, how he introduced the MacIntosh So currently trying to figure out what a good GUI would be. to do with. It is planned that for non-blocking via some Not yet sure how this turns out. For the control buttons, and an abort button: after a while it shows stats: the abort button shows again after redo: (*) probably not needed for DOM updates. |
You can check here, but a monitor might have more Hz: |
TauProlog has a new interfaces:
The test case was a large limit and then:
But I find that this sandbox here is blocking:
http://tau-prolog.org/sandbox/
Is there another sandbox already online?
The text was updated successfully, but these errors were encountered: