3 ms·
> Datalog is a declarative logic programming language. While it is syntactically a subset of Prolog, Datalog generally uses a bottom-up rather than top-down eva
by tgamblin 2y ago
> Datalog is a declarative logic programming language. While it is syntactically a subset of Prolog, Datalog generally uses a bottom-up rather than top-down evaluation model. This difference yields significantly different behavior and properties from Prolog. It is often used as a query language for deductive databases.
https://en.m.wikipedia.org/wiki/Datalog https://en.m.wikipedia.org/wiki/Datalog
- 2-3-7-43-1807 2y agodo you know what you are writing about? I mean have you actually done something with datalog? and then _which_ datalog? if yes, then you are probably someone working with it academically or the answer is no. because try to even set a toy project up with it (for the purpose of learning how to use it) and you'll quickly run into unmaintained interpreters, discussions of what datalog is and what not and you can choose between difficult to understand academic papers or simplistic introductions that lead you no where.
- UltraSane 2y agoHave you tried Datomic?
- 2-3-7-43-1807 2y agono. https://github.com/Datomic/codeq 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 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?
- UltraSane 2y agoI tried using Datomic Pro for a CMDB. I liked how logical queries were but I ended up going with Neo4j instead because finding paths between two nodes is incredibly useful in IT. https://central.sonatype.com/artifact/com.datomic/local/1.0.267 https://central.sonatype.com/artifact/com.datomic/local/1.0....
- 2-3-7-43-1807 2y agomhm ... sounds like you don't know what you are talking about if you conflate Neo4j/Cypher with Datalog ... because "in IT".
- UltraSane 2y agoI'm fully aware they are very different things. I'm just saying I have tried using datomic and I really like it's query language but it cannot find a path between two objects like Neo4j which is a killer feature in a CMDB. My dream DB would be a hybrid of Neo4j and Datomic. 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.
- upghost 2y agoOk just to clarify, Datomic is a Clojure thing. It is free to use but closed source. It is an excellent database that is used, owned, and financed by Nubank, the largest and most rapidly growing bank in Brazil. 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.
- fithisux 2y agoThere is Datascript. I am not a Clojure guy, so it is not clear to me if it pulls datomic as a dependency.
- upghost 2y agoDatascript is very similar to Datomic, except that it runs in ClojureScript and is an in-memory datastore with no concept of history or point-in-time queries. The schemas are also much looser than Datomic. Otherwise, many syntax and semantics are similar. No dependency on Datomic as Datomic is Java and DataScript is JavaScript.
- fithisux 2y agoAh thank you.
- akritid 2y agoI have found two somewhat usable (your point still stands): soufflé (high performance but more limited) and DES, which works well for some simple personal data management, after some code massage (it’s written in Prolog). Any other recommendations? And since the prolog experts are here: what do you think about Ciao? Seems quite polished but also adventurous to (non-expert) me