Live data from Hacker News

On Lisp

paulgraham.com

61–70 of 107 posts

Re: On Lisp

#61
post #33
post #30

Earlier quoted context omitted.

What kind of argument is this. > constraint logic programming, logic programming The book you comment on actually implments a logic programming system. Both common lisp and clojure have implmentations of high performance logic systems. > Static functional programming Both Clojure and Common Lisp have type systems that can do most things ml and haskell can do. Its arguable that some of this (in the CL) are even more p…

But that's not the main style of programming. If you teach someone lisp he'll hack around with functions and macros and not realize that his problem could be elegantly written in constraint programming. Most of the time the majority of code (written by good programmers) is in constraints or relations, so why encase that in a functional language with parenthesis everywhere (I've programmed a fair bit in lisp and don't…

People who have problems need to know about diffrent solutions. Just forcing everybody to use some langauge that supports some of these from the ground up want change that.

You want a language that is flexible to expand into new fields.

Also you have still not provided with these magical programming languages you are talking about. Is there any language you yourself would use?

As far as I know many concepts like contraind logical programming is not really ready for prime time, in most cases.

Re: On Lisp

#62
post #47
post #45

Earlier quoted context omitted.

It's 2013, and the top comment on a story about Lisp (on HN, a site written in Lisp) is complaining about syntax? Seriously, how much time did you actually spend learning/using Lisp before giving up because it had a "massive indentation problem"?

Surely expressing personal issues with Lisp's syntax is valid, especially if a possible solution is offered. If you see at least some of the larger codebases written in Lisp, it is natural to be overwhelmed by the level of indentation, which will cause the code to wrap under many editor setups.

"Lisp looks strange not so much because it has a strange syntax as because it has no syntax; you express programs directly in the parse trees that get built behind the scenes when other languages are parsed, and these trees are made of lists, which are Lisp data structures"

Re: On Lisp

#63

Any advice or link for someone new to Lisp like me? Also, is there any good open source project using Lisp that I can fork/download and tinker with? I'm still having problem wrapping my head around Lisp. Even implementing some simple algorithms in Lisp took some time for me. I think this is due to the fact that I learned to program in C. Nowadays I work mainly with python/ruby/javascript, but I got the feeling that I…

Something that helped me (even though I didn't plan it that way) was switching over to emacs for coding and extending it using elisp. Suddenly, whenever I felt that there was a function or enhancement that I'd like the editor to have, I could implement it right away elisp and use it right away. You don't even need to create a plugin file or anything, you just hop over to the scratch buffer, write your function, evaluate it, and you extended the functionality. It is so easy that I do it all the time now. That really helped me learn more lisp.

Re: On Lisp

#64
post #48

Earlier quoted context omitted.

You could have a look at the software below Hacker News. It's written in the Arc Lisp dialect (which itself is implemented on top of the Racket Lisp dialect). Apart from Racket, Clojure is also a nice Lisp to get started with. It runs on the JVM. I'd advice against learning Common Lisp as your first Lisp these days, even though Common Lisp is what On Lisp is about.

Any particular reason against Common Lisp?

Common Lisp is ugly (e.g. see https://en.wikipedia.org/wiki/Lisp-1_vs._Lisp-2) and not particularly functional. There are a few reasons you might want to learn it nonetheless, but they don't apply to someone new to Lisp.

(In case you ask: Common Lisp is a useful target, if you want to port programs from even older Lisps, like emacs' elisp.)

Re: On Lisp

#65
post #50

Earlier quoted context omitted.

I've heard people complain about parentheses, but indentation isn't usually the issue. I challenge you: I looked at your personal website, and you seem to claim experience in Java and C. Show me a large codebase in Lisp and a large codebase in Java or C where the Lisp codebase is dramatically less readable than the Java or C codebase due to indentation.

You seem very upset. Calm down. I just had an idea that it might be fun to represent lisp code in a treemap. Or rather a zoomable treemap like this: http://bost.ocks.org/mike/treemap/

Perhaps like these?

http://foldr.org/~michaelw/emacs/

Re: On Lisp

#66
post #55

Earlier quoted context omitted.

I'd advise exactly the opposite. While clojure and racket are excellent languages, they are very different from one another and CL. Telling someone to learn python or ruby if they ask about learning lua isn't a good advice, is it?

Oh, if your goal is to learn one of the Lisps, then don't spend any time on Common Lisp. It's old and ugly. Similar, if someone asked about a modern scripting language, I'd send them away from Perl in favour of Python or Ruby. If they goal was explicitly Perl (or Common Lisp) that would be a different thing, though.

>>Oh, if your goal is to learn one of the Lisps, then don't spend any time on Common Lisp. It's old and ugly.

why?

I don't find that at all, and a large reason for learning common lisp is as a learning exercise to become more intimately familiar with lambda calculus and s-expressions. The increased expressivity of clojure (for example) may hinder the very thought processes that make lisp a dialect worth learning. Of course they are both fine languages, but most people now advocate the learning of a LISP not for practicalities sake, but rather just to demonstrate real life things that those sets of languages do differently than nearly every other language, and to allow the programmer to take from those experiences and apply them to their language of choice.

From THAT standpoint, i'd advocate CL first, if not only for forcing the user of the language to experience the follies of certain practices, such as the namespace issues that Clojure tried to fix about CL.

Re: On Lisp

#68
post #50

Earlier quoted context omitted.

I've heard people complain about parentheses, but indentation isn't usually the issue. I challenge you: I looked at your personal website, and you seem to claim experience in Java and C. Show me a large codebase in Lisp and a large codebase in Java or C where the Lisp codebase is dramatically less readable than the Java or C codebase due to indentation.

You seem very upset. Calm down. I just had an idea that it might be fun to represent lisp code in a treemap. Or rather a zoomable treemap like this: http://bost.ocks.org/mike/treemap/

Not upset, just tired of ignorant programmers who get off on complaining, and inventing solutions to imaginary problems (bad syntax? ooh, clever visualization!) rather than actually writing code. By the way, you didn't answer the question -- how much Lisp code have you written, "javajosh"?

Re: On Lisp

#69
post #46

Earlier quoted context omitted.

What do you mean by indentation problem? In practice, everyone just uses emacs to indent, no problem.

Oh, I was just thinking that it would be nice to visualize lisp in a more two-dimensional way, something like this: http://bl.ocks.org/mbostock/4063582 I'm not really a lisp coder at all (a bit of clojure experience), but the relentless self-similarity of lisp languages is both a strength and a weakness, IMHO. But it's regular syntax would make it a good candidate for a treemap. Just sayin'.

I'm not really a lisp coder at all (a bit of clojure experience)

In other words, you don't have a clue. Right, thanks for clearing that up.

Re: On Lisp

#70
post #64

Earlier quoted context omitted.

Any particular reason against Common Lisp?

Common Lisp is ugly (e.g. see https://en.wikipedia.org/wiki/Lisp-1_vs._Lisp-2 ) and not particularly functional. There are a few reasons you might want to learn it nonetheless, but they don't apply to someone new to Lisp. (In case you ask: Common Lisp is a useful target, if you want to port programs from even older Lisps, like emacs' elisp.)

Oh I see by Ugly you mean practical. Lisp is about Metaprogramming not referential transparency. On the otherhand once you start diving in the source code of Clojure you quickly find yourself looking at javaclasses ime.

On the other hand CL has CLOS, an object system which puts others to shame. And reader macros to define your own syntax. See cl-annot to see the decorator syntax from python being ported to CL or how to give hashmaps Ruby syntax [1].

[1]: http://frank.kank.net/essays/hash.html

Post reply on HN