4 ms·
For comparison, it's also quite easy to mess up the performance of a JavaScript program, and yet it's part of a web standard. My recommendation in cases of poor
by zmonx 9y ago
For comparison, it's also quite easy to mess up the performance of a JavaScript program, and yet it's part of a web standard. My recommendation in cases of poor performance is to improve Prolog systems by features that yield better performance. Examples: better virtual machines, JIT indexing, tabling, constraints, goal reordering as in Mercury etc., all of which are now becoming part of modern Prolog systems.
Important advantages of logic programs over functional ones is that logic programs are typically shorter and more general, and ideally well suited for describing domain-specific knowledge (such as styles and layouts) declaratively. Prolog is already part of the semantic web to considerable extent, albeit disguised as RDF and complex query languages with a different syntax than Prolog. It could have been Prolog all along, and some members of the committees have suggested that in fact.
- tannhaeuser 9y agoFun to hear from another Prolog fan here. Like you, I came back to Prolog from SPARQL/OWL2, and share your opinion. My upcoming SGML system (sgmljs.net) will also feature a full ISO Prolog engine for querying over document metadata (there's even a "tolog" Prolog profile for this, which at one point was considered to become an ISO standard [1]). Do you know of Prolog systems for layout computation of CSS or other layout languages? I "know" Prince/PrinceXML (Mercury-based) and the begin of a formal specification for CSS as logic/attribute grammar [2] (from 2009). [1]: http://www.ontopia.net/section.jsp?id=specifications http://www.ontopia.net/section.jsp?id=specifications [2]: https://lmeyerov.github.io/projects/pbrowser/pubfiles/extended.pdf https://lmeyerov.github.io/projects/pbrowser/pubfiles/extend...
- zmonx 9y agoAwesome work and links! For dynamic layout generation with Prolog, I recommend you start with the PhD thesis of Joost Geurts: https://pure.tue.nl/ws/files/2135764/200613391.pdf https://pure.tue.nl/ws/files/2135764/200613391.pdf Joost uses Prolog CLP(FD) constraints and other declarative language features for reasoning about multimedia data. See also the following paper: https://espace.library.uq.edu.au/view/UQ:7851 https://espace.library.uq.edu.au/view/UQ:7851 However, I must correct one misconception: I did not "come back from SPARQL/OWL2" to Prolog. Rather, when the whole RDF/SPARQL hype started, I could only hope that in due time, this will all stop again and turn back to Prolog, which now, years later, is slowly happening. Prolog FTW! It's a great language for formal specifications and declarative descriptions of all kinds of data, including layouts. I hope your project becomes a great success. ISO compliance is definitely a great benefit and will help adoption in large organizations considerably.
- marcosdumay 9y agoI disagree that it's equally easy to mess languages of any other paradigm. One simply does not code a linear time algorithm into a super-exponential time program by mistake in javascript. At least, not often. That said, the DOM is actually not that large. My comment may be an overreaction.