Live data from Hacker News

The Failure of Lisp? A Reply To Brandon Werner

danweinreb.org

11–20 of 53 posts

Re: The Failure of Lisp? A Reply To Brandon Werner

#11
post #8
post #2

Lisp (any lisp, be it lisp-1 or lisp-2) are currently fighting a fight on multiple fronts. From one side, each iteration of Python or Ruby gains new ground as they incorporate more and more lisp-concepts, while being "Visually friendly" (ie, with common syntax). They also have the ability to lure many more users from, say Java or C#. On the other side, you have any language with type theory governing the language des…

Lisp will have played its major part when other languages have real macro systems.

Why can't macro systems be part of an IDE? Is there anything macros do that can't be done at compile-time?

Startup idea: web-based language-specific IDE, with a simple interface for sharing/voting on macros between users.

Re: The Failure of Lisp? A Reply To Brandon Werner

#12
post #11
post #8

Earlier quoted context omitted.

Lisp will have played its major part when other languages have real macro systems.

Why can't macro systems be part of an IDE? Is there anything macros do that can't be done at compile-time? Startup idea: web-based language-specific IDE, with a simple interface for sharing/voting on macros between users.

The lisp macro system can more or less be done at compile time, yes, but that's not the problem with other languages. The format of lisp makes it especially easy to do macros - code is data!

Here's an example. Take, for example, this class declaration:

  (defclass dog (animal)
    ((size :accessor dog-size)
     (name :accessor dog-name :init-form "Fido")))
How do you make that into data? Easy. Just quote it:

  '(defclass dog (animal) ...)
Now take the equivalent in Java:

  public class Dog {
    int size;
    String name = "Fido";
  }
How do you get that into data? Well, I suppose the best you could do without modifications to the core language is just put it in a string. But then to do something useful you'd have to do so much tedious string parsing it wouldn't be worth it. I suppose you could invent a special ParseTree class or something, and a quote operator, and etc etc, but that wouldn't be nearly as easy as Lisp makes it.

What the previous poster was saying is that once other languages have a code representation that is easy to work with as data, and can manipulate that code as data at compile-time to produce complex macros, then Lisp might fade. (At least that's how I understood it, correct me if I'm wrong.)

Re: The Failure of Lisp? A Reply To Brandon Werner

