From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: summer of code ideas Date: Mon, 7 Mar 2011 17:37:22 -0500 Message-ID: References: <87pqq2vcnb.fsf@gnu.org> <87d3m2va6f.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1299538985 13483 80.91.229.12 (7 Mar 2011 23:03:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 Mar 2011 23:03:05 +0000 (UTC) Cc: guile-devel@gnu.org To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Mar 08 00:03:01 2011 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 1PwjS7-0000Ia-Mz for guile-devel@m.gmane.org; Tue, 08 Mar 2011 00:02:59 +0100 Original-Received: from localhost ([127.0.0.1]:36051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwjS6-00030r-TS for guile-devel@m.gmane.org; Mon, 07 Mar 2011 18:02:58 -0500 Original-Received: from [140.186.70.92] (port=42733 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwj3R-0001Bv-KB for guile-devel@gnu.org; Mon, 07 Mar 2011 17:37:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwj3L-0004RX-5R for guile-devel@gnu.org; Mon, 07 Mar 2011 17:37:24 -0500 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:53066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwj3L-0004RS-1i; Mon, 07 Mar 2011 17:37:23 -0500 Original-Received: by vxc38 with SMTP id 38so5264160vxc.0 for ; Mon, 07 Mar 2011 14:37:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Gya3+37mKQf9UrOB8TR6sRTlS9CTi4Jw7j3sIZHJRKg=; b=Q7OnxyG/HFr1ydKEoivWYRE3MwBv3bsbagix6T8uF+qFY3Ca07CpkGjyo57vS788d/ iyF41e5f8laNYqlRGhhK03Uc/wmDRhTnY8zhHPg26DBtwp4CvjgnZBaVjHlvpqun8yVz 5eBZqu/qnJiE0ef9WspNZBR6K/AhIZ1He+ScA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=KW3OKv7akgLrkk/JRUweBNQe/9ziLXo4p3pULkAGCTxHvi/kGjGO2q7xV2ZPSidRnU bzVPHJos+ZsE6KhuqaA36mbZEXTobdMxTSi3OATj+vJOtTg6FKveK/p36PXROA/xE4g/ pmFNmkTAld2viVottVU218UwfYkbj5TGt6YIg= Original-Received: by 10.52.180.102 with SMTP id dn6mr3178950vdc.38.1299537442412; Mon, 07 Mar 2011 14:37:22 -0800 (PST) Original-Received: by 10.52.166.194 with HTTP; Mon, 7 Mar 2011 14:37:22 -0800 (PST) In-Reply-To: <87d3m2va6f.fsf@gnu.org> X-Google-Sender-Auth: 65qRrhIuDbzVhtktxmMWZcuD3js X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 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:11824 Archived-At: Hello, >> We talked about having a Scheme-based language that could compile to >> both plain C and JIT, but decided that would make the VM too >> complicated, > > Maybe I forgot to feed that thread, but I think it might be easier to > have a high-level representation the VM opcodes as sexps (possibly a > subset of Scheme), and then write the C files from that. > > Though the main difficulty is to find a sufficiently expressive way to > write opcodes in. Oh dear. My impression was that we had decided to use a C parser. If not, I think the hardest part of making this work would be making the C output look nice. Libjit and C are such similar languages that making the translator would be quite simple. >> I notice that GCC now has the ability to use plugins, > > The plug-in API doesn=92t allow plug-ins to add new front-ends > (info "(gccint) Plugins"). Ah, I see. I read their wiki a bit. It does look like using GCC would be difficult, but I still think it would be worthwhile to do just because they have such a nice compiler already written. It looks like what you need to build a frontend is the ability to manipulate GCC's data structures and the ability to write functions that C code can call back to. I believe the FFI can do both of these things now (not that it wouldn't be a pain to fit everything together). Also, after looking at the MELT project and the Modula-2 frontend, I'd say they might be receptive to the idea of using a high-level language to write parts of GCC. Noah