[gambit-list] Gambit-C v4.1.1 highlights

Marc Feeley feeley at iro.umontreal.ca
Sat Dec 15 23:05:42 EST 2007


Gambit-C v4.1.1 was released earlier today.  The Mac OS installers now  
work properly on Tiger (and Leopard).

Some of the REPL's debugging functionality is now available as  
procedures (e.g. display-continuation-backtrace and display- 
exception).  These can be used to implement specialized debuggers or  
error catchers.

Two new REPL commands have been added to inspect the environment of  
closures (the command ",(e <closure>)") and to start a REPL in the  
environment of a closure or continuation (the command ",(v <closure-or- 
continuation>)").  Here are some examples:

 > (define (f n)
     (define (square x) (* x x))
     (lambda (y) (- (square (+ y n)) (square (- y n)))))
 > (define g (f 1))
 > (g 10)
40
 > ,(e g)
square = (lambda (x) (* x x))
n = 1
 > ,(e (f 5))
square = (lambda (x) (* x x))
n = 5
 > ,(v g)
1> ,e
square = (lambda (x) (* x x))
n = 1
1> (square 10)
100
1> (set! n 2)
1> ,(e square)
square = (lambda (x) (* x x))
n = 2
1> ,t
 > (g 10)
80

Marc



More information about the Gambit-list mailing list