From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Eval, tail calls, (current-module), and backward compatibility Date: Wed, 18 Jan 2012 23:47:22 +0100 Message-ID: <87y5t4pr0l.fsf@gnu.org> References: <87lip70zz7.fsf@netris.org> <878vl4vhdr.fsf@gnu.org> <8739bcfz65.fsf@pobox.com> <87pqegr6rm.fsf@gnu.org> <87ty3sejee.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1326926858 19319 80.91.229.12 (18 Jan 2012 22:47:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2012 22:47:38 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 18 23:47:30 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RneHx-0004MS-5I for guile-devel@m.gmane.org; Wed, 18 Jan 2012 23:47:29 +0100 Original-Received: from localhost ([::1]:56853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RneHw-0000Lc-Ea for guile-devel@m.gmane.org; Wed, 18 Jan 2012 17:47:28 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RneHu-0000LW-8q for guile-devel@gnu.org; Wed, 18 Jan 2012 17:47:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RneHt-00038h-BZ for guile-devel@gnu.org; Wed, 18 Jan 2012 17:47:26 -0500 Original-Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:46554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RneHt-00038d-62 for guile-devel@gnu.org; Wed, 18 Jan 2012 17:47:25 -0500 X-IronPort-AV: E=Sophos;i="4.71,532,1320620400"; d="scan'208";a="127973994" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 18 Jan 2012 23:47:23 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 =?iso-8859-1?Q?Niv=F4se?= an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87ty3sejee.fsf@pobox.com> (Andy Wingo's message of "Wed, 18 Jan 2012 23:27:21 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.105 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13575 Archived-At: Andy Wingo skribis: > On Wed 18 Jan 2012 23:21, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Andy Wingo skribis: >> >>> On Wed 18 Jan 2012 22:18, ludo@gnu.org (Ludovic Court=C3=A8s) writes: >>> >>>> (('apply (f args)) >>>> (apply (eval f env) (eval args env))) >>> >>> This is in primitive-eval (and here, `eval' is locally bound). Mark is >>> talking about R5RS `eval' (`scm_eval'). >> >> OK, but =E2=80=98scm_eval=E2=80=99 is not recursive, so no wonder it=E2= =80=99s not >> tail-recursive. :-) >> >> (I=E2=80=99m confident I=E2=80=99m missing something, but I just fail to= see what. ;-)) > > Hee hee :) The point is that this should loop indefinitely: > > (define (loop) > (eval '(loop) (current-module))) > (loop) OK, got it. TBH, I=E2=80=99d be happy to document the limitation and live with it, especially since it=E2=80=99s not a regression. Thanks, Ludo=E2=80=99.