Live data from Hacker News

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

news.ycombinator.com

181–190 of 211 posts

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

#181
post #6

Is there a good argument against Clojure in this case? My impression is that it's a good lisp and you can get actual work done in it which is an advantage over some of the other options.

>Is there a good argument against Clojure in this case? I use Common Lisp and my main argument will be that Clojure isn't an "interactive programming" language like Common Lisp, Smalltalk (and Pharo, Squeak, Scratch) are. And, for me, this is removing one of the main, core advantages of Lisp. Dispensing with the interactive programming features is, IMO, a step backwards in the state-of-the-art. Common Lisp ADDED all…

I've been programming Clojure for a while and I've dabbled in CL, and while the CL debugger is certainly nicer, I don't see a major difference in how you develop interactively. Could you explain where do you see Clojure falling short?

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

#182

Earlier quoted context omitted.

> Clojure IDE "Cursive" is supposed to be good, but never tried and not sure if you want to invest time in an ad hoc IDE. Cursive is just a Clojure plugin for IntelliJ , nothing ad-hoc about it. IntelliJ is the favourite IDE for lots of people - especially Java devs - so it's an obvious choice for Clojure developers. I've programmed Clojure professionally for several years now and have seen maybe 50 different editor…

> Cursive is just a Clojure plugin for IntelliJ Well, I'm ignorant about the IntelliJ ecosystem. Can I take some of what Cursive is providing and use it with Racket or Common Lisp?

No, Cursive is just for Clojure, not other programming languages.

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

#184
post #6

Is there a good argument against Clojure in this case? My impression is that it's a good lisp and you can get actual work done in it which is an advantage over some of the other options.

>Is there a good argument against Clojure in this case? I use Common Lisp and my main argument will be that Clojure isn't an "interactive programming" language like Common Lisp, Smalltalk (and Pharo, Squeak, Scratch) are. And, for me, this is removing one of the main, core advantages of Lisp. Dispensing with the interactive programming features is, IMO, a step backwards in the state-of-the-art. Common Lisp ADDED all…

Clojure is quite capable in interactive programming, through its REPL, so you must be talking about the lack of a condition system in the clojure core.

But Common Lisp features like the condition system are already available in Clojure by just requiring (loading) the respective library. :)

As an example, see https://github.com/clojureman/special . Nice thing about this repo is that it points to other options re. conditions with pros and cons of each one.

Now that I think of it, you might also be referring to the fact that Common Lisp can load libraries through the REPL. Clojure can also do this through an alpha feature, add-lib, that you can already require in any project.

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

#185
I'm currently taking another stab at lispy-languages. I've tried it a few times in the past and I've always had a hard time coming back to it when something else intervenes. Usually self-inflicted because of some complex and unecessary environment setup involved.

I've lately had some success using vanilla emacs, Geiser and Guile (or MIT) Scheme. If you want to work through sicp, the little schemer [1], or my current favorite "Essentials of Programming Languages"[2], then that's the perfect setup. Racket will work too, but if you're using emacs anyway then it's just as easy to get going with Guile or MIT.

I'd recommend getting familiar with largely vanilla emacs[0] rather than a curated kit, but it will require a little bit of additional investment. Additionally, you'll be getting acquainted with emacs-lisp (elisp), so you'll be swimming in lisp languages.

I'm not a fan of VS Code and only use it for work when I have to (and then only when I can't use vim). I'm sure it'd work, vim too, but there are an awful lot of emacs/lisp resources out there and it's helpful to take advantage of what's available.

[0] https://sanemacs.com

[1] https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0...

[2] https://www.amazon.com/Essentials-Programming-Languages-Dani...

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

#186

Lot of comments here, many good, so I'll try not to duplicate, but: 1. Emacs is a hurdle, but one that's worth it when you use SLIME. 2. I went through Barski's "Land of Lisp" and enjoyed it, but couldn't get the web server to work, so I tweaked it to use Hunchentoot[0] [0] - https://github.com/npsimons/land-of-lisp-using-hunchentoot/c...

landoflisp.com mirrors: https://web.archive.org/web/20180113072302/http://landoflisp... https://archive.is/1WIG8

Why? The original site is still up.

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

#187

Earlier quoted context omitted.

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.

Exactly. Functional programming is pretty much all about being very mindful of when to use state vs pure functions.

Using state is not functional programming, so you're really saying that functional programming is all about being mindful when to use functional programming versus when to abandon functional programming.

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

#188
post #6

Is there a good argument against Clojure in this case? My impression is that it's a good lisp and you can get actual work done in it which is an advantage over some of the other options.

I tried Clojure a bit and, compared to CL, I find it bloated :S Installing a library takes ages, a lot of memory, and I can't do it from the REPL (so I must quit my development environment, and start it again). CL feels very snappy. I can even install a new library to a running web app. I know it's dangerous, but it works and it helped me already :)

Libraries can be installed from the REPL in Clojure but it does require a dependency ahead of time:

https://insideclojure.org/2018/05/04/add-lib/

Some of Clojure's other runtimes perform a bit better, Babashka, CLJS, CLR, GraalVM for different trade offs if you need something like a scripting language or native images etc

I'm sure CL is still quicker but there are options

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

#189

Earlier quoted context omitted.

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.

also ugly :)

Even uglier

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

#190

Earlier quoted context omitted.

>Is there a good argument against Clojure in this case? I use Common Lisp and my main argument will be that Clojure isn't an "interactive programming" language like Common Lisp, Smalltalk (and Pharo, Squeak, Scratch) are. And, for me, this is removing one of the main, core advantages of Lisp. Dispensing with the interactive programming features is, IMO, a step backwards in the state-of-the-art. Common Lisp ADDED all…

Clojure is quite capable in interactive programming, through its REPL, so you must be talking about the lack of a condition system in the clojure core. But Common Lisp features like the condition system are already available in Clojure by just requiring (loading) the respective library. :) As an example, see https://github.com/clojureman/special . Nice thing about this repo is that it points to other options re. cond…

What i'm talking is about the following:

- Able to easily modify (and recompile) a function while your code is running

- Able to redefine a class and then change existing instances so they use the new class definition

- Able to sabe the complete running state of the system (the "image" of the system, including state of all variables, data, loaded libraries, compiled functions, etc) into a file so it can be restarted later, just like Smalltalk does.

- Able to inspect any stack frame at will and to restart execution from any chosen stack frame

These are just a few of the feature that Common Lisp has and that are part of what an "interactive language" is. Common Lisp brings all these features, they work seamlessly, without any sweat, working reliably and efficiently.

Post reply on HN