Datalog is a form of prolog, used currently by a database called datomic as it's query language. If you wanted to play with datalog, the best way is to do the free tutorial at www.learndatalogtoday.org you don't need to anything about datomic or clojure in order to do the tutorial, and I found it really helpful to get an idea of how it would be really helpful for certain types of queries, compared to an analogous query in SQL (which I also like btw...)<p>[Edit] - funny, someone <i>just</i> posted this other tutorial to HN too, haven't done it yet but looks fun and educational, it's a murder mystery! <a href="https://xmonader.github.io/prolog/2018/12/21/solving-murder-prolog.html" rel="nofollow">https://xmonader.github.io/prolog/2018/12/21/solving-murder-...</a>
There is also more modern Power of Prolog[1][2]. Another interesting language is ProbLog[3] - Probabilistic Prolog, seems used in bioinformatics.<p>[1] <a href="https://www.metalevel.at/prolog" rel="nofollow">https://www.metalevel.at/prolog</a><p>[2] <a href="https://github.com/triska/the-power-of-prolog" rel="nofollow">https://github.com/triska/the-power-of-prolog</a><p>[3] <a href="https://dtai.cs.kuleuven.be/problog/" rel="nofollow">https://dtai.cs.kuleuven.be/problog/</a>
A discussion from 2015: <a href="https://news.ycombinator.com/item?id=9246897" rel="nofollow">https://news.ycombinator.com/item?id=9246897</a><p>And one from 2010: <a href="https://news.ycombinator.com/item?id=1976127" rel="nofollow">https://news.ycombinator.com/item?id=1976127</a>
Wow. I wish this existed when I was in middles school, trying to write science fair project in prolog. It sent me down an academic rabbit hole that was way above my depth of knowledge. And the books I could find were really dry academic oriented. But I powered through and wrote a prolog program to help identify poisons.
A friend of mine wrote a Chrome extension for better styling: <a href="https://chrome.google.com/webstore/detail/learn-prolog-now-enhanced/gojfoljalmhohccaganmbgbffmfffhcg" rel="nofollow">https://chrome.google.com/webstore/detail/learn-prolog-now-e...</a>
Why? No, really, subjectively Prolog looks lovely to me, but sort of "Chapter 0" explaining why should people learn Prolog and how they can apply it practically could make an awesome addition.
The thing that intrigued me the most about Prolog was that true and false are not opposites. True means it could prove it, but false means it couldn’t prove it in time, not strictly necessarily really false as in not true. Thinking about that distinction, that you can have a language where the default logic can’t be used for Boolean algebra, blew my mind when I was in college and has been fun to ponder ever since.
I dived into prolog this year, and I really liked it. However, I didn't find a very active community to answer questions. The lack of energy in the community, and my wondering where I could use prolog for a practical application, tempered my enthousiasm, and I switched to learning something else (category theory).
For those wanting to kill the "learn logic programming" and "learn a golfing language" birds with one stone, check out:<p><a href="https://github.com/JCumin/Brachylog" rel="nofollow">https://github.com/JCumin/Brachylog</a>
SWI-Prolog to WebAssembly:<p><a href="https://github.com/JanWielemaker/swi-prolog-wasm/blob/master/README.md" rel="nofollow">https://github.com/JanWielemaker/swi-prolog-wasm/blob/master...</a>
Nice!<p>I've study a super-little-bit prolog at university time but I do not really understand it... I still have to understand "why prolog?" at all but perhaps sooner or later I'll try to review it a bit with this site-book :-)
I was going through this recently because my brother is going through the CS program that I went through, which is the only time I've encountered anyone mention Prolog. I still can't really envision how to create comprehensive systems in this, but it seems the logic paradigm could be applied to some really useful new areas that it hasn't reached yet, similar to how the influence of functional languages is pretty much expected for any trendy new language today (Rust, ES6).
I quite enjoy watching successive generations of programmers rediscover prolog in particular and rule-based programming in general. It's well worth learning even if you never really use it, because it expands your understanding of the art.
I tried swipl prolog and enjoyed it but poor PostgreSQL support scared me away. Any prolog developers have any advice? I really like prolog but need an implementation with good db support for specifically Postgres but haven’t found anything.
Prolog is a language I have fond memories of but haven't touched in a long time. How applicable is it outside of academia given all of the alternatives?