49 points · by drmrkela · 14y ago · 82 comments
Indeed, criticizing "lisp" is difficult because it isn't really clear what you mean. Common Lisp? Well that has a lot of work done for you. Scheme? That's deliberately minimalist because it's not meant for everyday work until you go outside the core spec (e.g., PLT Scheme's libraries). Clisp? MacLisp? What?
Lisp didn't take off because it didn't take off. There isn't some deep unconscious wisdom being tapped by the masses that we can read with tea leaves and subtlety. These things are random. There is a parallel universe not far from this one where Anic is a big deal and Pike took off in place of Python.
Because to assume otherwise that would imply that everyone knows every language and some are uniform winners over others. Do you know every language you have rejected? Heck, do you even know the general characteristics of Lisp, or Haskell, or ML, or Anic, or Pike, or APL? No, and to really try and learn all of them would take a lot of time unless you're quite gifted. So the premiere and popular programming languages are as unpredictable as fashion.
All you and I can do in our quest to be great software engineers is try and choose tools that split the difference between The Best For the Job and the Best We Can Manage.
This kind of smugness[1] is one reason why Clojure will never take over the world. It seems to be some kind of unwritten rule that every Clojure evangelist has to knock another language in any post anywhere [2]. Ugh.
I am a great admirer of Rich Hickey (the man is a genius), and am happily using Clojure in my present project, but this kind of triumphalist rhetoric is a big turn off. I don't think Clojure "obsoletes" Ruby or Python, anymore than Haskell or Erlang "obsoletes" the various lisps.
[1] This attitude seems particularly endemic amongst people who've moved to Clojure from the early Ruby on Rails community, where sneering at alternative frameworks was part of the culture.
Rich Hickey, while justifiably proud of his language, as he should be, never makes silly statements like this.
[2] see http://news.ycombinator.com/item?id=4272186 for an embedded gratuitous swipe at Scala in an otherwise insightful post.
You can say I am some sort of hater and now it's Rails's turn, but I've been consistent with this even when I was a full time rails programmer [1]. You can find essays by me on the inadequacies of Rails dating back years now [2]. The very things I was complaining about in 2007 are now the glaring flaws in modern Rails. So I made the decision to strike out for tools that don't have a cultural bias against progress in areas I believe important.
So, if I am a Smug Lisp Weenie, then surely I am also a Smug Scala Weenie. And a Smug Erlang Weenie. And a Smug Haskell Weenie. And a Smug Ruby Weenie. And a Smug Hadoop Weenie. And a Smug C weenie... Because one thing I've made very clear is that I think attachment to tools is the problem. We should always aim to use the best tools at our disposal, and I think the place where Python and Ruby are the best tools are shrinking under the onslaught of the competition. Argument from familiarity is something I simply cannot bear to listen to anymore.
If believing this makes me smug then I guess I am smug.
[1] http://www.oreillynet.com/ruby/blog/2007/06/multicore_hardwa...
[2] http://dave.fayr.am/posts/2008-11-20-the-opposite-of-momentu...
Oh but that's not what I said. I said that claims of Clojure "obsoleting" Ruby/Python reek of smugness once prevalent in RoR and Common Lisp communities, and do turn off intelligent people. You can like and evangelize Clojure without making such rabid claims, especially when they are unsupported by data or strong arguments.
"We should always aim to use the best tools at our disposal,"
This is a non controversial position. The "smugness" is in going beyond such sane positions and declaring Clojure to be some kind of uber Ruby/Python killer without any supporting data or arguments.
"and I think the place where Python and Ruby are the best tools are shrinking under the onslaught of the competition."
This is more dubious. Do you have any supporting data? What do you see as "competition" to Ruby or Python? Clojure? in terms of deployed systems, Clojure is barely a blip (wrt RoR, say). I know many intelligent devs using and liking Clojure, but also other intelligent devs using and liking Python and Ruby. I even know (horror!) people who know all three and don't always choose Clojure.
Also, it is pretty hard to characterize Clojure as an "onslaught" on Ruby in any fashion (afaik Rich Hickey doesn't have such an onslaught as part of his goals for Clojure development), or as an "obsoleting" language, which is a very strong claim. Strong claims require strong supporting evidence.
In fairness to you, you did say " I think that .. " which brings me to
"Argument from familiarity is something I simply cannot bear to listen to anymore."
Totally agreed. Now apply that to your Clojure evangelism/praise. ;-)
Fwiw I am working on a Clojure project, and quite like the language. It is extremely well designed and (given the limitations of the JVM) very elegant.
But I don't have a stake in proclaiming it to "obsolete" Ruby/Python etc - at least not without some very convincing arguments - certainly not just "argument from familiarity" ;-)
All that said, I gladly concede that Clojure is some kind of ultra uber language in your experience, in the interest of stopping this thread from expanding fruitlessly.
PS: Decent essays btw. Now apply the same critical eye to Clojure :)
I don't have to personally know every language. Languages grow in popularity by picking up users. It is clear lisp was and is very popular with certain segments of programmers, and ever caught on with others.
You know, it was fairly popular for a time.
> I don't have to personally know every language. Languages grow in popularity by picking up users.
This is a tautology.
But let's pretend for a second what you meant to say was "Languages deserve the usership they gain in a sort of mindshare stock exchange." Then let's rewind 10 years and show you Clojure, Ruby, Java, and Javascript.
Can you ever imagine someone from 2002 picking Javascript over those alternatives? Someone sane, I mean. All praise to the pragmatism of the 'net, but Javascript's popularity is a function of its largely unrequested deployment and the failure of competing products (mostly due to artificial and non-technical business-enforced nonsense).
And yet here we are with Javascript being so popular that startups are raising $9m just to build frameworks in them. And yet by any reasonable metric Javascript is a "worse" language. The most highly-recommended starter book for javascript is "The Good Parts", because a whole lot of the language is just so bad it has to be ignored or worked around.
All we're really doing is appealing to popularity as a justification for using perceived popularity instead of real technical metrics. Which is–to some extent, anyways–fine and good; it certainly is traditional for people to do this. But let's not pretend we have access to some deeper insight while we're doing it.
But does that theory actually limit what we'd predict about the future? Does it retroactively predict all the past data that we've seen? As you pointed out, Lisp was quite popular for a bit.
What if we just said, Lisp isn't popular because it didn't get/stay lucky?
That anti-theory isn't quite as satisfying, but at least it doesn't pretend at knowledge that it doesn't have.
One really nice thing, in my opinion, about JavaScript programmers is that they don't sit around kvetching about why the wrong language won. We all know it was a fluke, but the fluke happened, and here we are, so you can either squawk about languages, or get real things done instead, and improve the tools and software that you have.
I'm afraid I have to dispute this. I'm about as dedicated a Lisper as you'll find -- learned it at the feet of Bernie Greenberg, Gerry Sussman, and David Moon in the late 1970s, and still use it when I get the chance. (Oh and I think my Symbolics machine still works, though I haven't fired it up in several years.) I was around during the time you're probably thinking of -- the AI bubble of the mid-1980s -- and even then, Lisp was the language a lot of people loved to hate, if they knew anything about it at all.
There was some interest in Lisp, to be sure, but I think "fairly popular" is putting it too strongly. It has always been a fringe language.
On another note -- it struck me the other day that if history had gone a little differently, we might be using Dylan instead of JavaScript. Oh well...
Javascript is not the only language that surpassed Lisp in popularity, far from it.
Care to qualify how Clojure obsoletes Ruby or Python? Both of those languages have great tools (rails, for example) that those in the Clojure communities have great respect for. As a Clojure and Ruby/Rails programmer, I share your enthusiasm for Clojure and lisp, but I can't see Clojure pushing either Ruby or Python out of the water any time soon.
I am surprised a Clojure programmer would have much respect for Rails. Its aggressive share-nothing approach leads to inconsistency, poor performance, awkward architectures, and over-reliance on external state management.
Perhaps one might admire it for making a bold claim about configuration vs. convention, but a valid criticism of Rails is that they went so far along the convention line in rebellion of bad tools like Spring that now they get accused of excessive magic.
> But I can't see Clojure pushing either Ruby or Python out of the water any time soon.
Like I said, success is fashion. But then, people said this to me about Git Vs. SVN after I gave a tech talk to a bunch of ruby folks about how git would take over the world. Two people left that talk and went on to found Github, so... "High Fashion."
Clojure has all the power of Ruby's dynamism, but with a better solution to the expression problem (protocols are namespace contained, allowing for monkey-patching that doesn't taint the world). It has access to a lot of fantastic high-performance libraries. It can safely deal with high degrees of parallelism with a degree of ease few environments can claim. It has a minimalist syntax which can compete with even the most terse and convention-driven ruby syntax (i.e., Compojure vs. Sinatra).
Similar complaints can be leveled at Python with less of a performance angle and more of a power angle; Clojure gives you access to many of those features that the python community feels are "too awkward" to use in the OO world, but are entirely natural in the Lisp world.
So yeah, every time someone writes a server in Node.js I think to myself, "You could have done it in Clojure and had just as much dynamism during development, just as easy a deployment story, and also perform easily an order magnitude faster under load, and you don't have to run like a scared child from parallelism."
When evaluating what tool to use for a project, there are many things to take into account other than the technical superiority of the tools. Relevance Inc, one of the strongest backer of Clojure, still make use of Rails for client projects. Rails' huge web dev ecosystem really made many common tasks as simple as importing a gem here and there and making a few method calls. It all comes down to the right tool for the right job. I'm interested in your take on how Rails' "share-nothing approach", awkward architectures etc.
> Clojure has all the power of Ruby's dynamism
Yes, and then some. Without repeating what you have already said, I would add efficient persistent data structure to the Clojure's list of awesome tricks. Doing functional programming in ruby and python, for example, will force you to trade value immutability with efficiency -- a penalty that one does not have to pay in Clojure.
Clojure is definitely gathering a lot of following. Like many others, I have picked it up, played with it, and never looked back.
But going back to what was said before. Yes, Clojure is awesome. No, Clojure is not obsoleting Ruby or Python any more than those obsoleted PHP, at least not now.
Wrt Python I know I'll do fine w/ Django, Flask, Jinja2, Psycopg2, Tornado...
If you need deeper support for vector math, scientific calculations, and the like then Incanter is probably what you want. It does all the complicated fast math stuff that always benefits from carefully planned and hand-tuned libraries.
Compare a Noir or even bare Compojure web service vs. a Sinatra web service. Is there really a big winner on brevity?
That's quite a jump to an (invalid) conclusion.
Sure, no programmer has knows of all the languages he does not use or has rejected. But that doesn't mean that there is not a reason some language gain traction and get to be known by lots of programmers and others do not.
You seem to have the simple minded view that simply because I haven't heard of all the languages I don't use, it is random which ones I do use. That's not how it works.
It works by statistics and aggregates. I may not know language X I do not use, and I might know Y, which I do use. But this is not random, it's because of various forces at play, that made Y more widely known and X less so. For example, C provided raw speed with less memory use at a time it was very crucial, was easy to learn, had free/cheap compilers available, it was the language UNIX was written in, and it was simple enough. Oh, and portable. Those things got it traction. Lisp was mostly used in academia-AI, was slow at the time, compilers cost an arm and a leg and Lisp Machines even more so, and was associated with the "AI winter". Those are some reasons it did not do well.
But then:
> But this is not random, it's because of various forces at play, that made Y more widely known and X less so.
Where "various forces" is furious handwaving for the sheer randomness that made that set available to you. And let's say in a slightly different history that set is slightly different (but still contains your current choice), how do you know you would have ended up the same?
But perhaps I am being lamentably simple minded. Every decision you make is deliberate and justifiable.
You keep using that word, random. I don't think it means what you think it means.
A coin toss is random. C picking up for the stuff we did in the eighties is not random. Lisp losing traction after the AI winter is not random. Javascript gaining traction with the web is not random.
That the creation of C was effected by random events (the experiences of Ken Thompson, the position of AT&T, the decision to provide the source, etc), does not mean that the success was random.
The success was logical and repeatable given the needs of the era and how the language came to be. To put it in another way, if another language had taken the role of C in the industry at the time, it would have been pretty similar to C, and with external qualifications (availability of source, portability, etc) similar to C.
From this aspect, the (random) fact that it was C after all and not some other C-like language, doesn't matter at all. The language that would have filled C's role would have quacked like C, and that is the non-random, and substantial part.
Read the "Worse is better" for some background.
In particular, the phrase "back in a day" is used twice and I'm still not 100% certain whether it means that the actions were performed in a single day (which would be odd phrasing) or, more likely, if it's meant to be "back in the day", in the sense of "at an unspecified point in the past".
That said, I don't wish to put people off from blogging in English, especially considering it was an interesting article that I would not have been able to enjoy if it was written in Croatian. My (intended to be friendly) advice is to recruit native-English proof-readers. I think you won't need them for long.
And that is not a bad thing. But really, how many Picassos and Da Vincis and Michelangelos have we produced so far? That's not something you could ever call "mainstream"...
I think that the failure of Lisp to gain traction is probably better attributed to the other point about too much minimalism being madness. Some of the forms in Racket are pretty crazy.
Many- most perhaps - developers don't want that. They want a golden road to deployment, a KISS mechanism to write basic code to do basic things and keep doing them. Flexibility and power expand the solution space too much for their taste.
Well, that's OK for them. I'll just be doing my Lisp as much as I can.
CS people like to abstract away the computation from physical hardware, but the apparent fact is computation _is_ physical, and it's limits lie in physics and not in mathematics or philosophy (see Shor's algorithm for instance).
It's only natural to write programs in a language that follows the same flow as the underlying physical computer. A classical computer is represented by it's assembly language, thus it makes sense to have languages like C. Concepts like "stateless programs" don't even exists in a classical computer. It's as crazy as trying to build a quantum algorithm that does away with measurements!
In addition the physical world does not work anything like a stateless machine. As most useful programs imitate a physical process rather than a pure mathematical object, the notion of writing programs in such languages is not-intuitive and requires transformation of the actual problem at a both low (hardware) and high (software output) level.
Finally I would like to speculate that the whole concept will never be intuitive in the future (post-quantum computer era). In the era of quantum computers, because they will always be physical objects with a particular state, and it's this very fact that they have a well-defined state allows us to perform a computation.
The same thing can be said about "which model of computation resemble physical reality." Each of us can have different mental models of physical systems. Personally, the functional paradigm is closer to my mental model than declarative, but imperative still feels the most natural. This isn't a statement about reality, but rather about how you think about it.
That being said, of course it matters the way you write your software. There is a huge gap between actual CPU instructions and Lisp. Between Lisp and the machine is an automated, soft layer of emulation, which may or may not be optimal and is extra work anyway.
F=MA is a function, and it isn't mutable. I could calculate force from some other function (e.g. Gm1m2/r^2). I can compose those functions together to get a new function. Still nothing mutable. I could continue this to create a model of a physical system that turns into one big function. That function models the system, and it can take some outputs to give whatever outputs you want. All without storing state internally.
So, it's certainly possible to accurately represent physical systems without keeping track of state along the way.
Lisp's parenthetical syntax is not, and never has been, its problem. You say "parenthesis" as a cute excuse to avoid doing any meaningful defense of your rejection of lisp.
I've wondered for years why people latch onto the parenthesis thing. When I learned lisp for a class, I never gave it a second's thought. To me it feels like people are looking for a handy reason to put Lisp down, perhaps either because they don't understand it or because they do understand it and they are jealous of some of the features of Lisp.
Personally I prefer both Forth's RPN and C/C++ (Algol?) style notation to Lisp's s-expressions.
However, I do like the overall elegance that this brings to the code, where code and data are the same. Which is why I also like Postscript -- it does the same thing but in an RPN style (a function is actually an executable array).
Also, there is great support from lisp-friendly editors to handle parentheses management (e.g. paredit for emacs http://emacswiki.org/emacs/ParEdit).
If the latter, pg makes a good argument in section 4.8 of On Lisp:
"So yes, reading a bottom-up program requires one to understand all the new operators defined by the author. But this will nearly always be less work than having to understand all the code that would have been required without them.
If people complain that using utilities makes your code hard to read, they probably don’t realize what the code would look like if you hadn’t used them. Bottom-up programming makes what would otherwise be a large program look like a small, simple one. This can give the impression that the program doesn't do much, and should therefore be easy to read. When inexperienced readers look closer and find that this isn’t so, they react with dismay."
You know, I don't think this is true at all. Concision can make things harder to read, because you have to understand everything you read from scratch. A language where some common patterns come with a bit of boilerplate allow you to orient yourself via that boilerplate. The visual representation of a common pattern provided by the sugary syntax of some languages is, in one sense a waste of space and typing, but it can make code easier to read than a more concise language would be.
Pseudocode is better expressed in Python than Lisp, therefore much better in the academic world.
My point stands: READABILITY.