From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: guile-devel@gnu.org
Subject: schelog repl.
Date: Tue, 14 Dec 2010 23:03:36 +0100 [thread overview]
Message-ID: <201012142303.36594.stefan.itampe@gmail.com> (raw)
Hi everybody.
I'm just so satisfied with the progress that I just need to write this email
to cool down a little and so that you don't need to comment on the glitches
present before :-)
So, here is a script of a session,
nomenclature:
(<exec> (v ...) code ...) - binds initiates global schelog variables v ...
and then execute the schelog code 'code ...'
(<n> var n) - tries to bind schelog var to 1 ... n
(<take> n code) - finds the n next solutions values of code
in a tree search.
here is an interaction:
scheme@(guile-user)> (<exec> (a b))
scheme@(guile-user) [1]> (<exec> () (<n> a 10))
scheme@(guile-user) [2]> (<exec> () (<n> b 10))
scheme@(guile-user) [3]> (<take> 10 `(,(! a) ,(! b)))
$1 = ((1 1) (1 2) (1 3) (1 4) (1 5) (1 6) (1 7) (1 8) (1 9) (1 10))
scheme@(guile-user) [3]>
scheme@(guile-user) [2]> (<take> 2 `(,(! a) ,(! b)))
$2 = ((2 <gp>) (3 <gp>))
scheme@(guile-user) [2]> (<take> 2 `(,(! a) ,(! b)))
$3 = ((4 <gp>) (5 <gp>))
scheme@(guile-user) [2]> (<exec> () (<n> b 5))
scheme@(guile-user) [3]> (<take> 20 `(,(! a) ,(! b)))
$4 = ((6 1) (6 2) (6 3) (6 4) (6 5) (7 1) (7 2) (7 3) (7 4) (7 5) (8 1) (8 2)
(8 3) (8 4) (8 5) (9 1) (9 2) (9 3) (9 4) (9 5))
scheme@(guile-user) [3]> (<take> 20 `(,(! a) ,(! b)))
$5 = ((10 1) (10 2) (10 3) (10 4) (10 5))
scheme@(guile-user)>
Pretty nice!
Yes, is it okey to call these macros a schelog system or are that assuming a
special syntax that lead to problems. Maybe guile-log is better :-).
Cheers
Stefan
reply other threads:[~2010-12-14 22:03 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=201012142303.36594.stefan.itampe@gmail.com \
--to=stefan.itampe@gmail.com \
--cc=guile-devel@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).