Live data from Hacker News

Learn Lisp the Hard Way

learnlispthehardway.org

21–30 of 144 posts

Re: Learn Lisp the Hard Way

#21
I can't bag on a free book, one created as a labor of love...but if I had to make a suggestion, it would be to tone things down a bit:

http://learnlispthehardway.org/book/preface/

> The biggest secret to Lisp is that it is actually the simplest programming language ever created—and that, coupled with its expressiveness and elegance, is why it is favored exclusively by the best programmers in the world.

As a Lisp novice...my thoughts are, "Really?" to both of those assertions. Because the natural follow up is..."So if all the best programmers use it, whatever "best" means, why is it a language that seems so rare in everyday use?".

No need to assert things you can't actually prove or show...it just builds up skepticism before the reader even starts learning. Just talk about the language at hand, or at the very least, do a quick Rosetta Stone comparison of Lisp doing something much more simply than Python/Ruby/PHP, and that's all you need to write in the intro.

Re: Learn Lisp the Hard Way

#22
post #9
post #3

Earlier quoted context omitted.

Just because Lisp looks foreign doesn't mean that it's harder. The syntax is different , but it is also very simple . If this were untrue, Scheme wouldn't have survived as a teaching language all these years.

It's less about it being 'foreign' and more about it being totally unparsable. The thing with imperative programming is that you don't really need to know the language to at least get an idea of what's happening. Lisp is so dense that while you can pack an unbelievable amount of programming into a small chunk, approaching it as a beginner is daunting. There isn't a really good way to 'build' on an algorithm and learn…

totally unparsable

Completely and utterly false. Lisp's s-expression syntax is trivial to parse because it is so regular.

The thing with imperative programming

Common Lisp is multi-paradigm, as mentioned in the site's FAQ. You can write imperative code all you want.

Re: Learn Lisp the Hard Way

#23
post #17

Earlier quoted context omitted.

Why copy his format? Seems Zed did the hard work to establish the brand.

Why would he put up a public repository if he did not want the format copied? Zed A. Shaw created project Learn X The Hard Way 2011-08-29 22:06:48 UTC This is a skeleton book project that makes it easier to start working on a "Learn X The Hard Way"...

I think you can copy his format, but taking his brand is a different story. Zed put a lot of hard work into that, this is less than honest in my mind.

Re: Learn Lisp the Hard Way

#24
post #9
post #3

Earlier quoted context omitted.

Just because Lisp looks foreign doesn't mean that it's harder. The syntax is different , but it is also very simple . If this were untrue, Scheme wouldn't have survived as a teaching language all these years.

It's less about it being 'foreign' and more about it being totally unparsable. The thing with imperative programming is that you don't really need to know the language to at least get an idea of what's happening. Lisp is so dense that while you can pack an unbelievable amount of programming into a small chunk, approaching it as a beginner is daunting. There isn't a really good way to 'build' on an algorithm and learn…

Even if you don't understand Lisp (the meaning of various operators), the structure of a Lisp function is already clear. All you have to understand is symbols, spaces, and parentheses; a lot of that comes from Western writing systems already (which use symbols separated by spaces (and parentheses)). The one piece of common knowledge that you dno't get to apply in Lisp is the writing system for infix arithmetic. (It can be easily put in as a small library module, but nobody ever uses it.)

Re: Learn Lisp the Hard Way

#25
post #9

Earlier quoted context omitted.

It's less about it being 'foreign' and more about it being totally unparsable. The thing with imperative programming is that you don't really need to know the language to at least get an idea of what's happening. Lisp is so dense that while you can pack an unbelievable amount of programming into a small chunk, approaching it as a beginner is daunting. There isn't a really good way to 'build' on an algorithm and learn…

