OWL, reasoning for the semantic web, is open world, and assumes there might be more triples it doesn't know.
Closed reasoning is more powerful, but is, well, "closed minded".
step in, over,over,over,.. fudge, too far
no problem, hit r and requery ... speeds up debug a zillion times
buttons on right side to bring up code in browser or in editor
edit('foo/bar') will take you to the handler for the URI /foo/bar
eliminates directory structure nightmares.
If you do need low latency comms across language barrier, Java and C are easy.
cut as earky as possible
parent(A,B) <-- is A the child or the parent?
parent_of(A,B) <-- clearer, but emphasizes one role
parent_child(A,B) <-- best, makes it clear A is parent, B child
_X actually a normal variable, but allowed to be singleton
foo(_X, _X). succeeds when its args unify
to see all the chars that work this way
See prolog_current_frame/1 and reset/3
prints howdy when the compile reaches this point
Many things that do IO pass unrecognized options to the underlying IO pred...
foo(3 + C) is identical to foo('+'(3,C)) and probably not what you want
unless foo expects an expression as an argument.
So if you try Y=3 and later try X = 5 as a solution it'll fail (😋good thing!)...
an exception means WTF?
/** ... */
foo/1 - means foo(X), foo with 1 argument
foo//1 means the DCG foo with 1 semantic argument foo(X) --> ...
this idiom appears not only in docs, but in code like
:- dynamic foo/3.
foo --> foo, "x"
infinite loop - change to foo --> "x", foo. or use tabling.
Sometimes using tabling to fix can yield clearer, more intuitive DCG's
append([a,b],[c,d],[a,b,c,d]) - is this a partition?
append([a,b],[c,d],Z) - concatenate
append([a,b],Y,Z) - name lists that start a,b
append([a,b],Y,[a,b,c,d]) - suffix
append(X,Y,[a,b,c,d]) name the partitions of a,b,c,d
append(X,Y,Z) name pairs of lists and what they concat to
append(X,[c,d],Z) name lists that end c,d
Prolog eschews control structures. Metapredicates undermine this, but meta_predicate saves the day.
Data - facts that reduce uncertainty.
Knowledge - data that can be reasoned about
Wisdom - knowledge that should be reasoned about
So yes, I can get to work, by filling the tank and using surface street.
Intro video on it
rdf(User, foaf:name, Name)
The sane way to get Windows is use the binary
Submit a PR.
library(yall) reorders args
Suppose you have some predicate that calls a service that might not be available, and so should only be called within some other with_remote_service metapredicate...
Good Prolog implementations GC all of them
(If you're beyond 2 and you're not in a data term instead of code, DEFINITELY make a helper predicate.)
there's a library to handle these
The codemirror syntax coloring is used in SWISH, so it kept up to date.
ok_num(X) :- 1 is X % 2.
rf :- member(X, [a,b,c,d]), % choice points
Weirdly, this is often useful.
:- module(foo, ).
When the reader sees this it parses to ...
If you wish to redefine a system predicate, redefine_system_predicate/1