From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: %nil once again Date: Fri, 17 Jul 2009 08:59:04 +0100 Message-ID: <8763drbv07.fsf@arudy.ossau.uklinux.net> References: <4A5F2F8A.5040108@domob.eu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247817568 9328 80.91.229.12 (17 Jul 2009 07:59:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jul 2009 07:59:28 +0000 (UTC) Cc: Andy Wingo , guile-devel To: Daniel Kraft Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jul 17 09:59:21 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 1MRiLf-0008D7-VO for guile-devel@m.gmane.org; Fri, 17 Jul 2009 09:59:20 +0200 Original-Received: from localhost ([127.0.0.1]:34640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRiLf-00031Y-J3 for guile-devel@m.gmane.org; Fri, 17 Jul 2009 03:59:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRiLa-00030G-5z for guile-devel@gnu.org; Fri, 17 Jul 2009 03:59:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRiLV-0002wq-Je for guile-devel@gnu.org; Fri, 17 Jul 2009 03:59:13 -0400 Original-Received: from [199.232.76.173] (port=38758 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRiLV-0002wg-E9 for guile-devel@gnu.org; Fri, 17 Jul 2009 03:59:09 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:48734) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MRiLU-00052V-OB for guile-devel@gnu.org; Fri, 17 Jul 2009 03:59:08 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRiLT-00034n-Jj for guile-devel@gnu.org; Fri, 17 Jul 2009 03:59:07 -0400 Original-Received: from arudy (host86-152-99-133.range86-152.btcentralplus.com [86.152.99.133]) by mail3.uklinux.net (Postfix) with ESMTP id CF5841F746A; Fri, 17 Jul 2009 08:59:05 +0100 (BST) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id E3CAF38021; Fri, 17 Jul 2009 08:59:04 +0100 (BST) In-Reply-To: <4A5F2F8A.5040108@domob.eu> (Daniel Kraft's message of "Thu\, 16 Jul 2009 15\:47\:54 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:8883 Archived-At: Daniel Kraft writes: > Hi, Hi Daniel! > I think I got the test-suite as well as a basic macro implementation > (the compiler framework is really cool, that was fairly easy to do); > recursive macros do not yet work, but otherwise it looks fine. > > However, I want to tackle quasi-quotes (besides others) now; and in > Elisp %nil is not only #f of Scheme but also the end-of-list marker (I > guess that's why simply using Scheme's #f for %nil does not work). > > I did some experiments, and it seems that Scheme respects it partially: > > scheme@(guile-user)> `(1 2 3 . ,%nil) > (1 2 3) > > (is %nil in Scheme a variable because it needs the unquote?) Do you mean why don't we just use the symbol nil? If so, the answer is because in Scheme, (cons 'a 'nil) should be (a . nil), not (a). > However: > > scheme@(guile-user)> (null? %nil) > #f > scheme@(guile-user)> (equal? %nil (cdr (list 1))) > #f I believe those work in the interpreter, and so are VM bugs. Can you check that with ,o interp #t ? > So: How is this handled by the interpreter? Currently, by the relevant places using SCM_NULL_OR_NIL_P. (But I expect that Mark Weaver's patch may change that; I haven't looked at it in detail yet.) > Is there maybe some > runtime-option to make Guile use %nil as end-of-list for lists > constructed? No, this ability is always enabled. > Or could we introduce some means to do so? > > If that's not a good idea because of performance or other > considerations, I guess I'll have to implement some conversion routine > and use that? This on the other hand will probably hit Elisp's > performance. > > Any suggestions and ideas welcome! Maybe I just fail to see something... Just a couple of VM bugs, I think... Regards, Neil