Live data from Hacker News

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

news.ycombinator.com

71–80 of 211 posts

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

#71
post #69

There are obviously many possible paths, so I can only really tell you what I've done. I can't say it's necessarily the best approach. For me, I decided to start with Common Lisp. I installed SBCL, Slime for Emacs, and started working through the book Practical Common Lisp . By and large this seems to be a workable approach, but I will offer up this caveat. The PCL book is very much "project based" in that the author…

This is a bit off-topic, but something you said resonated with me. > The PCL book is very much "project based" in that the author walks you through building a couple of actual applications. This is a Good Thing™ for the most part, but it does mean that you don't necessarily get things in the order you might expect. > > There's a part of me that almost wishes I'd started with a book that takes more of an approach of "…

> I feel like I'm in the minority in that I prefer to NOT learn things by just "diving in". I am much more successful when I start from the absolute fundamentals.

A bit more off-topic, but this resonated with me. I too feel more comfortable when I start with the absolute fundamentals. When something does not work, knowing the fundamentals helps me to reason about why it does not work from the first principles. On similar lines, I did a relevant "Show HN" post here today:

Emacs4CL: https://github.com/susam/emacs4cl (35 lines of ~/.emacs to turn Emacs into Common Lisp dev environment)

It bothers me a little when someone new to Common Lisp or Emacs is encouraged to start off with Portacle or Spacemacs directly without appreciating the extensibility of Emacs and how SLIME fits in the environment. The Show HN post on Emacs4CL I have linked to above is an attempt to promote a more DIY approach to setting up one's development environment for Common Lisp without having to spend a lot of time.

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

#72

Earlier quoted context omitted.

You could have an atom that holds the state and a function which can update that atom. You might do something like the elm architecture where you pass a message to a reducer which produces the new state that the atom is set to. All the logic is contained in the reducer and is pure and immutable and the state change happens at a single controlled point.

OK. If I understood correctly, then you limit the mutable state to one point, and use functional logic everywhere around it. You can also optionally close over the atom to achieve encapsulation. Thanks, TIL! That's equivalent to the "mostly functional" style that's doable in Common Lisp.

Yeah, Clojure is one of those languages where functional purity at all costs isn't really the goal. Like others have said its more about being careful how you set state and Clojure gives you loads of great functions for doing everything in a pure way. Its standard library is its greatest asset as far as I'm concerned

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

#73
This is a bit tangential but what helped me most in picking up Lisp was writing my own. Until I worked through Make A Lisp [0] I don't think I really "got" Lisp. You can work in whatever language you're familiar with. You build a Lisp similar to Clojure and learn a lot of important concepts by implementing them.

[0] https://github.com/kanaka/mal

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

#74

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…

"If you mean Common Lisp, I'd say install SBCL and start playing with with the repl" I meant any lisp. Common lisp, clojure, ccl. I am new to this so did not have a choice. But in this thread I get the feeling that common lisp is the most suggested.

If you want a bunch of Lispers to recommend a Lisp, then it's hard not get the most traditional one recommended. If you think the value proposition of Clojure sounds interesting, then just go with Clojure. If you think Racket sounds interesting, just go with Racket. They're all Lisps, but serve different niches.

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

#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 ugly, IMO. It's "pragmatic" and has a bunch of libraries and functionality and whatnot, but it's not as fun or elegant as a minimal, pure, Scheme.

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

#76
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.

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

#78
post #71
post #69

Earlier quoted context omitted.

This is a bit off-topic, but something you said resonated with me. > The PCL book is very much "project based" in that the author walks you through building a couple of actual applications. This is a Good Thing™ for the most part, but it does mean that you don't necessarily get things in the order you might expect. > > There's a part of me that almost wishes I'd started with a book that takes more of an approach of "…

> I feel like I'm in the minority in that I prefer to NOT learn things by just "diving in". I am much more successful when I start from the absolute fundamentals. A bit more off-topic, but this resonated with me. I too feel more comfortable when I start with the absolute fundamentals. When something does not work, knowing the fundamentals helps me to reason about why it does not work from the first principles. On sim…

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.

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

#79
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?

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

#80
post #44

Earlier quoted context omitted.

How is the VSCode support? I've only used IntelliJ + Cursive for Clojure and am quite spoiled. That's the only reason I might not recommend Clojure for a VSCode user. Now, if said user is interested in switching to Emacs or IntelliJ, I'd think it would be a perfect fit.

Chiming in since I'm a bit disappointed with Clojure VS Code support:calva (the clojure extension) works great, unless you also want vim bindings. In which case it's a bit of a cluster. It's documented and I understand why - but it's still a pain point (it makes the escape key not exit insert mode anymore, by default). (nota bene: I understand these things are hard to solve and I don't mean to throw the stone without…

Vim with the Vim-Fireplace plugin works great for me.
Post reply on HN