HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
"Production Prolog" by Michael Hendricks

Strange Loop Conference · Youtube · 28 HN points · 13 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Strange Loop Conference's video ""Production Prolog" by Michael Hendricks".
Youtube Summary
Prolog isn't just for solving cute logic puzzles. It's a powerful, productive, modern language. We've been using Prolog in production for the last 18 months. These are the cool tricks and pain points we've encountered.


Michael Hendricks
@mndrix

Michael Hendricks is the co-founder and lead developer at PriceCharting. He writes open source software and was the first political candidate in the United States to accept Bitcoin campaign contributions.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Jun 20, 2021 · 22 points, 1 comments · submitted by tosh
edtechdev
Been looking into terminusdb, an open source graph database implemented in prolog and rust. Previous discussion: https://news.ycombinator.com/item?id=22867767
I recommend starting with [0] to get a feel for what's possible. [1] is great when you have time to dive deeper. [2] is good motivation, and [3] will show you how to build a practical roles & permissions system.

Keep in mind that you don't have to build your app in 100% prolog to use prolog. There are likely implementations in your favorite language. For example, Rust[a] JavaScript[b], and Ruby[c].

[0] https://learnxinyminutes.com/docs/prolog/ [1] https://www.metalevel.at/prolog [2] https://youtu.be/G_eYTctGZw8 [3] https://github.com/TheClause/learn-prolog/blob/master/articl...

[a] https://github.com/mthom/scryer-prolog [b] http://tau-prolog.org/ [c] https://github.com/preston/ruby-prolog

TomMarius
Thank you!
Prolog also has some really impressive debugging tools. It allows you to pause execution, change the code, and then resume execution from an earlier point in time.

Michael Hendrick's "Production Prolog" talk gives a demo of this (at 12:17) https://www.youtube.com/watch?v=G_eYTctGZw8

