From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.user Subject: Re: Hash table read syntax in guile 2.0 Date: Mon, 18 Feb 2013 10:01:19 +0800 Message-ID: References: <7CB57FD4-FAAA-4F9C-9A04-F6DFA215C344@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1361153250 25356 80.91.229.3 (18 Feb 2013 02:07:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2013 02:07:30 +0000 (UTC) Cc: guile-user To: Hengqing Hu Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Feb 18 03:07:52 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 1U7G92-00081v-LJ for guile-user@m.gmane.org; Mon, 18 Feb 2013 03:07:52 +0100 Original-Received: from localhost ([::1]:37119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7G8i-0007BZ-Jz for guile-user@m.gmane.org; Sun, 17 Feb 2013 21:07:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7G8e-0007BR-6K for guile-user@gnu.org; Sun, 17 Feb 2013 21:07:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7G8c-0005ap-0A for guile-user@gnu.org; Sun, 17 Feb 2013 21:07:28 -0500 Original-Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]:34016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7G8b-0005al-RY for guile-user@gnu.org; Sun, 17 Feb 2013 21:07:25 -0500 Original-Received: by mail-ie0-f180.google.com with SMTP id bn7so6579999ieb.39 for ; Sun, 17 Feb 2013 18:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=yE/Ubi/MXRxzCWly0luZCI4lxlL6nYBhUTU30nV/VWM=; b=KztIsQRhM/jvCmSd/cwnU+La3/X5QnehmEoIKH9Y66vrASDHHOeWGm6UZBO7WMS3zD kOyXxGpIF7KiRukJW0uQsjETamoFg9pj5YaJDnyPvc36ad9iEc9B+iaDa8PcMbgFSwdt BvYNaz9rpLl64/IUEtyCyoZnnrb9h8yRksrGzilCVLbvJ9raK5ke6A5Z7vliqhNqo8vc YqyNGLAreaU/0Bg2dw4KsuBYtH1h0fYndd4iHruMhQiv0Y2UL49Pi4TpN2AZWCgN+Cj+ /riPN+8hJRN7Eer+NBaDCUopIfBClzrEcFQnrhgpOPVdQtF2WQjdEjnyVYsucpIWGI4F 4Brw== X-Received: by 10.42.26.142 with SMTP id f14mr5088591icc.38.1361152879316; Sun, 17 Feb 2013 18:01:19 -0800 (PST) Original-Received: by 10.64.76.51 with HTTP; Sun, 17 Feb 2013 18:01:19 -0800 (PST) In-Reply-To: <7CB57FD4-FAAA-4F9C-9A04-F6DFA215C344@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::234 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:10121 Archived-At: 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. 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. > > My understanding of length and fold is the same for deep lists as for > hash table. Interesting. By deep list do you mean a list that has lists as it's elements, like: (define x '((1 2 3) (4 5 6))) or ..? > > 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.. 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? Regards