Say I want to use it as a database query language, presumably that's not going to happen, right?
Say I want to use it as a database query language, presumably that's not going to happen, right?
https://github.com/Datomic/codeq : last update to that repo was 12 years ago.
it's JDK which I find unappealing.
also, how close is it to Datalog?
https://github.com/gns24/pydatomic : last update 11 years ago.
and that's representative of pretty much anything regarding Datalog.
So, I'll just stick to Prolog then.
---
have you?
would you recommend it?
https://central.sonatype.com/artifact/com.datomic/local/1.0....
An example of where Neo4j really shines is I found a site with BGP route dumps. The file contains over 57 million very redundant Autonomous System paths that are just sequences of a IP prefix and the AS path it is reachable by. By loading each IP prefix and AS hop as
(Prefix)-[:ANNOUNCED_BY]->[:AS]-[:BGP_NEXT_HOP]->[:AS]
I can easily trace paths from one prefix to another by going
MATCH path = (p1:Prefix)-[:*]->(p2:Prefix) return path
which will return which AS announce the prefixes and all BGP paths between them. It really is very powerful.
It is not Datalog syntax but heavily inspired by Datalog.
I'm throwing this in here just for clarification, I don't want to see Datomic as collateral damage in this conversation.
Otherwise, many syntax and semantics are similar.
No dependency on Datomic as Datomic is Java and DataScript is JavaScript.
[1]: https://dcnorris.github.io/precautionary/index.html
[2]: https://github.com/mthom/scryer-prolog/discussions/2441
[3]: https://link.springer.com/chapter/10.1007/978-981-97-2300-3_...
Regarding how, check out Power of Prolog on YouTube.
Choose the task, download Prolog and start coding. That's, generally, how you "get something done".
As to using Prolog as a database query language, I'd say that's like using a piano as a lawn ornament, but you can certainly replace a traditional relational DB with Prolog. The SWI-Prolog website does that and the developers explain how to do it in this article:
Can I replace a LAMP stack with SWI-Prolog?
https://www.swi-prolog.org/FAQ/PrologLAMP.md
And here's some more about using Prolog for good, old-fashioned, web development, in the sense of creating sites that run on the web and have visitors etc etc, particularly the SWI-Prolog website itself:
Eat Your Own Dog Food
s/logic programming/relational programming/
it isn't as expressive as LP or CLP and works best embedded in a functional-biased language