9 ms·
The Roots of Lisp
- charlieok 15y agoPG: "It seems to me that there have been two really clean, consistent models of programming so far: the C model and the Lisp model. These two seem points of high ground, with swampy lowlands between them." We lost founders of both in the last couple weeks. Ritchie for C, McCarthy for Lisp. What's cool about the paper Paul is talking about here: if you start with car, cdr, cons, quote, cond, atom, eq, and a notation for functions expressed as lists, you can write an "eval" function reimplementing the language. The rest can be built on top of it. Graham calls this an "axiomatization of computation". The notion of a Turing machine was already well known before McCarthy's paper, and is its own fundamental description of computation. Then came this high-level language which constitues a new one. It isn't "THE axiomatization of computation", just "AN axiomatization of computation". PG continues the story in a later essay, "Revenge of the Nerds": "What happened next was that, some time in late 1958, Steve Russell, one of McCarthy's grad students, looked at this definition of eval and realized that if he translated it into machine language, the result would be a Lisp interpreter." "This was a big surprise at the time. Here is what McCarthy said about it later in an interview:" "'Steve Russell said, look, why don't I program this eval..., and I said to him, ho, ho, you're confusing theory with practice, this eval is intended for reading, not for computing. But he went ahead and did it. That is, he compiled the eval in my paper into [IBM] 704 machine code, fixing bugs, and then advertised this as a Lisp interpreter, which it certainly was. So at that point Lisp had essentially the form that it has today....'" "Suddenly, in a matter of weeks I think, McCarthy found his theoretical exercise transformed into an actual programming language-- and a more powerful one than he had intended." http://www.paulgraham.com/icad.html http://www.paulgraham.com/icad.html Pretty cool story :)
- Peaker 15y agoThere are more clean, consistent and interesting models of programming besides the C and Lisp models. The Ml/Haskell family of languages. Logic languages (though these are somewhat subsumed by the former). Dependent-type languages.
- 0x12 15y agoTILs such as forth. Smalltalk. What family does APL belong to?
- gruseom 15y agoCertainly its own family, along with its successors J and K.
- Peaker 15y agoYou could argue those languages are not very clean, at least syntactic-wise.
- silentbicycle 15y agoDon't confuse having lots of operators with being unclean. They're syntactically more internally consistent than Common Lisp, for example.
- gtani 15y agohttp://www.info.ucl.ac.be/~pvr/paradigmsDIAGRAMeng101.pdf http://www.info.ucl.ac.be/~pvr/paradigmsDIAGRAMeng101.pdf http://news.ycombinator.com/item?id=3150277 http://news.ycombinator.com/item?id=3150277
- swannodette 15y agoThe Lisp system is a meta model. Thus you can implement a Lisp that works like ML/Haskell/Prolog if you like. ML/Haskell don't seem to provide that kind of meta power as cleanly or consistently IME. Prolog has a good meta model, but it doesn't seem to subsume other models as cleanly, consistently, or efficiently as Lisp.
- Peaker 15y agoImplementing a Lisp that works like ML/Haskell will be as much work as implementing a compiler/interpreter of these languages outside of Lisp. The macro system is not a great compiler toolkit for languages with semantics radically different from Lisp. Lisp thus does not really subsume these languages.
- erichocean 15y agoForth is the third model -- very clean and consistent, and still widely used. (Forth is usually the first HLL to get working on a new chip due to its simplicity.) If you're looking for a modern stack-language implementation, give Factor a try: http://factorcode.org/ http://factorcode.org/
- RodgerTheGreat 15y agoI think Forth is particularly notable for providing metaprogramming facilities which are arguably on par with Lisp while taking a completely different approach. Lisp represents code and data the same way and can manipulate both with ease. Forth has what might be described as an "interactive compiler" which can be easily extended during the compilation process. Since an immediate word can hijack the parser, you could theoretically build Forth out into a reasonable facsimilie of any other language if you so desired. These capabilities are already used in most Forth distributions to provide things like flow control, comments and string literals.
- gruseom 15y ago"Steve Russell said, look, why don't I program this eval..., and I said to him, ho, ho, you're confusing theory with practice, this eval is intended for reading, not for computing. But he went ahead and did it." Here is the point in the story where we need Norvig's annotation from PAIP (p. 777): "So the first Lisp interpreter was the result of a programmer ignoring his boss's advice." I like to think that the "ho, ho" in the original quote means that McCarthy appreciated this.
- vorg 15y agoIn a meeting, the person who suggests a good idea and the person who recognizes a good idea are usually two different people.
- dxbydt 15y agohttp://www.cs.uni.edu/~wallingf/blog-images/code/jmc-lisp.scm http://www.cs.uni.edu/~wallingf/blog-images/code/jmc-lisp.sc...
- deleted 15y ago[deleted]
- agavin 15y agoFor nearly two decades I was a diehard LISP advocate. I even forced all my programers to code three Crash Bandicoot and four Jak & Daxter games in custom LISP dialects that I wrote the compilers for (an article on one here http://all-things-andy-gavin.com/2011/03/12/making-crash-bandicoot-gool-part-9/ http://all-things-andy-gavin.com/2011/03/12/making-crash-ban...). But by the mid 2000s I started doing the kind of programming I used to do in LISP in Ruby. It's not that Ruby is a better language, but mostly it was the momentum factor and the availability of modern libraries for interfacing with the vast array of services out there. Using the crappy unreliable or outdated LISP libraries -- if they worked at all -- was tedious. Plus the LISP implementations were so outmoded. It was very hard to get other programers (except a couple enthusiasts) to work that way. Ruby struct a decent compromise. And it's type system and object model are better than CL anyway. The syntax is more inconsistent, and the macro model nowhere near as good. But it turns out. Libraries and implementation matter a lot. Still, you can feel lots and lots of LISP influence in all the new runtime typed languages (Ruby, Python, etc). And 30 years later, listeners still rule!
- minikomi 15y agoIf you have any, I'd be interested in hearing some useful tidbits being a long term lisper now grounded in ruby may have brought forth.
- agavin 15y agoWell it certainly shows you how BAD/OLD the CMCL and ACL Garbage Collection code/algo's were (at least when I last used them in 2006). In ACL you could get these LispMachine-like multi-hour GCs. Now we use tons of GC based systems everyday (like browsers) without having to reboot too frequently.
- brlewis 15y agoIn the 1990s I did mostly C, but in the 2000s I did mostly Kawa Scheme. Java class libraries, especially JDBC, are what led me to choose a Java-based implementation.
- icandoitbetter 15y ago
- denarvaez 15y agospanish translation http://codigomaldito.blogspot.com/2008/02/las-rases-de-lisp.html http://codigomaldito.blogspot.com/2008/02/las-rases-de-lisp....
- mjbellantoni 15y ago"As computers have grown more powerful, the new languages being developed have been moving steadily towards the Lisp programming model. A popular recipe for new programming languages in the past 20 years has been to take the C model of computing and add to it, piecemeal, parts from the Lisp model[.]" Hey! That's what I think, too! Around 2007 when I'd had quite a bit of exposure to both Python and then Ruby I'd started to think the same thing. Although I didn't have the foresight to say it in a public essay I would tell my friends "In five years Javascript will start to become a popular general (i.e. non-web only) programming language and Lisp in 20." I now think think the big Lisp (or Scheme) event will happen even sooner--say in 5 to 7 years. (Meaning you will see the kinds of articles you see around Node today on HN about Lisp.)