Live data from Hacker News

Why Lisp Is Unpopular

news.ycombinator.com

81–90 of 159 posts

Re: Why Lisp Is Unpopular

#81
post #74

The power of a programming language is proportional to its capability for innate abstraction. If that's true, it follows list-oriented languages are inherently inferior to their hashtable-oriented brethren. (These orientations are often misguidedly referred to as "functional" and "object-oriented" paradigms, which I find to be useless, over-overloaded terms.) Basically, with list-oriented langs the primary abstractio…

While lisp code is represented as lists, other user data can be represented with hash tables, vectors, arrays, classes, etc, including lists. (Yes, the name "lisp" refers to lists, but the language has grown since the name was picked.) Also, it's easy to represent arbitrary graphs with lists, in much the same way that you'd do so with hash tables, structs, etc. Yes, the way that a node refers to other nodes differs b…

I was only talking about the code itself, the primary metaphor of the programming language, not what the language actually represents. Most langs that I've encountered are structured as semi-formalized strings (i.e. C-derived langs), where as Lisp is structured in "physical" lists. I shouldn't have talked about "abstractions," because that wasn't what I meant. I was getting at the "concretions" of the actual lingual interface.

Re: Why Lisp Is Unpopular

#82
post #66

Earlier quoted context omitted.

Make it: 3 months full time, plus whatever amount of time is needed to become deeply conversant with all the underlying lambda calculus concepts.

You're saying nobody can become proficient (not "deeply conversant") in lisp in 3 months because I can't become deeply conversant in lambda calculus in 3 months?! nobody, proficient, lisp. I, deeply conversant, lambda calculus. You're comparing apples and oranges. I learned lisp (pretty deeply, I'd qualify myself as intermediate then and now) in what... 5 or 6 months? And I was alone. And I didn't know emacs. With so…

Well, we have 2 data points now. I guess we can agree that it's harder to learn than Python :-)

For what it's worth, I think learning Lisp is useful for getting (re)acquainted with lambda calculus if nothing else.

Re: Why Lisp Is Unpopular

#83

Earlier quoted context omitted.

I really don't find that lisp, at least common lisp, is particularly concise. Consider lambda functions, one of those things that lisp is particularly praised for; common lisp: (lambda (x) (+ x 1)) C#3 : x=> x + 1 ruby : { |x| x + 1 } python : lambda x: x + 1 Haskell : \x -> x + 1 Just in terms of character count, CL is the longest of the lot. No, the problem with trying to get a lisp under your belt has alredy been…

"I've tried really hard to learn lisp, and it turns out that actually, while there may be some platonic lisp that IS great, actually programming common lisp, now, is a massive effort in struggling in the dark." The weedout process has worked its magic again ;P You usually get rewards proportional to the effort... I don't think lisp is beyond anyone's reach if they work faithfully on gaining proficiency in it for 3 mo…

I would take 3 months to learn a new language, but then my startup would be dead.

I picked up Python in a day. I'm quite proficient at it a year later. A simple syntax + a great standard library is the best way to get things done, if not the best way to learn to write software.

Re: Why Lisp Is Unpopular

#84
post #2

There are many hypotheses out there that Lisp lacks popularity for this or that flaw in the language or in the community. The problem with these hypotheses is that you can point to similar or bigger flaws in languages that have grown popular. If a language has good qualities, people will figure out ways around the problems. My hypothesis is that Lisp is unpopular for the exact same reason some of us love it: concise…

I really don't find that lisp, at least common lisp, is particularly concise. Consider lambda functions, one of those things that lisp is particularly praised for; common lisp: (lambda (x) (+ x 1)) C#3 : x=> x + 1 ruby : { |x| x + 1 } python : lambda x: x + 1 Haskell : \x -> x + 1 Just in terms of character count, CL is the longest of the lot. No, the problem with trying to get a lisp under your belt has alredy been…

You can shorten (+ x 1) to (1+ x), and if you get annoyed typing "lambda", it's not that hard to change it to something shorter like "fn". Also, CL has a lot of built-ins so I don't find I need to write lambdas nearly as often as in other languages. In this example, just say "1+".

