This seems already <i>almost</i> valid Prolog syntax, which is also a syntactic superset of Datalog.<p>The main question I have for implementors of Datalog and Prolog variants like this: If you are <i>that</i> close to using Prolog syntax, why not go all the way and rely fully on Prolog, a language for which a well-defined ISO standard and several interesting implementations already exist. One of the key benefits you get in this way is Prolog's strength for meta-programming and reasoning about programs with the same formalism you use to state the specifications and queries. Abstract interpretation, query optimization etc. can be easily implemented in this way, instead of having to parse an additional formalism.<p>It may be possible to implement such Prolog-"variants" entirely within Prolog by defining suitable infix or prefix operators, or adding <i>conforming</i> extensions in implementations. A conforming extension is one that does not conflict with existing ISO syntax. For example, something that would be a syntax error in conforming Prolog implementations could be used as an implementation-specific extension.
This is my project! So soon ... I was considering a Show HN but wanted to wait until things like documentation are a bit more complete, but here we are.<p>Ask me anything.
Other resources for logic programming and Go:<p>ichiban/prolog - ISO Prolog interpreter in pure Go, getting close to v1: <a href="https://github.com/ichiban/prolog" rel="nofollow">https://github.com/ichiban/prolog</a><p>trealla-prolog/go - ISO Prolog interpreter embedded via WASM: <a href="https://github.com/trealla-prolog/go" rel="nofollow">https://github.com/trealla-prolog/go</a><p>guregu/pengine - library for interfacing with Pengines (SWI-Prolog's RPC protocol): <a href="https://github.com/guregu/pengine" rel="nofollow">https://github.com/guregu/pengine</a><p>biscuit-auth/biscuit-go - Biscuits are a fancy auth token with a little Datalog engine: <a href="https://github.com/biscuit-auth/biscuit-go" rel="nofollow">https://github.com/biscuit-auth/biscuit-go</a><p>I'm a big fan of logic programming. We've been seeing a small resurgence of interest in it (for example Yarn using Prolog made some waves) and I have some optimism for its future.
Interesting; Google engineer previously published Datalog variants for BigQuery: <a href="https://research.google/pubs/pub43462/" rel="nofollow">https://research.google/pubs/pub43462/</a> & <a href="https://logica.dev/" rel="nofollow">https://logica.dev/</a><p>This new language seems similar to differential-Datalog (which is sadly in maintenance mode): <a href="https://news.ycombinator.com/item?id=33521561" rel="nofollow">https://news.ycombinator.com/item?id=33521561</a>
Inventing a language seems to be a rite of passage for every engineer at google.<p>Go, Dart, Carbon, Mangle, am I missing some?<p>I'm not criticizing, I would not dare as I'm creating my own language as well :P
Some of the other stuff looks intriguing, but regarding the claim that "Unlike SQL, our Mangle rule projects_with_vulnerable_log4j has a name and can be referenced in other queries." goes, SQL in a VIEW or common table expression (CTE) can also be referenced in other queries.
RDFox looks like the best bet for datalog databases, it computes changes incrementally, also with aggregation extensions. Logicblox, Soufflé, datomic, inter4ql, corese are also worth a look. Looks like there's a lot of innovation possible in the space, like distributed logic processing, incremental sorting, adding assert statements, figuring out why specific rules don't match recursively, etc
I’m probably wrong (I’ve been deep diving into RDF triplestores lately) but I think sparql does all that and has a W3C specification.<p>Maybe the difference is you don’t have to convert your data into (subject, property, object) triples?<p>Been reading this hexastore paper and they seem to be trying to solve the same problems but I’m no data scientist so who knows.