guile-devel
[Top][All Lists]
Advanced

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

Re: Article on VM's


From: Andy Wingo
Subject: Re: Article on VM's
Date: Thu, 11 Feb 2010 20:50:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi Ewan,

On Wed 10 Feb 2010 17:36, Ewan Higgs <address@hidden> writes:

> Given the list of existing VMs, is there any technical, ethical,
> moral, or legal reason why Guile doesn't/didn't use another VM? And if
> it/we did decide to use another VM which would be the best candidate?
> Maybe I missed this discussion on the list.

Ah, there's lots of discussion if you look back to the 90s, but I wasn't
around then, so I'll leave you to the spelunking :)

Here is part of the history as I know it:
http://wingolog.org/archives/2008/11/02/guile-bar-mitzvah

And a relevant quote:

    history

    I started on this project because I had a social investment in
    Guile, and wanted my own code to run faster. Luckily, Keisuke
    Nishida already did all of the hard work for me.

    Working with Kei's code has been incredibly enlightening, we've been
    having conversations, displaced in time: I come up with the
    questions, then I notice the answers already in the source. I have
    never actually corresponded with Keisuke in the conventional sense.
    This is a beautiful and strange thing about free software.

    Since then, the code passed through Ludovic Courtès' hands for some
    years, then I unearthed it and brought it to where it is today. It's
    been a pleasing task, having all of the right decisions already made
    for you, just having to fill in the missing bits.

    I should also mention that I had no idea how to write a compiler --
    Ghuloum's beautiful paper notwithstanding. But seeing code that
    breaks it down into levels that I understand has empowered me as a
    programmer to create things that I did not think possible.

History is full of accidents, as you know.

Besides history, there are some technical and social considerations. Not
all VMs are appropriate for Scheme; a notable example would be the JVM's
lack of tail calls. Also consider multiple values, continuations, and
dynamic-wind.

But any time you adapt to someone else's abstraction, you lose a little
bit of autonomy. You also lose flexibility and understanding (the
understanding that one gains while hacking a VM). That's why most every
Scheme has their own compiler, most have their own GC, the ones with VMs
have custom VMs...

Regarding flexibility, one might look at
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=history;f=libguile/vm-i-system.c;hb=HEAD
to see what I mean.

Socially you need to be able to build on something that's not going to
change out from under you; few of the VMs on that list meet that
criteria. Also such a package would need to be appropriate for including
into the GNU system. Few qualify.

There are more reasons, but most only justify the present. If I were
hacking anew now, though, I still think I'd go with a bespoke stack
machine. Eventually we'll do decent ahead-of-time native compilation
anyway, and the point will be moot.

Cheers,

Andy
-- 
http://wingolog.org/




reply via email to

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