Re: [racket] ~a and sandbox

2014-01-24 Thread Robby Findler
This is probably because ~a has a contract on it and the contract system does fancy stuff to figure out names for blame assignment, including possibly looking at that file. This problem has been fixed in the current git code and the fix should be included in our next release (due out soon). Robby

Re: [racket] selectively local-expand sub-expressions

2014-01-24 Thread Scott Klarenbach
Just an update, I was able to make this work. #lang racket (require (for-syntax racket/syntax syntax/stx)) (define-syntax-rule (pred? x) (> 3 x)) (define-for-syntax (recursive-expand stx) (let loop ([l (syntax->list stx)]) (cond [(stx-null? l) l] [(stx-pair? (stx-car l)) (cons (loop (stx-

[racket] ~a and sandbox

2014-01-24 Thread 75thNumber .
i'm using racket textual v5.3.6 on windows. ~a seems to be crashing my sandboxed programs. Here's an example (foo.rkt): #lang racket/base (require racket/sandbox) (define evaluate (make-evaluator 'racket '(define (main) (~a (+ 1 2) (evaluate '(main)) When I run foo.rkt at the pro

[racket] Nested macros to refer to user's lexical context?

2014-01-24 Thread Sean Kanaley
A macro like (define-syntax (mac stx) (... generate user scope function by passing stx to format-id ...)) doesn't work (function is unbound in phase 0) if I use optional parameters and telescoping cases: (syntax-case ... [(_ param ...) #'(mac some-default-thing param ...)] [(_ optional-thi