From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Kraft Newsgroups: gmane.lisp.guile.devel Subject: Re: Status Update, Elisp Compiler Date: Sun, 06 Sep 2009 18:24:40 +0200 Message-ID: <4AA3E248.5070207@domob.eu> References: <4A8BA821.1090309@domob.eu> <20090906011348.GA3382@fibril.netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1252254258 32059 80.91.229.12 (6 Sep 2009 16:24:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2009 16:24:18 +0000 (UTC) Cc: Andy Wingo , guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Sep 06 18:24:11 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 1MkKXB-0002IW-Tz for guile-devel@m.gmane.org; Sun, 06 Sep 2009 18:24:10 +0200 Original-Received: from localhost ([127.0.0.1]:33524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkKX9-0001fL-5x for guile-devel@m.gmane.org; Sun, 06 Sep 2009 12:24:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkKX1-0001eh-VH for guile-devel@gnu.org; Sun, 06 Sep 2009 12:24:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MkKWx-0001dt-C0 for guile-devel@gnu.org; Sun, 06 Sep 2009 12:23:59 -0400 Original-Received: from [199.232.76.173] (port=56461 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkKWx-0001dq-7d for guile-devel@gnu.org; Sun, 06 Sep 2009 12:23:55 -0400 Original-Received: from taro.utanet.at ([213.90.36.45]:56790) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MkKWw-00009j-HM for guile-devel@gnu.org; Sun, 06 Sep 2009 12:23:55 -0400 Original-Received: from patricia.xoc.tele2net.at ([213.90.36.9]) by taro.utanet.at with esmtp (Exim 4.69) (envelope-from ) id 1MkKWp-00016R-Q2; Sun, 06 Sep 2009 18:23:47 +0200 Original-Received: from dsl-36-233.utaonline.at ([81.189.36.233] helo=[192.168.2.18]) by patricia.xoc.tele2net.at with esmtpa (Exim 4.69) (envelope-from ) id 1MkKWp-0002c2-LR; Sun, 06 Sep 2009 18:23:47 +0200 User-Agent: Thunderbird 2.0.0.0 (X11/20070425) In-Reply-To: <20090906011348.GA3382@fibril.netris.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:9275 Archived-At: Mark H Weaver wrote: > Daniel Kraft wrote: >> 4) I've not done anything yet regarding converting '() -> %nil in lists >> that are seen from elisp; I think the final conclusion was that we want >> such a conversion, and so I will do that. But maybe I can try if it is >> reasonably possible to allow switching it off to regain performance >> without? Maybe also allow switching off the #f -> %nil conversion for >> booleans (t = #t). > > I thought the point of the %nil work was to avoid the need for such > conversions. My %nil patch (in progress) includes a fast macro for > boolean testing from lisp, which considers (), #f, and %nil to all be > false. Yes, of course. I remember we discussed those issues, but think the last I heard of was to do, at least partially or in "some cases", a translation. For booleans this is done at the moment (but only those that are seen from elisp, i.e. not when some boolean expression is only generated by the compiler). But once again I'm open to discussion on this subject, and how to solve that best. In my opinion, there are two sides to look at seperately: One is from elisp to scheme, i.e. that (if nil 1 2) can be compiled directly to a guile internal if construct without need to add a elisp->scheme boolean translation. That's what your patch will do and what's in any case a good idea (in my opinion). The other side is changing back booleans from Guile internals (like = or others) that are seen directly from elisp. I.e., that (= 1 2) is wrapped into a translator so it returns nil for false instead of #f. Here, for booleans translation is done at the moment, but for end-of-lists it is not. I've no real opinion on if we should do translation here or not... > If it is common to test for %nil using eq, then we could provide a > special eq which treats (), #f, and %nil as equal, part of the same > equivalence class. See above, but I think if real-world code does not depend on that and we don't strive for "100% compatibility" with emacs/elisp, we could really just go without the scheme->elisp translation and try directly. But as I said, I'd be happy to get other opinions again before I either remove the boolean translation or add one for lists. Thanks a lot for your comments and thoughts, though! And your patch of course ;) Yours, Daniel -- Done: Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz To go: Hea-Kni-Mon-Pri