From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Smith Newsgroups: gmane.lisp.guile.user Subject: Re: Errors using Guile 2.0 vs. Guile 1.8 Date: Sun, 29 Jan 2012 16:51:53 -0500 Organization: GNU's Not Unix! Message-ID: <1327873913.3401.26.camel@homebase> References: <1327852458.3401.10.camel@homebase> <87aa56us0v.fsf@gnuvola.org> Reply-To: psmith@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327873927 27778 80.91.229.3 (29 Jan 2012 21:52:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Jan 2012 21:52:07 +0000 (UTC) Cc: guile-user@gnu.org To: Thien-Thi Nguyen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jan 29 22:52:05 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RrcfM-0007iV-In for guile-user@m.gmane.org; Sun, 29 Jan 2012 22:52:04 +0100 Original-Received: from localhost ([::1]:58617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrcfL-00059T-T5 for guile-user@m.gmane.org; Sun, 29 Jan 2012 16:52:03 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrcfH-00059D-Oy for guile-user@gnu.org; Sun, 29 Jan 2012 16:52:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrcfF-0007Tx-Ua for guile-user@gnu.org; Sun, 29 Jan 2012 16:51:59 -0500 Original-Received: from oproxy1-pub.bluehost.com ([66.147.249.253]:32873) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RrcfF-0007Ts-Jd for guile-user@gnu.org; Sun, 29 Jan 2012 16:51:57 -0500 Original-Received: (qmail 17122 invoked by uid 0); 29 Jan 2012 21:51:56 -0000 Original-Received: from unknown (HELO box531.bluehost.com) (74.220.219.131) by oproxy1.bluehost.com with SMTP; 29 Jan 2012 21:51:55 -0000 Original-Received: from 146-115-71-23.c3-0.lex-ubr1.sbo-lex.ma.cable.rcn.com ([146.115.71.23] helo=[172.31.1.105]) by box531.bluehost.com with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RrcfD-00060z-5w; Sun, 29 Jan 2012 14:51:55 -0700 In-Reply-To: <87aa56us0v.fsf@gnuvola.org> X-Mailer: Evolution 2.32.2 X-Identified-User: {678:box531.bluehost.com:madscie1:mad-scientist.us} {sentby:smtp auth 146.115.71.23 authed with paul+mad-scientist.us} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 66.147.249.253 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9211 Archived-At: On Sun, 2012-01-29 at 22:18 +0100, Thien-Thi Nguyen wrote: > () Paul Smith > () Sun, 29 Jan 2012 10:54:18 -0500 >=20 > $ cat g1.mk > define show > (define (show s) > (display s) > (newline)) > endef > $(info define display) > $(guile $(show)) > $(info after define) > $(guile (show "HI")) # this one > all:; >=20 > I don't know what this means, or how to proceed with debugging. >=20 > What happens if you change the marked line to: >=20 > $(guile (map object->string > (list show > current-output-port > (current-output-port)))) >=20 > ? I would also try simply =A1$(guile show)=A2, but remember faintly > that such a type would cause an error. Thinking along these lines > some more, the problem is perhaps with the return value of =A1show=A2, > which is the return value of calling =A1newline=A2, which is probably > unspecified. >=20 > As for 1.8 vs 2.0, i dare not speculate. Sorry for being unclear. What I was trying to indicate by having the $(info ...) lines there is that the error is actually generated when the (define ...) is parsed, NOT when the function is invoked. In fact I can remove the invocation and still get the errors: $ cat /tmp/g2.mk define show (define (show s) (display s) (newline)) endef $(info define display) $(guile $(show)) $(info after define) all:; =20 $ ./make -f /tmp/g2.mk define display Backtrace: In ice-9/boot-9.scm: 162: 5 [catch #t # ...] 170: 4 [#] In unknown file: ?: 3 [catch-closure] In ice-9/eval.scm: 389: 2 [eval # #] 374: 1 [eval # #] In unknown file: ?: 0 [scm-error misc-error #f ...] =20 ERROR: In procedure scm-error: ERROR: Unknown object: #> after define make: `all' is up to date. I can also (define ...) a function which is entirely numeric (for example the Fibonacci calculator in the test suite) so there's no issue with string return values or ports or anything like that: $ cat /tmp/g3.mk # Define the "fib" function in Guile define fib ;; A procedure for counting the n:th Fibonacci number ;; See SICP, p. 37 (define (fib n) (cond ((=3D n 0) 0) ((=3D n 1) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) endef $(guile $(fib)) x:; =20 $ ./make -f /tmp/g3.mk Backtrace: In ice-9/boot-9.scm: 162: 5 [catch #t # ...] 170: 4 [#] In unknown file: ?: 3 [catch-closure] In ice-9/eval.scm: 389: 2 [eval # #] 374: 1 [eval # #] In unknown file: ?: 0 [scm-error misc-error #f ...] =20 ERROR: In procedure scm-error: ERROR: Unknown object: #> make: `x' is up to date. As you can see I'm not actually calling these functions at all; simply defining them is enough to cause the error. Again these all work perfectly with Guile 1.8. --=20 ---------------------------------------------------------------------------= ---- Paul D. Smith Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scient= ist