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: upcoming patches Date: Tue, 20 Oct 2009 21:19:28 +0200 Message-ID: References: <87aazo74zd.fsf@ossau.uklinux.net> <20091020164727.GC3779@fibril.netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256066357 31109 80.91.229.12 (20 Oct 2009 19:19:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Oct 2009 19:19:17 +0000 (UTC) Cc: guile-devel , Neil Jerram To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Oct 20 21:19:07 2009 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.50) id 1N0KEc-0002gu-8K for guile-devel@m.gmane.org; Tue, 20 Oct 2009 21:19:06 +0200 Original-Received: from localhost ([127.0.0.1]:55986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0KEb-00082I-De for guile-devel@m.gmane.org; Tue, 20 Oct 2009 15:19:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0KEV-000823-W1 for guile-devel@gnu.org; Tue, 20 Oct 2009 15:19:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0KEQ-00081T-J2 for guile-devel@gnu.org; Tue, 20 Oct 2009 15:18:58 -0400 Original-Received: from [199.232.76.173] (port=52566 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0KEQ-00081Q-D8 for guile-devel@gnu.org; Tue, 20 Oct 2009 15:18:54 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:53500 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0KEQ-00027F-4o for guile-devel@gnu.org; Tue, 20 Oct 2009 15:18:54 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id CF17D60660; Tue, 20 Oct 2009 15:18:53 -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; s=sasl; bh=oNsGgKG7dzsVKE2kNMu73Tdpbw4=; b=b35mG1 ui082adAmMuHafbwVGVr0BUS+4PKFBGrpN8GEflUAUKPH2TwNjp2vJ6j7D6zDSaC vzc7SDTY815dqh4TOyHPG9U25TlgcKHXQakVje3khCpkVcC9h3Ui2+ABt4avOTqt T9QHCmiKDr275r5eTmzyPdA8hylUv95SYMLog= 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; q=dns; s=sasl; b=gs51KpLqsQEHutAq9+39XKEeyh/IGEPJ 3xXIAtOFfhhQrsSgbYjW8za8tT5v5q2v/FYNQLH2jSJdP9Ky8PcDbql1vfV0ZFxq gf3gwK5T4aiG0HC15+So7M4eLNRwu7qXwJ8wOpLwmzTqCmZC7aZ09OV3HY6Ry+al JOI9E1GG6EQ= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id B19826065F; Tue, 20 Oct 2009 15:18:51 -0400 (EDT) Original-Received: from unquote (unknown [83.34.240.150]) (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 72AAA6065E; Tue, 20 Oct 2009 15:18:48 -0400 (EDT) In-Reply-To: <20091020164727.GC3779@fibril.netris.org> (Mark H. Weaver's message of "Tue, 20 Oct 2009 12:47:27 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: 66A68644-BDAD-11DE-852C-1B12EE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by monty-python.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:9539 Archived-At: Hi, On Tue 20 Oct 2009 18:47, Mark H Weaver writes: > Andy wrote: >> 2) Make sure Mark's patch is in > > Neil wrote: >> Have I missed this? I _think_ I'm still waiting for Mark's updated >> patch... > > Sorry for being so slow on this. I had a lot of free time with I > first submitted the patch, but have been busier since then. No prob, happens to all of us :) > The biggest block is that I'm intimidated by the prospect of looking > at every use of scm_is_{false,true,null} in the tree and deciding > which of the new predicates should be used. Why don't we just get the first version in with #define scm_is_false(x) scm_is_false_and_not_nil(x), etc? Patches that do 1 thing only are best. > I expect that the vast majority could be left alone without > introducing new bugs, but I can't be sure without checking each one. Sure, but we can help with that. > Also, since writing the first patch, I've had some second thoughts > about whether this approach to #nil is the correct one. I'm primarily > concerned with the problem of equality predicates, which from the lisp > point of view should treat #nil as equal to both '() and #f. How will > this interact with collections (e.g. hash tables and alists, or even > simple lists used as sets) which use lists as keys? If lisp adds an > element to such a collection, scheme won't be able to find it, and > vice versa. I see the potential for many subtle bugs to go unnoticed. Well, there are many ways to think about this I guess. I'm of more of a pragmatic than a practical bent; so it's clear to me is that whatever goes in as a result of your patch will be pragmatically better than what we have now. What do you think about this: (eq? #f '()) => #f (eq? #f #nil) => #f (eq? '() #nil) => #f (eqv? #f '()) => #f (eqv? #f #nil) => #t (eqv? '() #nil) => #t (equal? #f '()) => #f (equal? #f #nil) => #t (equal? '() #nil) => #t That handles delv, assoc, etc. Hash is more difficult. Hashq of all are distinct; hashv and hash are the same. But if (hash #f) == (hash #nil) and (hash #nil) == (hash '()), then (hash '(a)) == (hash '(a . #f)), which would be bad -- and indeed that's not possible. So why don't we just say that (hash #nil) == (hash '()). It will be documented that hash tables and lisp interaction are just this way. > Although I'm sure the Emacs community would never agree, I'm tempted > to suggest that the best solution is for Emacs to meet us half way Only if we can show them some really awesome benefits would they do this -- and even then I think it's a bad idea. There is 20 years of elisp code out there that we can't presume to change. > Apologies if these thoughts are half-baked. Part of the problem is > that I've not had enough time to fully evaluate these issues, and I > feel paralyzed since I don't like any of the available options. No prob! Thanks for mailing the list, I hadn't thought about the hash issues before. What do you think about my dodgy "solutions"? :) Cheers, Andy -- http://wingolog.org/