Another thing you'll find is that for trivial problems, Lisp might take a few extra characters, but it scales much better. Try making your Python lambda print the value of x first. Try telling your Ruby lambda that x (and x+1) fits in a machine word so it can compile the function into only a couple of CPU instructions. Try writing a metacircular evaluator in C#. :-)

When you're just getting started, in any language, it doesn't really matter which implementation you pick. (FWIW, CLISP is byte-compiled, SBCL is a native compiler, and Allegro costs $600. Not unique to Lisp: you can find expensive proprietary C++ compilers, too.)

As a Lisp and Ruby programmer, I disagree that Lisp's documentation is weak. I would be very happy if Ruby's docs were even half as good as Lisp's.

I type "sudo apt-get install library-name" for both Lisp and Python libraries, so no difference there. (Ruby gems are less frequently packaged, and aren't compatible with the FHS, so they're a little harder.)

Lisp examples seem to be more often found in (dead tree) books, while Ruby and Python examples are more often found on the web. Since Ruby and Python libraries (and even syntax) are still in flux, and Lisp predates the web, this kind of makes sense. If you can't buy a couple books, it can be rough, though some good Lisp books are becoming available on the web for free.

Those symbols you picked are a little weird, but when's the last time you actually saw a cdadr? It is at least consistent (which is more than can be said for some languages!). I don't find "unshift" or "__gt__" any better.

I don't want to sound like a pure apologist. I admit that Slime is an investment (if you don't already know Emacs). Apparently there is a Lisp plugin for Eclipse, but I know nothing about it. It is a shame more IDEs don't support Lisp well, though I can see why they don't.

Finally, it could be simply that Lisp doesn't map well to your mind. (I don't mean this as an insult -- everybody's different. Maybe Smalltalk or Prolog or Sisal is your cup of tea.) I don't think Ruby maps well to mine, though I know some people who seem like Matz reincarnate -- which could explain why the docs are so sparse! The core of programming, to me, is having fun building good abstractions, and if Lisp isn't doing it for you, by all means, find (or invent!) something that does. Cheers!

Re: Why Lisp Is Unpopular

#85
post #80

Earlier quoted context omitted.

I think the problem Lisp has is that very few people are forced to use it. If you look at the average programmer, he doesn't want to think about programming, he just wants to press keys an go home. So a language that requires you to think instead of type is not something that he is going to flock to. I think the sad reality is that most programmers aren't very smart, so smart languages will never become popular. I'm…

I think most people prefer languages that let them think about the problem they are trying to solve, rather than think about what the macros expand to, or what happens when they call that continuation.

Sure. Nobody would ever write a macro to solve a problem.

No wait: on second thought, I surrender to how completely dumbfounded I am by this comment.

I'm calling Kenny...

Re: Why Lisp Is Unpopular

#86

Earlier quoted context omitted.

Well if you ignore the human visual processing system, that's a valid argument. One ascii character is just the same as the next. Unfortunately for lisp, that's not the case. Whitespace is different than lines. There's a reason most people can't look past the parens - they're hard to look past.

Parenthesis fade into the background with experience (especially if your code is well-formatted), in the same way you start to group things by curly braces in C or Java over time. No one looks at C code the first time and thinks it's clear to understand.

The point I was trying to make is that whitespace and parens are not equally good as delimiters.

Specifically, reading a newspaper that has parens instead of whitespace would be harder.

(Specifically,(reading(a(newspaper(that(has(parens(instead(of(whitespace (would(be(harder.)))))))))))))

In terms of actually being a problem, I'd say it depends on the code, for sure. I could create that same example in C, but end it with }}}}}}}}}}}}}}. However, in my admittedly limited experience with lisp, it seems more likely to be highly nested, tempting people to put more levels on a single line.

I also agree with you that C shouldn't be held up as the paragon of readability.

Python is pretty darn good though.

Re: Why Lisp Is Unpopular

#87
post #6

