GNU bug report logs - #24102
Use guile variable objects as SRFI-111 boxes.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: "Glenn Michaels" <gmichaels@HIDDEN>; Keywords: patch; dated Fri, 29 Jul 2016 09:23:02 UTC; Maintainer for guile is bug-guile@HIDDEN.
Added tag(s) patch. Request was from "Glenn Michaels" <gmichaels@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 24102 <at> debbugs.gnu.org:


Received: (at 24102) by debbugs.gnu.org; 2 Aug 2016 10:26:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 02 06:26:24 2016
Received: from localhost ([127.0.0.1]:53394 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bUWtw-0004B0-2I
	for submit <at> debbugs.gnu.org; Tue, 02 Aug 2016 06:26:24 -0400
Received: from www.safe-mail.net ([212.29.227.81]:34044
 helo=orange.safe-mail.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gmichaels@HIDDEN>) id 1bUWto-0004Al-4G
 for 24102 <at> debbugs.gnu.org; Tue, 02 Aug 2016 06:26:18 -0400
Received: by orange.safe-mail.net with Safe-mail (Exim 4.84)
 (envelope-from <gmichaels@HIDDEN>) id 1bUWtY-0002MP-Ml
 for 24102 <at> debbugs.gnu.org; Tue, 02 Aug 2016 06:25:56 -0400
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=N1-0105; d=Safe-mail.net;
 b=R5xtmL/PtBV7NsL7grK3o0dM85MIjhR/rAhqmcZUiBwQeSt5VTbg8dMECbkYO18+
 RgAG3tcIpK/mjI6UrpMfgmzIiZzP4PQ2AY2Yt3Gpn3ZJ9vmxUTh7gdIiWz4PA7sH
 YvgUP1oxwHQM4LgnqLR9bYkiT58rUVS2XqwN1cagN4I=;
Received: from pc ([94.242.246.24]) by Safe-mail.net with https
Subject: bug#24102: Use guile variable objects as SRFI-111 boxes.
Date: Tue, 2 Aug 2016 06:25:56 -0400
From: "Glenn Michaels" <gmichaels@HIDDEN>
To: 24102 <at> debbugs.gnu.org
X-SMType: Regular
X-SMRef: N1O-3bLcU31rOy
Message-Id: <N1O-3bLcU31rOy@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="-----5KVYT3G4Q6BC2-57A07534.2373-L9Y0JA6PWR4JQ-----"
X-SMSignature: DTD8CPBs1XP4VCalAQ71ffhb/elLDFhePiG+bGE+Jkm+agOt+34D63AXAhQ+heGv
 52NACI26u/rqr7ptusLR9FNOM6oZuHv31dHtHY4FIPNC03bop9KePm++7jJRxdDJ
 xkX9WicgBcLR4MT3jjz5FotZ/VF+16lqddYtel0e/4Q=
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 24102
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

This is a multi-part message in MIME format.

-------5KVYT3G4Q6BC2-57A07534.2373-L9Y0JA6PWR4JQ-----
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Trivial patch implementing this suggestion attached.

-------5KVYT3G4Q6BC2-57A07534.2373-L9Y0JA6PWR4JQ-----
Content-Type: text/x-diff; name="srfi-111.patch"
Content-Disposition: attachment; filename="srfi-111.patch"
Content-Transfer-Encoding: 7bit

--- a/module/srfi/srfi-111.scm
+++ b/module/srfi/srfi-111.scm
@@ -17,21 +17,9 @@
 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 (define-module (srfi srfi-111)
-  #:use-module (srfi srfi-9)
-  #:use-module (srfi srfi-9 gnu)
-  #:export (box box? unbox set-box!))
+  #:re-export ((make-variable . box)
+               (variable? . box?)
+               (variable-ref . unbox)
+               (variable-set! . set-box!)))
 
 (cond-expand-provide (current-module) '(srfi-111))
-
-(define-record-type <box>
-  (box value)
-  box?
-  (value unbox set-box!))
-
-(set-record-type-printer! <box>
-  (lambda (box port)
-    (display "#<box " port)
-    (display (number->string (object-address box) 16) port)
-    (display " value: ")
-    (write (unbox box) port)
-    (display ">" port)))

-------5KVYT3G4Q6BC2-57A07534.2373-L9Y0JA6PWR4JQ-------




Information forwarded to bug-guile@HIDDEN:
bug#24102; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Jul 2016 09:22:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 29 05:22:19 2016
Received: from localhost ([127.0.0.1]:49960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bT3zn-00038d-LH
	for submit <at> debbugs.gnu.org; Fri, 29 Jul 2016 05:22:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51251)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gmichaels@HIDDEN>) id 1bT3zk-00038N-45
 for submit <at> debbugs.gnu.org; Fri, 29 Jul 2016 05:22:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gmichaels@HIDDEN>) id 1bT3ze-0005my-1b
 for submit <at> debbugs.gnu.org; Fri, 29 Jul 2016 05:22:10 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:60122)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gmichaels@HIDDEN>) id 1bT3zd-0005mj-Ug
 for submit <at> debbugs.gnu.org; Fri, 29 Jul 2016 05:22:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42208)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gmichaels@HIDDEN>) id 1bT3zb-0003ro-O7
 for bug-guile@HIDDEN; Fri, 29 Jul 2016 05:22:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gmichaels@HIDDEN>) id 1bT3zY-0005lx-CZ
 for bug-guile@HIDDEN; Fri, 29 Jul 2016 05:22:07 -0400
