[racket] bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Aug 31 12:39:02 EDT 2011

8 hours ago, Neil Van Dyke wrote:
> Matthew Flatt wrote at 08/30/2011 07:13 PM:
> > At Tue, 30 Aug 2011 19:03:24 -0400, Neil Van Dyke wrote:
> >   
> >> Thanks, Carl and Robby.  I need to set up the lexical context to be that 
> >> of the macro, while preserving the source position info.  I will look 
> >> into the pointers you gave me for how to do that.
> >>     
> >
> > One more pointer: `replace-context' from `syntax/strip-context'.
> >   
> 
> "replace-context" was exactly what I needed.  Thank you, PLTers.
> 
> Working code pasted below in case anyone Googles this in the future.
> 
> Aside... Once Carl and Robby pointed out what I was missing, my
> summary was a close match for the documentation of
> "replace-context".  Perhaps some grad student wants to see if
> there's anything that can be done with IR and NLP here, for finding
> library routines

Google does that well.


> or even composing small expressions with them.  Use natural
> language, and possibly the context of code in a DrScheme window.
> Something that does better than Google could, but short of handling
> "Computer, write me a program that..."

The composition aspect is not something that google does, but it's
something that was very discussed for a good while.  Even going the
other -- seemingly easier -- way, from a formal language to a natural
one is already extremely difficult to do well.  (As a known NLPer
experienced first-hand...)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.