Lisp is totally parseable. So much so, that no LALR(1) approach is required to conquer it. It consists of an unambiguous parenthesized notation, plus some simple prefix-basd notations (and only a small modicum of non-nesting infix, like the consing dot and the colon in "package:symbol". You do not run into any issues of associativity or precedence. Moreover, indenting Lisp so that it looks good, readable and "canonic…

^ Why would someone downvote facts? Because they conflict with their religion, of course.

Re: Learn Lisp the Hard Way

#26
post #9
post #3

Earlier quoted context omitted.

Just because Lisp looks foreign doesn't mean that it's harder. The syntax is different , but it is also very simple . If this were untrue, Scheme wouldn't have survived as a teaching language all these years.

It's less about it being 'foreign' and more about it being totally unparsable. The thing with imperative programming is that you don't really need to know the language to at least get an idea of what's happening. Lisp is so dense that while you can pack an unbelievable amount of programming into a small chunk, approaching it as a beginner is daunting. There isn't a really good way to 'build' on an algorithm and learn…

How much of your argument is cognitive bias?

From what I understand the hardest thing to teach new programmers coming to Java or Javascript or even Python is assignment and mutability. That has a huge cognitive overhead.

Contrast that with the lambda-form structure and substitution method of evaluating expressions in Lisp.

    (function arg1 arg2...)
It's consistent and simple. You can introduce mutable variables and iteration later. With just the substitution method you can go very far as demonstrated by Gerald Sussman in the SICP lectures.

You color your argument with a preference for imperative programming by over-simplifying Java; arguably one of the more difficult languages to teach beginners. The venerable, "Hello, world!" exercise is an illustrative example.

Again contrast that with:

    (format t "Hello, world!")
I think it is possible that Lisp is not that hard to teach as we're meant to believe by arguments like this. Java is a fine language but it requires a fair amount of expertise to use effectively. The same can be said of C. Python and other dynamic languages of the sort might come close to lowering the "difficulty" bar but I wouldn't discount Lisp just because it seems foreign to you.

Re: Learn Lisp the Hard Way

#27
post #14
post #9

Earlier quoted context omitted.

It's less about it being 'foreign' and more about it being totally unparsable. The thing with imperative programming is that you don't really need to know the language to at least get an idea of what's happening. Lisp is so dense that while you can pack an unbelievable amount of programming into a small chunk, approaching it as a beginner is daunting. There isn't a really good way to 'build' on an algorithm and learn…

I don't find your argument to be very compelling. Let me guess: you learned imperative programming first, you're most familiar with it, and you only have limited experience with Lisp, if any? The fact that you find imperative programming easy (because you know it well) and Lisp and functional programming to be hard, is not very informative about which of imperative or Lispy or functional programming is easiest to lea…

The only thing that was hard with imperative programming that I can remember was "=". That was absurd, to put it simply. "x = x + 1"? As someone who has seen these symbols in math class and think they know what they mean that notation kind of suck.

Re: Learn Lisp the Hard Way

#28
post #2

"Is Lisp as hard as people say it is? No. Lisp is actually the simplest programming language, and has no syntactic cruft. While it wasn't designed to be “easy to learn” like Swift, Python, Ruby, or Basic, there is less overall to learn and you will be writing real, useful programs in Lisp sooner than you could with other languages." It's like a never-ending stream of lies, every word being a little more absurd than t…

Well, let's see.

Lisp has no syntactic cruft? It has (almost) no syntax, so there's less room for cruft. That said... cons? car? cdr? That's your syntax? That's not cruft? Seriously? There may be less total cruft, but the percentage of cruft might still be higher...

There's less overall to learn? If you mean to master the syntax, sure, that's true.

You'll be writing real, useful programs in Lisp sooner than you could with other languages? That's a much more arguable point. There's more to being able to effectively program in Lisp than learning the syntax (as there is for every language). Is that "more" easier to learn for Lisp than for other languages? I have no data, but for the web site's claim, I'd at least say "citation needed".

Re: Learn Lisp the Hard Way

#29
post #2

"Is Lisp as hard as people say it is? No. Lisp is actually the simplest programming language, and has no syntactic cruft. While it wasn't designed to be “easy to learn” like Swift, Python, Ruby, or Basic, there is less overall to learn and you will be writing real, useful programs in Lisp sooner than you could with other languages." It's like a never-ending stream of lies, every word being a little more absurd than t…

> It's like a never-ending stream of lies, every word being a little more absurd than the last...

It's been my experience that most things are tractable once you spend long enough staring at them.

If you care enough about a subject to have strong sentiments like "never-ending pack of lies" then your time would perhaps be better served by spending time with the "adored" object, rather than these comments.

Re: Learn Lisp the Hard Way

#30
post #22
post #9

Earlier quoted context omitted.

It's less about it being 'foreign' and more about it being totally unparsable. The thing with imperative programming is that you don't really need to know the language to at least get an idea of what's happening. Lisp is so dense that while you can pack an unbelievable amount of programming into a small chunk, approaching it as a beginner is daunting. There isn't a really good way to 'build' on an algorithm and learn…

totally unparsable Completely and utterly false. Lisp's s-expression syntax is trivial to parse because it is so regular. The thing with imperative programming Common Lisp is multi-paradigm, as mentioned in the site's FAQ. You can write imperative code all you want.

Parsable for humans, I believe he meant. And there's something nice about line-by-line execution.
Post reply on HN