Live data from Hacker News

Ask HN: I want to start learning Lisp. Where do I begin?

news.ycombinator.com

121–130 of 211 posts

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#121

I forgot to ask in my main question. I can't edit it anymore. I am seriously thinking of learnijg common lisp. Thank you for all the suggestions. Is it possible to build web apps in common lisp or any lisp? Any frameworks available? Is it possible to build multithreaded apps that use multiple CPU cores for performance? What is used? POSIX threads?

If you are thinking on doing web apps, I think Clojure is the best option, as it enables you to write clojure to target both server (either in clojure or clojurescript) and browser (with clojurescript, that compiles to javascript), and share code between those seamlessly (for example, protocols, specs, business logic, etc. that you may need in both sides).

That's the most extended option by far, but I'm sure that you will find other lisps that compile to javascript (not that I know them).

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#122
post #119
post #78

Earlier quoted context omitted.

Exactly. Though, to be fair, if someone says they want to learn LISP and then you tell them to learn Emacs... well, now they have TWO problems! xD I love and use Emacs. And I also, unsurprisingly, don't like or recommend that people start off with all of these "starter packs". But at the same time, if you don't already know Emacs and you want to learn LISP, I don't know what I'd recommend.

For Clojure, VSCode with the Calva and clj-kondo extensions installed is a pretty good, free starting point. Also, if you are used to the Jetbrains tools like IntelliJ, try the Cursive IDE (paid).

Cursive is free for non-commercial use.

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#123
post #110
post #84

Earlier quoted context omitted.

Can I read SICP while learning Clojure? Is lisp very different?

There are a few people who have translated the solutions to Clojure, this one looks like the most comprehensive: http://www.sicpdistilled.com/

It looks like only chapter 1 is completed. A lot of chapter 2, and the just bits of 3 and 4.

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#124
post #90

If you mean Common Lisp, I'd say install SBCL and start playing with with the repl. Choose the editor you know best; even notepad is useful to copy and paste expressions to/from the repl. Any editor that's suited for programming will have a way to send expressions to the repl with a keystroke, which is much more comfortable. So basically, just pick VSCode. With that, you're ready to go. Take just one book and work th…

SBCL is great, but one should not use an editor, which doesn't have proper paren matching and some indentation support. That is just making your life miserable. So SBCL+Slime+Emacs is a great combination. Or alternatively, get the free version of Lispworks.

Whoa, that's a big jump you made there from paren matching plus indentation to emacs. If he is just learning, emacs might be overkill. I was just simplifying the minimum requirements. But I agree with you about parens. This is not 100% popular but for a newbie I'd add the following recommendation:

Make sure your editor has parinfer available. Not parindent, parinfer. People swear by parindent, but you don't need it on day one. Just try it later on. Parinfer is your friend.

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#125

Racket Scheme & SICP is a fun way to start playing, especially if you are into theoretical concepts of CS and programming, like higher order programming and abstraction. The documentation for Racket is excellent, see e.g. https://docs.racket-lang.org/quick/index.html ... and many people have created online resources to adapt SICP to Racket, as well as other learning texts. I like Beautiful Racket, e.g. https://beauti…

I'd like to add that there's also a large Discord community for Lispers here: https://discord.gg/eHectVPqJ4

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#126

I think you can use whatever to do Lisp. I'd start with something simple like Scheme, and definitely by watching and doing the SICP lecture recordings from now 34 (!) years ago: https://ocw.mit.edu/courses/electrical-engineering-and-compu... Once you think you grok it, you can pick a Lisp that's closest to what other tools and frameworks you're used to. For me, I never actually did anything in Lisp for production use…

> I think you can use whatever to do Lisp. I'm not sure about that. You need an editor that automatically matches parens and other paired delimiters and keeps them balanced, like paredit.

I did kind of make the assumption that you'd have a code editor that has some form of paren highlighting, at least, though I've never actually found this to be a bigger problem in Lisp than other languages.

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#127
post #67
post #47

Books -ANSI Common Lisp by Paul Graham -On Lisp by Paul Graham -Simply Scheme -The Little Schemer -Structure And Interpretation Of Computer Programs -Paradigms of Artificial Intelligence Programming Implementations Common Lisp - any should be fine, I’ve used sbcl and clisp Scheme - I like gambit scheme. It has a macro system that can be used like described in “On Lisp”

The Hacker News Paul Graham?

Yes. I actually found out HN due to his lisp books, so for me is Paul Graham? The "On Lisp" Paul Graham? haha.

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#129
post #75

If you want to learn a LISP dialect just for fun and/or enlightenment, I would say you want either a Scheme (Guile or Racket) or Clojure. Some people will argue that Clojure isn't a real LISP, which is fine. They're probably right. But it's an elegant and well-designed language that has a lot of the same features and feeling of a LISP/Scheme. I know I could be burned alive for saying it, but Common Lisp is pretty ugl…

Why is common lisp ugly? Many people here suggested common lisp. I was considering it. I like to learn for fun but I am looking for something practical. I will want to build some useful apps in the end with it.

This is mostly people complaining about weird names like RPLACA or having to type #' because it's a Lisp-2. From the MIT perspective it can feel inconsistent but for such an old, practical language, it is really well designed.

I mean, if Common Lisp is ugly what are Perl and C++ then.

Re: Ask HN: I want to start learning Lisp. Where do I begin?

#130

Racket Scheme & SICP is a fun way to start playing, especially if you are into theoretical concepts of CS and programming, like higher order programming and abstraction. The documentation for Racket is excellent, see e.g. https://docs.racket-lang.org/quick/index.html ... and many people have created online resources to adapt SICP to Racket, as well as other learning texts. I like Beautiful Racket, e.g. https://beauti…

I have to second this. Racket is absolutely the best place to start. There are great books for beginners, and the documentation is top notch.

it comes with its own editor (Dr. Racket) that does some really helpful things for beginners, like hovering over a variable and seeing lines drawn to where it's being used.

It's not the fastest lisp, but that's ok. It's spectacular for learning and has a huge ecosystem too. My "daily driver" is Chicken Scheme, but i wouldn't recommend it to a beginner. The docs just aren't helpful to newbs (and frequently frustrating to me even though it has one of the better set of docs)

Vim is meh for Lisp & Scheme, and I'm a Vim fan. Emacs is great. If you're a Vim user check out Doom Emacs. It's great for us geeks who love vim but want more power and better lisp support. But... start with Dr. Racket for now.

Others have mentioned the SICP book, and it is good but i wouldn't suggest it as as "how to start with lisp" book. Also, watch the free lectures of the course from MIT. Very good, and make it way easier to work through the book.

Post reply on HN