From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: modifying pointers Date: Fri, 09 Apr 2010 22:15:21 +0200 Message-ID: References: <87k4sgpp0w.fsf@gnu.org> <87fx34mmt4.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270844251 6160 80.91.229.12 (9 Apr 2010 20:17:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Apr 2010 20:17:31 +0000 (UTC) Cc: guile-devel To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 09 22:17:29 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Kdp-0000iu-3t for guile-devel@m.gmane.org; Fri, 09 Apr 2010 22:17:26 +0200 Original-Received: from localhost ([127.0.0.1]:50200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Kdn-0004MO-K0 for guile-devel@m.gmane.org; Fri, 09 Apr 2010 16:17:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0Kde-0004Lr-DF for guile-devel@gnu.org; Fri, 09 Apr 2010 16:17:14 -0400 Original-Received: from [140.186.70.92] (port=32804 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Kdc-0004Ku-W2 for guile-devel@gnu.org; Fri, 09 Apr 2010 16:17:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0KdG-0007iP-Br for guile-devel@gnu.org; Fri, 09 Apr 2010 16:16:53 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:44356 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0KdG-0007iK-7y; Fri, 09 Apr 2010 16:16:50 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 1B853A9735; Fri, 9 Apr 2010 16:16:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=pZxymzyGG6qe v7Ruch+PpINMlqo=; b=W8oR77B7ecdDq1vMHxmQCrLIM3eXAToIoWrJETNVZrJK RWG4jx8W+DpDR1YmZaBZVLfAaaCdTHJQEvxreSROSUDh5p3lg9nBDjkyK0folqLk aNpBq2wOjvyzFUBDWhIRmTRRcRdC4xZHvu54YMHExbyVB2ndnHiFPq/XZNzGN5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=ch4qTQ ruW8lgQsQGncmcpxMi4q9Jm7PR8M023XL3OgS9B2i6tA7CBVyi8ORsv2Fltswu45 pxlJEaEzJ5jDRrmH1qt3l863ExGfB2EG4QG9GzwhtrHEpPJTE/VIhdeCkAC5iKpM SbpmR3Ynt2AxnFUzVXhiiHf2b//oBO2BNVL+g= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 08093A9734; Fri, 9 Apr 2010 16:16:49 -0400 (EDT) Original-Received: from unquote (unknown [81.39.162.147]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 0FB34A9731; Fri, 9 Apr 2010 16:16:43 -0400 (EDT) In-Reply-To: <87fx34mmt4.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 09 Apr 2010 21:46:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: D3E45C02-4414-11DF-BA8B-D033EE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10183 Archived-At: Hi! On Fri 09 Apr 2010 21:46, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Andy Wingo writes: > >> I'm just wondering if it is valid to create a ((void*) 777) pointer. >> Under what condition is that useful? > [...] > It opens the door to all sorts of crazy things. :-) Cool :) FWIW, let's kick that door off its hinges :-))) >> If that is useful, OK; but under what condition is it useful to mutate >> the pointer in a foreign pointer object? Why not create a new foreign >> pointer object? > > There=E2=80=99s currently no procedure to create a foreign object from a > bignum. Perhaps we should define one then. It would be more expressive. Also it avoids all kinds of shared-state problems. > (Besides, =E2=80=98foreign-set!=E2=80=99 exists and has always been defin= ed for all > types of foreign pointer objects.) Sure, but this might be an accident. In every case except `void', foreign-set! modifies the pointed-to memory. Perhaps we need a foreign-pointer accessor instead, which would work on pointers to values as well. And a constructor of course. Andy --=20 http://wingolog.org/