[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transient environment with standard functions
From: |
Matthew Keeter |
Subject: |
Re: Transient environment with standard functions |
Date: |
Fri, 10 Jun 2016 14:44:43 -0400 |
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 <address@hidden> 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 <address@hidden> 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
>>
- Re: Transient environment with standard functions, Basa Centro, 2016/06/10
- Re: Transient environment with standard functions,
Matthew Keeter <=
- Re: Transient environment with standard functions, Basa Centro, 2016/06/10
- Re: Transient environment with standard functions, Taylan Ulrich Bayırlı/Kammer, 2016/06/10
- Re: Transient environment with standard functions, Basa Centro, 2016/06/10
- Re: Transient environment with standard functions, Matthew Keeter, 2016/06/10
- Re: Transient environment with standard functions, Mike Gran, 2016/06/10
- Re: Transient environment with standard functions, Taylan Ulrich Bayırlı/Kammer, 2016/06/10
- Re: Transient environment with standard functions, Basa Centro, 2016/06/11
- Re: Transient environment with standard functions, Matthew Keeter, 2016/06/11
Re: Transient environment with standard functions, Chris Vine, 2016/06/10