From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: Issue with compiling to scheme Date: Mon, 12 Aug 2013 15:17:55 +0200 Message-ID: <87a9knt5do.fsf@zigzag.favinet> References: <874nb7evbo.fsf@markwitmer.com> <87vc3mlmun.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1376313365 28442 80.91.229.3 (12 Aug 2013 13:16:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Aug 2013 13:16:05 +0000 (UTC) Cc: guile-user@gnu.org To: mark.d.witmer@gmail.com Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Aug 12 15:16:07 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V8ryg-0000Po-Tj for guile-user@m.gmane.org; Mon, 12 Aug 2013 15:16:07 +0200 Original-Received: from localhost ([::1]:33295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8ryg-0007gP-79 for guile-user@m.gmane.org; Mon, 12 Aug 2013 09:16:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8ryO-0007ZO-Lf for guile-user@gnu.org; Mon, 12 Aug 2013 09:15:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8ryI-0004rX-Ad for guile-user@gnu.org; Mon, 12 Aug 2013 09:15:48 -0400 Original-Received: from smtp205.alice.it ([82.57.200.101]:49229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8ryH-0004rG-VR for guile-user@gnu.org; Mon, 12 Aug 2013 09:15:42 -0400 Original-Received: from zigzag.favinet (87.9.131.145) by smtp205.alice.it (8.6.060.28) id 51FA21FE03802300; Mon, 12 Aug 2013 15:15:39 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1V8s0c-0000X4-Ci; Mon, 12 Aug 2013 15:18:06 +0200 In-Reply-To: <87vc3mlmun.fsf@gmail.com> (mark d. witmer's message of "Sat, 03 Aug 2013 13:12:48 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.101 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:10625 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () mark.d.witmer@gmail.com () Sat, 03 Aug 2013 13:12:48 -0400 I can't see a way to do that without wrapping the whole set of expressions in `begin', but that's what creates the problem I described above. I can hack a solution for now but if anyone knows a clean way to do it, that'd be much appreciated. Maybe the simplest way is to completely separate code generation from compilation. This also gives you an opportunity to do compilation in two places (of the code that generates the code, and of the generated code). So your Makefile would look like: gen: gen.scm $(COMPILE) -o $@ $(COMPILEFLAGS) $< chmod +x gen =20 %.generated : %.xml ./gen -o $@ $(GENFLAGS) $< =20 %.go : %.generated $(COMPILE) -o $@ $(COMPILEFLAGS) $< This presumes that $(COMPILE) can create an executable -- not merely "loadable" -- file. (I wouldn't know, personally; under Guile 2, i still keep =E2=80=98GUILE_AUTO_COMPILE=3D0=E2=80=99 in the environment.) Anyway, once you discover and settle on the cleanest methods, i invite you to write it up in Texinfo and add it to CMOD-PLAY: http://www.gnuvola.org/software/cmod-play/ I am very much looking forward to learning what you discover, and applying it to all the projects i maintain. (For example, Guile-SDL test/gfx.scm is a dog under Guile 2.x, blech.) Fingers crossed... =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlII4IcACgkQZwMiJEyAdQIAbwCglLYN0cN5pEQVlRcxpUG8DmP7 mYgAn1KOCSLihpY4C1lRF7CCJRVrcZZg =SgQj -----END PGP SIGNATURE----- --=-=-=--