Received: from www.safe-mail.net ([212.29.227.81]:55968
 helo=orange.safe-mail.net) by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gmichaels@HIDDEN>) id 1bT3zY-0005kS-4k
 for bug-guile@HIDDEN; Fri, 29 Jul 2016 05:22:04 -0400
Received: by orange.safe-mail.net with Safe-mail (Exim 4.84)
 (envelope-from <gmichaels@HIDDEN>) id 1bT3zO-0007Vt-B5
 for bug-guile@HIDDEN; Fri, 29 Jul 2016 05:21:54 -0400
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=N1-0105; d=Safe-mail.net;
 b=ciuuGj7NAsZDwrd9COR3CE5LOirPh/pO306xwxhGvrycrACcmiXkjF+rlc42ngCQ
 J87KHHk2S3hMVzfc52hMAupd//woPH+cAGZipbeqEJZf2wZXYNgKiZpqGuOmfD+6
 2GrhFmiSyTXUpcMQFt4PZnyQMeaF4S24py3drBWWBx4=;
Received: from pc ([185.65.134.81]) by Safe-mail.net with https
Subject: Use guile variable objects as SRFI-111 boxes.
Date: Fri, 29 Jul 2016 05:21:53 -0400
From: "Glenn Michaels" <gmichaels@HIDDEN>
To: bug-guile@HIDDEN
X-SMType: Regular
X-SMRef: N1O-EYuO2QhvA6
Message-Id: <N1O-EYuO2QhvA6@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-SMSignature: nL00nQ99PTQU4Mhmu00i2e5ftqAWOQn8zZc5wIlBAQSUULflOmtsneji9lTac7TW
 50pWwgwEJ8rs1TjUsRjP7JnA2VeCptMEuri29KVAGcYRQj5mfXcMjNaYXLNx61Rm
 5DzHtn57kWVZxUXUbbNi9OzbJudr59Uexf2lLGRKO8I=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Currently, guile's (srfi srfi-111) module ("mutable boxes") provides
an implementation based on records with a single value field.

Wouldn't it make more sense to re-export the functions make-variable,
variable?, variable-ref and variable-set! from the guile core as box,
box?, unbox and set-box! respectively?

These functions have the same signatures and the same semantics as
required by the SRFI-111 spec., and they appear to be significantly
faster than the current record-based implementation.

Moreover, SRFI-111 boxes and guile variable objects are clearly
semantically the same thing. It's bad enough having two names for the
same thing, without having two implementations too.

Reference: http://srfi.schemers.org/srfi-111/srfi-111.html




Acknowledgement sent to "Glenn Michaels" <gmichaels@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#24102; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 3 Aug 2016 08:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.