3 ms·
There's no simple list, really...it's just highly domain specific. I can give you an example though. At work, we have a very large set of data representing ind
by Blackthorn 12y ago
There's no simple list, really...it's just highly domain specific. I can give you an example though.
At work, we have a very large set of data representing individual "runs" that has to be "scored" (given various different numbers) in an ever-growing list of complicated ways. Originally these scorers were written in Python. This proved to be very difficult to maintain, and we recently moved to writing these in a Prolog-like language (not Prolog, but close enough for this discussion). At the end of the day it feels kind of like a much more powerful SQL (which makes sense, as SQL is a "relational" programming language and quite similar in concept). The facilities of logic programming perfectly fits this use case.
Similarly, you might take a look at anything people use "miniKanren" (an embeddable logic DSL) for. The fundamental thing to realize about Prolog, imho, is that while it's Turing-complete and has GUI facilities I wouldn't really call it a general-purpose programming language. It really works best as something like a DSL when you have tasks that require lots of logic and searching.
edit: Actually, writing this, I have a list for you. Do you need to perform a search and compute a result over a big data set, sort of like (in theory) you would with SQL on a relational DB? Then that's where logic programming languages shine.
- rbc 12y agoBoth GNU and SWI Prolog have bi-directional C interfaces. Prolog can be used as a mini-language under C, at least with those implementations.