14 ms·
The birth of Prolog (1992) [pdf]
- dang 6y agoIf curious, past threads: Prolog and Logic Programming Historical Sources Archive - https://news.ycombinator.com/item?id=22658770 https://news.ycombinator.com/item?id=22658770 - March 2020 (33 comments) The Birth of Prolog (1992) [pdf] - https://news.ycombinator.com/item?id=18178215 https://news.ycombinator.com/item?id=18178215 - Oct 2018 (39 comments) A Tribute to Alain Colmerauer (2001) - https://news.ycombinator.com/item?id=15254369 https://news.ycombinator.com/item?id=15254369 - Sept 2017 (1 comment) In Memoriam Alain Colmerauer: 1941-2017 - https://news.ycombinator.com/item?id=14399688 https://news.ycombinator.com/item?id=14399688 - May 2017 (5 comments) Others? Prolog itself is probably too big a theme to list here, but Prolog origins? (Edit: thanks to commenter who supplied now-deleted reference.)
- deleted 6y ago[deleted]
- nextos 6y agoThe history of Erlang is also intimately related to Prolog, as explained by Joe Armstrong in this article: https://www.cse.chalmers.se/edu/year/2009/course/TDA381_Concurrent_Programming/ARCHIVE/VT2009/general/languages/armstrong-erlang_history.pdf https://www.cse.chalmers.se/edu/year/2009/course/TDA381_Conc... It's quite amazing how one can implement Erlang or basically any other language prototype as a Prolog metainterpreter.
- ProfHewitt 6y agoStrict logic programs (including Prolog) do not implement concurrency, which motivated the invention of Actors. For more information see the following: "Information Security Requires Strongly-Typed Actors and Theories" https://papers.ssrn.com/abstract=3418003 https://papers.ssrn.com/abstract=3418003
- tom_mellior 6y agoThere's also this classic paper that actually contains Prolog code for (reconstructed versions of?) the first metainterpreters that became Erlang: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.3972&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34....
- macintux 6y agoThat’s amazing, thanks. Somehow I had never stumbled upon this before.
- pjmlp 6y agoWhen I did my degree, the compiler assignment could be done in any language except for Lisp and Prolog as compiler implementation language. The rationale? It would be a child's play if we used them.
- emmanueloga_ 6y agoI was wondering if anyone knows of a resource in the same vein as [1] or [2] but to implement a prolog interpreter instead of lisp. 1: https://github.com/kanaka/mal https://github.com/kanaka/mal 2: http://www.buildyourownlisp.com/ http://www.buildyourownlisp.com/
- howerj 6y agoI was hoping there would be something like this as well, all of the prolog interpreters out there are either too complex or do not explain how they work. I might have to write something myself as implementing your own (toy) interpreter is a good way to fully understand the concepts behind the language.
- ookdatnog 6y agoPerhaps not quite what you're looking for, but the free MIT book "Structure and Interpretation of Computer Programs" (https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html https://mitpress.mit.edu/sites/default/files/sicp/full-text/...) has a section on interpreting logic programs (section 4.4) in Scheme. I think it's sufficient to understand the semantics of Prolog, but I'm not sure how much of the rest of the book you'd need to read to understand that chapter (it's an amazing book though!) edit: to be clear, in the book you interpret a logic programming language with lisp-like syntax
- gglitch 6y agoI believe several of the canonical Lisp books implement a simple Prolog as an exercise. I’m pretty sure Norvig’s Paradigms of Artifical Intelligence Programming, pg's On Lisp, and Winston & Horn’s Lisp all do.
- Jtsummers 6y agoThe relevant section of PAIP: https://github.com/norvig/paip-lisp/blob/master/docs/chapter11.md https://github.com/norvig/paip-lisp/blob/master/docs/chapter... Also worth exploring The Reasoned Schemer which teaches minikanren, which can be (and has been) implemented in many programming languages. It explores much of the same space as Prolog. I wrote most of a minikanren in Common Lisp while working through the book (someone else had already published a version to quicklisp which was better than what I made).
- ProfHewitt 6y agoAs Kowalski has acknowledged and reported by others, Prolog was invented as a subset of Planner that only implemented backward chaining. See the following for further information: "Middle History of Logic Programming: Resolution, Planner, Prolog and the Japanese Fifth Generation Project" ArXiv 2009. https://dev.arxiv.org/abs/0904.3036 https://dev.arxiv.org/abs/0904.3036
- deleted 6y ago[deleted]
- inetsee 6y agoThe link provided takes me to a "Test server", and an abstract titled "Inconsistency Robustness in Logic Programs". Clicking on the pdf download link returns "Not Found". Searching arxiv for "middle history of logic programming" produces no results. I would really like to read more about Planner, but I have had no luck searching for this paper.
- buescher 6y agohttps://www.cs.unm.edu/~eschulte/classes/cs550/data/middle-hist-lp.pdf https://www.cs.unm.edu/~eschulte/classes/cs550/data/middle-h...
- inetsee 6y agoThank you very much for helping me find this paper, but I am still somewhat confused. When I couldn't find the paper in arxiv, it didn't occur me at first to go back to the beginning and use a general search engine. When I did plug the title into DDG it took me to arxiv, which had the expected abstract and a working link to the pdf. But doing another search in arxiv returned "No Results", even though I had put in the exact title from the abstract I was just looking at. A little more digging uncovered the fact that the paper in question has gone through 41 revisions, and somewhere along the line the title was changed from "Middle History of Logic Programming: Resolution, Planner, Edinburgh LCF, Prolog and the Japanese Fifth Generation Project" to "Inconsistency Robustness in Logic Programs", which is still rattling my brain a little bit. edit: The working link I found is https://arxiv.org/abs/0904.3036v22 https://arxiv.org/abs/0904.3036v22
- gglitch 6y agoOne of the debates I always enjoy when it shows up on HN is the comparison of lightweight serialization formats, especially, e.g., sexprs vs json. I don’t believe I’ve ever seen Prolog terms show up, but they seem apposite.
- sedachv 6y agoOne of those three is not like the others. Prolog is homoiconic. JavaScript programs are not JSON. Parsing Prolog terms is easy. Parsing JSON correctly is very difficult: http://seriot.ch/parsing_json.php http://seriot.ch/parsing_json.php
- gglitch 6y agoIt seems to be conventional to use the homoiconicity of Tcl to serialize data out in a way intended to be interpreted back in again as code [0], but I don’t think I’ve seen this recommended by Lispers. [0] - e.g. https://trs.jpl.nasa.gov/bitstream/handle/2014/7660/03-1728.pdf https://trs.jpl.nasa.gov/bitstream/handle/2014/7660/03-1728....
- tom_mellior 6y ago> Parsing Prolog terms is easy. Parsing JSON correctly is very difficult: http://seriot.ch/parsing_json.php http://seriot.ch/parsing_json.php Most of that page is about character escaping as well as Unicode and floating point corner cases. You'll need to handle the same corner cases if you want to write a robust Prolog parser (it's slightly simpler if you cheat by rejecting Unicode).
- tannhaeuser 6y agoBasic JSON support using Prolog's built-in operator precedence parsing or pio lib should be as easy as :- op(600, xfy, :). MyJSON = { "this": "bla", "that": 100, "L": [ 1, "two", 3 ] } provided your Prolog has curly braces (should come with DCGs).