From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Lucy Newsgroups: gmane.lisp.guile.devel Subject: Re: Some Questions Date: Mon, 29 Mar 2010 00:18:28 -0600 Message-ID: <52c42c3e1003282318q3f01f575m7bf45342bf520499@mail.gmail.com> References: <52c42c3e1003242253w40bd6447k48e5a42cc1d33a98@mail.gmail.com> <52c42c3e1003251242g1a39b967pfdf5437b953bf054@mail.gmail.com> 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 1269844493 31848 80.91.229.12 (29 Mar 2010 06:34:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Mar 2010 06:34:53 +0000 (UTC) To: guile-devel@gnu.org, Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 29 08:34:48 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 1Nw8Yh-0005vt-FW for guile-devel@m.gmane.org; Mon, 29 Mar 2010 08:34:47 +0200 Original-Received: from localhost ([127.0.0.1]:34952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nw8JP-00080t-9F for guile-devel@m.gmane.org; Mon, 29 Mar 2010 02:18:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nw8JL-00080g-AS for guile-devel@gnu.org; Mon, 29 Mar 2010 02:18:55 -0400 Original-Received: from [140.186.70.92] (port=36105 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nw8JI-000802-HB for guile-devel@gnu.org; Mon, 29 Mar 2010 02:18:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nw8JG-0005tO-3t for guile-devel@gnu.org; Mon, 29 Mar 2010 02:18:52 -0400 Original-Received: from mail-pv0-f169.google.com ([74.125.83.169]:53965) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nw8JF-0005t2-VM for guile-devel@gnu.org; Mon, 29 Mar 2010 02:18:50 -0400 Original-Received: by pvg2 with SMTP id 2so6851109pvg.0 for ; Sun, 28 Mar 2010 23:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:received:message-id :subject:to:content-type:content-transfer-encoding; bh=cu+SQIqpS6Pu4vkAWF5aGmwaqgxBAStogBvxm+inI7M=; b=e24EFIjjkntm4RtPymHGgOMv352PeVyfXRje/ncO2SklMAIkLfk9GzoOu9dS8j8YIA 8H2wn+uVNYw+AS7Ubj5i77aA4ogURpAC7d47mZCccHm5GRC0lbp9xPInunoBghdljN2Z ryQr74wBXBZ9o9nAEbVuSt3GLYTR835OJPBDI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=QefXMJuExnnC0F+3Eqtij29oK/iPk7mQgDr44oy/UaoWZD7ufeBklq6bAStZsBCftD RH9+csIocGy1lxawrlSEbr9id2PaPDSKfxNH62a8OmZuF/dHHXNWyIUj6wtIJgGB4XeE qFBNVQuqmVxgActP7MInZZGr7xTxi7FDeg+6E= Original-Received: by 10.141.40.4 with HTTP; Sun, 28 Mar 2010 23:18:28 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: fd34bc6d4939fb9f Original-Received: by 10.141.187.3 with SMTP id o3mr3835947rvp.224.1269843528113; Sun, 28 Mar 2010 23:18:48 -0700 (PDT) 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:10105 Archived-At: On Fri, Mar 26, 2010 at 5:56 AM, Andy Wingo wrote: > http://www.gnu.org/software/guile/mail/mail.html :) Guile-devel. Send > things there, and copy me on them if you really want it to go to my > attention. Ah, OK, I thought you meant the summer-of-code@gnu.org mailing list. > Well, I've already heard of someone who would like to do Lua, so if it's > the same to you, I'd have a look at Python. Here's a mail I sent to the > list recently regarding practicalities: > > =A0http://lists.gnu.org/archive/html/guile-devel/2010-03/msg00076.html > > I'd also have a look at Thomas Bushnell's early work at supporting > Python, before we had the compiler: http://savannah.gnu.org/projects/gpc > > I am somewhat concerned that we'll end up with a number of half-finished > language implementations. I'm not sure what to do or think about that. I'll probably apply to work on Python then. Two quick questions: 1. How fast would you need it to be? (i.e. am I going to be writing C code or can I stick with straight Scheme?) 2. I was thinking of compiling Python into Scheme code, but you suggest in that link compiling to Tree-IL instead. Could you elaborate on the logic behind that more? Does it just result in faster programs? > Hm, another thought, project-wise: have you heard of parsing expression > grammars before? Here are a couple links: > > =A0 http://en.wikipedia.org/wiki/Parsing_expression_grammar > =A0 http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html > > Writing a good PEG parser library, together with docs and example > grammars, sounds like about a 1.5-2 month project -- just about right > for the SOC. > > We do have a LALR parser generator; I said something else about it in > the mail to guile-devel. A PEG parser seems like a shorter project than two months, but maybe writing one that's up to GNU standards would take a while. Would you prefer this over a python compiler? I'd be up for it; I mostly want to be writing something intellectually interesting in Scheme. > > Happy hacking, > > Andy > -- > http://wingolog.org/ > Anyway, sorry I haven't written for the last 3 days. You said you wanted to see some code so I wrote some, but I kinda got caught up in it. I hosted things up at http://people.cs.uchicago.edu/~mlucy/ if you want to take a look. peg.scm is a PEG parser. It works on the things I've tested it on, but I'd be amazed if there weren't any bugs lurking there. It's also in need of a serious refactoring--please don't think my finished code looks like parse-expression. It works but I wouldn't consider it finished by any standard, I just ran out of time (applications open tomorrow). rvector.scm is a resizable vector library--not terribly useful, but I wrote it to get familiar with guile before writing peg.scm (and as evidence that I do, in fact, produce reasonably clean code once the bugs are ironed out). peg-tst.scm and rvector-tst.scm do what they sound like. peg-tst.scm is two tests and an example of the library actually parsing a simple function grammar. rvector-tst.scm won't complete successfully without the change I suggested in http://lists.gnu.org/archive/html/bug-guile/2010-03/msg00011.h= tml. (Nobody wrote back so I'm not entirely sure it's a bug. If it isn't then rvector-tst.scm is wrong.)