From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: guile-devel <guile-devel@gnu.org>,
"guile-user@gnu.org" <guile-user@gnu.org>
Subject: prolog
Date: Fri, 21 Mar 2014 20:59:33 +0100 [thread overview]
Message-ID: <CAGua6m3VCdzjkzdT4EVRpSmuvVyhFchi1da1mF1XAQUB94A1qQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
Ok, I've been working on a prolog shell in guile.
,help works as before
[+ 1 2] staring [ will mark a sexp evaluation normal sexp reader is used
X=1;X=2. And of cause prolog expressions ends with '.'
Then we will get:
prolog@(guile-user)> [use-modules (logic guile-log iso-prolog)]
prolog@(guile-user)> assertz(f(1)).
yes
more (y/n/a) > n
prolog@(guile-user)> asserta(f(a)).
yes
more (y/n/a) > n
prolog@(guile-user)> f(X).
X = a
more (y/n/a) > y
X = 1
more (y/n/a) > y
no
prolog@(guile-user)> ,help
Help Commands [abbrev]:
,help [all | GROUP | [-c] COMMAND]
[,h] - Show help.
,show [TOPIC] - Gives information about Guile.
,apropos REGEXP [,a] - Find bindings/modules/packages.
,describe OBJ [,d] - Show description/documentation.
Command Groups:
,help all - List all commands
,help module - List module commands
,help language - List language commands
,help compile - List compile commands
,help profile - List profile commands
,help debug - List debug commands
,help inspect - List inspect commands
,help system - List system commands
Type `,help -c COMMAND' to show documentation of a particular command.
prolog@(guile-user)> [+ 1 2]
$1 = 3
prolog@(guile-user)>
Happy hacking!
[-- Attachment #2: Type: text/html, Size: 2084 bytes --]
reply other threads:[~2014-03-21 19:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGua6m3VCdzjkzdT4EVRpSmuvVyhFchi1da1mF1XAQUB94A1qQ@mail.gmail.com \
--to=stefan.itampe@gmail.com \
--cc=guile-devel@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).