by padraic7a · 7y ago · 0 comments
I had always heard of Prolog as being obscure and overly academic. It's popped up a little bit recently however - the last place I heard of it in use is in the recently launched TerminusDB https://github.com/terminusdb?language=prolog
Both Haskell and Prolog seem to run on a school-year cycle where search interest peaks a little before the end of the semester. Prolog's cycle is significantly more pronounced, suggesting the interest is indeed purely academic. Whereas Rust has been growing steadily and shows little seasonality.
I'd say it's random chance, given X million programmers and Y million articles there's always somebody who will see a lot of Z topic.
Terminus in particular seems to be an extension of work Gavin did during his postdoc, in particular the Dacura stuff mentioned here: http://aligned-project.eu/open-source-tools/. He deleted the DQS repository for some reason but there's a mirror here: https://github.com/bozicb/dacura-1.
By inflating the search results they'll encourage the competition to spend inordinate amounts of time learning cat theory and trying to get the compiler to understand their code. In the mean time they'll hack it together in Perl.
Sorry for the inappropriate about at humour, I couldn't resist.
That's not to say that Haskell isn't used in China; there is a visualization group in Didi (Chinese Uber) that uses it, Haskell/FP user groups, university classes, etc. But there's no obvious reason that Haskell would have massively shot up in the past 3 days.
http://wadler.blogspot.com/2015/04/prime-minister-of-singapo...
He is already quite good with C++
https://arstechnica.com/information-technology/2015/05/prime...
foo(X, Y) :-
some_condition(X),
!,
bar(Y, X).
foo(X, Y) :-
baz(X, Y).
to: foo(X, Y) :-
( some_condition(X)
-> bar(Y, X)
; baz(X, Y) ).
and get the same performance and clearer code.There are really very few actually useful uses of the cut in modern Prolog code. But we have no good, free, current teaching materials, so people get stuck learning the old ugly and convoluted ways.
Unfortunately since it's almost impossible to model ideas without stuff like the arrow, cut, or \+ (not) operators, writing actual pure logical Prolog programs that actually do interesting things is supremely difficult.