From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.user Subject: Re: How to add Guile support to a package Date: Mon, 5 Jan 2015 13:18:11 +0000 Message-ID: <20150105131811.766a8813@bother.homenet> References: <4850D445-1C26-4463-9D95-3883943E438A@telia.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1420463917 6398 80.91.229.3 (5 Jan 2015 13:18:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2015 13:18:37 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jan 05 14:18:30 2015 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 1Y87YD-0000Vn-Au for guile-user@m.gmane.org; Mon, 05 Jan 2015 14:18:29 +0100 Original-Received: from localhost ([::1]:60428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y87YC-00029p-LC for guile-user@m.gmane.org; Mon, 05 Jan 2015 08:18:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y87Y2-00028S-SL for guile-user@gnu.org; Mon, 05 Jan 2015 08:18:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y87Xy-0002rc-AS for guile-user@gnu.org; Mon, 05 Jan 2015 08:18:17 -0500 Original-Received: from smtpout5.wanadoo.co.uk ([80.12.242.80]:54817 helo=smtpout.wanadoo.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y87Xy-0002qt-5H for guile-user@gnu.org; Mon, 05 Jan 2015 08:18:14 -0500 Original-Received: from laptop.homenet ([2.25.43.65]) by mwinf5d64 with ME id cDJB1p00E1QMmXW03DJBv0; Mon, 05 Jan 2015 14:18:11 +0100 X-ME-Helo: laptop.homenet X-ME-Date: Mon, 05 Jan 2015 14:18:11 +0100 X-ME-IP: 2.25.43.65 Original-Received: from bother.homenet (localhost [127.0.0.1]) by laptop.homenet (Postfix) with ESMTP id EB3AD8C201 for ; Mon, 5 Jan 2015 13:18:11 +0000 (GMT) In-Reply-To: <4850D445-1C26-4463-9D95-3883943E438A@telia.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.80 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:11702 Archived-At: On Mon, 5 Jan 2015 11:05:31 +0100 Hans Aberg wrote: > > > On 5 Jan 2015, at 10:19, Antonio Ceballos > > wrote: > > > GNU Chess has not been using the garbage collector so far. > > There is an issue when using C++ global objects having initializers > doing allocations, on platforms (as on OS X) where the GC initializer > must run first. Does this include guile-2.0? That uses the gc library, which seems to require some precautions to be taken on Darwin as regards the loading of dynamic libraries, but I have not heard of problems interfacing with static global objects where those static objects are conventionally allocated rather than GC'ed. In any event, I have not had problems getting guile to work as an optional extension language for a C++ program with linux, from the memory allocation point of view. There are however issues with accommodating guile exceptions, which are basically long jumps, to C++ objects with non-trivial destructors. You have to organize the code so that no guile exception can take such a C++ object out of scope, and no C++ exception can propagate out of a guile dynwind block. Chris