Re: [racket-users] Require Transformers

2016-06-29 Thread Alexis King
Just for fun, if you want to be a little bit naughty, you can define a custom #%top transformer that will make unbound identifiers that are fully qualified automatically resolve to their imported values. Just do a little bit of processing on the unbound identifiers: #lang racket (require

Re: [racket-users] Require Transformers

2016-06-29 Thread Matthias Felleisen
Now cam someone show me how to get Racket-style requiring in Python :-) > On Jun 29, 2016, at 9:35 AM, Jay McCarthy wrote: > > I think you want this: > > #lang racket/base > (require (for-syntax racket/base > syntax/parse >

Re: [racket-users] Require Transformers

2016-06-29 Thread Jay McCarthy
I think you want this: #lang racket/base (require (for-syntax racket/base syntax/parse racket/require-transform racket/syntax)) (define-syntax ns-in (make-require-transformer (λ (stx) (syntax-parse stx [(_ mp:id)

Re: [racket-users] Require Transformers

2016-06-29 Thread Alex Knauth
> On Jun 29, 2016, at 9:05 AM, Shakna Israel wrote: > > I'm trying to introduce an implicit binding for require. > > One of the features I love about Python, is the namespace binding. > > import sys > > sys.stdout.write("Sweet") > > I know this can also be accomplished