[gambit-list] anyone get schelog working with gambit-c?

naruto canada narutocanada at gmail.com
Tue Aug 21 22:08:26 EDT 2007


On 8/22/07, Bradley Lucier <lucier at math.purdue.edu> wrote:
>
> On Aug 21, 2007, at 8:16 PM, naruto canada wrote:
>
> > anyone get schelog working with gambit-c?
> > I've tried both schelog.scm and gambit-schelog.scm, both versions
> > get me:
> > *** ERROR -- Ill-formed expression
>
> Your reports of the error messages you get are out of context and not
> very useful.

This is what I did, I simply copy the two files to my working dir, and then

(if (equal? "gambit-c" interpreter) (set! void (load "gambit-schelog.scm"))
    (set! void (load "schelog.scm"))
)
(%which () %true)

I get:
*** ERROR -- Ill-formed expression
()

It seems to return the correct answer "()", but still shows an error
message-- strange.

>
> > if anyone has managed to get it working please let me know. thanks.
>
> You can download a version you can compile and that will work from
>
> http://www.math.purdue.edu/~lucier/software/schelog/
>
> (which you can get to from my home page if necessary).  I had to fix
> makeport.scm because the getenv in recent gambit betas is different
> from getenv in older betas.
>
> You build Schelog by:
>
> > [brad:~/Desktop/schelog] lucier% gsi makeport

Thanks, it works now, this is what I did.
first, "makeport" couldn't detect my OS, so I modify it:

;(set! *operating-system*
;  (case *dialect*
;    ((bigloo gambit guile mzscheme petite scm stk)
;     (cond ((getenv "COMSPEC") 'windows)
;           (else 'unix)))
;    ((mitscheme)
;     (cond ((get-environment-variable "COMSPEC") 'windows)
;           (else 'unix)))
;    ((pscheme) 'windows)
;    (else
;      (display "What is your operating system? [unix windows]")
;      (newline)
;      (read))))
(set! *operating-system* 'unix)

ok, now makeport works,
/usr/4.0b22/bin/gsc gambit-unix-version-of-schelog.scm

/usr/4.0b22/bin/gsi
Gambit Version 4.0 beta 22

(load "gambit-unix-version-of-schelog")

(%which () %true)
(%which () %fail)


> > What is your Scheme dialect? [bigloo gambit guile mitscheme
> > mzscheme petite pscheme scm stk]
> > gambit
> > Porting schelog.scm...
> > Resulting file is `gambit-unix-version-of-schelog.scm'
> > You may want to rename it
>
> I compiled it with
>
> > [brad:~/Desktop/schelog] lucier% gsc gambit-unix-version-of-
> > schelog.scm
>
> I then cd'ed to the examples directory and ran the houses puzzle:
>
> > [brad:~/Desktop/schelog/examples] lucier% gsc
> > Gambit Version 4.0 beta 23
> >
> > > (load "../gambit-unix-version-of-schelog")
> > "/Users/lucier/Desktop/schelog/examples/../gambit-unix-version-of-
> > schelog.o1"
> > > (load "houses.scm")
> > "/Users/lucier/Desktop/schelog/examples/houses.scm"
> > > (load "puzzle.scm")
> > "/Users/lucier/Desktop/schelog/examples/puzzle.scm"
> > > (solve-puzzle %houses)
> > ((solution= ((japan owns the zebra) (norway drinks water))))
>
> So it seems to work.
>
> > I will see if I can get in touch with the author.
>
> I think Dorai has moved on to other things; he may not be interested
> in supporting it any more.
>
> Brad
>



More information about the Gambit-list mailing list