10 ms·
I admit that I don't completely understand Lisp's claim to fame. Yes, programs in the language are represented by a built-in data type, and you can write a self
by cousin_it 12y ago
I admit that I don't completely understand Lisp's claim to fame. Yes, programs in the language are represented by a built-in data type, and you can write a self-interpreter quite easily. But the same is true for a simple assembly language, if you know the instruction encoding! You can represent a program as a code pointer, and it's easy to write an analog of "eval" by hand, using just a handful of arithmetic instructions and conditional jumps. What's more, such an "eval" won't even depend on a garbage collector or other niceties that Lisp self-interpreters take for granted.
- RodgerTheGreat 12y agoLisp gets a great deal of undue credit as being some kind of timeless enlightened wisdom, which I see as ignorant of the history of the language's development. It took years to develop approaches to garbage collection (the earliest prototypes used bump allocators and crashed when they exhausted a heap), years to finalize the syntax of the language (you'll notice that the "maxwell's equations" are written using M-Expressions, a syntax for the language which was discarded for ease of implementation and later rationalized because homoiconicity can be handy), decades to realize how important lexical scope (versus dynamic) is to maintaining encapsulation. Modern Lisps are substantially different in syntax and semantics from these earliest ideas; we're just still calling them Lisp. It's very easy to make Lisp look elegant when you brush all the implementation details under the rug.
- coldtea 12y ago>Modern Lisps are substantially different in syntax and semantics from these earliest ideas; we're just still calling them Lisp. An interesting take on "modern", meaning "the last 3 decades or so", which is like millenia in the IT industry...
- TeMPOraL 12y agoI understand that by "IT industry" you mean the Web, which is the industry's equivalent of a fashion show. Work clothes, suits and hazmat wear also don't change their design every three months.
- coldtea 12y agoNo, I mean the IT industry. I have been following it since the mid-eighties...
- laichzeit0 12y agoNot redesign, but recycle old ideas. It might change in details, but as far as I've thus far observed, IT operates in cycles. The terminal + mainframe -> the personal computer -> the cloud (personal mainframe) -> ? Like cycles in economics, climate, fashion, etc.
- yogthos 12y agoI'm not sure what you're talking about here. The latest language in Lisp family is Clojure and it came out in 2007. The syntax that it uses is quite a bit different from Lisps from 30 years go.
- taeric 12y agoI wouldn't call it quite a bit different. Really just seems to have a few small changes where they prefer [] over (). Otherwise just a different set of standard macros. Or are you referring to some other difference?
- coldtea 12y agoClojure is not that different, but besides that, parent implied changes from Lisp circa '60s that were already in CommonLisp and Scheme 30 years ago...
- Delmania 12y agoNo language that is developed is perfect on release. The timeless wisdom of Lisp, as you call it, rest largely on macros and lambdas. Those ideas are powerful in their ability to allow you to build abstractions and customize the language to your needs. Basically, Lisp allowed for DSLs before the concept of a DSL was even recognized.
- deleted 12y ago[deleted]
- vinceguidry 12y agoYou can't call it timeless if it took time to develop.
- nights192 12y agoYeah- you're right. Pythagoras' theorem obviously isn't timeless; the fool took time devising the formula!
- vinceguidry 12y agoPythagoras did not discover the theorem, it's just named after him. He may have been the first to record a proof of it. It's conceivable that the very first peoples to become seriously interested in geometrical calculation would have discovered it as a matter of course. It does meet the definition of timelessness whereas Lisp does not. As Wikipedia notes: "Mesopotamian, Indian and Chinese mathematicians are all known to have discovered the theorem independently and, in some cases, provide proofs for special cases."
- nights192 12y ago... which is irrelevant. The point posed was that the ephemeral form heralds the so-called 'revolutionary' concepts, and stating that a prolonged delivery of the concepts invalidates their usefulness is the result of an overly literal interpretation of a common phrase.
- michaelsbradley 12y agoSome of the "old Lisp things" are becoming new again. For example, John Shutt has developed a non-trivial theory of F-Expressions (vau-calculus)[1] and a language named Kernel that employs them[2]. Neither has received wide attention yet, but the Lisp renaissance of the past few years is still young... [1] https://www.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unrestricted/jshutt.pdf https://www.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unr... [2] ftp://ftp.cs.wpi.edu/pub/techreports/pdf/05-07.pdf
- db48x 12y agoExactly the same is true of Maxwell's equations. The four we use today are different than the 20 he originally came up with; most of that reduction comes from vectorizing them, and they gain a lot of clarity by using vector-calculus operations such as gradient and curl. Together these changes brush the computational complexities under the rug, and leave only the descriptive power of the laws: * "the gradient of the electric field is proportional to the amount of electric charge" * "the curl of an electric field is always zero" * "the gradient of a magnetic field is always zero" * "the curl of a magnetic field is proportional to the size of the electric current plus the amount of change in the electric field with respect to time".
- 4ad 12y agoSure, assembly is also homoiconic. However, there's more to lisp than homoiconicity.
- 4ad 12y agoWow, downvotes, amazing.
- mjburgess 12y agoThe "claim to fame" has more to do with homoiconicity, ie. that the language is its own syntax tree. This allows you to extend the language in arbitrarily complex ways in the language itself - a consequence of this is the simplicity of writing a self-interpreter. Languages involve a lot of apparent mystification, in part because the syntax tree and the semantics of the syntax tree are not the program you are writing. Who knows what "class X {}" actually does to the (virtual) machine? By essentially providing a 1:1 correspondence between the "real" semantics and the "apparent" semantics, programming this way can seem magical compared to other languages. With assembly you arent taking objects of the language and making them objects of a metalanguage, ie. you arent preserving semantics when you abstract. All you're doing is creating hacks on top of the basic semantics, so in effect, introducing a new language (of specialized jumps, etc.).
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- Blackthorn 12y agoWhere this argument loses me is that I have yet to see a single Lisp person going around extolling the virtues of Prolog, a language that is also homoiconic and has macros. (If Lisp people want to start doing that though, I'd be happy. Prolog is great.)
- molloy 12y agoMaybe that's because a "Lisp person" who did so would be considered a "Prolog person." :) I'll give Prolog a shot!
- hga 12y agoA lot of Lispers are interested in logic programming, if not Prolog. It's in SICP, it's the topic of The Reasoned Schemer (www.amazon.com/Reasoned-Schemer-Daniel-P-Friedman/dp/0262562146/), Shen includes a Prolog and you can use its syntax: http://www.shenlanguage.org/learn-shen/prolog.html http://www.shenlanguage.org/learn-shen/prolog.html So you'll have to modify your statement at minimum to "a single person other than Mark Tarver" ^_^.
- julienchastang 12y agoIf you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases. - Guy L. Steele
- Permit 12y agoThat seems like a huge disadvantage to me. The bottle neck in any software project (> 1 person) is usually the time it takes to read and understand source code. Some estimates[1] claim that up to 78% of development time is spent just reading code. With that in mind, I would not want to learn a new language for every project I was a part of. I'd even go so far as to say: The majority of programmers cannot design a good language, and if Lisp gives them the opportunity to try then that's a BadThing™. [1]http://blogs.msdn.com/b/peterhal/archive/2006/01/04/509302.aspx http://blogs.msdn.com/b/peterhal/archive/2006/01/04/509302.a...
- Flow 12y agoA big problem is people being too smart for their own good. But that happens in all languages.
- tunesmith 12y agoIt depends on the complexity of the new language, doesn't it? If these new languages are highly domain-specific DSL's for complex domains, then the entire software package might be more understandable overall.
- julienchastang 12y agoThe thing is when you know lisp (or scheme) you understand programming languages much more fundamentally than you would otherwise and so jumping from one programming language to another becomes much easier. (BTW, I hated Scheme in school, but I have since seen the light thanks to SICP.) Overall, I agree with the theme of this sub-thread that non-idiomatic code in any language is a real pain in the ass. I see this everyday when I look at code written by scientists who are smart, driven, motivated people and therein lies the problem.
- sedachv 12y ago
- billsix 12y agoLisp's eval/apply is so short and dense that it can fit on a chalkboard. Its also easy experiment with language design by making slight changes to the intrepeter.
- abecedarius 12y agoTurning that around, there was the Scheme-79 chip: http://dspace.mit.edu/handle/1721.1/6334 http://dspace.mit.edu/handle/1721.1/6334 This takes Lisp as the machine language of a high-level machine (with READ as the assembler). You could do the same with C, but without a compiler stage it'd be absurd.
- deleted 12y ago[deleted]
- hga 12y agoADDED: the author of the deleted post I'm responding to thought that he remembered that the Scheme 79 chip failed to actually run Lisp (Scheme). I replied: Not that I know of, but only because of microcode errors. I was told "Sussman wasn't quite as smart as he thought he was" to tape it out without making really sure the microcode was correct. In all fairness, at the time they had little in the way of available computer resources to e.g. simulate it, and it was all part of a very exciting time when MIT started doing Mead and Conway style VLSI, see https://en.wikipedia.org/wiki/Mead_%26_Conway_revolution https://en.wikipedia.org/wiki/Mead_%26_Conway_revolution and note the latter gave a famous course on it at MIT in 1978.
- GregBuchholz 12y agoI think there are multiple factors to Lisp's claim to fame, and other have covered a few of them. But one thing to also keep in mind is the historical context. Lisp had features like garbage collection and much more of a "batteries included" standard library. It was a much higher level language, and more safe to use (memory safe, fewer incidence of off-by-one errors, etc.) compared to most other contemporary languages in the 70s and 80s (C for instance). You might still see a lot of Lisp advocacy aimed at wooing you away from those languages by touting the virtues of bignums/rationals, garbage collection, anonymous functions/closures, etc.. By the time the late 90s and 2000s rolled around pretty much of all of the popular languages had incorporated high-level features pioneered by lisp, and so now-a-days lisp doesn't probably seem quite as attractive to python or ruby or javascript or C# or Haskell users. Also, I think there may just be some personal preferences involved in different language choices. If you like C, and think it is a great language, then I'd say there is a lower probability that you'd like lisp, because they have a different philosophy about how programs could be built.
- agumonkey 12y agoIt's the opposite side of the computing spectrum. Many languages aimed at using machines, Lisp was an ideal to express computability. As other said, yeah the eval definition hides away GC, IO and the read function, which fits my interpretation (sic) of lisp as an abstraction abstraction. They weren't interested much in the machine details, this itself is already a fun fact. So it started an ideal until a student was foolish enough to actually program it. Yet this vaporous ideal was enough to write a symbolic differentiator. You don't have bytes nor integers but you can express non trivial mathematical concepts. You had almost nothing yet you could do a lot, another fun fact. To me Lisp is like a linguistic library, on top of which you'll add primitive types as needed. The expressiveness is given by scope, lambdas, logic and recursion, the rest is secondary. Maybe my lambda calculus classes are making me biased though. McCarthy said he wasn't too inspired by LC even though I've read he was a student of A. Church. ps: about scoping, I've read emails from Lisp users circa 59 who were discussing the addition of lexical scope, that was before Algol was publicly released.
- tunesmith 12y agoI saw that bit about McCarthy too. I wonder if his point was that while you can do functional programming in lisp, you can do a lot of other non-functional-programming stuff too, and so in that sense he didn't see Lisp as an implementation of lambda calculus.
- agumonkey 12y agoAccording to D. Gabriel, the imperative forms were added later to seduce scientists used to FORTRAN algorithms. But Steele's interview of McCarthy makes it clear that Lisp is more a natural accident turning into compressed carbon than the implementation of an apriori concept.
- cousin_it 12y agoThere's a spectrum of near vs. far from the machine, but there's no spectrum of computability, all Turing complete languages are equally Turing complete. There's no difference between Lisp and assembly in this regard. In fact if you take into account the big-O time complexity, then assembly is better than the version of Lisp described in the OP, because the latter suffers a logarithmic penalty due to immutability. More to the point, Lisp is nice because it's in a sweet spot of language complexity vs self-interpreter complexity, and lambda calculus is nice because it's a simple basis of computation. But there are many languages that make self-interpreters simple (assembly, Forth...) and many simple bases of computation (SKI calculus, rule 110...) To call something the "Maxwell equations of software", IMO you need something more substantial. For example, Haskell folks can claim that lazy evaluation is provably superior (in termination and time complexity) to any other evaluation strategy. The dependent typing folks can claim that all valid programs correspond to valid proofs and vice versa, and that strict and lazy evaluation are equivalent w.r.t. termination. The guy behind Kernel can claim that the one true Lisp should allow you to mapcar a macro. There are many kinds of wonderful math that give you insight into computation!
- DavidPlumpton 12y agoTry writing a complex program in 1960s era COBOL. Then you will understand a large part of Lisp's claim to fame.
- hga 12y agoPerhaps, but when you add alternates like Algol and PL/1 (1964) that case becomes a lot weaker. (Although I don't really know Algol and only know PL/1 as of IBM's late '70s version.) The weaknesses of COBOL were widely realized (and in it's niches it's not hardly so bad, or so I say from one week of using it).
- coliveira 12y agoThis is very close to the idea explored by Forth. It has just a simple engine that compiles pieces of code on the fly. No need for garbage collection or any complicated macros.