[racket] macros make my head hurt--can someone help?

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Wed Jan 26 16:45:44 EST 2011

OK, I understand that the template language in (define-syntax ...)
doesn't give you access to the full panoply of Racket-ness. But I
really want to manipulate the template variables before passing them
on to the next step in the expansion. I've tried (define-for-syntax
..) and a couple of other things, but I keep getting errors about
identifiers being unbound and other things which indicate in a very
concrete way that I don't have a good grasp on how this all works.

I've tried reading the explanation in the Reference several times, but
I think you have to understand what it's saying before it makes sense.

Can anyone point me to a lecture, a paper, a chapter, or a chart that
explains exactly how Racket (and/or Scheme) gets evaluated? What's
defined when, how the namespaces are set up, examples of clever macros
that manipulate templates before they're output, etc?

If such a thing doesn't exist, could someone write something up? In
your copious free time? If I say pretty please? (This paragraph is
much more funny if you read it with up-talk on each sentence.) :-)


Posted on the users mailing list.