TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learn Prolog Now

289 pointsby febinover 6 years ago

17 comments

ghufran_syedover 6 years ago
Datalog is a form of prolog, used currently by a database called datomic as it&#x27;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&#x27;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&#x27;t done it yet but looks fun and educational, it&#x27;s a murder mystery! <a href="https:&#x2F;&#x2F;xmonader.github.io&#x2F;prolog&#x2F;2018&#x2F;12&#x2F;21&#x2F;solving-murder-prolog.html" rel="nofollow">https:&#x2F;&#x2F;xmonader.github.io&#x2F;prolog&#x2F;2018&#x2F;12&#x2F;21&#x2F;solving-murder-...</a>
评论 #18754954 未加载
评论 #18755079 未加载
xvilkaover 6 years ago
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:&#x2F;&#x2F;www.metalevel.at&#x2F;prolog" rel="nofollow">https:&#x2F;&#x2F;www.metalevel.at&#x2F;prolog</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;triska&#x2F;the-power-of-prolog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;triska&#x2F;the-power-of-prolog</a><p>[3] <a href="https:&#x2F;&#x2F;dtai.cs.kuleuven.be&#x2F;problog&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dtai.cs.kuleuven.be&#x2F;problog&#x2F;</a>
评论 #18756013 未加载
dangover 6 years ago
A discussion from 2015: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9246897" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9246897</a><p>And one from 2010: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=1976127" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=1976127</a>
yardieover 6 years ago
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.
mrcccover 6 years ago
A friend of mine wrote a Chrome extension for better styling: <a href="https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;learn-prolog-now-enhanced&#x2F;gojfoljalmhohccaganmbgbffmfffhcg" rel="nofollow">https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;learn-prolog-now-e...</a>
qwerty456127over 6 years ago
Why? No, really, subjectively Prolog looks lovely to me, but sort of &quot;Chapter 0&quot; explaining why should people learn Prolog and how they can apply it practically could make an awesome addition.
评论 #18756426 未加载
评论 #18755600 未加载
评论 #18754905 未加载
评论 #18754979 未加载
评论 #18754904 未加载
评论 #18754804 未加载
评论 #18754875 未加载
评论 #18754878 未加载
pkteisonover 6 years ago
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.
评论 #18754880 未加载
raphinouover 6 years ago
I dived into prolog this year, and I really liked it. However, I didn&#x27;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).
评论 #18756980 未加载
评论 #18759640 未加载
jonahxover 6 years ago
For those wanting to kill the &quot;learn logic programming&quot; and &quot;learn a golfing language&quot; birds with one stone, check out:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;JCumin&#x2F;Brachylog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;JCumin&#x2F;Brachylog</a>
eismccover 6 years ago
SWI-Prolog to WebAssembly:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;JanWielemaker&#x2F;swi-prolog-wasm&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;JanWielemaker&#x2F;swi-prolog-wasm&#x2F;blob&#x2F;master...</a>
xteover 6 years ago
Nice!<p>I&#x27;ve study a super-little-bit prolog at university time but I do not really understand it... I still have to understand &quot;why prolog?&quot; at all but perhaps sooner or later I&#x27;ll try to review it a bit with this site-book :-)
评论 #18754575 未加载
njnover 6 years ago
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&#x27;ve encountered anyone mention Prolog. I still can&#x27;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&#x27;t reached yet, similar to how the influence of functional languages is pretty much expected for any trendy new language today (Rust, ES6).
评论 #18754126 未加载
评论 #18755176 未加载
评论 #18754839 未加载
User23over 6 years ago
I quite enjoy watching successive generations of programmers rediscover prolog in particular and rule-based programming in general. It&#x27;s well worth learning even if you never really use it, because it expands your understanding of the art.
justbakerover 6 years ago
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.
评论 #18755227 未加载
tjpnzover 6 years ago
Prolog is a language I have fond memories of but haven&#x27;t touched in a long time. How applicable is it outside of academia given all of the alternatives?
momofarmover 6 years ago
So for the end of year 2018, is there still people using Prolog in profession field instead of academic?
me2tooover 6 years ago
This is the website I used to learn Prolog and all I can do is to highly recommend it