[HN Gopher] The Janus System: Multi-Paradigm Programming in Prol...
___________________________________________________________________
The Janus System: Multi-Paradigm Programming in Prolog and Python
Author : woolion
Score : 74 points
Date : 2023-09-01 13:06 UTC (9 hours ago)
(HTM) web link (arxiv.org)
(TXT) w3m dump (arxiv.org)
| photon_lines wrote:
| Cool. I wrote a subset of Prolog using only a few lines of Python
| and if anyone is interested, you can find it here:
| https://github.com/photonlines/Python-Prolog-Interpreter
| galaxyLogic wrote:
| How about (creating) a Prolog interpreter which consumes and
| outputs JSON?
|
| Then use #SheBang to make any such prolog-file interpreted by
| that interpreter to return JSON to the caller. Then it could be
| integrated to ANY program written in any language which uses the
| Unix shell-calling conventionss.
| convolvatron wrote:
| this is certainly a very useful idea. the Rego datalog language
| leans on this pretty heavily, although its emphasis is on
| access policy more than general transforms.
|
| ddlog is another datalog variant that supports this, but I
| believe you need to specify the schema as a rust type
| anentropic wrote:
| It appears that this originated with XSB Prolog but subsequently
| SWI Prolog is offering something similar/compatible too:
|
| https://www.swi-prolog.org/pldoc/man?section=janus-intro
|
| https://swi-prolog.discourse.group/t/a-bundled-python-interf...
| refset wrote:
| Just noting that the documentation found at your first link is
| much easier to skim by clicking on the parent section - i.e.
| https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p...
| herodotus wrote:
| Anyone interested in calling Prolog from an imperative
| programming language might be interested in this 1995 paper:
|
| https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...
| winter_blue wrote:
| Wow, this is pretty awesome. Does anyone know if there are any
| languages that implement this?
| bmitc wrote:
| I think it would be easier to embed Shen in a language. By
| implementating the kernel language KLamba, you get Shen,
| which includes a Prolog.
| [deleted]
| leetrout wrote:
| Related...
|
| Prolog -(ish)-> Datalog -> Rego & OPA
|
| https://www.openpolicyagent.org/docs/latest/policy-language
|
| https://pypi.org/project/opa-python-client/
___________________________________________________________________
(page generated 2023-09-01 23:01 UTC)