[gambit-list] Trying to build termite with beta 22

Bradley Lucier lucier at math.purdue.edu
Wed Apr 18 22:29:47 EDT 2007


There have been some attempts to build termite with gambc-4.0b22, and  
I had tried it earlier without success, so I thought I'd report my  
attempt more clearly so somebody might be able to help (hi,  
Guillaume!).  Basically, I think the definition of ##make-macro-descr  
in _eval.scm has changed, so the use of it in termite should be  
updated.  If I'm right, perhaps someone can tell me why I get

[brad:~/programs/termite/examples] lucier% gsi cell.scm
*** ERROR IN "cell.scm"@21.24 -- Datum or EOF expected

after I install gsi+termite.  cons.scm at least finishes:

[brad:~/programs/termite/examples] lucier% gsi cons.scm
#<kons #2>
1
2
(1 . 2)
(123 . 2)
done

Shat start[123].sh are supposed to do is anybody's guess ;-).

Brad

I used the darcs command at toute.ca to download termite.

To debug, I changed termite.scm as follows:

[brad:~/programs/termite] lucier% rcsdiff termite.scm
===================================================================
RCS file: RCS/termite.scm,v
retrieving revision 1.1
diff -r1.1 termite.scm
43c43
< (compile-time-load "termite/match-support.scm")
---
 > (compile-time-load "match-support.scm")
70a71
 > #|
82a84,85
 > |#
 >

I put the the time-related stuff in termite-time.scm:

(c-declare "#include <time.h>")

(define formatted-current-time
   (c-lambda () char-string
     "time_t t;
      struct tm* tm;
      char str[64];
      time(&t);
      tm = localtime(&t);
      strftime(str, 64, \"20%y-%m-%d %H:%M:%S\", tm);
      ___result = str;"))

So now I can compile and load termite-time separately and I load  
termite.scm into the interpreter, and I immediately get:

^C[brad:~/programs/termite] lucier% gsi
Gambit Version 4.0 beta 22

 > (load "termite-time")
"/Users/lucier/programs/termite/termite-time.o1"
 > (load "termite.scm")
*** ERROR IN "match.scm"@6.1 -- Wrong number of arguments passed to  
procedure
(##make-macro-descr -4 '#<procedure #2> #f)
1>

Looking at the definition of ##make-macro-descr in _eval.scm,   
perhaps you need:

--- termite.scm 2007/04/19 01:57:02     1.1
+++ termite.scm 2007/04/19 02:11:02
@@ -30,6 +30,7 @@
          ##interaction-cte
          ',(car pattern)
          (##make-macro-descr
+         #f
           ',(form-size (cdr pattern))
           ,src
           #f)))))




More information about the Gambit-list mailing list