One of the most interesting applications of Prolog I have seen in the recent past is the formalization of dose-escalation trial designs that occur in clinical oncology. In particular, David C. Norris has implemented a Prolog formulation of the cumulative cohort design (CCD) as part of his precautionary package: https://github.com/dcnorris/precautionary/blob/main/exec/pro... This Prolog program can be used to exhausti…
Wow this is the best thing since the Actually Portable Executable source code. https://justine.lol/thun.png How did the author generate those letters?
Ask HN: What are some interesting examples of Prolog?
21–30 of 64 posts
Re: Ask HN: What are some interesting examples of Prolog?
#22Re: Ask HN: What are some interesting examples of Prolog?
#23Re: Ask HN: What are some interesting examples of Prolog?
#24The first version of erlang was written in prolog. https://wikipedia.org/wiki/Erlang_(programming_language)
Re: Ask HN: What are some interesting examples of Prolog?
#25Not exactly a big codebase, but it was a revelation for me how natural typecheckers can feel in Prolog: I basically rewrote typing rules with some tweaks: [1] Also, tests were surprisingly enjoyable in Prolog: [2]. [1] https://github.com/EarlGray/language-incubator/blob/29755c32... [2] https://github.com/EarlGray/language-incubator/blob/29755c32...
Not a criticism of the code here by any stretch, I always find it impressive when people manage to understand languages that are totally foreign to me, that being said however Prolog has always struck me as uniquely unreadable. Even back in university when we looked briefly at different styles of programming, the code always ended up looking something like lines 107-132 in your example, which to someone jumping in is…
I used to be a specialist in a product called Tivoli Enterprise Console. Which was a late 90s/2000s era event correlation system that used an ancient prolog dialect as its rules engine.
I had an awesome boss who let me do whatever, a limited set of tools, and a partner in crime who complemented my style. So we ended up implementing an Oracle database interface in Perl and a client application that allowed others to add facts to the database. Periodically, we’d load the facts into the prolog system and could make queries to tell us what apps were impacted, did we care about them, who was responsible, etc.
The end system was able to identify app owners, system administrators and other information on any of about 20k servers and lots of network gear. We were able to take a flow of about 300k daily events and cook it down to about 40-50 actionable alerts and a few hundred automated actions.
The whole thing took about 3 months to build and another 4-6 to tweak. We got promoted and moved on, but the system hummed along for about 4-5 years until IBM started killing the underlying product. I think the place pivoted that functionality to ServiceNow.
Re: Ask HN: What are some interesting examples of Prolog?
#26Re: Ask HN: What are some interesting examples of Prolog?
#27Earlier quoted context omitted.
Wow this is the best thing since the Actually Portable Executable source code. https://justine.lol/thun.png How did the author generate those letters?
figlet is the classic tool to generate these: http://www.figlet.org/ toilet is a slightly more modern reimplementation with some added features (like color): http://caca.zoy.org/wiki/toilet
Re: Ask HN: What are some interesting examples of Prolog?
#28Re: Ask HN: What are some interesting examples of Prolog?
#29Norvig’s AI book has a lot of prolog in it.
prolog looks like a third way, not C and not Lisp.