From: Basa Centro <basa.centro@gmail.com>
To: guile-user@gnu.org
Cc: matt.j.keeter@gmail.com
Subject: Re: Transient environment with standard functions
Date: Fri, 10 Jun 2016 20:39:33 +0000 [thread overview]
Message-ID: <CAOmOhtvVqGSveOA7-RXMx6qxGnMkpXJKqjqo5Du+53BVPjbk7Q@mail.gmail.com> (raw)
In-Reply-To: <7B7BC3F7-A25D-427D-8E21-D3583C3C7DEA@gmail.com>
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.keeter@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.centro@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.keeter@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
>>>
>
>
next prev parent reply other threads:[~2016-06-10 20:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-28 20:16 Transient environment with standard functions Matthew Keeter
2016-06-10 18:18 ` Basa Centro
2016-06-10 18:44 ` Matthew Keeter
2016-06-10 20:39 ` Basa Centro [this message]
2016-06-10 21:11 ` Taylan Ulrich Bayırlı/Kammer
2016-06-10 22:11 ` Basa Centro
2016-06-10 22:31 ` Matthew Keeter
2016-06-10 22:49 ` Mike Gran
2016-06-10 23:08 ` Taylan Ulrich Bayırlı/Kammer
2016-06-11 15:15 ` Basa Centro
2016-06-11 19:44 ` Matthew Keeter
2016-06-10 22:35 ` Chris Vine
-- strict thread matches above, loose matches on Subject: below --
2016-06-11 23:07 Basa Centro
2016-06-12 0:51 Basa Centro
2016-06-26 21:29 ` Amirouche Boubekki
2016-07-03 21:20 Blanka Herono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOmOhtvVqGSveOA7-RXMx6qxGnMkpXJKqjqo5Du+53BVPjbk7Q@mail.gmail.com \
--to=basa.centro@gmail.com \
--cc=guile-user@gnu.org \
--cc=matt.j.keeter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).