[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-babel for prolog

From: Bjarte Johansen
Subject: Re: [O] org-babel for prolog
Date: Fri, 2 Jan 2015 14:29:49 +0100

I thought you should know that I moved the project here: https://github.com/ljos/ob-prolog This makes it a bit easier for me to track issues and do proper commit-messages etc.

I have now implemented the session stuff properly (I think). I still have to implement the variable stuff and expansion of the body (or I can perhaps just use the generic function). 

19. des. 2014 kl. 16.25 skrev Bjarte Johansen <address@hidden>:

I just wanted to report that it is now possible to evaluate prolog code and it should return the correct result. Both as a call to the executable and in a session. When calling a goal in a session, I add a cut at the end of the goal so that prolog doesn’t ask if you want to get the next possible answer. I am not sure if this is the best approach.

I haven’t implemented variable assignment yet because I haven’t decided how it should do that considering how prolog uses variables. If someone has any ideas for this I would be glad to hear them. I have considered entering the variables into the prolog database with the record predicates or replacing all prolog variables with the same name as in the var declaration with the value. The last one I don’t think is a particularly good idea, except if we only replace the free variables.


10. des. 2014 kl. 18.20 skrev Bjarte Johansen <address@hidden>:


I have started to implement org-babel support for (swi-)prolog. I have gotten to the point where I can execute a goal in an external process and have the result show up in the org file. I am now working on getting the session to work correctly. It runs and prints, but it doesn’t do the correct thing in the inferior-mode-buffer and the output is garbled. I still have some work ahead of me.

I just thought I would let you know in case someone was interested in following the progress or maybe also in helping me. I have the mode hosted in its current state here https://gist.github.com/ljos/2e346333e1b7bfd56d05 . 

And before you ask, yes, if I get this into a working order, I would eventually be interested in getting this into either contrib or core.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]