Re: [racket-dev] make-empty-namespace vs make-base-empty-namespace; ie attaching racket/base does other stuff

2014-04-29 Thread Stephen Chang
Thanks for the explanation. It all does make sense. I guess I'm still unsatisfied because it still feels like there's a gap between the namespace model as presented by the docs and what actually happens. For example, the docs give me the impression that you can't require a module unless it's

Re: [racket-dev] make-empty-namespace vs make-base-empty-namespace; ie attaching racket/base does other stuff

2014-04-29 Thread Matthias Felleisen
I think improvements would be welcome. Start with a redex model. On Apr 29, 2014, at 3:15 PM, Stephen Chang stch...@ccs.neu.edu wrote: Thanks for the explanation. It all does make sense. I guess I'm still unsatisfied because it still feels like there's a gap between the namespace model

Re: [racket-dev] make-empty-namespace vs make-base-empty-namespace; ie attaching racket/base does other stuff

2014-04-29 Thread Matthew Flatt
At Tue, 29 Apr 2014 15:15:44 -0400, Stephen Chang wrote: I guess I'm still unsatisfied because it still feels like there's a gap between the namespace model as presented by the docs and what actually happens. For example, the docs give me the impression that you can't require a module unless

[racket-dev] make-empty-namespace vs make-base-empty-namespace; ie attaching racket/base does other stuff

2014-04-28 Thread Stephen Chang
Motivated by some recent email threads, I decided to better understand how Racket namespaces work by re-reading some docs but I got confused. Paraphrasing the examples from this part of the guide: http://docs.racket-lang.org/guide/mk-namespace.html the following example fails because the module

Re: [racket-dev] make-empty-namespace vs make-base-empty-namespace; ie attaching racket/base does other stuff

2014-04-28 Thread Vincent St-Amour
Extra bit of information, this works too: #lang racket (define ns (make-empty-namespace)) (namespace-attach-module (current-namespace) ''#%builtin ns) (parameterize ([current-namespace ns]) (namespace-require m.rkt)) But replacing ''#%builtin with ''#%kernel or ''#%boot

Re: [racket-dev] make-empty-namespace vs make-base-empty-namespace; ie attaching racket/base does other stuff

2014-04-28 Thread Matthew Flatt
If you start with an empty namespace, then the handful of primitive modules needed to bootstrap `racket/base` are not there. Attaching `racket/base` doesn't make m.rkt available, but it makes it possible to load m.rkt, after which m.rkt will be declared in the namespace. It's not a matter of