From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: No Itisnt Newsgroups: gmane.lisp.guile.devel Subject: Re: Lightning Bindings Date: Fri, 28 May 2010 15:49:07 -0500 Message-ID: References: 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 1275079914 5019 80.91.229.12 (28 May 2010 20:51:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 May 2010 20:51:54 +0000 (UTC) Cc: guile-devel@gnu.org To: Noah Lavine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri May 28 22:51:52 2010 connect(): No such file or directory 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 1OI6Wz-0001ch-KU for guile-devel@m.gmane.org; Fri, 28 May 2010 22:51:49 +0200 Original-Received: from localhost ([127.0.0.1]:43025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI6Wz-0005Zx-4e for guile-devel@m.gmane.org; Fri, 28 May 2010 16:51:49 -0400 Original-Received: from [140.186.70.92] (port=53385 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI6UR-00035E-0r for guile-devel@gnu.org; Fri, 28 May 2010 16:49:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OI6UP-0001Ps-4G for guile-devel@gnu.org; Fri, 28 May 2010 16:49:11 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:55786) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI6UP-0001Pg-17 for guile-devel@gnu.org; Fri, 28 May 2010 16:49:09 -0400 Original-Received: by gwb19 with SMTP id 19so1687107gwb.0 for ; Fri, 28 May 2010 13:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=42xMcmxsO9GIBIghc8X+hVYRmzUjj2Dhe8JyFgQh1XU=; b=KwytFuybyKNFarn3w1RgD/7Zugle81lp3QB893QG75XOxurLMUFXkZGZLsIb9YwHWe +IifAu5v2A0XubZIkKh5yFL0QDACF1eufMp6H9iIRpiS8XRdAOD1M0/ek6Z4L1ZaEPng eZCxUbRD6wTbZ4bo+cH+97mqIiTU1X8WISXHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=amV2DKB3Wy3TpjgGEh4NFPTV3Jc6lZuVNyuPoSgYcbjUPIIVIltoAL57niRHcOprr9 KQ59gEZCifrkWdMXiMlvlj5d0JQXI/Z+Dtf2tpKU2mMtSiyeQhmCsNlysLtwUwrMGaa8 sQWnRCdz0DZWFScqX7n1Wb+A+sXBN6sgyxatI= Original-Received: by 10.229.228.208 with SMTP id jf16mr247695qcb.43.1275079747940; Fri, 28 May 2010 13:49:07 -0700 (PDT) Original-Received: by 10.229.232.199 with HTTP; Fri, 28 May 2010 13:49:07 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:10394 Archived-At: Neat! Have you looked into libjit? The only reason I bring it up is because it seems to be more popular than Lightning and already has some third-party language bindings. On Thu, May 27, 2010 at 4:03 PM, Noah Lavine wrot= e: > Dear Guile Developers, > > After watching the discussion of native code generation on this list a > few weeks ago, I decided I'd like to help. I looked at several > possibilities, but it seemed like the easiest and most sure way of > making *something* work was writing bindings to GNU Lightning. > > I now have a start at working bindings for Lightning, which you can > see at http://github.com/noahl/guile-lightning. Currently it can only > use a few Lightning instructions, but I have enough to verify that it > generates executable code and that code interfaces with Guile. At this > point I could fairly easily go through the Lightning manual and add > more functions, command-by-command, until I had a complete interface > to the Lightning API. > > My thought was to do enough of the Lightning API that it could call C > functions, and then implement a compiler from Guile VM code to native > Lightning-generated code that just called a series of VM functions. > There wouldn't be any inlining or cool things like that, but it would > be a start. You could then add inlining support for individual VM > functions as it seemed important. At that point I would also want to > wrap the rest of the Lightning API, both so that inlined VM functions > could use it and so that other Guile programs could use Lightning like > any other module. > > However, I would like to ask two questions before I do that, to make > sure the result is ultimately useful. > =A0 - First, would you like Lightning bindings? As I said, I think it's > the fastest way to get some native code generation going, but I don't > think it'll ultimately be the best. (I can clean up and post my notes > on different code generation systems if you'd like them.) > =A0 - Second, what would a good interface to a native code generation > system be? (I'm assuming we'll want Lightning available as a regular > module in addition to using it to speed up the language.) My current > prototype just mimics the Lightning API, but it's not necessarily the > best way to do this. Is there a better way? > > Thank you > Noah Lavine > >