[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some Questions
From: |
Michael Lucy |
Subject: |
Re: Some Questions |
Date: |
Mon, 29 Mar 2010 00:18:28 -0600 |
On Fri, Mar 26, 2010 at 5:56 AM, Andy Wingo <address@hidden> 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 address@hidden 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:
>
> http://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:
>
> http://en.wikipedia.org/wiki/Parsing_expression_grammar
> 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.html.
(Nobody wrote back so I'm not entirely sure it's a bug. If it isn't
then rvector-tst.scm is wrong.)
- Re: Some Questions,
Michael Lucy <=