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: %nil once again Date: Thu, 16 Jul 2009 15:47:54 +0200 Message-ID: <4A5F2F8A.5040108@domob.eu> 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 1247752111 31323 80.91.229.12 (16 Jul 2009 13:48:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2009 13:48:31 +0000 (UTC) Cc: Andy Wingo , Neil Jerram To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jul 16 15:48:24 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 1MRRJp-0004Vc-4g for guile-devel@m.gmane.org; Thu, 16 Jul 2009 15:48:17 +0200 Original-Received: from localhost ([127.0.0.1]:50906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRRJo-0008S5-LC for guile-devel@m.gmane.org; Thu, 16 Jul 2009 09:48:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRRJB-0007dp-Pp for guile-devel@gnu.org; Thu, 16 Jul 2009 09:47:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRRJ6-0007VR-In for guile-devel@gnu.org; Thu, 16 Jul 2009 09:47:36 -0400 Original-Received: from [199.232.76.173] (port=48892 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRRJ6-0007Uv-9V for guile-devel@gnu.org; Thu, 16 Jul 2009 09:47:32 -0400 Original-Received: from tatiana.utanet.at ([213.90.36.46]:48135) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MRRJ5-0002Pq-R5 for guile-devel@gnu.org; Thu, 16 Jul 2009 09:47:32 -0400 Original-Received: from plenty.xoc.tele2net.at ([213.90.36.8]) by tatiana.utanet.at with esmtp (Exim 4.69) (envelope-from ) id 1MRRJ3-0007Rq-B6; Thu, 16 Jul 2009 15:47:29 +0200 Original-Received: from d86-33-51-72.cust.tele2.at ([86.33.51.72] helo=[192.168.1.18]) by plenty.xoc.tele2net.at with esmtpa (Exim 4.69) (envelope-from ) id 1MRRJ3-0002Uv-6U; Thu, 16 Jul 2009 15:47:29 +0200 User-Agent: Thunderbird 2.0.0.0 (X11/20070425) 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:8881 Archived-At: Hi, 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?) However: scheme@(guile-user)> (null? %nil) #f scheme@(guile-user)> (equal? %nil (cdr (list 1))) #f It would be cool to teach Guile somehow to treat %nil as the "standard" end-of-list value, such that both of these queries would optimally return true. At least, is there some way to construct lists terminated by %nil using something like the list primitive? Other things needed would be for instance terminating rest-arguments by %nil rather than '() and the like. So: How is this handled by the interpreter? Is there maybe some runtime-option to make Guile use %nil as end-of-list for lists constructed? 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... Thanks, Daniel -- Done: Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz To go: Hea-Kni-Mon-Pri