3 ms·
The Roots of Lisp
- prakash 17y agolink to complete article in ps: http://lib.store.yahoo.net/lib/paulgraham/jmc.ps http://lib.store.yahoo.net/lib/paulgraham/jmc.ps
- fogus 17y agoOne 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 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.
- 10ren 17y agohtmlized http://google.com/search?q=cache%3Ahttp%3A%2F%2Flib.store.yahoo.net%2Flib%2Fpaulgraham%2Fjmc.ps http://google.com/search?q=cache%3Ahttp%3A%2F%2Flib.store.ya... danger: possible syntax loss
- pwmanagerdied 17y agoHe 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?
- sjs 17y agoShort 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
- ced 17y agoStrings. 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.
- pwmanagerdied 17y agoI know that, but there already exists a syntax for strings. I thought he was implying something more.
- jbert 17y agoTypo/error on page 4 (of postscript version)? ((lambda (f) (f '(b c))) '(lambda (x) (cons 'a x))) afaics, the 2nd lambda shouldn't be quoted.
- danblick 17y ago"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.