Lisp HUG Maillist Archive

Interesting find...

I just ran across Dybvig’s PhD Thesis ( http://agl.cs.unm.edu/~williams/cs491/three-imp.pdf ). In the appendix he shows some interesting comparisons between heap-based and stack-based implementations for a Lisp-like language (Scheme).

I have constructed many different versions of machines and architectures in the past. But over the past decade or so I have increasingly forced myself to live within the confines of Common Lisp. And in doing so, I have repeatedly run into barriers when trying to implement faithful Lisp versions of things like Reppy’s CML Channels, and Continuation Passing Style (CSP) compilers, and even the Butterfly (Erlang in Lisp) system. Invariably, these all have to resort to one major THROW to achieve similar (not identical) behavior in stack-based Common Lisp.

This has been a source of frustration, to some small degree, and I have often toyed with the idea of implementing another compiler targeting heap-based (spaghetti stacks) architecture using Common Lisp - something more akin to the description of the Smalltalk-80 implementation.

The Dybvig thesis shows just how costly that pining for perfection becomes…

- DM

Re: Interesting find...


Hi David, you might find this paper on the history of the development of Chez Scheme interesting as well:  http://www.cs.indiana.edu/~dyb/pubs/hocs.pdf 
Its been a few years since I’ve read that paper, but if I recall correctly, Dybvig ended up using a combination of the two approaches over the course of evolving Chez Scheme.  

I’m curious, how would you characterize the situations where you had to resort to throw?  Also, how was the resulting behavior different from what you were intending to replicate?  

Regards,
Gene


On Apr 19, 2016, at 1:18 PM, David McClain <dbm@refined-audiometrics.com> wrote:

I just ran across Dybvig’s PhD Thesis ( http://agl.cs.unm.edu/~williams/cs491/three-imp.pdf ). In the appendix he shows some interesting comparisons between heap-based and stack-based implementations for a Lisp-like language (Scheme).

I have constructed many different versions of machines and architectures in the past. But over the past decade or so I have increasingly forced myself to live within the confines of Common Lisp. And in doing so, I have repeatedly run into barriers when trying to implement faithful Lisp versions of things like Reppy’s CML Channels, and Continuation Passing Style (CSP) compilers, and even the Butterfly (Erlang in Lisp) system. Invariably, these all have to resort to one major THROW to achieve similar (not identical) behavior in stack-based Common Lisp.

This has been a source of frustration, to some small degree, and I have often toyed with the idea of implementing another compiler targeting heap-based (spaghetti stacks) architecture using Common Lisp - something more akin to the description of the Smalltalk-80 implementation.

The Dybvig thesis shows just how costly that pining for perfection becomes…

- DM

Re: Interesting find...

David & Gene,

On Tue, Apr 19, 2016, at 03:20 PM, Gene Diveglia wrote:
>
> Hi David, you might find this paper on the history of the development
> of Chez Scheme interesting as well:
> <http://www.cs.indiana.edu/~dyb/pubs/hocs.pdf>
>
> Its been a few years since I’ve read that paper, but if I recall
> correctly, Dybvig ended up using a combination of the two approaches
> over  the course of evolving Chez Scheme.

[snip]

> > On Apr 19, 2016, at 1:18 PM, David McClain <dbm@refined-
> > audiometrics.com> wrote:
> >
> > I just ran across Dybvig’s PhD Thesis
> > <http://agl.cs.unm.edu/~williams/cs491/three-imp.pdf>. In the
> > appendix he shows some interesting comparisons between heap-based
> > and stack-based implementations for a Lisp-like language (Scheme).

Thanks for mentioning these papers. I was familiar with Dybvig's
retrospective that Gene mentioned, but not his PhD thesis that David
pointed to. Both of you may also be interested in this paper on the
nanopass compiler framework approach (if you haven't seen it already):
<http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf>

Also, as it happens, Chez Scheme was open sourced by Cisco earlier
today!: <https://github.com/cisco/ChezScheme>. The nanopass framework is
used in Chez Scheme, but is also a separate project, the References
section of the README has bibliographic notes on newer papers than the
JFP article mentioned above, see
<https://github.com/nanopass/nanopass-framework-scheme>


-- 
Daniel Moniz <dnm@pobox.com> [http://pobox.com/~dnm/]


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:32 UTC