A Tour of Prolog

preview_player
Показать описание
Let's take a look at Prolog's greatest attractions and most unique features! In addition to being an excellent database and query language, Prolog is uniquely suited for processing rules, reasoning about strings, and solving combinatorial problems. Rewriting code at compilation time, a feature called macros in other languages, is easily possible in Prolog. Prolog's implicit mechanisms allow exceptionally concise meta-interpreters. These features make Prolog a very attractive language for writing interpreters and other complex applications.
Рекомендации по теме
Комментарии
Автор

I am brand new to Prolog with no background whatsoever but I do have an advanced degree in math. I’m extremely impressed with the degree of precision in these videos balanced by an extremely clean exposition. The two don’t necessarily go hand in hand and often appear to be near strangers. First of all thank you for your efforts, but also I want to share how impressed I am.

douglasmennella
Автор

Happy Birthday Prolog! After some time of learning it and using it in couple of programs, I can say that it is one of my favorite programming languages. Just 2 days ago I had to write a small program that had to select a proper approximating formula and compute a result given available data and do some dependency checking - it is so natural to do it in Prolog. Don't even try to imagine how many "if statements" I would've had to write in an imperative language.

AleksyGrabovski
Автор

Thank you for this video. It has been very helpful in understanding Prolog.

KrunoslavSaho
Автор

This was the best prolog intro I had! Also this emacs config is great, gonna try both of 'em soon, damm as a nvim guy you kinda stole my heart there.

kng-gx
Автор

Thanks for this very inspirational overview of Prolog!

HakanKjellerstrand
Автор

New to Prolog, and finding it fascinating. Your videos, books, and papers are a true gold mine of relevant information.

I've been reading "Coding Guidelines for Prolog" by Covington et al (2011), and was wondering how up to date it is.

alexisbrodeur
Автор

Oh my, oh my, how did SWI-Prolog get omitted at 48:00? Thank you go a wonderful tour!

AndrewBerezovskiy
Автор

Very motivating video to reanimate my Prolog love ;-)

ulrichvollert
Автор

Great video! I'm amazed at what I'm learning about Emacs from your videos, not just Prolog. What are you using to visualize the Prolog terms at 10:37?

jasonrothfuss
Автор

I'm a huge fan of your videos, have watched all of them, sometimes many-fold. Your video on http parsing was instrumental in opening the door for me to implement some useful web-scraping, for instance. Your website continues to be a source of inspiration and aspiration. Still scratching at the door of making an interpreter; I'd love to apply it to reason about state transitions on the Ethereum VM, for instance, etc.

I'd love to hear more details about meta-interpreters and alternative execution strategies. Especially any foundation that might point the way for a generalizable parallel-processing prolog. Or as a means to reason about other logic formalisms, such as linear logic, LTL, other modal logics, etc.

Also, I'd be curious to hear your take on ECLiPSe prolog, and their history/contributions to constraint programming? What about their implementation of arrays? How does introducing the array syntax `[]()` effect reasoning? I've had a lot of fun playing with optimization problems and have been impressed by their libraries that enable such versus, for example, miniZinc. Using prolog as a control-plane that interfaces with other solvers or can interop to other systems seems useful in this regard.

Please keep making such solid content. It's a continued source of inspiration. Thank you!

zacharylarson
Автор

just a small question, what do you use to present the prolog statements as trees on the right buffer?
It looks like Graphviz but I would like to know how to set up such application.

afonsorafael
Автор

I'm surprised you didn't use the term "referential transparency" in the video, because Prolog seems like a language that makes referential transparency a first class citizen with it's goal/term expansions and query optimization feature. Very cool language and great job with the video to demonstrate Prolog's interesting features. I will check out the language. Do you know if there are any linear optimization tools written in Prolog like the simplex or something? I bet it would be good for that.

jamievaughn
Автор

Great video, thanks. What about making a video named "A Tour of Scryer Prolog". It could be reused as a source for a Scryer Prolog manual.

jorgschuster
Автор

As usual, pretty neat stuff, thanks.

TBH I'm a bit surprised by your first step. To show the versatility of Prolog I'd read this CSV file with Prolog (e.g. use_module(library(csv)) or something like that). Just keep the original CSV under version control, or for collaboration, rather than Prolog facts… It's easier for the next official Unicode release ;) [you won't have to repeat your emacs macro]
This might be a bit "advanced" for a "Tour of Prolog", but seems more "real" to me (and safer since parsing CSV with quoting and such is actually quite tricky).
(ok, then you don't have a neat collection of facts to "display", since they're built dynamically… but… I kinda have problems making sense of the first example otherwise)

An example of "rule-based" reasoning that's "trendy" is actually unit testing, since defining a passing test is very often completely natural through rules… (though it rarely takes advantage of the relational aspect).

The fact that there are several Prolog systems, and that they are evolving is either good or bad, depending on the point of view ;)
It may feel very immature for a 50 y.o. language ^^


Tiny remarks but if seen as a first video about prolog:
For */1, I'd tend to write it using parentheses to make it visually clear that it's not simply "commenting out" the predicate, but real generalization of the argument.
I'd also add useless single quotes around chars to make them more different from variables…

SylvainSoliman
Автор

german_english(
"Wo gehn wir denn hinn? Immer nach Hause.",
"Where are we going? Always home."
).

mikeamy