unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Why 3 different evaluators?
@ 2011-11-16  5:00 rixed
  2011-11-16  9:31 ` Andy Wingo
  0 siblings, 1 reply; 8+ messages in thread
From: rixed @ 2011-11-16  5:00 UTC (permalink / raw)
  To: guile-user

According to the doc, guile currently maintain 3 evaluators:

- the new VM
- an evaluator written in scheme
- the old C evaluator, used for bootstrapping the compiler.

That's a lot of code just to bootstrap the compiler.  Why not bootstrapping the
compiler from either previous installed guile or (as fall-back) some provided
.go bytecode instead? Wouldn't that make guile code significantly simpler to
maintain and faster to compile?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Why 3 different evaluators?
  2011-11-16  5:00 Why 3 different evaluators? rixed
@ 2011-11-16  9:31 ` Andy Wingo
  2011-11-16 10:17   ` rixed
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Wingo @ 2011-11-16  9:31 UTC (permalink / raw)
  To: rixed; +Cc: guile-user

On Wed 16 Nov 2011 06:00, rixed@happyleptic.org writes:

> According to the doc, guile currently maintain 3 evaluators:
>
> - the new VM
> - an evaluator written in scheme
> - the old C evaluator, used for bootstrapping the compiler.
>
> That's a lot of code just to bootstrap the compiler.  Why not bootstrapping the
> compiler from either previous installed guile or (as fall-back) some provided
> .go bytecode instead? Wouldn't that make guile code significantly simpler to
> maintain and faster to compile?

No :)

If I bootstrap Guile-X from Guile-Y, I have to make sure that Guile-X's
code can load in Guile-Y -- not trivial -- and I have to trust the
output of Guile-Y.

If I bootstrap Guile-X from GCC, I have to trust GCC.

I trust GCC more than Guile-Y.

You can use GUILE_FOR_BUILD if you want to speed things up.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Why 3 different evaluators?
  2011-11-16  9:31 ` Andy Wingo
@ 2011-11-16 10:17   ` rixed
  2011-11-16 18:48     ` Andy Wingo
  0 siblings, 1 reply; 8+ messages in thread
From: rixed @ 2011-11-16 10:17 UTC (permalink / raw)
  To: guile-user

-[ Wed, Nov 16, 2011 at 10:31:31AM +0100, Andy Wingo ]----
> If I bootstrap Guile-X from Guile-Y, I have to make sure that Guile-X's
> code can load in Guile-Y -- not trivial -- and I have to trust the
> output of Guile-Y.

You have to make sure that the evaluator that's written in scheme
can be run by Guile-Y. This evaluator migh as well be written to
be runnable by many other scheme implementations, if you really do
not trust Guile :-)  This is how GHC is bootstrapped BTW, any
sufficiently standard haskell compiler can do it.

> If I bootstrap Guile-X from GCC, I have to trust GCC.

And the code for this C evaluator that's almost used nowhere thus
probably much less tested than the rest of Guile.

> You can use GUILE_FOR_BUILD if you want to speed things up.

That's nice, will try it.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Why 3 different evaluators?
  2011-11-16 10:17   ` rixed
@ 2011-11-16 18:48     ` Andy Wingo
  2011-11-16 19:05       ` rixed
  2011-11-16 19:43       ` Mike Gran
  0 siblings, 2 replies; 8+ messages in thread
From: Andy Wingo @ 2011-11-16 18:48 UTC (permalink / raw)
  To: rixed; +Cc: guile-user

On Wed 16 Nov 2011 11:17, rixed@happyleptic.org writes:

>> If I bootstrap Guile-X from GCC, I have to trust GCC.
>
> And the code for this C evaluator that's almost used nowhere thus
> probably much less tested than the rest of Guile.

On the contrary, it is used to interpret the entire compiler, when
compiling eval.go.  It runs on every system that builds Guile.  Also it
is very simple, and uses the same algorithm as eval.scm.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Why 3 different evaluators?
  2011-11-16 18:48     ` Andy Wingo
@ 2011-11-16 19:05       ` rixed
  2011-11-16 19:43       ` Mike Gran
  1 sibling, 0 replies; 8+ messages in thread
From: rixed @ 2011-11-16 19:05 UTC (permalink / raw)
  To: guile-user

Very good then.
Forget about my remark then.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Why 3 different evaluators?
  2011-11-16 18:48     ` Andy Wingo
  2011-11-16 19:05       ` rixed
@ 2011-11-16 19:43       ` Mike Gran
  2011-11-17  5:29         ` rixed
  1 sibling, 1 reply; 8+ messages in thread
From: Mike Gran @ 2011-11-16 19:43 UTC (permalink / raw)
  To: Andy Wingo, rixed@happyleptic.org; +Cc: guile-user@gnu.org

> From: Andy Wingo <wingo@pobox.com>
> On Wed 16 Nov 2011 11:17, rixed@happyleptic.org writes:
> 
>>>  If I bootstrap Guile-X from GCC, I have to trust GCC.
>> 
>>  And the code for this C evaluator that's almost used nowhere thus
>>  probably much less tested than the rest of Guile.
> 
> On the contrary, it is used to interpret the entire compiler, when
> compiling eval.go.  It runs on every system that builds Guile.  Also it
> is very simple, and uses the same algorithm as eval.scm.

I believe that you can still run the whole test suite on the C evaluator
by erasing all the .go files from the modules lib, setting auto compile off,
then running the check-guile script.  It does take a while to start up,
though, since it reads the psyntax file each time a new script starts.
 
Haven't tried it lately, but, it has worked on previous versions of 2.0.
 
-Mike



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Why 3 different evaluators?
  2011-11-16 19:43       ` Mike Gran
@ 2011-11-17  5:29         ` rixed
  2012-01-09 22:16           ` Andy Wingo
  0 siblings, 1 reply; 8+ messages in thread
From: rixed @ 2011-11-17  5:29 UTC (permalink / raw)
  To: guile-user@gnu.org

-[ Wed, Nov 16, 2011 at 11:43:52AM -0800, Mike Gran ]----
> I believe that you can still run the whole test suite on the C evaluator
> by erasing all the .go files from the modules lib, setting auto compile off,
> then running the check-guile script.

I though it would run the evaluator written in scheme in that case.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Why 3 different evaluators?
  2011-11-17  5:29         ` rixed
@ 2012-01-09 22:16           ` Andy Wingo
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Wingo @ 2012-01-09 22:16 UTC (permalink / raw)
  To: rixed; +Cc: guile-user@gnu.org

On Thu 17 Nov 2011 06:29, rixed@happyleptic.org writes:

> -[ Wed, Nov 16, 2011 at 11:43:52AM -0800, Mike Gran ]----
>> I believe that you can still run the whole test suite on the C evaluator
>> by erasing all the .go files from the modules lib, setting auto compile off,
>> then running the check-guile script.
>
> I though it would run the evaluator written in scheme in that case.

The Scheme evaluator only runs if ice-9/eval.go is present and up to
date.  Otherwise the fallback C evaluator is used.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-09 22:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16  5:00 Why 3 different evaluators? rixed
2011-11-16  9:31 ` Andy Wingo
2011-11-16 10:17   ` rixed
2011-11-16 18:48     ` Andy Wingo
2011-11-16 19:05       ` rixed
2011-11-16 19:43       ` Mike Gran
2011-11-17  5:29         ` rixed
2012-01-09 22:16           ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).