unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* schelog repl.
@ 2010-12-14 22:03 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2010-12-14 22:03 UTC (permalink / raw)
  To: guile-devel

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-14 22:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 22:03 schelog repl Stefan Israelsson Tampe

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).