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: Emacs Lisp, macros Date: Fri, 24 Jul 2009 00:09:53 +0200 Message-ID: References: <4A5CE0F9.4080904@domob.eu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248387282 15254 80.91.229.12 (23 Jul 2009 22:14:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jul 2009 22:14:42 +0000 (UTC) Cc: guile-devel To: Daniel Kraft Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jul 24 00:14:35 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 1MU6Yd-0000wY-3h for guile-devel@m.gmane.org; Fri, 24 Jul 2009 00:14:35 +0200 Original-Received: from localhost ([127.0.0.1]:33766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MU6Yc-00038i-DZ for guile-devel@m.gmane.org; Thu, 23 Jul 2009 18:14:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MU6YY-00038T-8u for guile-devel@gnu.org; Thu, 23 Jul 2009 18:14:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MU6YS-00037F-3U for guile-devel@gnu.org; Thu, 23 Jul 2009 18:14:28 -0400 Original-Received: from [199.232.76.173] (port=55772 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MU6YR-000379-UU for guile-devel@gnu.org; Thu, 23 Jul 2009 18:14:23 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:40905 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MU6YQ-00055Y-S2 for guile-devel@gnu.org; Thu, 23 Jul 2009 18:14:23 -0400 Original-Received: from localhost.localdomain (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 8B806FBFB; Thu, 23 Jul 2009 18:14:22 -0400 (EDT) Original-Received: from unquote (unknown [81.38.186.175]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 93848FBFA; Thu, 23 Jul 2009 18:14:16 -0400 (EDT) In-Reply-To: <4A5CE0F9.4080904@domob.eu> (Daniel Kraft's message of "Tue, 14 Jul 2009 21:48:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: 2CC349B6-77D6-11DE-A983-AEF1826986A2-02397024!a-pb-sasl-sd.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:8945 Archived-At: Hello! On Tue 14 Jul 2009 21:48, Daniel Kraft writes: > (defun primep (p &optional from) > (let ((i (if from from 2))) > (while (and (/= (% p i) 0) (<= (* i i) p)) > (setq i (1+ i))) > (/= (% p i) 0))) > > (primep 1283939) -> #t This is fantastic. > While of course the #f should be %nil, this is simply because I use #f > at the moment for nil (but that will be redefined once the falsity of > %nil is corrected). Yes. Hopefully we can pull in Mark's patch by the next release. > For macros (and also for funcall/apply, which ought to be able to > execute functions in form of an uncompiled list like '(lambda (a b) (+ a > b))) I will probably need some means of compiling and executing a > certain piece of code 'by hand' from within compilation. It seems that > I can do something along > > ((compile #:from 'elisp) arguments to compiled code) Yes this is exactly right. > Regarding the test-suite: It seems to me there's no 'very extensive' > and 'complete' single test-suite for guile at the moment, but I might be > mistaken. So maybe I should create testsuite/elisp and a > run-elisp-tests.scm like the one for vm which loads/compiles/runs and > all that the individual tests? Or is there some existing framework I > can plug my tests into? You should add tests under test-suite/test/elisp.test (note the dash), and add your file to TESTS in test/Makefile.am. But you've probably figured that out already :) Happy hacking, Andy -- http://wingolog.org/