5 ms·
Prolog has reached an exciting new milestone with Scryer prolog. It is the first highly performant open source iso-compliant Prolog. I would check out Markus
by upghost 2y ago
Prolog has reached an exciting new milestone with Scryer prolog. It is the first highly performant open source iso-compliant Prolog.
I would check out Markus Triska's work to have your mind blown:
https://www.metalevel.at/prolog https://www.metalevel.at/prolog
https://youtube.com/@thepowerofprolog https://youtube.com/@thepowerofprolog
- overclock351 2y agoDo you have any papers comparing Scryer with other prolog systems (like SWI-prolog or SICStus prolog) performance-wise ?
- jodrellblank 2y agoThere are some benchmarks here of SWI Prolog's benchmark suite on diffrent Prolog systems by Jan Wielemaker the SWI Prolog author: https://swi-prolog.discourse.group/t/porting-the-swi-prolog-benchmark-suite-comparing-8-prolog-systems/6997#the-modern-systems-vs-swi-prolog-2 https://swi-prolog.discourse.group/t/porting-the-swi-prolog-... He finds Scryer performs worse, which he does comment on, he also explains some tradeoffs and historic choices in SWI's design which affects its performance. I think I have seen the author of Scryer saying that's not surprising and Scryer is still building up core functionality where SWI has had 30+ years to optimise, but I don't remember where I read that. SWI has a document explaining some strengths and weaknesses regarding performance: https://www.swi-prolog.org/pldoc/man?section=swiorother https://www.swi-prolog.org/pldoc/man?section=swiorother Edit: some discussion on Scryer previously on HN: https://news.ycombinator.com/item?id=28966133 https://news.ycombinator.com/item?id=28966133
- jfmc 2y agoAnother table (in the same thread) comparing more systems: https://swi-prolog.discourse.group/t/porting-the-swi-prolog-benchmark-suite-comparing-8-prolog-systems/6997/31 https://swi-prolog.discourse.group/t/porting-the-swi-prolog-...
- b800h 2y agoSo SWI appears to be more performant, it has an open license, so as per the GGP's claim regarding Scryer in the post above, it must not be ISO-compliant?
- derdi 2y agoOr maybe the GGP was wrong about performance? Some default settings in SWI are not ISO-compliant (for example, it uses a string type that does not exist in ISO). But these are minor things that won't usually trip you up when feeding it ISO code. You can set flags to get it to conform in the way you want. And you should set flags whenever you want your ISO Prolog programs to be portable, because the standard is very lax and leaves a lot of things implementation-defined. But it specifies the flags to get implementations into the state you want.
- jodrellblank 2y agoThat's right; comedian Emo Phillips had a bit about it: "Once I saw this guy on a bridge about to jump. I said, "Don't do it!" He said, "Nobody understand me." I said, "What's so special about you?" He said, "I'm a computer guy." I said, "Me too! Desktop, tablet, console, smartphone?" He said "Desktop, mostly", I said "Me, too! Mac, Linux or Windows?" He said, "Any, I'm a programmer." I said, "Me, too! which style? OOP, Imperative, Functional, Logic, Array, Stack" He said, "Logic." I said, "Me, too! What subset? Answer Set Programming, Abductive Programming, Prolog, Datalog?" He said, "Prolog." I said, "Me, too! Conformant with the ISO/IEC 13211-1:1995 (core) standard term syntax for the period character or non-conformant extention decried by members of the ISO/IEC JTC1 SC22 WG17 working group?" He said, "SWI Prolog 7" I said, "Die, heretic!" And I pushed him over." - https://news.ycombinator.com/item?id=26624442 https://news.ycombinator.com/item?id=26624442 or read more seriously here: - https://www.complang.tuwien.ac.at/ulrich/iso-prolog/SWI7_and_ISO https://www.complang.tuwien.ac.at/ulrich/iso-prolog/SWI7_and...
- rlupi 2y agoI can't help. > "Once I saw this guy on a bridge about to jump. I said, "Don't do it!" He said, "Nobody understand me." I said, "What's so special about you?" He said: "I don't want to jump".
- mark_l_watson 2y agoI interviewed and helped hire Mark Thom, the original author of Scryer. I also follow Scryer with interest, even though most of my limited Prolog use has been with SWI Prolog (and one large project with ExperProlog in the 1980s). One thing to check out: Prolog plays fairly well with Python, providing opportunities for hybrid projects.
- klibertp 2y agoTo playing well with Python, this was on a front page some time ago: https://arxiv.org/abs/2308.15893 https://arxiv.org/abs/2308.15893 "The Janus System: Multi-paradigm Programming in Prolog and Python"
- mark_l_watson 2y agoHey, thanks! That looks cool.
- philzook 2y agoI am quite pleased with the ability to easily use prolog from within python and vice versa. It makes it now one of the easiest and most expressive solvers to plug into for my tastes. I'm starting to accumulate useful solvers here https://github.com/philzook58/prologsolvers/tree/164297d87f67202e5906d03a5b07d6ff7ce75ef9 https://github.com/philzook58/prologsolvers/tree/164297d87f6... You need to install swi prolog https://www.swi-prolog.org/download/stable https://www.swi-prolog.org/download/stable and pip install janus_swi A simple example to get started: https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/janus.html%27) https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p... import janus_swi as janus janus.consult("path", """ edge(a,b). edge(b,c). edge(c,d). :- table path/2. path(X,Y) :- edge(X,Y). path(X,Y) :- edge(X,Z), path(Z,Y). """) list(janus.query("path(a,Y)."))
- nextos 2y agoOn the topic of multi-paradigm programming, including logic programming, Oz/Mozart is an obligatory mention. See CTM and http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html. The authors were fairly prominent Prolog researchers. It's sad Van Roy is retiring and nobody is taking this forward. AliceML, a StandardML dialect inspired by Oz is also abandonware.
- deleted 2y ago[deleted]