guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The wonders of partial evaluation


From: Ludovic Courtès
Subject: Re: The wonders of partial evaluation
Date: Fri, 09 Sep 2011 10:38:57 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Hi Noah!

Noah Lavine <address@hidden> skribis:

> An interesting note from my current project: a partial evaluator means
> you don't have to use macros to define the PEG parser (while keeping
> exactly the same efficiency as now): instead of having (define-peg
> pattern) be a macro that analyzes pattern and outputs code, you have,
> (interpret-peg pattern string) be a program that parses string with
> peg. Then to generate code, you just partially apply interpret-peg to
> pattern, leaving string undetermined. (I'm not sure if the partial
> evaluator currently does this, but it would be an interesting
> approach.)

I’m not sure if it does what you want, but you’re welcome to try and
report back—best way to test is to run:

  (peval (compile exp #:to 'tree-il))

Next step will be to have peval consider local module-private bindings,
which should have more visible effects.

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]