News for hackers. Stuff that matters.
Re:Naga: Datalog-based rules engine in Clojure by tannhaeuser on Friday December 09, 2016 @06:05AM (#13138022)
Exactly.

While Datalog is a subset of Prolog, Datomic isn't Datalog. From their tutorial:

    [:db/add "foo" :db/ident :green]
This isn't Prolog syntax at all. Prolog would be

    assert("foo", ident, green)
Franz, Inc. does it as well - calling something Prolog for their Lisp product which it just isn't.

I've nothing against Clojure but I wish the functional programming fans wouldn't call their DSLs Prolog or Datalog. If you're using Prolog or Datalog, you're expecting it to be (reasonably) portable accross Prologs, which this isn't at all.

Re:Naga: Datalog-based rules engine in Clojure by lispm on Friday December 09, 2016 @08:46AM (#13138683)
'Prolog' in Lisp exits for decades. During the 80s several Prolog implementation had been developed for research systems and also for commercial systems. Many used an s-expression syntax for Prolog, but some could also read 'Edinburgh' syntax.

Most of the time these 'Prolog' implementations are not as powerful/complete like a typical modern Prolog implementation.

LispWorks for example has an expert system development extension with an integrated Prolog.

http://www.lispworks.com/documentation/lw70/KW-M/html/kwprol...

It also offers to read Edinburgh syntax and also has a command line interface for this syntax.

http://www.lispworks.com/documentation/lw70/KW-M/html/kwprol...

But it still is far from ISO Prolog compatible.

Re:Naga: Datalog-based rules engine in Clojure by tannhaeuser on Friday December 09, 2016 @09:57AM (#13139049)
> 'Prolog' in Lisp exits for decades.

I sure hope so ;)

Also it's clear ISO Prolog isn't universally embraced (http://www.cs.unipr.it/~bagnara/Papers/Abstracts/ALPN99a) since most popular Prolog implementations based on WAM were started way earlier.

I guess there are worse things Prolog had to suffer; namely, Perl insensitively took away the .pl file suffix and made it its own.

Re:Naga: Datalog-based rules engine in Clojure by nl on Friday December 09, 2016 @06:36AM (#13138150)
Where are you seeing that it uses Datomic? The linked page says:

Datalog based rules engine and The language being implemented is called "Pabu" and it strongly resembles Prolog.

There doesn't seem to be much documentation for this, but the examples look like this:

    sibling(fred, barney).
    parent(fred, mary).
    sibling(mary, george).
    gender(george, male).
    /* Using the OWL namespace to describe the sibling property */
    owl:SymmetricProperty(sibling).
See [1]

It's been a while since I did Prolog, but that looks pretty familiar (and like your example)

[1] https://github.com/threatgrid/naga/blob/master/pabu/family-2...

Re:Naga: Datalog-based rules engine in Clojure by tannhaeuser on Friday December 09, 2016 @07:01AM (#13138245)
You're right. I was referring to Datomic because it was linked to from https://github.com/quoll.

Mind you, Prolog (ISO/IEC 13211-1) has very specific requirements with respect to exceptions, arithmetic, operator-precedence parsing and resolution/negation-as-failure/extra-logical features, which I see often glossed over when people call something Prolog in a roundabout way.

Re:Naga: Datalog-based rules engine in Clojure by nl on Friday December 09, 2016 @07:23AM (#13138320)
Hence why they claim to be Datalog.
Re:Naga: Datalog-based rules engine in Clojure by quoll71 on Friday December 09, 2016 @11:12AM (#13139538)
It's a longish talk, but the syntactic difference between systems like Datomic and traditional Datalog systems is discussed in the video mentioned above: https://www.youtube.com/watch?v=8rRzESy0X2k