Matt and List, As a matter of fact, I've been thinking about defecting to MIT/GNU Scheme if I don't get better support for scmutils and C++ FFI. :)
Come on now Guilers, we can't have people defecting to Racket. Is there equivalent functionality in Guile to Racket's make-base-namespace, as Matt needs? It does seem like Guile's module system should handle this. Let's help Matt. Esprit de Guile! (Basa) On 6/10/16, Matthew Keeter <matt.j.kee...@gmail.com> wrote: > Thanks for the reply! > > You’ll be sad to hear that I’ve solved the problem by switching to Racket – > (make-base-namespace) creates the kind of temporary environment I needed, > and multiple calls produce multiple independent namespaces. > > -Matt > > On Jun 10, 2016, at 2:18 PM, Basa Centro <basa.cen...@gmail.com> wrote: > >> Hi Matthew, >> >> [I know this reply is a little delayed. Please let us know how you >> did it if you have already solved the problem.] >> >> Are you using eval-string? >> >> https://www.gnu.org/software/guile/manual/html_node/Fly-Evaluation.html#Fly-Evaluation >> >> It might help for you to post a minimal code sample of what "almost >> works" and point out what doesn't. Also, there may be a simpler >> technique for what you are trying to accomplish--can you backtrack us >> to a higher level motivation? It seems like you need a read-only >> environment with a read/write one added on. >> >> (Basa) >> >> >> On 5/28/16, Matthew Keeter <matt.j.kee...@gmail.com> wrote: >>> I’m trying to generate a temporary, transient environment that a useful >>> set >>> of functions in it. >>> >>> The use case is eval’ing a set of small code strings. Each environment >>> needs to be >>> independent, so previous eval’s don’t leave anything in the environment. >>> >>> I can make a dummy environment with (null-environment 5), but it’s >>> missing >>> everything >>> useful. Calling (scheme-report-environment 5) gives me a useful >>> environment, but the >>> environment is shared (so effects from one eval can carry over, which is >>> undesirable). >>> >>> Any pointers? (resolve-module) seems like it could be useful, but the >>> #:version argument >>> doesn’t seem to work. >>> >>> Thanks, >>> Matt >>> > >