Ludovic Courtès writes:

Hi!

> Impressive!

Thanks!

> Is it a goal to try interpret a language as close as possible to that of
> Guile, and have the same libraries?  I guess that could help in the
> future: we could use (system base lalr), nyacc, etc.

We definitely want Nyacc and PEG, and who can live without lambda*?
Other than that I intend to cut as many corners as I can get away with,
also wrt Guile compatibility; at least for now.

> Also, currently there’s approximately 2K lines of C.  How do you plan to
> make sure that it doesn’t grow over time, or even that it shrinks?  :-)

It was worse, about 2600LOC.  I worked very hard last week and also had
a bit of luck.  I found a performance clue-bat while reading Guile-1.8's
eval.c; now macros are expanded only once.

This helped so much that I finally started moving stuff from the C
prototype into Scheme; about 1000LOC have been removed.  The intepreter
with all dependencies, including cell creation and garbage collector is
now ~1000LOC.  That is able to execute a Scheme program that has been
loaded into memory.  Another ~500LOC is spent to load a minimal Scheme
program and to dump it, to provide a small posix interface, math
functions and do some error reporting.

Next up: 0.4 release.  Then I want to start working on the now very
simplistic compiler backend and hook it up to Nyacc's AST.  As the
current proof-of-concept C compiler runs in Guile too and Nyacc runs
in Mes this can be all done in Guile or a joint Guile/Mes project.

> This all sounds very promising, thanks a lot!

Yay, quit happy to hack on this!

Greetings,
Jan

-- 
Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

Reply via email to