#13
Some may consider Lisp a failure of a language, but I sure am glad my startup is written in Lisp! The issue of syntax baffles me, because in recently learning Javascript, the essential area of bugs for me were almost all syntax related. I never have to worry about syntax in lisp as its either ( or ). There are no ; or } or { or , etc to worry about what goes where when.

The logical structure reveals itself so clearly in the form of indentation so that the parenthesis become transparent for me. Having emacs slime automate the indenting is of course essential in enabling a clear focus on the function of the code instead of spending time thinking about the syntax.

Re: The Failure of Lisp? A Reply To Brandon Werner

#14
post #3
post #2

Lisp (any lisp, be it lisp-1 or lisp-2) are currently fighting a fight on multiple fronts. From one side, each iteration of Python or Ruby gains new ground as they incorporate more and more lisp-concepts, while being "Visually friendly" (ie, with common syntax). They also have the ability to lure many more users from, say Java or C#. On the other side, you have any language with type theory governing the language des…

While I hear many people complaining about the "awkward" and "hard-to-read" syntax, it's rare to hear someone compliment the syntax of lisp. I am a big fan of the Lisp syntax because it's so simple and consistent - probably a relic of its roots in lambda calculus. Not having to worry about operator precedence is a huge bonus in itself - I don't know why on one hand people cling to PEMDAS, logic, assignment, etc havin…

You have an interesting point here that is not often discussed.

I am pretty new to programming, which means that I'm not stuck in conventions about how code syntax is supposed to be. On this background I find lisp pretty easy exactly because the syntax is so simple.

To me lisp is like chess: It's easy to grasp the basic rules, but hard to become a master.

Re: The Failure of Lisp? A Reply To Brandon Werner

#15
post #11

Earlier quoted context omitted.

Why can't macro systems be part of an IDE? Is there anything macros do that can't be done at compile-time? Startup idea: web-based language-specific IDE, with a simple interface for sharing/voting on macros between users.

The lisp macro system can more or less be done at compile time, yes, but that's not the problem with other languages. The format of lisp makes it especially easy to do macros - code is data! Here's an example. Take, for example, this class declaration: (defclass dog (animal) ((size :accessor dog-size) (name :accessor dog-name :init-form "Fido"))) How do you make that into data? Easy. Just quote it: '(defclass dog (an…

Or:

1. Allow a factory for Class.

2. Make Method contain the full body contents as a list of statements, and give them a factory as well.

Then it's a matter of reasonable constructor syntax.

Re: The Failure of Lisp? A Reply To Brandon Werner

#16
Lisp's biggest problem is the simple fact that most other languages already ship with most nonwindows boxes. _Successful_Lisp_ is a good book (amongst others), but what do you type the code into?

Until today, I hadn't heard of SBCL. I've been fiddling in e-lisp, which is a tragedy of its own sorts. The only mention of SBCL in "google:lisp linux" is an ad. I don't think I'm the only one still afraid of a $5k entrance fee for lisp.

Re: The Failure of Lisp? A Reply To Brandon Werner

#17
post #7

Earlier quoted context omitted.

Interlisp had the last part correct. [ was a special open paren and ] closed all open parens back to (and including) the most recent [.

Nice - I remember someone saying that that in emacs you could have it format it using indentation and now show the parens (or maybe it wasn't emacs).

It was Emacs: http://www.emacswiki.org/cgi-bin/wiki/UnParenMode

Re: The Failure of Lisp? A Reply To Brandon Werner

#18
post #11
post #8

Earlier quoted context omitted.

Lisp will have played its major part when other languages have real macro systems.

Why can't macro systems be part of an IDE? Is there anything macros do that can't be done at compile-time? Startup idea: web-based language-specific IDE, with a simple interface for sharing/voting on macros between users.

While people generally talk about using macros for code generation, macros are essentially for doing things at compile time. (Or read time, in the case of read macros, e.g. 'x -> (quote x).) Due to simplicity of Lisp syntax, the easiest way to extend the language is usually by generating code, though, so that's what they're associated with.

You can do things with the C preprocessor at compile time, it's just completely unaware of C, which really cripples it. The Lisp preprocessor (its macro system) is also running Lisp, and can easily process itself.

Re: The Failure of Lisp? A Reply To Brandon Werner

#19

I don't know CL, but from the subset of scheme that i know, i cant imagine how can this language fail. It just feels too good and the code is so beautiful. I could say for certain that scheme has made me into a better programmer.

Common Lisp and (especially!) Scheme are really elegant languages, sure, but there's really something to be said for being able to install the one clear Python implementation* and getting a huge standard library with lots of documentation and a large community, upfront, versus trying to figure out whether you should set up SBCL or CLISP or PLT or Chicken or ..., then finding there are several libraries for what you're trying to do, but you're not sure they're compatible with the compiler/interpreter you're using, etc. And then, what editor do you use? ("What's this SLIME thing about?") And this, that, and the other thing. That is a lot to figure out, all at once and upfront, before you can try it out. Making it really hard for curious people to play around with Lisp means that few people will see its potential.

All of the above could just as well apply to Ruby or even Haskell. I think Python, in particular, has been really carefully designed to give a good first impression, though. I don't know if that was deliberate or not, but it's brilliant. (I know some people balk at the indentation-based syntax, but I bet many people coming from e.g. a Perl or C++ background think, "Whoa, this looks really clean." "Executable pseudocode.") Lisp doesn't really seem to focus on making a good first impression. (On the other hand, OCaml just says, "Hello!" and immediately backhands you. It makes up for it once you understand the type system, but I'm not at all surprised the OCaml community is small.)

Stuff like Lisp in a Box helps a lot, but it wouldn't hurt to have a link to it in 300-pixel-tall burning letters at the top of lisp.org, you know? You can't even go directly to a download page for any implementation from lisp.org. (When you click the download link at the top of Haskell.org, it takes you right to GHC's download page.)

I've also frequently heard the Lisp community can be rude or off-putting, but I haven't experienced this personally. I could see them being a bit gruff and frustrated about answering a lot of the same questions over and over again, though, and seeing languages like Python and Ruby getting so much more attention than Lisp can be heartbreaking.

So, basically: Marketing.

* I know about Stackless, etc., but which does python.org point you to? QED.

Re: The Failure of Lisp? A Reply To Brandon Werner

#20
post #3
post #2

Lisp (any lisp, be it lisp-1 or lisp-2) are currently fighting a fight on multiple fronts. From one side, each iteration of Python or Ruby gains new ground as they incorporate more and more lisp-concepts, while being "Visually friendly" (ie, with common syntax). They also have the ability to lure many more users from, say Java or C#. On the other side, you have any language with type theory governing the language des…

While I hear many people complaining about the "awkward" and "hard-to-read" syntax, it's rare to hear someone compliment the syntax of lisp. I am a big fan of the Lisp syntax because it's so simple and consistent - probably a relic of its roots in lambda calculus. Not having to worry about operator precedence is a huge bonus in itself - I don't know why on one hand people cling to PEMDAS, logic, assignment, etc havin…

I agree. I wish ML used s-expressions.

Also, you might like this presentation, "The Swine Before Perl" by Shriram Krishnamurthi (of PLT). It's a great thing to show people who wonder how you could think Lisp has a good syntax: http://www.cs.brown.edu/~sk/Publications/Talks/SwineBeforePe...

(Also: SK's book is great.)

Post reply on HN