From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Hulin Newsgroups: gmane.lisp.guile.devel,gmane.comp.gnu.lilypond.devel Subject: Re: %module-public-interface Date: Fri, 02 Apr 2010 12:58:47 +0100 Message-ID: <4BB5DBF7.6050700@hulin.org.uk> References: <87zl1pv89p.fsf@gnu.org> <87d3ylv5oe.fsf@gnu.org> <4BB53617.7060700@hulin.org.uk> <87y6h6kxei.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270209588 17951 80.91.229.12 (2 Apr 2010 11:59:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Apr 2010 11:59:48 +0000 (UTC) Cc: "lilypond-devel@gnu.org" , guile-devel@gnu.org To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 02 13:59:44 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NxfXL-0001WH-Qu for guile-devel@m.gmane.org; Fri, 02 Apr 2010 13:59:44 +0200 Original-Received: from localhost ([127.0.0.1]:40226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxfXL-0001vb-EN for guile-devel@m.gmane.org; Fri, 02 Apr 2010 07:59:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxfWi-0001ZJ-IL for guile-devel@gnu.org; Fri, 02 Apr 2010 07:59:04 -0400 Original-Received: from [140.186.70.92] (port=40385 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxfWg-0001ZB-Rm for guile-devel@gnu.org; Fri, 02 Apr 2010 07:59:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxfWf-0008W1-DO for guile-devel@gnu.org; Fri, 02 Apr 2010 07:59:02 -0400 Original-Received: from asmtp2.iomartmail.com ([62.128.201.249]:58495) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxfWb-0008Vi-TB; Fri, 02 Apr 2010 07:58:58 -0400 Original-Received: from asmtp2.iomartmail.com (localhost.localdomain [127.0.0.1]) by asmtp2.iomartmail.com (8.13.8/8.13.8) with ESMTP id o32Bwttk025681; Fri, 2 Apr 2010 12:58:55 +0100 Original-Received: from [192.168.1.100] (cpc3-rdng6-0-0-cust547.winn.cable.ntl.com [82.10.50.36]) (authenticated bits=0) by asmtp2.iomartmail.com (8.13.8/8.13.8) with ESMTP id o32Bwrr3025671; Fri, 2 Apr 2010 12:58:54 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 In-Reply-To: <87y6h6kxei.fsf@gnu.org> X-MIME-Autoconverted: from 8bit to quoted-printable by asmtp2.iomartmail.com id o32Bwrr3025671 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10136 gmane.comp.gnu.lilypond.devel:28273 Archived-At: On 02/04/10 10:37, Ludovic =EF=BF=BD wrote: > Hi Ian, > > Ian Hulin writes: > > =20 >> On 30/03/10 22:52, Ludovic =EF=BF=BD wrote: >> =20 > =20 >>> Andy Wingo writes: >>> >>> =20 >>>> On Tue 30 Mar 2010 22:56, ludo@gnu.org (Ludovic Court=C3=A8s) writes= : >>>> >>>> =20 >>>>>> I'm pretty sure that the submodule thing can be changed without an= y >>>>>> problem. But it seems that the %module-public-interface is used >>>>>> explicitly, at least by texmacs and lilypond. >>>>>> =20 >>>>> How do they use it? >>>>> =20 >>>> Linking to the evil empire: >>>> >>>> http://www.google.com/codesearch?hl=3Den&lr=3D&q=3D%25module-public-= interface&sbtn=3DSearch >>>> http://www.google.com/codesearch?hl=3Den&lr=3D&q=3D%25module-public-= interface+lang%3Ac%2B%2B&sbtn=3DSearch >>>> =20 >>> Lilypond does: >>> >>> --8<---------------cut here---------------start------------->8--- >>> mod =3D scm_call_0 (maker); >>> scm_module_define (mod, ly_symbol2scm ("%module-public-interf= ace"), >>> mod); >>> --8<---------------cut here---------------end--------------->8--- >>> >>> Solution: do something like: >>> >>> --8<---------------cut here---------------start------------->8--- >>> #ifdef HAVE_SCM_SET_MODULE_PUBLIC_INTERFACE_X >>> scm_set_module_public_interface_x (mod, mod); >>> #else >>> scm_module_define (mod, ly_symbol2scm ("%module-public-interface"= ), >>> mod); >>> #endif >>> --8<---------------cut here---------------end--------------->8--- >>> >>> (We just need to add that function.) >>> >>> =20 >> =20 >>> TeXmacs does: >>> =20 >> >> =20 >>>>> And we could add a =E2=80=98public-interface=E2=80=99 slot to =E2=80= =98module-type=E2=80=99 and have >>>>> =E2=80=98module-public-interface=E2=80=99 and =E2=80=98set-module-p= ublic-interface!=E2=80=99 refer to >>>>> it; for backward compatibility we=E2=80=99d also initialize the >>>>> =E2=80=98%module-public-interface=E2=80=99 binding. How does it so= und? >>>>> =20 >>> Actually the trick wouldn=E2=80=99t work in cases where the >>> =E2=80=98%module-public-interface=E2=80=99 binding is mutated, as wit= h Lilypond. >>> >>> Given this and the above examples, I=E2=80=99d suggest dropping that = binding >>> completely and sending patches to the Lilypond/TeXmacs people. >>> >>> What do you think? >>> =20 >> If you do add scm_set_module_public_interface_x, could you back-port >> it to Guile V1.8.6 and V1.8.7? >> =20 > We could back-port it to the 1.8 series, but not to the already-release= d > 1.8.7 and 1.8.6. We=E2=80=99d have to make a 1.8.8 release, but I=E2=80= =99m not sure > that would really help anyway since that would force Lilypond users to > switch to that version. > > =20 >> Those are the lowest versions of Guile the upcoming stable release of >> Lilypond will support. >> =20 > How about doing #ifdef HAVE_SCM_SET_MODULE_PUBLIC_INTERFACE_X in your > code? > > We still have to agree on the change and actually implement it, the > latter being easy. ;-) I'm sure that would be easy enough, if guile provided=20 HAVE_SCM_SET_MODULE_PUBLIC_INTERFACE_X in the V2.0 guile-config (or the pkg-config guile-2.0 data which I believe is=20 replacing it), that looks like it would be the most painless route for=20 both projects. > When is the new Lilypond release due? > > =20 I'm not the ReleaseMeister for Lilypond; you'll get a better picture by=20 talking to Graham Percival (graham@percival-music.ca). But FWIW it looks like we're on our few last development releases before=20 the stable V2.14 comes out. It's near enough for a spoof release=20 announcement to have gone out on the mailing list on April 1st which=20 suckered me! I reckon plans are for Lilypond to stick with Guile V1.8.7 at least=20 until the next Lilypond stable version after V2.14, but again, mileage=20 may vary if you talk to more experienced Lilypond people. Currently there are only a couple of people in the Pond looking at=20 Lilypond/Guile V2.0 transition, and there are a few compatibiilty=20 breakages we've identified. 1. Lilypond configure looks at guile-config --version to get the guile=20 version - the guile V2.0 guile-config says it's being deprecated in=20 favour of pkg-config --atleast-version/--exact-version/--max-version. 2. Lilypond has *lots* of guile code which it needs to build the project. 3. There's a restriction introduced in Guile V2.0 whereby dynamic use=20 of define, define-public and variants will cause the guile compilation=20 to fail with diagnostics. We have these in our basic Scheme files=20 (lily.scm and lily-library.scm). These compilation failures currently=20 stop Lilypond building altogether. 4. We've already seen the %module-public-interface thing in the Lily=20 C++. There's probably more smelly stuff lurking in the C++ interface,=20 which won't surface until we start trying to use Guile 2.0 more. Graham, Vincent, is it worth opening a tracker to capture=20 forward-compatibility issues with Guile? Thanks for your feedback so far, Ludo. The other Lily developer who has=20 done anything with Guile 1.9/V2.0 is Patrick McCarty (pnorks@gmail.com). Cheers, Ian