From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antonio Ceballos Newsgroups: gmane.lisp.guile.user Subject: Re: How to add Guile support to a package Date: Mon, 5 Jan 2015 18:34:00 +0100 Message-ID: References: <87ioglm9z8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420479274 5194 80.91.229.3 (5 Jan 2015 17:34:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2015 17:34:34 +0000 (UTC) Cc: Guile User To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jan 05 18:34:22 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 1Y8BXq-0005Hx-21 for guile-user@m.gmane.org; Mon, 05 Jan 2015 18:34:22 +0100 Original-Received: from localhost ([::1]:33310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8BXp-00020p-9v for guile-user@m.gmane.org; Mon, 05 Jan 2015 12:34:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8BXW-0001p9-UP for guile-user@gnu.org; Mon, 05 Jan 2015 12:34:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8BXV-0008FY-T4 for guile-user@gnu.org; Mon, 05 Jan 2015 12:34:02 -0500 Original-Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:41719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8BXV-0008FQ-MN; Mon, 05 Jan 2015 12:34:01 -0500 Original-Received: by mail-wi0-f181.google.com with SMTP id r20so3777900wiv.14; Mon, 05 Jan 2015 09:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=4O6bGyMWkPl/V85S2u2TMZfr2QNH9mEGvtXgFySD/gs=; b=m/6PvtD1ipS7ED3jcStOZLyPtf4OG+ySwn/0EK4inmf9zgtMMJh8z7UrWsGhiQIVl2 dJhwmO/0wwE7QPjypSubV448BDVy8n9AM+01r+nuWs2dddflzr10Xg4hxvJ6+xyMWoj/ Tn/t2VMnQFsTk7xmb2IhteS3noBnPXoF0NxXfRIEvPLPX24dkP2unKrwVLsheCgcvsfB KDzpbmbQWAvcqpqJp5yeOXa0MsZ3sZQ5LdUYRoomPWv66FzReM9iFavIOp//HdlzjJ14 4v1sR8go+1blJiO5hgB+KUZ87THlEvVX+LKBQHwJYxWVNNEoHMd2RXWJmEKuKG221Str lF5w== X-Received: by 10.180.88.33 with SMTP id bd1mr27689965wib.10.1420479240411; Mon, 05 Jan 2015 09:34:00 -0800 (PST) Original-Received: by 10.216.150.1 with HTTP; Mon, 5 Jan 2015 09:34:00 -0800 (PST) In-Reply-To: <87ioglm9z8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::235 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:11707 Archived-At: Hi Ludo, Thanks for your support. This is only a rough plan, but one of the things that I have in mind is to allow users provide their own evaluation function as an Scheme expression. That would be possible when GNU Chess is run in a especial new mode whereby the Guile evaluation function would replace the built-in evaluation function. For that purpose, I think that I need both to embed Guile into Chess, and to export some primitives that could be used as building blocks for the Scheme evaluation function. Does it make sense? Regards, Antonio On Mon, Jan 5, 2015 at 6:08 PM, Ludovic Court=C3=A8s wrote: > Hi, > > I think the question to ask is what you want to enable with Guile. > Probably you=E2=80=99ll want to export some of the functions and data typ= es of > Chess to Scheme, which can be done using the libguile C interface. > > Another question is whether you want to embed Guile into Chess, or > whether you want to extend Guile with Chess. In the latter case, Chess > would essentially be a Scheme library. This is best because it opens > for more possibilities, and makes it easier to work with the Scheme API > of Chess. More info on this trade-off at > . > > Since you want Guile to be an optional dependency, embedding may be more > appropriate, though. > > HTH, > Ludo=E2=80=99.