Re: [fonc] Kernel Maru

2012-04-10 Thread Alan Kay
Hi Julian

(Adding to Ian's comments)

Doing as Ian suggests and trying out variants can be an extremely illuminating 
experience (for example, BBN Lisp (1.85) had three or four choices for what was 
meant by a lambda closure -- three of the options I remember were (a) do 
Algol -- this is essentially what Scheme wound up doing 15 years later, (b) 
make a private a-list for free variables, (c) lock the private a-list to the 
values of the free variables at the time of the closure).

I  suggest not trying to write your eval in the style that McCarthy used (it's 
too convoluted and intertwined). The 
first thing to do is to identify and isolate separate cases that have to be 
taken care of -- e.g. what does it mean to eval the function position of an 
expression (LISP keeps on evaling until a lambda is found ...). Write these 
separate cases as separately as possible.


Dave Fisher's thesis A Control Definition Language CMU 1970 is a very clean 
approach to thinking about environments for LISP like languages. He separates 
the control path, from the environment path, etc.


You have to think about whether 
special forms are a worthwhile idea (other ploys can be used to 
control when and if arguments are evaled).

You will need to think about the tradeoffs between a pure applicative style vs. 
being able to set values imperatively. For example, you could use Strachey's 
device to write loops as clean single assignment structures which are 
actually tail recursions. Couple this with fluents (McCarthy's time 
management) and you get a very clean non-assignment language that can 
nonetheless traverse through time. Variants of this idea were used in Lucid 
(Ashcroft and Wadge).

Even if you use a recursive language to write your eval in, you might also 
consider taking a second pass and writing the eval just in terms of loops -- 
this is also very illuminating.

What one gets from doing these exercises is a visceral feel for great power 
with very little mechanics -- this is obtained via mathematical thinking and 
it is obscured almost completely by the standard approaches to characterizing 
programming languages (as things in themselves rather than a simple powerful 
kernel with decorations).

Cheers,

Alan






 From: Ian Piumarta piuma...@speakeasy.net
To: Julian Leviston jul...@leviston.net 
Cc: Fundamentals of New Computing fonc@vpri.org 
Sent: Monday, April 9, 2012 8:58 PM
Subject: Re: [fonc] Kernel  Maru
 
Dear Julian,

On Apr 9, 2012, at 19:40 , Julian Leviston wrote:

 Also, simply, what are the semantic inadequacies of LISP that the Maru 
 paper refers to (http://piumarta.com/freeco11/freeco11-piumarta-oecm.pdf)? 
 I read the footnoted article (The Influence of the Designer on the Design—J. 
 McCarthy and Lisp), but it didn't elucidate things very much for me.

Here is a list that remains commented in my TeX file but which was never 
expanded with justifications and inserted into the final version.  (The ACM 
insisted that a paper published online, for download only, be strictly limited 
to five pages -- go figure!)

%%   Difficulties and omissions arise
%%   involving function-valued arguments, application of function-valued
%%   non-atomic expressions, inconsistent evaluation rules for arguments,
%%   shadowing of local by global bindings, the disjoint value spaces for
%%   functions and symbolic expressions, etc.

IIRC these all remain in the evaluator published in the first part of the 
LISP-1.5 Manual.

 I have to say that all of these papers and works are making me feel like a 3 
 year old making his first steps into understanding about the world. I guess 
 I must be learning, because this is the feeling I've always had when I've 
 been growing, yet I don't feel like I have any semblance of a grasp on any 
 part of it, really... which bothers me a lot.

My suggestion would be to forget everything that has been confusing you and 
begin again with the LISP-1.5 Manual (and maybe Recursive Functions of 
Symbolic Expressions and Their Computation by Machine).  Then pick your 
favourite superfast-prototyping programming language and build McCarthy's 
evaluator in it.  (This step is not optional if you want to understand 
properly.)  Then throw some expressions containing higher-order functions and 
free variables at it, figure out why it behaves oddly, and fix it without 
adding any conceptual complexity.

A weekend or two should be enough for all of this.  At the end of it you will 
understand profoundly why most of the things that bothered you were bothering 
you, and you will never be bothered by them again.  Anything that remains 
bothersome might be caused by trying to think of Common Lisp as a 
dynamically-evaluated language, rather than a compiled one.

(FWIW: Subsequently fixing every significant asymmetry, semantic irregularity 
and immutable special case that you can find in your evaluator should lead you 
to something not entirely unlike the tiny evaluator at 

Re: [fonc] Kernel Maru

2012-04-10 Thread Duncan Mak
On Tue, Apr 10, 2012 at 2:34 PM, Monty Zukowski mo...@codetransform.comwrote:

 If anyone finds an electronic copy of Fisher's thesis I'd love to know
 about it.  My searches have been fruitless.


The title is not the same, but maybe these are variants of the same paper?

http://dl.acm.org/author_page.cfm?id=81100550987coll=DLdl=ACMtrk=0cfid=76786786cftoken=53955875

Also, I no longer have access to ACM digital library, so I can't post the
PDFs.

-- 
Duncan.
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Kernel Maru

2012-04-10 Thread Monty Zukowski
Yes, it looks like this is it.  $37 for a PDF.  Thanks!

CONTROL STRUCTURES FOR PROGRAMMING LANGUAGES
by FISHER, DAVID ALLEN, Ph.D., Carnegie Mellon University, 1970, 215
pages; AAT 7021590

On Tue, Apr 10, 2012 at 11:54 AM, Duncan Mak duncan...@gmail.com wrote:
 On Tue, Apr 10, 2012 at 2:34 PM, Monty Zukowski mo...@codetransform.com
 wrote:

 If anyone finds an electronic copy of Fisher's thesis I'd love to know
 about it.  My searches have been fruitless.


 The title is not the same, but maybe these are variants of the same paper?

 http://dl.acm.org/author_page.cfm?id=81100550987coll=DLdl=ACMtrk=0cfid=76786786cftoken=53955875

 Also, I no longer have access to ACM digital library, so I can't post the
 PDFs.

 --
 Duncan.

 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Kernel Maru

2012-04-10 Thread Duncan Mak
It doesn't look like any of the libraries near me hold it, but here you go:

http://www.worldcat.org/title/control-structures-for-programming-languages/oclc/4335223referer=brief_results

http://www.worldcat.org/title/control-structures-for-programming-languages/oclc/82223524referer=brief_results

Looks like people the hunt for this PDF has been on since 2003 ;-)

http://lists.squeakfoundation.org/pipermail/squeak-dev/2003-November/070082.html

-- 
Duncan.
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Kernel Maru

2012-04-10 Thread Ian Piumarta
Extending Alan's comments...

A small, well explained, and easily understandable example of an iterative 
implementation of a recursive language (Scheme) can be found in R. Kent 
Dybvig's Ph.D. thesis.

http://www.cs.unm.edu/~williams/cs491/three-imp.pdf

Regards,
Ian

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Kernel Maru

2012-04-10 Thread Julian Leviston
I started on this yesterday when I received your email Ian, and I just wanted 
to say thank you (and Alan, too) very much for responding.

I'm still interested in what your thoughts on Kernel are (and Arc, too, 
actually) sometime if you have a couple of moments to pen them... 

Julian

On 11/04/2012, at 7:54 AM, Ian Piumarta wrote:

 Extending Alan's comments...
 
 A small, well explained, and easily understandable example of an iterative 
 implementation of a recursive language (Scheme) can be found in R. Kent 
 Dybvig's Ph.D. thesis.
 
 http://www.cs.unm.edu/~williams/cs491/three-imp.pdf
 
 Regards,
 Ian
 

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Kernel Maru

2012-04-10 Thread Monty Zukowski
Thank you everyone for the great references.  I've got some homework
to do now...

Monty

On Tue, Apr 10, 2012 at 2:54 PM, Ian Piumarta piuma...@speakeasy.net wrote:
 Extending Alan's comments...

 A small, well explained, and easily understandable example of an iterative 
 implementation of a recursive language (Scheme) can be found in R. Kent 
 Dybvig's Ph.D. thesis.

 http://www.cs.unm.edu/~williams/cs491/three-imp.pdf

 Regards,
 Ian

 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc