tau-prolog / sandbox Goto Github PK
View Code? Open in Web Editor NEWAn online Tau Prolog sandbox
Home Page: http://tau-prolog.org/sandbox
License: BSD 3-Clause "New" or "Revised" License
An online Tau Prolog sandbox
Home Page: http://tau-prolog.org/sandbox
License: BSD 3-Clause "New" or "Revised" License
According to the ISO core standard, it is allowed to dynamically
create clauses of a predicate, even if it doesn't have a dynamic
declaration. assertz/1 and friends are allowed to do this.
But since it is implicit dynamic, it should then be retrievable
via the clause/2 builtin. Currrently I get the following:
I need to output text to the sandbox query console, either with write or format. Write output the text as a list and write("Testtext")
returns [T,e,s,t,t,e,x,t]
for example, isnstead of "Testtext".
I don´t get format
to work at all.
How can I output strings as strings with write, or format in the sandbox?
(This problem does not exist under Mobile Chrome)
When entering text for an interactive query, typing space cancels the entire line of text typed so far.
This used to work some time ago.
Firefox Version 66.0.2
TauProlog has a new interfaces:
promiseQuery: queries a goal and returns a promise that is resolved
when the goal loads successfully, or rejected when there is an error. It
takes the same arguments as the query method.
http://tau-prolog.org/manual/promises-interface
The test case was a large limit and then:
longrunning :-
between(1,300,_),
between(1,300,_),
between(1,300,_),
fail.
longrunning.
But I find that this sandbox here is blocking:
http://tau-prolog.org/sandbox/
Is there another sandbox already online?
This works fine:
?- hilbert((p->p), X, 2).
X = 'ax-mp'('ax-mp'('ax-2','ax-1',(p->(_114->__115->_114)->p)),
'ax-mp'('ax-1','ax-1',(_114->__115->_114)),(p->_114->__115->_114)) ;
parsing query: hilbert((p->p),X,2) ok!
But when I forget the parenthesis around p->p, it redirects me to GitHub:
?- hilbert(p->p, X, 2).
javascript error: TypeError: try_answer(...) is undefined
Report error on GitHub
error parsing query:throw(error(syntax_error(', or ) expected'),[line(1),column(9),found(->)]))
I am more expecting a parsing error without a JavaScript error.
Enter the query:
I=1,N is 1 <<I.
And Tau responds with:
?- I=1,N is 1 <
So everything behind the < is eaten by HTML (in the HTML source, the first < is written as <
and the second is not).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.