10 ms·
I'm first of all excited by the fact that this made first page on HN. I didn't realise there was that much interest in Prolog news (as in more than two or three
by YeGoblynQueenne 11y ago
I'm first of all excited by the fact that this made first page on HN. I didn't realise there was that much interest in Prolog news (as in more than two or three people).
Also, having more open-source Prolog engines is a very good thing, both for the language and for the project itself. For the project, it's good because it makes it easier for a community to grow around it. Swi has benefited enormously from its popularity (Jan Wielemaker has commented on this occasionally). For the language, it's good because the more healthy Prolog communities we have, the more we can hope to get new people interested in the language.
Comparing to other Prologs (and Prologs-ish'es) the problem with having closed-source and only for-pay Prolog engines is mainly one of portability, which in the Prolog world is a bit shit (and that's a vast understatement).
Frex, I wrote my degree dissertation using Win-LPA Prolog in 2010-11. LPA is commercial and I don't have a licence anymore (I had a student one) so now I can't run my dissertation. I tried (and tried (and tried)) to make it work on Swi but failed (and failed (and failed))[1].
The problem is there are subtle differences between implementations that bite you in ways you never thought possible, and it's just aaaargh hard to get the same program running in the same way on two different Prologs.
Apparently the exception to this portability hell is Yap and Swi, who have worked together to maintain some compatibility with each other. I don't have experience of this myself (after getting burned I've stuck to Swi) but if Amzi open-sourcing their stuff also means they'll be more open to this sort of working with others, then that's really, really amazing news.
____________________________
[1] It's here: https://github.com/stassa/Gleemin https://github.com/stassa/Gleemin
But it will hurt you.
Also, graduate dissertation, 5 years ago: embarrassing.
- danieldk 11y agoThe problem is there are subtle differences between implementations that bite you in ways you never thought possible, and it's just aaaargh hard to get the same program running in the same way on two different Prologs. Or even between versions of the same implementation. E.g., I know of one project that sticks with SICStus 3, because in SICStus 4 findall/3 removes blocked goals from copied variables. This system relies quite heavily on blocked goals and working around this change turned out to be too expensive. (If I recall correctly ;).) Another example is SWI Prolog diverging from the ISO standard in version 7 (e.g. double quoted strings are now a type on their own, rather than a list of character codes). Luckily, there is a --traditional flag for older code. In both cases, there are good reasons for the changes, but it makes portability hard. Edit: wanted to add that this is not intended to be a critique of these particular (great) implementations of Prolog.
- YeGoblynQueenne 11y ago>> Or even between versions of the same implementation. E.g., I know of one project that sticks with SICStus 3, because in SICStus 4 findall/3 removes blocked goals from copied variables. This system relies quite heavily on blocked goals and working around this change turned out to be too expensive. When you say "blocked goals" do you mean it like: :-block(a_block). % ... stuff ... :-end_block(a_block). That sort of thing? Anyway yeah, sounds typical :/ With Swi I hurt a little recently when an update screwed up some of my stuff but then that was my fault for doing hacky tricks and trying to use modules as they're not meant to be. >> In both cases, there are good reasons for the changes, but it makes portability hard. Oh indeed. I started using 7.x the moment it was out pretty much, knowing that it means I'm tied to Swi for good and bad, but there's much more good than bad and so far I haven't regretted it.
- danieldk 11y agoWhen you say "blocked goals" do you mean it like: These: https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.html/mpg_002dref_002dwhen.html#mpg_002dref_002dwhen https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.ht... https://sicstus.sics.se/sicstus/docs/4.0.7/html/sicstus/Block-Declarations.html https://sicstus.sics.se/sicstus/docs/4.0.7/html/sicstus/Bloc...
- YeGoblynQueenne 11y agoAh, OK, when/2 -cheers :)
- nickpsecurity 11y agoThat makes sense. Ensuring compatibility and network effects were key attributes successful software in Gabriel's Worse is Better essays. That Prolog implementations have inadvertently sabotaged that effect probably contributes to them being less niche than they would be. Btw, have you tried Mercury? My last foray into logic programming made it seem like it was killing Prologs in quite a few fronts. Prover work moved onto HOL, Coq, etc. Some people still use it for type-checking and queries. Yet, seems hard for me... not a logic programmer btw... to justify Prolog given capabilities and results from other tools. Any ideas on why it's worth keeping around or would you use an alternative today? Regarding dissertation, I lost most of life's work when three HD's (main + 2 backups) all died within short time of each other. Encrypted with custom crypto that also fried haha. You can't run something you spent years on and is referenced in your degree. I feel your pain or irritation on that. ;) Note: Oh shit, it's a Magic the Gathering interpreter! I used to play that every day with friends like a decade ago to pass time at school/work. I even wrote some GUI's and game engines for it but really alpha stuff. Probably would've wrote an AI for it if I didn't discover Starcraft. Might try to read some of it this week if I get spare time even though idk Prolog anymore. Maybe I'll learn something anyway or get some nostalgia at the least. :)
- YeGoblynQueenne 11y ago>> Regarding dissertation, I lost most of life's work when three HD's (main + 2 backups) all died within short time of each other. Encrypted with custom crypto that also fried haha Ouch. Oh dear, that sounds horrible. >> Btw, have you tried Mercury? I've picked it up a few times but I keep coming back to vanilla Prolog. It's great but I'm a bit scared by the tiny amount of adoption. I know it's kind of ironic: low adoption feeds back on to itself. >> Any ideas on why it's worth keeping around or would you use an alternative today? I do a lot of nlp for university, and although I use Python for all the machine learning stuff, the text processing capabilities of Prolog are beyond any comparison with anything else. For instance, everyone uses regular expressions for tiny bits of parsing and string manipulation. Prolog uses a sort of pattern matching, unification, that is like regular expressions except without any special syntax and Turing-complete. For language processing, most interpreters have something called Definite Clause Grammars. In short, it's syntactic sugar that lets you declare a grammar, except the grammar is also a parser, that recognises and generate strings (because Prolog). They make developing a parser a piece of cake. Also, Prolog runtimes are essentially fast, in-memory relational databases, with added reasoning (and no SQL). I can think of many applications that could use that sort of thing. Plus, the language itself is the database, so there's no object-relational impedance mismatch and whatnot. >> Might try to read some of it this week if I get spare time even though idk Prolog anymore Thanks, I appreciate that. But please keep in mind: 5 years ago and embarrassing :)