Better HN
topnewbestaskshowjobs
Log inSign up

domenico_c

3 karma · joined Jun 5, 2017 (9y ago) · 4 submissions

Submissions

comment 9y ago · link · parent

Someone from my team replied. Thanks for taking the time to start the discussion on the comparison, we have a few people with a computational logic background here and we plan to publish a blog post on the topic soon!

comment 9y ago · link · parent

You could use a subset of Prolog to query Grakn. The language itself is not what motivates the development of Grakn, it's rather a tool that fits the model more naturally.

comment 9y ago · link · parent

Grakn developer here. That's interesting, do you have any particular graph database in mind?

Grakn runs fine on a single machine. One of the core architectural points is that the engine should not be too tightly bound to the storage layer. Currently we rely on Cassandra for storage but we are experimenting with other solutions.

The answer to your last question depends on what query you are performing. If the domain you are modelling is represented naturally as a graph, then you can expect much better performance than PostgreSQL (we'll publish some benchmark results soon).

comment 9y ago · link · parent

In my opinion there are mainly three reasons why Prolog is not popular.

The reason is that declarative languages in general are not as immediate as imperative languages. Nothing intrinsic about declarative languages themselves, this has to do mostly with the fact that we are taught and we are exposed to imperative languages first and then we hear about other more "exotic" paradigms.

Second issue. In a sense, the elegance of the language has been the biggest weakness. The academics loved to play with conceptual matters. A lot of effort went into papers on semantics and mapping different types of reasoning but not much into tools, IDEs, or compilers. The community didn't make enough libraries, built the right abstractions and software engineering practice. Every time you start a project in Prolog you are starting from scratch. Also, the elegance of the language is the reason a lot of people approaching Prolog get quite demanding. "It's logic programming so why do we have to use a cut?". Yet most programmers have no problems with the quirks of C++ or Java.

The third one is Prolog hasn't found it's excellence area. C, Go, Scala, Java all have their on strengths and scenarios where they are the best candidates. Prolog would make in theory an excellent candidate for representing complex domains based on rules, covering a module of a larger piece of software. It would be perfect to represent the rules of a board game or the knowledge of a chatbot, but for a number of reason that's no happening. How does the reasoner scale with larger datasets? Will it be hard to manage? Is there an example of something similar being attempted?

In my very personal opinion, as a community we should learn from these lessons, take the best bits of Prolog and make something new. At Grakn.ai (https://grakn.ai/) we are working on a graph database that uses an inference layer that is based on Prolog's resolution, maybe worth having a look. The idea there is that Prolog maybe shouldn't become a great general-purpose language but its bests parts must be used as a base for the next advances in knowledge representation and reasoning.