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: Embedding vs. Extending (was: Re: Using guile as an extension language for GNU make) Date: Sun, 18 Sep 2011 13:21:08 -0400 Organization: GNU's Not Unix! Message-ID: <1316366468.28907.138.camel@homebase> References: <1316304616.28907.118.camel@homebase> <87pqiyaw5w.fsf@gnu.org> Reply-To: psmith@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1316366485 22519 80.91.229.12 (18 Sep 2011 17:21:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Sep 2011 17:21:25 +0000 (UTC) Cc: guile-user@gnu.org To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Sep 18 19:21:18 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 1R5L3O-0004J5-41 for guile-user@m.gmane.org; Sun, 18 Sep 2011 19:21:18 +0200 Original-Received: from localhost ([::1]:46131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5L3N-0002C0-M4 for guile-user@m.gmane.org; Sun, 18 Sep 2011 13:21:17 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5L3L-0002Bh-2y for guile-user@gnu.org; Sun, 18 Sep 2011 13:21:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5L3I-000569-GR for guile-user@gnu.org; Sun, 18 Sep 2011 13:21:15 -0400 Original-Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:54440) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1R5L3I-00055x-70 for guile-user@gnu.org; Sun, 18 Sep 2011 13:21:12 -0400 Original-Received: (qmail 19939 invoked by uid 0); 18 Sep 2011 17:21:11 -0000 Original-Received: from unknown (HELO box531.bluehost.com) (74.220.219.131) by oproxy3.bluehost.com with SMTP; 18 Sep 2011 17:21:11 -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 1R5L3G-0001Dw-R1; Sun, 18 Sep 2011 11:21:10 -0600 In-Reply-To: <87pqiyaw5w.fsf@gnu.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: 69.89.21.8 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:8801 Archived-At: On Sun, 2011-09-18 at 14:10 +0200, Ludovic Courts wrote: > Ideally, when Guile support is enabled, GNU make would be turned into > a Guile extension (a shared library and its companion Scheme module > that loads it with ‘load-extension’) that would expose make’s > functionality. I'm not sure I'm interested in going to that extreme. GNU make has one overarching, guiding concept: it's a critical component of a GNU-based POSIX environment. All POSIX-standard makefiles must work in GNU make, and there are hundreds of thousands of already-existing makefiles, both for POSIX and GNU versions of make. Obviously asking people to start writing makefiles in Scheme would not be appropriate. A technically acceptable option would be to build GNU make in two forms: first a standalone application that worked as now, and second a "library" that could be linked as a Guile extension. However, from what I've read of Guile that would be an immense amount of work: GNU make was created over 20 years ago and has a lot of not-completely-clean features and implementation details which rely on it being a stand-alone program. There's massive amounts of global memory usage, not even a nod to threading capabilities or locking, and features like automatically re-exec'ing itself in some situations. Finally, while it's a cool idea I'm not sure there's a compelling need for this. Have lots of people wanted to be able to define make-type rules and invoke make-like algorithms in Guile programs? Coming from the GNU make side, I've never heard of such a request. Of course sometimes the usages aren't clear before the capability exists; nevertheless there are so many things to do to GNU make proper that I can't justify the effort this would take, for the apparent return involved. If someone else were interested in it I'd be happy to work with them on cleanups to the GNU make codebase that would enable this, as long as they were generally appropriate. My main purpose is to add some kind of scripting capability to GNU make to augment the current functions capability. So many people want me to add new functions to GNU make, and they're very useful functions, but I'm not interested in creating yet another complete scripting language. I'd rather choose an existing language and allow GNU make makefiles to take advantage of it. Guile seems like a natural choice for many reasons. -- ------------------------------------------------------------------------------- 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 Scientist