From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hengqing Hu Newsgroups: gmane.lisp.guile.user Subject: Re: Hash table read syntax in guile 2.0 Date: Mon, 18 Feb 2013 10:36:16 +0800 Message-ID: References: <7CB57FD4-FAAA-4F9C-9A04-F6DFA215C344@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1361154989 5596 80.91.229.3 (18 Feb 2013 02:36:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2013 02:36:29 +0000 (UTC) Cc: guile-user To: Daniel Hartwig Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Feb 18 03:36:51 2013 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 1U7Gb4-00008F-S9 for guile-user@m.gmane.org; Mon, 18 Feb 2013 03:36:50 +0100 Original-Received: from localhost ([::1]:40528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Gak-0002WO-NF for guile-user@m.gmane.org; Sun, 17 Feb 2013 21:36:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Gae-0002WF-1R for guile-user@gnu.org; Sun, 17 Feb 2013 21:36:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7Gab-0004V9-9B for guile-user@gnu.org; Sun, 17 Feb 2013 21:36:23 -0500 Original-Received: from mail-da0-f44.google.com ([209.85.210.44]:35867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Gab-0004V2-2p for guile-user@gnu.org; Sun, 17 Feb 2013 21:36:21 -0500 Original-Received: by mail-da0-f44.google.com with SMTP id z20so2274808dae.17 for ; Sun, 17 Feb 2013 18:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:in-reply-to:mime-version :content-transfer-encoding:content-type:message-id:cc:x-mailer:from :subject:date:to; bh=dBiOWnEYDneuQO9jNnN02bdIY5UooC7ULmINH5slizc=; b=mDtGi7okkVDpkYwXGZ0rYcwPBveFnQgo8UbQ7aBfb1SXwH5yCGjNnUAVsIkMNQoGaT m+7r0HGN3LHw3m+kp35/wIDDBBnKtxLzn68CZf4YX5bEeCwt5EIffvqr/SbPhHb8iTKo 0BYZsFXoSjmHIOB/VICmrnQfHJSfHXPlPs/+XfRN+MGR4d8vP9ZxxWMu1bGT144GFDd0 itTW/4Jj6Yb3eki3Kt7ZSfnePu/F/O7qzsqrda/nbzJ7IZcdOsDC/VDxLWGD5R8Q31Jm N3ylLr9D1n3clcazMJjp83pZsTwSJ6Y6oI1wFlxe+J+sei2MYRns0rUO9xyj/1BH7Krp 1JJA== X-Received: by 10.66.85.161 with SMTP id i1mr31699694paz.67.1361154980089; Sun, 17 Feb 2013 18:36:20 -0800 (PST) Original-Received: from [192.168.0.3] ([60.162.89.201]) by mx.google.com with ESMTPS id hu2sm12765204pbc.38.2013.02.17.18.36.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 18:36:19 -0800 (PST) In-Reply-To: X-Mailer: iPad Mail (9B206) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.210.44 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10123 Archived-At: Thanks for the collaboration. You are right, that's what I mean by a deep list. One usage of knowing the information is to tell whether the hash table is empty or not, Since a hash-empty? procedure is not provided. =D4=DA 2013-2-18=A3=AC10:01=A3=ACDaniel Hartwig =D0=B4=B5= =C0=A3=BA > On 17 February 2013 22:15, Hengqing Hu wrote: >> I don't know it's intentional or a bug, >> but now object->string returns something different. >=20 > It was an intentional change. Previously you could not tell apart two > distinct hash tables that happened to have the same number of elements > and bucket size. Now you can, because the output includes an unique > object id. >=20 >>=20 >> My understanding of length and fold is the same for deep lists as for >> hash table. >=20 > Interesting. By deep list do you mean a list that has lists as it's > elements, like: >=20 > (define x '((1 2 3) (4 5 6))) >=20 > or ..? >=20 >>=20 >> It's great you have provided a patch so a constant time way >> to know no of key/value bindings in a hash table could be more accessible= .. >=20 > Its not an operation fundamental to hash-tables (indeed, some > implementations can not determine this in constant time), and I think > that is the main reason for its absence. What do you use the > information for? >=20 > Regards