Live data from Hacker News

Learn Lisp the Hard Way

learnlispthehardway.org

111–120 of 144 posts

Re: Learn Lisp the Hard Way

#111

Regarding the tone I concede it is a little over the top, but considering the author works for D-Wave[1] building the future of (Quantum) Computing I think it is not without merit. It may be better to leave the intro part for the end as it may alienate programmers that have preconceived notions about lisp based on hearsay and not actual experience (i.e. it's enlightening, it's old, full of cruft, hard to read, it's f…

It's worth noting that I don't work for D-Wave. Quantum Computing is an interest of mine, so naturally I signed up for their developer program when they launched it a couple years back (which they shut down entirely earlier this year).

Re: Learn Lisp the Hard Way

#112

Earlier quoted context omitted.

I think you're missing the point and/or wrong. First, I don't want to have to turn myself into an LALR parser to read some code. > What is hard for the machine is hard for you also. But what's easy for the machine may well not be easy for the human. LZW isn't very hard for a computer, but good luck reading it. Syntaxes that may be equivalent to the computer may well not be for the human. Yes, a human can train itself…

My point is hinting at that Lisp is readable when it is properly written with indentation and alignment. And when good coding practices are followed, like writing reasonably small functions, using good variable names and so on. Humans do not count parentheses and keep track of nesting levels when reading Lisp, any more than they go through LALR(1) state transitions when reading C++. We structure the code in 2D, and u…

And, about that vocabulary point: different Lisp dialects differ in their vocabulary. Common Lisp vocabulary will not get you very far in understanding Scheme. Emacs Lisp vocabulary will serve you only so far if you'e reading Common Lisp. A dedicated Schemer will be tripped up reading EuLisp, and so on. In languages that have a big divide between "built in" and "library", we see this kind of variation at the library level. For instance C is mostly the same on Unix or Windows, but the libraries are mutually foreign languages. `CreateProcess` with umpteen arguments versus `fork` and `exec`, and whatnot. Since C doesn't have built in data structures, everyone rolls their own, creating effectively a different "C with lists" dialect.

Re: Learn Lisp the Hard Way

#113

Earlier quoted context omitted.

I'm not the above poster but I think the power of macros is way overhyped and not nearly as strong as people claim. I see the claim of "you can write a macro to do it" for any imaginable feature all the time , but it is simply not true. A recent example from personal use is continuations. Scheme has them as a first-class object. Common Lisp does not, but a common claim is that you can write macros to provide continua…

That's right; macros need a target language to expand to, and that target language needs to seamlessly inter-operate with the surroundings and with the forms that are inserted into it. Some semantics is simply not available without transforming the entire program in which the macro call occurs.

Yes, exactly my point. Macros are very powerful but not a magic sauce that makes Common Lisp infinitely extendable. Some things you actually need to change the underlying implementation for.

Re: Learn Lisp the Hard Way

#114
post #107

Ok i started this. How long before I can condescend to the rest of you barbarian peons? But seriously - i've been wanting to learn a lisp for a while now and this seems like an accessible way to go about it.

welp apparently i'm done for now... http://learnlispthehardway.org/book/1-02-02-more-strings/

Re: Learn Lisp the Hard Way

#116
post #114
post #107

Ok i started this. How long before I can condescend to the rest of you barbarian peons? But seriously - i've been wanting to learn a lisp for a while now and this seems like an accessible way to go about it.

welp apparently i'm done for now... http://learnlispthehardway.org/book/1-02-02-more-strings/

Restarted the server, you should now be able to see the next three exercises... although there's very little to be seen in them so far.

Re: Learn Lisp the Hard Way

#117
post #104
post #96

Earlier quoted context omitted.

http://landoflisp.com/ is a nicely informal book on learning lisp that is easy to get into. Pretty sure I've seen it highlighted here a few times.

I like Land of Lisp, and I own the ebook+paperback, but I don't think that it's well suited to beginning programmers. I think the "let's make a game" approach actually works better for programmers who are coming from a different language and trying to understand concept translations, rather than novel concepts themselves. edit : I can't reply to you, but re-read what I said. I am making the point that I believe Land…

I see your point, though I'm not sure I agree. I do think you have to have an interest in games. At the least, you can't be turned off by them.

Though, I have absolutely nothing to back up my thought on this. Would be curious to see any studies or other such on these thoughts.

Also, apologies for the edit. My main thought was more for the informal nature of Land of Lisp. That is, it isn't "high theory" written for experts, nor is it written for kids.

Re: Learn Lisp the Hard Way

#118
post #103

Earlier quoted context omitted.

The point is that other languages added little to what Lisp already had to offer over half a century ago. Every language has its use, but really we ARE wasting time by splitting the worldwide community of programmers in different languages. Look at how most programmers love one language and advocate it's the best there is. That's called a split. Aren't we supposed to not reinvent the wheel?

This view only makes sense if you believe one language is enough. One language that has it all figured out, one language that is the right solution for any task. Even if such a language existed (be it Lisp or not), which is unrealistic, there is still a second aspect to the whole thing: programmers' brains. Different languages map differently to different kinds of brains, and that's a very good reason to explore mult…

One language might not be enough, but one nice language plus C --- now you're talking. :) :)

Re: Learn Lisp the Hard Way

#119
post #83

I really hope Colin finishes this as I've always thought Lisp would be a better beginner language if there was a book like mine for it. You've either got "The Little Schemer" series, which is annoyingly written for little kids but close to the style, or you have giant academic tomes that only hard core geeks would bother reading. A "trainer" book like mine would definitely solve this gap. The intro is a little bit co…

I don't think The Little Schemer is intended for young kids. The preface says > The Little LISPer is based on lecture notes from a two-week ``quickie'' introduction to Lisp for students with no previous programming experience and an admitted dislike for anything quantitative. Many of these students were preparing for careers in public affairs. I don't know exactly what that means, but it sounds university-level?

I actually liked the Little Schemer a lot, specifically the way it's laid out with just questions in one column and answers in another (it helped establish a rhythm that made it nice to go through); but I did find the tone a little "young".

All the examples are about food, and there's cartoons littered throughout. There's a bunch of books that seem to be of that tone (Learn you a Haskell, Land of Lisp, Realm of Racket, Learn You Some Erlang), and I found myself instinctively recoiling from all of them (I haven't read the Erlang book, but it seems very much in that style).

I think it's important to have lots of different styles of books for learning a language, because I think different people respond better to different approaches, but selfishly, I wish every language had an equivalent to "ANSI Common Lisp" (by this site's benefactor emeritus) and Real World Haskell. I am also a big fan of the way Zed chose to lay out his books.

Re: Learn Lisp the Hard Way

#120

I have nothing against Lisp, but... >Is Lisp as hard as people say it is? >No. Lisp is actually the simplest programming language, and has no syntactic cruft. I always see this used when claiming certain languages are easy to grasp. "It's not complex at all! The syntax is incredibly simple!" x86 assembly also has very simple syntax but it's not too easy for beginners to write in, beyond very simple and small programs…

The syntax of assembly language isn't combinative, beyond simple catenation. You're not creating trees, just a "link sausage" (or, a graph, more accurately) of instructions. Lisp syntax expresses tree structures; it actually does what other languages achieve with complicated syntax. They have parsers which build trees out of nodes. Those trees can be written in a Lisp-like way. E.g. a C declaration might be turned, b…

You still end up with myriad syntax rules; why (a int) and not (int a)? Why not any inversion or isomorphic transformation?
Post reply on HN