Hacker News new | ask | show | jobs
by slgeorge 1687 days ago
I've been messing with Clojure/ClojureScript for a few years having previously had zero Lisp experience. Overall, I think Clojure does a good job of being both practical and lispy. It's a language that is for building real things.

I've been focusing on ClojureScript (https://clojurescript.org/) as you get the benefit of interoperating with the Javascript ecosystem. The fact that there's a strong community around both Javascript hosted and Java hosted gives a wealth of library options.

Overall, the tooling has been getting a lot closer to the sort of experience that contemporary developers expect. The Calva plugins integration with Visual Studio (https://calva.io/) makes it easy to get started - you can even run it online with gitpod (https://github.com/PEZ/rich4clojure).

That just leaves learning the language - the slight changes in syntax (brackets for different data types) definitely help early on, and for the most part Clojure discourages people going down the path of macros which means reading other peoples code is reasonably accessible. The main struggle is that it's a language used by a lot of advanced or full-time developers, so documentation is pretty dense and it can take a real commitment to understand the detail.

It may not be 'correct' enough if you're coming from other Lisps, but coming the other way from C/Python etc I've found it an accessible and practical option.

3 comments

> Overall, I think Clojure does a good job of being both practical and lispy. It's a language that is for building real things.

As opposed to? Common Lisp and Emacs Lisp are both highly practical. Scheme you might call more academic, but that's not really what people think of when they say "Lisp".

CL is not really highly practical. The stdlib is not very coherent and lackluster in general (do I really need to import external code to split a string?), the commonly accepted package manager is in an eternal beta limbo, the whole QL/ASDF/... thing is clumsy, parallel/concurrent libraries are very low-level, etc.

Now SBCL in itself is rock-solid and a fantastic experience when used with emacs, but the CL ecosystem is insufficient to qualify as “highly practical”.

IMHO, the most practical lispy language is Racket: tight language, excellent stdlib, easy to package and deploy, and a development experience that worse than CL but good enough.

The commercial Common Lisp I use, also has large amounts of extensions to CL. Including a function to split sequences/strings, parallel and concurrent extensions, ... ;-) It's actually the same commercial Common Lisp which Rich Hickey used years ago to write his first Lisp programs and where he developed his first ideas for Clojure.
Are you working under an NDA or something? Are you being threatened? Blink three times if you need help.

Seriously, is there a reason you have to hint about what Lisp you use?

I just didn't want it to sound like an advertizement.

If you are interested, I'm using LispWorks <http://www.lispworks.com>. The other large commercial Common Lisp implementation is Allegro CL <https://franz.com/products/allegro-common-lisp/>.

Is there a reason you can't ask politely?
Because I thought it was funny, and I'm pretty sure lispm has enough sense of humor not to need a valiant protector today.
There are about two of them anyway.
I wasn't trying to set up an "opposition" on the language level in my sentence. The decision was couched in my personal constraints - whether "as a hobbyist" it was practical for me to learn the language successfully. And, having done so would it have the capabilities so I can build things that I'm interested in. For me personally, I like to have plenty of 'similar code' so that I can see what other people do. I was comparing this with a more academic approach which I've seen many Lisp learners enjoy - for example going through the Structure and Interpretation of Computer Programs (SICP). Other languages I looked at and seemed interesting were Elm and Racket - no particular reason why they didn't stick.

I suspect a lot of the dynamics of my choice are because I wasn't coming from any sort of Lisp background previously. If you were coming from Common Lisp then things would feel different.

Visual Studio Code, and yes Calva is nice.
I've read that Clojure(Script) has a great REPL experience. Even when using VSCode, can one use the REPL easily?
Yes, it looks like Calva has first-class support for launching REPLs from your project, or for attaching itself to a REPL session that was launched in some other way: https://calva.io/connect/
Yes, you can. It's all pretty seamless with Calva & VS Code.
I can confirm that, Calva enabled me to get comfortable enough with the whole ecosystem to actually start with experimental projects.

I fully plan on making it my main language for my own projects, with that being Java and the web stack at the moment.