One note of interest about pg's source code is that the dot functions (and., pair., etc...) are based in the host Lisp and not `eval.`. The implications are that pg's functions can take advantage of lexical scope, whereas McCarthy's original Lisp was dynamically scoped. This will make a huge difference if you are so inclined to use pg's code to do some hardcore Lisp anthropology. I did so a few years back using pg's code and it was a blast. I then wrote a small Lisp runtime with dynamic scope (http://github.com/fogus/lithp) to do the same exercise and it turned out to be a very different experience. It's worth trying it out to gain a full appreciation for the tools the Lisp pioneer's had to work with.
Thanks for linking this article -- it's one of my favorites.
"The Roots of LISP" include Herbert Simon and Allen Newell too. They co-invented the linked list (once called "NSS memory") in the mid 1950s, setting the stage for LISP and earning them a Turing award (McCarthy got his own). They were founders of AI and implemented some really neat software like the General Problem Solver. See Simon's "The Sciences of the Artificial" or his Nobel prize lecture, and "Unified Theories of Cognition" by Newell.
He states that Python sort-of has a symbol type like Lisp, but that there isn't a syntax for it. Could someone help me understand what he's talking about?
Short strings in Python are interned, i.e. 'foo' always returns the same string, not just an identical one.
There's some noise but the important part is that both x and y have the same address (0x37e300) and point to the same str object.
Python 2.6.4 (r264:75706, Nov 25 2009, 21:38:24)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> x='foo'
>>> y='foo'
>>> x.__add__
<method-wrapper '__add__' of str object at 0x37e300>
>>> y.__add__
<method-wrapper '__add__' of str object at 0x37e300>
>>> x is y
True
and a counter-example just for fun:
>>> x='this is a longer string. i wonder what the limit is?!'
>>> y='this is a longer string. i wonder what the limit is?!'
>>> x.__add__
<method-wrapper '__add__' of str object at 0x35a840>
>>> y.__add__
<method-wrapper '__add__' of str object at 0x35a890>
>>> x is y
False
Strings. Python allows you to manipulate an object's structure through the __dict__ field (as far as I can remember), and dir() also returns strings. They are ad hoc symbols.
Thanks for linking this article -- it's one of my favorites.