Oct 29, 2019 · samuell on Swish: SWI Prolog Notebook
For an awesome video showcasing a bit of the real power of Prolog, you need to check (if you haven't already) this Strangeloop talk:

"Production Prolog" by Michael Hendricks

https://youtu.be/G_eYTctGZw8

7thaccount
I think I started watching this a few years ago and never finished it which is sad because you are correct that this was fascinating. Maybe I'll give Prolog another go.
joshmarlow
That is an awesome talk. I'll second the recommendation.
> Hmm I'm fine with prolog, I love it, but I'm not sure how it can be used in practice.

Well, that rings similar to what is said about Lisp sometimes, and I think it can easily be refuted by pointing to instances where it is being used in practice[0].

There are some problems that are fairly easy to solve in Prolog, but would be very difficult to express in SQL[1]. And recursive relations, which are at the core of Prolog, only made their way into SQLite 4 years ago[2].

My comment was specifically about those Prolog/Datalog implementations in Racket. Other Prolog implementations might be dealing sensibly with incremental updates (but I don't know).

> Having seen companies where SQL was used very extensively for analytics, data storage etc I can't see how prolog wouldn't help.

You can't see how Prolog wouldn't help, as in Prolog can only be an improvement over SQL?

[0]: https://www.youtube.com/watch?v=G_eYTctGZw8

[1]: https://xmonader.github.io/prolog/2018/12/21/solving-murder-...

[2]: https://en.wikipedia.org/wiki/Hierarchical_and_recursive_que...

gnulinux
I think you misread my comment. I am pro-prolog but I'm skeptical of some of the details such as ACID complaint, being battle-tested, getting predictable performance etc.

> Well, that rings similar to what is said about Lisp sometimes, and I think it can easily be refuted by pointing to instances where it is being used in practice[0].

I don't think this is relevant. (I'm also a very strong fan of lisp). Most criticism of lisp is to the language itself. People acknowledge that lisp is theoretically possible to solve complex problems easily but they claim this slows us down in practice. This is not my claim against prolog. I think the language is pretty powerful, but I'm not sure if we can find something as rock solid as postgres.

> Prolog can only be an improvement over SQL?

Yes, precisely.

hjek
> I think you misread my comment.

Yea, I did misread a bit of it.

> I think the language is pretty powerful, but I'm not sure if we can find something as rock solid as postgres.

While PostgreSQL may be better for most projects, SWI Prolog is also usable for practical problems, although (if I'm not mistaken) SWI Prolog requires all facts to be loaded into memory, so there's a limitation in scale. And yes, I could't find any resources indicating whether the SWI Prolog database is ACID compliant.

But with Racklog and Racket Datalog it doesn't make sense to talk about whether they're ACID compliant as there's not yet any storage mechanisms, so they are not yet usable in any context involving persistent data. The limitations of those implementations are very different from limitations with Prolog/Datalog as such.

Dec 24, 2018 · worldsayshi on Learn Prolog Now
Yes. I'd love to know more about real world use cases.

Edit: Found some relevant threads and links: https://news.ycombinator.com/item?id=9248107 https://www.youtube.com/watch?v=G_eYTctGZw8

Apr 06, 2017 · StreamBright on The Power of Prolog
Same here, I don't think this is a particularly great way of starting with Prolog. I have found these videos helpful for understanding Prolog:

https://www.youtube.com/watch?v=SykxWpFwMGs

https://www.youtube.com/watch?v=G_eYTctGZw8

"Production Prolog" by Michael Hendricks: https://www.youtube.com/watch?v=G_eYTctGZw8
Mar 27, 2015 · BenDoan on Prolog interpreter in Go
The golog author has a great presentation on using prolog in production.[1]

[1] https://www.youtube.com/watch?v=G_eYTctGZw8

andrewchambers
Thanks for the video, really cool.
Mar 22, 2015 · abathologist on Learn Prolog Now
You might be interested in these SO answers regarding "Real world Prolog Usage": http://stackoverflow.com/questions/130097/real-world-prolog-... The answers are replete with claims about good use-cases for Prolog.

Michael Hendricks' talk at last year's Strange Loop on "Production Prolog" gives an excellent high-level survey of the uses, advantages, and drawbacks of Prolog: https://www.youtube.com/watch?v=G_eYTctGZw8

BTW, I have played a tiny bit with Flora2 myself. It seemed really neat. If you're interested in the intersection of OO and Prolog, you may also want to look at Logtalk[0]. FWIW, if I understand your meaning correctly, it is very easy to "pass rules as parameters to other rules" in vanilla Prolog. It facilitates all sorts of higher-order approaches and is very good for meta-programming.

[0]:http://logtalk.org/

Mar 22, 2015 · profquail on Learn Prolog Now
I found a page from 1994(!) asking the same question: https://dtai.cs.kuleuven.be/projects/ALP/newsletter/archive_...

Given that Prolog isn't super-widely used (compared to say, C++), there are going to be a limited number of developers with Prolog expertise. That means companies who use it in their tech stack are generally going to have to hire developers who fit the other qualifications for the role then put them through some internal Prolog training. The listings for such positions probably won't have Prolog as a "required" skill but a "desired" skill.

One other point -- just because there aren't any/many jobs where Prolog is required doesn't mean there aren't many cases where Prolog could be useful. Prolog hasn't been widely taught for a couple of decades, so a significant proportion of developers today won't recognize a problem that Prolog would be a good solution for as a problem that Prolog would be a good solution for.

There's a Strange Loop 2014 talk on YouTube, "Production Prolog", that might give ideas about jobs that use (or could use) Prolog: https://www.youtube.com/watch?v=G_eYTctGZw8

Not only is it worthwhile to learn, it's worthwhile to use for real world problems: https://www.youtube.com/watch?v=G_eYTctGZw8

From his blog: http://blog.ndrix.com/2014/10/how-we-use-prolog.html

Sucks, cannot edit old comment. Correction:

Michael Hendrick: https://www.youtube.com/watch?v=G_eYTctGZw8

Sep 21, 2014 · 6 points, 0 comments · submitted by agumonkey
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.