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: Using guile as an extension language for GNU make Date: Mon, 19 Sep 2011 02:28:46 +0200 Message-ID: <87sjntwf29.fsf@ambire.localdomain> References: <1316304616.28907.118.camel@homebase> <87wrd5x404.fsf@ambire.localdomain> <1316374080.28907.163.camel@homebase> 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 1316392223 13555 80.91.229.12 (19 Sep 2011 00:30:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Sep 2011 00:30:23 +0000 (UTC) Cc: guile-user@gnu.org To: psmith@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 19 02:30:19 2011 Return-path: Envelope-to: guile-user@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 1R5RkY-0001Wi-Ts for guile-user@m.gmane.org; Mon, 19 Sep 2011 02:30:19 +0200 Original-Received: from localhost ([::1]:42265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5RkY-00024v-Fw for guile-user@m.gmane.org; Sun, 18 Sep 2011 20:30:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5RkV-00024i-O6 for guile-user@gnu.org; Sun, 18 Sep 2011 20:30:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5RkU-0007B5-Lm for guile-user@gnu.org; Sun, 18 Sep 2011 20:30:15 -0400 Original-Received: from smtp206.alice.it ([82.57.200.102]:37699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5RkS-0007AQ-O3; Sun, 18 Sep 2011 20:30:13 -0400 Original-Received: from ambire.localdomain (62.211.148.139) by smtp206.alice.it (8.5.124.08) id 4E4BBF77029A38E1; Mon, 19 Sep 2011 02:30:10 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1R5Rj5-0005V5-0u; Mon, 19 Sep 2011 02:28:47 +0200 In-Reply-To: <1316374080.28907.163.camel@homebase> (Paul Smith's message of "Sun, 18 Sep 2011 15:28:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.102 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:8806 Archived-At: () Paul Smith () Sun, 18 Sep 2011 15:28:00 -0400 [new impl] That's better than what I had before, but I still have some concerns. For example, what if a Guile call wanted to return a list? I can use display as above, but the list will be enclosed in parentheses, which is not how make displays lists. Is there a clean way to handle this? "Clean" in what way? Everything depends on what the expected (valid) use of this facility would be. Could you give some examples (w/ failure cases)? I could write a function then invoke it with scm_map() (right?) but this seems like it might be work. Everything is work. Even play is work (but hopefully more fun/interesting). Also what if the data structure is more complex, where some elements of = the list are lists themselves, etc.? I can "flatten" the entire thing out, I suppose. Yes. Or I could ignore them as above and require the Guile scripting to convert the list into a string before returning it. Right. The protocol is internal; you can choose 60/40 or 40/60. I think concomitant w/ this particular hacking it would nice to implement some of the make functions (e.g., =E2=80=98patsubst=E2=80=99) in Scheme. E= nough of that and you will end up {in,con}verting the "embedding" effort to an "extending" effort as suggested by Ludo -- YHBW! :-D