As a followup to the Module System project that Christian Jaeger and I have discussed, as described here (http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Module_System ), this message goes to the Gambit list. However, the intention of this message is to ask Marc about Gambit's expansion mechanism.
The project still loosely exists, though it is very much in phase 1, where Christian and I are independently developing different protoypes.
After doing a lot of research, I became very interested in the portable syntax-case implementation that Gambit currently adopts. It is quite powerful and should fulfill my needs. My current goal then is to work on better integration of Gambit and syntax-case. If I can fix most of the current problems (location information, etc.), and build a lightweight configuration language on top of it, that would go very far.
It's very hard to start digging through Gambit's expansion/compiling mechanism though. Are there any wiki pages that would describe anything about Gambit's source code transforming mechanisms? (side note: Is there a way to see all of the pages on the wiki?) If not, I was wondering if Marc, or anyone else who has had experience with all of this, would be interested in working with me on this, at least just to help get it going. Maybe Christian has had experience in this area?
Marc has stated his interested in this, as in the following email: https://webmail.iro.umontreal.ca/pipermail/gambit-list/2005-December/000512....
I'm curious about the "few bits and pieces" mentioned in that email.
I started by looking at the portable syntax-case's SC-EXPAND procedure, and looking at how it was hooked in to gambit. What I found was the ##EXPAND-SOURCE procedure, but I was quickly stuck at what to do with it.
(set! ##expand-source (lambda (x) (pp x) x)) (define foo 5)
#(#(source1) (#(#(source1) define (console) 65537) #(#(source1) foo (console) 524289) #(#(source1) 5 (console) 786433)) (console) 1)
I've started digging through Gambit's internals to figure out what type of record this is, but it's going very slowly.
Thanks, - James
Afficher les réponses par date
On Apr 25, 2008, at 2:54 AM, James Long wrote:
After doing a lot of research, I became very interested in the portable syntax-case implementation that Gambit currently adopts. It is quite powerful and should fulfill my needs. My current goal then is to work on better integration of Gambit and syntax-case. If I can fix most of the current problems (location information, etc.), and build a lightweight configuration language on top of it, that would go very far.
Turns out I was wrong. Christian Jaeger has told me that Marc has finished integrating source code location information with the portable syntax-case implementation, so its integration is already really good.
What's left is a few pieces of code to work with portable syntax- case's modules a little easier, which isn't much to shout about. I'll probably throw something together and put it up on the Dumping Grounds.
Christian has helped me start digging through the Gambit sources as well.
- James