From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: Re: Minimal Guile Date: Wed, 4 Jan 2012 10:52:56 -0800 (PST) Message-ID: <1325703176.50927.YahooMailNeo@web37907.mail.mud.yahoo.com> References: <1324326921.17612.YahooMailNeo@web37905.mail.mud.yahoo.com> <1324483391.16920.YahooMailNeo@web37904.mail.mud.yahoo.com> <87fwfwlavy.fsf@gnu.org> <1325631236.82931.YahooMailNeo@web37908.mail.mud.yahoo.com> <87ty4cgt65.fsf@netris.org> <1325642994.97968.YahooMailNeo@web37905.mail.mud.yahoo.com> <87lipogmic.fsf@netris.org> Reply-To: Mike Gran NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1325703189 18991 80.91.229.12 (4 Jan 2012 18:53:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2012 18:53:09 +0000 (UTC) Cc: =?iso-8859-1?Q?Ludovic_Court=E8s?= , "guile-devel@gnu.org" To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 04 19:53:04 2012 Return-path: Envelope-to: guile-devel@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 1RiVxP-0000sg-F5 for guile-devel@m.gmane.org; Wed, 04 Jan 2012 19:53:03 +0100 Original-Received: from localhost ([::1]:47716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiVxP-0007Gf-4W for guile-devel@m.gmane.org; Wed, 04 Jan 2012 13:53:03 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:43862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiVxM-0007Ga-9p for guile-devel@gnu.org; Wed, 04 Jan 2012 13:53:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RiVxK-0005r9-RT for guile-devel@gnu.org; Wed, 04 Jan 2012 13:53:00 -0500 Original-Received: from nm17-vm2.bullet.mail.ne1.yahoo.com ([98.138.91.93]:44674) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RiVxK-0005qs-J7 for guile-devel@gnu.org; Wed, 04 Jan 2012 13:52:58 -0500 Original-Received: from [98.138.90.51] by nm17.bullet.mail.ne1.yahoo.com with NNFMP; 04 Jan 2012 18:52:57 -0000 Original-Received: from [98.138.89.246] by tm4.bullet.mail.ne1.yahoo.com with NNFMP; 04 Jan 2012 18:52:57 -0000 Original-Received: from [127.0.0.1] by omp1060.mail.ne1.yahoo.com with NNFMP; 04 Jan 2012 18:52:57 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 236095.57644.bm@omp1060.mail.ne1.yahoo.com Original-Received: (qmail 51472 invoked by uid 60001); 4 Jan 2012 18:52:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1325703176; bh=AYD0RsCvehtTqXfos8CirhVWvI77bd4v2EsFHmWRVFQ=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=P/WdiRUEp7cJXhmn0UVlRhWqe2yuBhzPASHG0clEWAXArlbKZddxwQzCZ0q7WOvPH6izBE5h04QPtgnQaxokwilHj2ab1HjLQUSJ9WNBDNKg8c8I+/jUQm+uk6SboDCCfmN++AzsMweiFOG47L77Q/L6SW8n9Nq1FgOT9bZvwG0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=KZVbnjsT9j0uhfQyKNjgw6t6GUJXqhgUF9YZ+J2BTOaI560EBh/T3HlZtzmOHNhwS8sR99Gj8z0b0s7N25wSaRW2V/PcwOdQ2oqPHeDfEzxkvx6tK5MmxIsx4a/hX3HhweYMksgnn/5WWTA9sJ8v7YW8+fDWTOkn5tbYAL4Yjg0=; X-YMail-OSG: vTGf2iUVM1k.biaFvo5L03JzsXSVQC3OEz7I..Sd5dK1OuL 1URqZRfGN00h61STmdi46TSzvq.Sj6he7P.pHsx29WU7Mlrx1Xhv5P1g84sq Vf1op0xjHVNK_D7USCmyw9eN9Fh019d5eT1hzTZhEWk5KpHO8dox8UpH0xN8 ZS9HWB1EzjaPKeekGZ37lwYNtFyU65c8_Prx_E1efsQ3Thbq3y85AXHAM3nk 0OciFH_MeTBdGd3J4IK073Vr.KFcQvbBBX3LEyhYeznxgVNbCvSBKeiSIAcp vIIlRgJL_1zx2RlgM9GlFKJXsAuxFw_QQmhc4wb4Msy5Z63eUhoyGwoLsTEM FCA24GlLSLhXlcx9S3TV77J5ldEe_PydOv39keBlSyjfuZSZWn.kTZBCyf34 R0Z6NmkYa4nydIjkQVw_T8cFHDw19CQYu7gkdQKKicqbMOlRktmxh_2Pnfna v_zPJXypvSunQZ4DnR.qg Original-Received: from [66.80.183.50] by web37907.mail.mud.yahoo.com via HTTP; Wed, 04 Jan 2012 10:52:56 PST X-Mailer: YahooMailWebService/0.8.115.331698 In-Reply-To: <87lipogmic.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 98.138.91.93 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13286 Archived-At: >> There are some theoretical corner cases where it could be useful.=0A>> = Don't know if these would ever occur in practice.=0A>> - Systems that don= 't use a Unix-like filesystem heirarchy=0A> =0A> I also don't see how Unix-= like filesystem semantics affect this=0A> question.=0A=A0=0AIf there were a= go archive, I could finally make a port to=0AMS-DOS because I could ignore= the 8.3 filesystem limitation.=A0 ;-)=0A=A0=0A> If this single file is to = be built only during the package build=0A> process, and never modified afte= r that, then it should be super-easy to=0A> invent your own little homebrew= format.=A0 If we assume that the library,=0A> executable, and go-bundle fi= les are always distributed together, that=0A> also means that we're free to= change the format at will.=A0 I guess it=0A> could be as simple as this:= =0A> =0A> * Concatenate all of the .go files together, making sure to align= each=0A> =A0 .go file on a page boundary (4 kilobytes) so that each one ca= n be=0A> =A0 individually mmapped.=0A> =0A> * Generate a C file that includ= es the entire directory of files within=0A> =A0 an initialized array.=A0 It= could be as simple as an array of structs=0A> =A0 with three fields: modul= e name, start offset in the big file, and=0A> =A0 length.=A0 If you sort th= is array by module name before generating the=0A> =A0 file, then you could = use binary search to find the file.=0A> =0A> * Once the C file is generated= , relink libguile with this file included.=0A> =A0 (The first time libguile= is built, it could include a stub version of=0A> =A0 the C file with an em= pty directory, so that it knows to use the=0A> =A0 traditional module-loadi= ng mechanism).=0A> =0A> * To allow graceful error messages in case the wron= g go-bundle is used=0A> =A0 with the wrong library, there should be some ki= nd of fingerprint put=0A> =A0 in both the go-bundle and the C file index.= =A0 Check the fingerprint=0A> =A0 before trying to load things from the go-= bundle.=0A=0AThat's good advice.=0A=A0=0AThanks much,=0A=A0=0AMike Gran