[plt-scheme] MrEd program in a separate namespace

From: Ed Cavazos (proteus at theworld.com)
Date: Sun Jun 8 02:13:39 EDT 2003

Matthew Flatt <mflatt at cs.utah.edu> writes:

> That's the right approach, but the namespace created by
> `make-namespace-with-mred' has nothing in the initial compile-time
> environment.
> 
> Probably you want
> 
>  (parameterize ([current-namespace ns])
>    (namespace-transformer-require 'mzscheme))
> 
> before the `eval'.
> 
> Matthew

Thanks! That worked perfectly. Here's me running 2 copies of boids and
2 copies of a clock, each in there own namespace:

        http://www.theworld.com/~proteus/mzapps.png

Being able to launch a REPL from within a currently running
application is very cool... I wish all the applications I use
supported this. This sort of process/application model has also raised
questions regarding "inter-namespace communication". I know that I can
use traditional methods such as sockets, but I wonder if a more
disciplined method involving exporting and importing symbols "on the
fly" would be useful. I guess for that, the namespaces would have to
reference each other, and in my simple experiments, only the top-level
namespaces "knows about" the child namespaces (*ns1*, *ns2*, etc.).

MrEd



Posted on the users mailing list.