[gambit-list] DrScheme and GambitC

Joel J. Adamson <adamsonj@email.unc.edu> adamsonj at email.unc.edu
Tue Sep 2 09:20:40 EDT 2008


>>>>> "William" == William Cook <wcook at cs.utexas.edu> writes:

    William> I don't know emacs so I cannot comment on how it interfaces
    William> with the Gambit text-based debugger.

First of all, no one knows Emacs, it is unknowable ;)

As to the debugger, look at this:
,----
| (let loop ((lis (list 'monkey (+ 1 2) "I love Gambit!")))
|     ;; step through this ridiculous loop
|     (step)
|     (if (null? lis)
|         (error "No more funny messages")
|         (display (car lis))))
| *** STOPPED IN loop, (console)@214.10
| 1> ,s
| | > null?
| | #<procedure #16 null?>
| *** STOPPED IN loop, (console)@214.16
| 1> ,s
| | > lis
| | (monkey 3 "I love Gambit!")
| *** STOPPED IN loop, (console)@214.9
| 1> ,s
| | > (null? lis)
| | #f
| *** STOPPED IN loop, (console)@216.10
| 1> ,s
| | > display
| | #<procedure #17 display>
| *** STOPPED IN loop, (console)@216.19
| 1> ,s
| | > car
| | #<procedure #11 car>
| *** STOPPED IN loop, (console)@216.23
| 1> ,s
| | > lis
| | (monkey 3 "I love Gambit!")
| *** STOPPED IN loop, (console)@216.18
| 1> ,s
| | > (car lis)
| | monkey
| *** STOPPED IN loop, (console)@216.9
| 1> ,s
| | > (display (car lis))
| monkey| #!void
| > 
`----

At each calculation it stops, and you can step through with ,s.  At each
"step", a new window opens and highlights the current position in the
source code.  This works on the console (listener) and from a source
file.  That's just the tip of the iceberg.  At each step, you can get a
backtrace, print the environment and all that crap.  Gambit-mode also
links into cmuscheme mode so that the same compile-and-load commands
from MIT Scheme work with Gambit (using compile-file).

Yes, there is no completion or reminder-completion, like there is with
Slime, and that would be pretty cool, but I don't find it too
irritating.  For someone who just loves to use Emacs, it's pretty cool.
Quack is really cool too for the documentation links it provides (you
can look up any SRFI you want with a few keystrokes, but I"m unaware of
a debugger (if someone knows of one in Quack, please let me know).

Joel
-- 
Joel J. Adamson
University of North Carolina at Chapel Hill
CB #3280, Coker Hall
Chapel Hill, NC 27599-3280

Before you reply to this email, please read
http://www.unc.edu/~adamsonj/email-howto.html



More information about the Gambit-list mailing list