How to make Lisp popular (or as popular as Lisp will ever get): 1) SBCL working very well on the big three PC platforms. 2) Bindings + easy installation for popular libraries. 3) Education (pg's articles, everything on planet.lisp.org) 4) Solid debugging, perhaps with things like breakpoints. There is much activity on all 4 problem items that I identified above, so Lisp IS getting more popular. I don't know if progra…

Noise != usage. Don't confuse attention with popularity. I think about the language and post comments about it on forums and read great Lisp code (e.g. Arc), but I'd never actually use it for anything non-trivial. Why? Because I write web apps and existing Lisps don't make that easier or more fun. The only (!) thing Lisp has to do is efficiently and absolutely abstract away XML, CSS, and JavaScript. No Lisp is going…

I'm interested in why you think that Lisp systems haven't yet efficiently abstracted away from HTML/CSS/JS. I work on such a system every day and the abstractions seem pretty efficient to me.

Re: Why Lisp Is Unpopular

#88
post #61

Earlier quoted context omitted.

And what about CLOS? Does not make Lisp, in your words, a "hash programming language"? Really I don't get the difference you state between list/hash programming languages, I've work a little with EcmaScript and I don't know anything about Io, but I'll put it in my to-do list. Can you, please, extend it? What's the main difference between them? Because you say that the primary abstraction of a "list" programming langu…

I've never looked at CLOS. But, what I mean is the "dominant metaphor," which I suspect is still lists. I'll just go through my probably plebeian understanding. Arrays are to lists as hashtables are to objects. An array, in my mind, is a list that only contains one type and is indexed with enumerated integers. On the other hand a list can contain any type, but is also indexed with enumerated integers. In JavaScript:…

Ok, I think I get you. But then I think you can't categorize programming languages this way, the default data-structures provided by the language don't characterize it. In fact, it seems to me that you like most JavaScript because it's object oriented, it's dynamic typing and functions are first-class. Features that others languages lack, and not because the "dominant metaphor" is the hash. Casually in JavaScript the objects are built with hashes (at least apparently), and can be easily extended.

It's a fun thread :D

Re: Why Lisp Is Unpopular

#89

Earlier quoted context omitted.

Parenthesis fade into the background with experience (especially if your code is well-formatted), in the same way you start to group things by curly braces in C or Java over time. No one looks at C code the first time and thinks it's clear to understand.

The point I was trying to make is that whitespace and parens are not equally good as delimiters. Specifically, reading a newspaper that has parens instead of whitespace would be harder. (Specifically,(reading(a(newspaper(that(has(parens(instead(of(whitespace (would(be(harder.))))))))))))) In terms of actually being a problem, I'd say it depends on the code, for sure. I could create that same example in C, but end it…

But you can format and indent your lisp code so the reader (people) doesn't have to rely on counting parentheses.

Example from taken from http://www.gigamonkeys.com/book/

  (defun test-+ ()
    (let ((*test-name* 'test-+)
          (another-var 'foo))
      (check 
        (= (+ 1 2) 3) 
        (= (+ 1 2 3) 5) 
        (= (+ -1 -3) -4))))

You should be able to read what this code does (check basically runs the statements and reports if they return true or false) without having to count a single parentheses.

Re: Why Lisp Is Unpopular

#90
post #2

There are many hypotheses out there that Lisp lacks popularity for this or that flaw in the language or in the community. The problem with these hypotheses is that you can point to similar or bigger flaws in languages that have grown popular. If a language has good qualities, people will figure out ways around the problems. My hypothesis is that Lisp is unpopular for the exact same reason some of us love it: concise…

I really don't find that lisp, at least common lisp, is particularly concise. Consider lambda functions, one of those things that lisp is particularly praised for; common lisp: (lambda (x) (+ x 1)) C#3 : x=> x + 1 ruby : { |x| x + 1 } python : lambda x: x + 1 Haskell : \x -> x + 1 Just in terms of character count, CL is the longest of the lot. No, the problem with trying to get a lisp under your belt has alredy been…

In my experience, Common Lisp often doesn't come out best at the code snippet level. Where it shines is in building whole systems. After a while one passes an inflection point where one realizes, "Holy cow - what I'm doing now is supposed to be way harder than it is". I probably have this experience every week.

You obviously put a lot of sincere effort into learning Lisp and I agree with much of what you say. After all that work, I wish I knew an easy way to communicate the joyful side to you.

Post reply on HN