Re: [racket-users] Macro calling macro question

2016-05-20 Thread Kevin Forchione
Both techniques worked for me! Thanks! I’m not sure why (format-id #’n “foo~a” [syntax-e #’n)) works when (format-id six “foo~a” (syntax-e #’n)) does not though. Apparently I need to look into the differences between the two contexts. -Kevin > On May 20, 2016, at 2:58 PM, Sam Caldwell

Re: [racket-users] Macro calling macro question

2016-05-20 Thread Sam Caldwell
Kevin, I have made this exact mistake in the past. The trouble is with the lexical context being passed to `format-id`. (_foo 3) foo3 ;; 3 Here, _foo is passed the syntax #'(_foo 3), which came from the same environment as the reference, foo3. (foo 3) foo3 ;; error ... Here, _foo is passed

Re: [racket-users] Macro calling macro question

2016-05-20 Thread Jens Axel Søgaard
The macro application (foo 3) expands into #'(begin (_foo n0) (foo n ...)) The expansion of (_foo n0) then defines foo3, but the scope will only include the piece of code above. To make definitions made by sub-macros available

[racket-users] Macro calling macro question

2016-05-20 Thread Kevin Forchione
Hi guys, I’ve been interested in having a macro build a series of defines. So I decided to start small, trying to get to a macro that would do something like the following to begin with: >(foo 3) (define foo1 1) (define foo2 2) (define foo3 3) I start with a macro that appears to do a single

[racket-users] file inclusion and optional text

2016-05-20 Thread Hendrik Boom
I's like to try mixing texts written in scribble with those written in another notation. I have a program that transltes files in the other notation to HTML (or to open document format, for that matter). It there an easy way to invoke it during scribble processing and use it to convert the

Re: [racket-users] mode-lambda example doesn't work?

2016-05-20 Thread hashim muqtadir
I seem to be facing a different issue though it fits into the same topic; i.e. the example mentioned in the docs does not work for me. Anyway when I try to run the example, I get the following output: $ racket -l mode-lambda/examples/one You can press these keys: r - show random