From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] ice-9: Add JSON module. Date: Tue, 22 Sep 2015 05:43:20 -0700 Message-ID: References: <87vbcg1c4d.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87si67zgb6.fsf@gnu.org> <87h9mneyny.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_627E4D33-7AF5-4198-BE4D-E5D342BD6BC3" X-Trace: ger.gmane.org 1442925839 15396 80.91.229.3 (22 Sep 2015 12:43:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Sep 2015 12:43:59 +0000 (UTC) Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= , guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 22 14:43:51 2015 Return-path: Envelope-to: guile-devel@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 1ZeMvG-00008h-T6 for guile-devel@m.gmane.org; Tue, 22 Sep 2015 14:43:51 +0200 Original-Received: from localhost ([::1]:39223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeMvG-0000yW-7n for guile-devel@m.gmane.org; Tue, 22 Sep 2015 08:43:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeMvD-0000yG-0g for guile-devel@gnu.org; Tue, 22 Sep 2015 08:43:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeMv8-00034q-V5 for guile-devel@gnu.org; Tue, 22 Sep 2015 08:43:46 -0400 Original-Received: from vms173017pub.verizon.net ([206.46.173.17]:40043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeMv8-00033h-Qk; Tue, 22 Sep 2015 08:43:42 -0400 Original-Received: from [192.168.2.127] ([71.106.140.79]) by vms173017.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NV200201WO9XWC0@vms173017.mailsrvcs.net>; Tue, 22 Sep 2015 07:43:27 -0500 (CDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=WcjxEBVX c=1 sm=1 tr=0 a=U5cW0FdS3jYB8mZKAXjpug==:117 a=o1OHuDzbAAAA:8 a=oR5dmqMzAAAA:8 a=ff-B7xzCdYMA:10 a=DeTtaYkFAAAA:8 a=tl5Gkp5mFkSoeP_guzUA:9 a=4cPwnQ3KfJUP8S4R:21 a=wExuG5aXWNDofVsk:21 a=CjuIK1q_8ugA:10 a=yXp7sdHcgFcA:10 a=oQ_jGohFB0lpNzazhFMA:9 a=M0t9t9h-4poc7IAn:21 a=IP5FPz3MnPdcaM-8:21 a=q_1TtZC7LsFJ1lGZ:21 a=_W_S_7VecoQA:10 In-reply-to: <87h9mneyny.fsf@netris.org> X-Mailer: Apple Mail (2.2104) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.46.173.17 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17851 Archived-At: --Apple-Mail=_627E4D33-7AF5-4198-BE4D-E5D342BD6BC3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Sep 21, 2015, at 11:49 PM, Mark H Weaver wrote: >=20 >> 2. The comments say integers are converted to exact and floating = point >> to inexact, but the code will convert 1.0 to exact. >=20 > In Scheme terminology, 1.0 is an integer. But in guile-2.0.11: scheme@(guile-user)> (exact? (string->number "1.0")) $1 =3D #f I also vote for using string->number: probably faster and more heavily = tested. Matt --Apple-Mail=_627E4D33-7AF5-4198-BE4D-E5D342BD6BC3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
On Sep 21, 2015, at 11:49 PM, Mark H Weaver <mhw@netris.org> = wrote:

2. The comments say integers = are converted to exact and floating point
to inexact, but = the code will convert 1.0 to exact.

In Scheme terminology, 1.0 is an = integer.

But = in guile-2.0.11:

scheme@(guile-user)> (exact? (string->number = "1.0"))

$1 =3D #f


I also vote for using string->number: probably faster and = more heavily tested.

Matt

= --Apple-Mail=_627E4D33-7AF5-4198-BE4D-E5D342BD6BC3--