Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-15 Thread Matthew Flatt
At Fri, 15 May 2015 11:09:25 -0400, Philip Blair wrote: > One question I have is whether or > not the scopes feature is something which I can more or less count on being > available in future versions of Racket That's not yet clear. Although most existing code would be unaffected by the change to

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-15 Thread Philip Blair
Sorry for the delay (I was moving earlier this week). Thank you for taking a crack at the task. One question I have is whether or not the scopes feature is something which I can more or less count on being available in future versions of Racket (I understand that it's from a snapshot and might the

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-14 Thread Ryan Davis
> On May 10, 2015, at 19:04, Matthias Felleisen wrote: > > Probably off-topic: you might be interested in > > http://repository.readscheme.org/ftp/papers/sw2003/Scmxlate.pdf > > Start with the title and then the summary at the end. Dorai has used this > package to make his programs availabl

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-10 Thread Matthias Felleisen
Probably off-topic: you might be interested in http://repository.readscheme.org/ftp/papers/sw2003/Scmxlate.pdf Start with the title and then the summary at the end. Dorai has used this package to make his programs available in Schemes and Common Lisps. -- Matthias On May 8, 2015, at 10:5

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-10 Thread Matthew Flatt
I've fought my way a little up the hill, and enclosed is an implementation that I think works the way you want within a module. See the enclosed "in-package.rkt". As you suspected, `make-syntax-introducer` is the piece that you need. In the terminology of the current macro expander, the function p

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-08 Thread Philip Blair
That's good to know about namespaces being intended to be for runtime reflection. I understand what you mean when you say "bindings and lexical context," but in what specific way do you mean in the context of this issue? I also feel that I should mention that I am having difficulty wrapping my bra

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-07 Thread Matthew Flatt
I agree that those sound goals sound like a poor fit for `module+`. It's possible that `racket/package` provides something closer to the namespace-management tools that you need. Generally, I think you'll find more success by manipulating bindings and lexical context (in the sense of `datum->synta

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-07 Thread Philip Blair
On Wednesday, May 6, 2015 at 11:02:33 PM UTC-4, Matthew Flatt wrote: > I wonder whether whether expanding to `module+` might be a better > direction. A rough expansion of your example might be > > #lang racket/base > (module+ FOO > (provide (all-defined-out)) > (define BAR 2)) > > (m

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-06 Thread Matthew Flatt
I wonder whether whether expanding to `module+` might be a better direction. A rough expansion of your example might be #lang racket/base (module+ FOO (provide (all-defined-out)) (define BAR 2)) (module+ FOO (define BAZ (add1 BAR))) (module+ FOO (add1 BAZ)) (module+ QU

[racket-users] Environment Shuffling and 3D Syntax

2015-05-06 Thread Philip Blair
Hello, I am working on a project in which I am trying to implement a Common Lisp-style package system. A simple example of usage would be as follows: (in-package FOO (define BAR 2)) ; ... (in-package FOO (define BAZ (add1 BAR))) ; ... (in-package FOO (add1 BAZ)) ; =