From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Clinton Ebadi Newsgroups: gmane.lisp.guile.user Subject: Re: Me no understand scoping Date: Thu, 31 Jul 2008 19:48:47 -0400 Message-ID: <874p657gyo.fsf@unknownlamer.org> References: <87r69ccaus.fsf@unknownlamer.org> <489074A9.1080508@wilsonjc.us> <49dd78620807310020i8b55067gd22f6ce361a04d7d@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217548163 11219 80.91.229.12 (31 Jul 2008 23:49:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2008 23:49:23 +0000 (UTC) Cc: guile-user@gnu.org To: "Maciek Godek" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Aug 01 01:50:13 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KOhuG-0003BZ-MC for guile-user@m.gmane.org; Fri, 01 Aug 2008 01:50:05 +0200 Original-Received: from localhost ([127.0.0.1]:42771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOhtL-0002ce-3Y for guile-user@m.gmane.org; Thu, 31 Jul 2008 19:49:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOhtH-0002c5-G4 for guile-user@gnu.org; Thu, 31 Jul 2008 19:49:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOhtG-0002b5-01 for guile-user@gnu.org; Thu, 31 Jul 2008 19:49:03 -0400 Original-Received: from [199.232.76.173] (port=39964 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOhtF-0002ar-Ho for guile-user@gnu.org; Thu, 31 Jul 2008 19:49:01 -0400 Original-Received: from deleuze.hcoop.net ([69.90.123.67]:60205) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KOhtF-0005s7-D1 for guile-user@gnu.org; Thu, 31 Jul 2008 19:49:01 -0400 Original-Received: from cpe-071-065-238-103.nc.res.rr.com ([71.65.238.103] helo=localhost.localdomain) by deleuze.hcoop.net with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KOht9-0002kE-08; Thu, 31 Jul 2008 19:48:55 -0400 In-Reply-To: (Maciek Godek's message of "Thu\, 31 Jul 2008 21\:21\:42 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6713 Archived-At: "Maciek Godek" writes: > Neil Jerram : > >>> How to achieve this effect without using eval? >>> (I've tried (+ . l) but it didn't work out) >> >> (apply + l) > > Correct :) > Here comes another one: > Suppose I want to define a variable, but I don't know its name > -- it is contained in another variable. For example: > (define a 'b) > I want to assign a value to the symbol "contained" in a. > (that would be b in this example). The problem is that "define" > quotes its first argument. How to achieve it? module-define! MODULE NAME VALUE e.g. (let ((foo 'bar)) (module-define! (current-module) foo 5) bar) => 5 Issue: this will be a top level binding, but a solution using `eval' would also produce a top level binding (as it executes there to allow lexical environments to be optimized...). Doing such things, however, is fairly unschemey. -- emacsen: every copy of Emacs comes with a bag of pot and 5 hits of acid emacsen: and a hotel coffee maker