• e

    Emmanuel Oga

    1 year ago
    came across this book that I haven't heard about before, maybe people here will find it interesting http://webdam.inria.fr/Alice/
    e
    1 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    resources to implement prolog interpreters https://news.ycombinator.com/item?id=26242450
    e
    w
    2 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    Found out that PAIP's chapter 11 is a nice intro to implementing prolog https://github.com/norvig/paip-lisp/blob/master/docs/chapter11.md Although, yeah... had to undust my commonlisp environment to work through it 😛 Chapter 12 is about compiling a prolog like dialect, haven't look at the chapter yet but looks interesting too. PAIP also recommends:
    Maier and Warren's Computing with Logic (1988) is the best reference for those interested in implementing Prolog. It starts with a simple interpreter for a variable-free version of Prolog, and then moves up to the full language, adding improvements to the interpreter along the way.
    ... seems to be a cool book but a bit archaic with example code in Pascal... but I guess Pascal is a simple enough language to port to something else without too much effort... hopefully 😛 The bad thing is that I couldn't find the source code anywhere so I'm afraid it may be missing bits and pieces in the book.
    e
    1 replies
    Copy to Clipboard
  • Rob Haisfield

    Rob Haisfield

    1 year ago
    With the addition of LAMBDA (a way to write reusable functions) in Excel, could logic programming translate well into a spreadsheet format? I found an old paper that talks about it but not many examples. https://dl.acm.org/doi/abs/10.1145/67449.67466
    Rob Haisfield
    j
    2 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    does anybody know if the ":-" from prolog has a name? I thought it was a textual form of "turnstile", but it seems the turnstile operator works on the "opposite direction"
    e
    CocoaGeek
    +2
    7 replies
    Copy to Clipboard
  • Rob Haisfield

    Rob Haisfield

    1 year ago
    So if I’m understanding logic programming right, it’s basically that I specify the conditions that need to be at some degree of truthiness, and it builds out from there? How does that relate to the actor model?
    Rob Haisfield
    Konrad Hinsen
    +2
    5 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    Following some prolog tutorials, it looks like the data/terms always has sort of a "global scope". How do ppl manage the "database" on medium / big prolog programs? Can there be more than one database? Are there some sort of namespacing and/or modularity features? Sometimes the concept of relations is a bit mind-boggling because it seems difficult to distinguish between relations that act as "routines" or "procedures", or something alike, and terms that act more like pure data. It just feels like, if I was writing an imperative program in prolog style, it would be something akin to code interspersed with, say, embedded CSV data 😕 Hope this makes a bit of sense 🙂
    e
    j
    +2
    7 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    what are good examples of embedded logic programming into other languages? All I can think of are "prologs in lisp" https://docs.racket-lang.org/racklog/ https://github.com/clojure/core.logic https://franz.com/support/documentation/current/doc/prolog.html
    e
    Mariano Guerra
    +2
    4 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    Been thinking a bit about "custom unification", or extensible unification. It seems it is a pretty common thing: A library that implements unification / custom unification in JavaScript Extending unification in clojure's core.logic An unification library for Python Also TIL SWI prolog supports maps/dictionaries Wondering how much it makes sense to use more complex data structures in prolog-like searches. Datalog seems to be an example that going "the other way", being more restrictive, may be more productive:
    Datalog disallows complex terms as arguments of predicates, e.g., p (1, 2) is admissible but not p (f (1), 2)
    Perhaps unification of complex/custom data structures is more productive for pattern matching than for general logic programming ... but not sure (SWI prolog's dict maybe contradicts this idea).
    e
    Nick Smith
    4 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    I was wondering what, if any, was the connection between prolog and theorem provers: https://www.metalevel.at/prolog/theoremproving
    e
    Nick Smith
    +1
    3 replies
    Copy to Clipboard