From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Basa Centro Newsgroups: gmane.lisp.guile.user Subject: Re: Transient environment with standard functions Date: Fri, 10 Jun 2016 18:18:45 +0000 Message-ID: References: <30B0B35B-F6B0-4FD4-A35D-3E6542C3871F@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1465582767 7542 80.91.229.3 (10 Jun 2016 18:19:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2016 18:19:27 +0000 (UTC) Cc: guile-user@gnu.org To: Matthew Keeter Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jun 10 20:19:27 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bBR1T-0007XA-Q1 for guile-user@m.gmane.org; Fri, 10 Jun 2016 20:19:11 +0200 Original-Received: from localhost ([::1]:43796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBR1S-0006oI-Tn for guile-user@m.gmane.org; Fri, 10 Jun 2016 14:19:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBR17-0006nz-21 for guile-user@gnu.org; Fri, 10 Jun 2016 14:18:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBR14-0000LD-VB for guile-user@gnu.org; Fri, 10 Jun 2016 14:18:47 -0400 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:33012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBR14-0000L4-Pt for guile-user@gnu.org; Fri, 10 Jun 2016 14:18:46 -0400 Original-Received: by mail-oi0-x231.google.com with SMTP id k23so124743821oih.0 for ; Fri, 10 Jun 2016 11:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=yA2YZdyOX5DF9VfIHD3sg1eckSW8OiSUEcukYPHps8g=; b=PMhDokSwPwsmK8zzpMmVt1FOea7Nb39S9zH491JcjdybTjx6n/w+2OWDd0pKKohPJH Cor3bX9R13fOEXjgr+Nh1Vp1cBXFtquzvyBq6hpCNswrYfHgX4XSVEpB42Y7b7rYwJo7 p2FZiXHRy3EBhEyrorgmhlMcnUAiLBUEWSo078V0PSQbmfMaZPHICL5cBdWmf5QrvQsu Bww5uWltO1b9zOeX1iCKXa2umjS5/CDxb6bGlcNWAr7+TuuqYM4/pr03ZbGHX6ultwuk jQ8fikIhNjJ5nIs+O2JoxfgAUmJWus4/frs1C0HdlaicvLZO4lDmP14+sX3nFcB0Yp0Z zmGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yA2YZdyOX5DF9VfIHD3sg1eckSW8OiSUEcukYPHps8g=; b=Ay/Ctdonry1+NZJju8mAVIZfBrp+3ngVEAmK1AIk96oCMj3rFa1D7SKjZdJHEinpKP 54YCHM16dC4w7BJco2FrP2dRz0K7FoW9LoIR30q9XUidEmtZUN92xa7wZFEnE2spdqBw JNLky70iM2qKDcHr9e+GSiSMdZe0CsnLkZXK6RU1L9Dv9uKXpfna/keZPxtd26c7iMNQ O2jgb4Rkg/Cfnld/DyA/y8RaSYT4OxqVp35XZRwhq++6UEHP4uWndfGuYQihp7io4pJj A+J7XfV6B3zd83Ne46d8kpe9Swx85+UaZ3sBnC28z2iDjFupo4iy7AAumISpqMVErCT4 3K9g== X-Gm-Message-State: ALyK8tIryYyjjKnEDhzF3a5QJOG484gZqFTIUhqwqHVJrz2wm9668tt3wIZJdd9N8SN2yLN2s8/hhulclRgWWA== X-Received: by 10.157.45.1 with SMTP id v1mr2186200ota.151.1465582725971; Fri, 10 Jun 2016 11:18:45 -0700 (PDT) Original-Received: by 10.202.104.150 with HTTP; Fri, 10 Jun 2016 11:18:45 -0700 (PDT) In-Reply-To: <30B0B35B-F6B0-4FD4-A35D-3E6542C3871F@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::231 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:12610 Archived-At: 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 wrote: > I=E2=80=99m trying to generate a temporary, transient environment that a = useful set > of functions in it. > > The use case is eval=E2=80=99ing a set of small code strings. Each envir= onment > needs to be > independent, so previous eval=E2=80=99s don=E2=80=99t leave anything in t= he environment. > > I can make a dummy environment with (null-environment 5), but it=E2=80=99= 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=E2=80=99t seem to work. > > Thanks, > Matt >