Live data from Hacker News

Ask HN: Best Lisp for software development?

news.ycombinator.com

31–40 of 138 posts

Re: Ask HN: Best Lisp for software development?

#31
post #15

Clojure most likely. Why don't you want to dig into the JVM, it's arguably the best production runtime out there. You could always try ClojureScript on Node.JS or even ClojureCLR. That said, I have to ask again why the hesitation to rely on the most battle tested most invested in runtime ever built, which is the JVM?

Was thinking the same thing. Seems people conflate java with the jvm. The jvm is almost as cool as the beam. Which got me thinking about the lfe, since we are in lisp land.

There’s also Clojerl for BEAM.

Re: Ask HN: Best Lisp for software development?

#32
post #4

My personal choice would be Clojure. I learned Racket and Common Lisp but haven't used them build something production-grade yet. I don't even know how to properly build, deploy and monitor a Racket server yet. Racket is good but the toolchain and libraries are far behind Clojure. Especially Cider and Cursive are so great, and for libraries, there are a lot of solid ones like Ring/Compojure, interesting things like D…

Am I wrong for saying that the Clojure community has not yet achieved consensus for things as simple as a build system? In some ways that seems like there would be more up-and-going friction than the JS build world.

Doesn’t JS have basically the exact same thing going as leiningen vs boot in npm vs yarn?

Re: Ask HN: Best Lisp for software development?

#33
The existence proofs for production code for both Clojure and Common Lisp have been done. That is, large teams, large programs, and making money. I'd point you towards either one.

Both have "modern" toolchains, testing and CI support, etc., depending exactly on what you mean by that. I suggest whatever you pick to spend some time trying out a few different workflows though (some of which may hail from before you were born yet still feel great) rather than deciding something based on what seems "modern" from your past experience. There was a time when Clojure was "just another jar" to sneak into an enterprise Java app and introduce a bit of sanity. It wasn't "modern" then, lein didn't even exist, but it was still worth doing for a lot of people. Similarly there's a lot of CL code out there that just chucks stuff into a single script-like file instead of doing things "the correct" way (the author might even expect you to use e.g. SBCL with the --script flag, which will do something very similar to what Python does when you pass a filename to it instead of launching it on its own), just like a lot of Python code out there chucked into a single file, but it can still be useful and perhaps appropriate for a particular production task.

For CL I've recommended this booklet before: https://www.darkchestnut.com/book-common-lisp-application-de... It helps you quickly get setup into one (of many possible) modern-feeling professional flows (by Java standards at least, which you'll also find following the default lein flow on the Clojure side) with a suggested project layout, a version-pinned library-dependencies definition file, and a single-step source-to-exe process via a simple Makefile that's little more than a wrapper around a simple shell script which would expose functions like all() or clean() as commands.

To add a bit more after reading some other replies, it's notable that Common Lisp has multiple implementations to choose from (some open source, some not) and if you're following the ANSI standard (or using various trivial-x or de-facto standard libraries) they can all run your code so you can change implementations rather easily later on if you have a reason to. (There's also an implementation that works well when you need to integrate with C++, and of course a JVM implementation if you do decide you want something in that ecosystem.) Clojure has no standard, it is whatever the on-JVM implementation implements, which has in the past changed and may change again (though the creator has ranted against doing that in general, we'll see if usage of "spec" can continue without changes though) and alter your program's behavior. There's a popular on-JS implementation (if you're looking to write production front-end app code I'd highly recommend getting into ClojureScript over any other Lisp) and a less popular on-.NET implementation, they'll both for the most part run pure Clojure code, but there are a lot of non-portable bits.

Re: Ask HN: Best Lisp for software development?

#34
post #4

My personal choice would be Clojure. I learned Racket and Common Lisp but haven't used them build something production-grade yet. I don't even know how to properly build, deploy and monitor a Racket server yet. Racket is good but the toolchain and libraries are far behind Clojure. Especially Cider and Cursive are so great, and for libraries, there are a lot of solid ones like Ring/Compojure, interesting things like D…

Am I wrong for saying that the Clojure community has not yet achieved consensus for things as simple as a build system? In some ways that seems like there would be more up-and-going friction than the JS build world.

JS is way from settled. There was grunt and gulp before, and there are Webpack, Parcel, RollUp, Pika etc.

Re: Ask HN: Best Lisp for software development?

#36
post #4

My personal choice would be Clojure. I learned Racket and Common Lisp but haven't used them build something production-grade yet. I don't even know how to properly build, deploy and monitor a Racket server yet. Racket is good but the toolchain and libraries are far behind Clojure. Especially Cider and Cursive are so great, and for libraries, there are a lot of solid ones like Ring/Compojure, interesting things like D…

Am I wrong for saying that the Clojure community has not yet achieved consensus for things as simple as a build system? In some ways that seems like there would be more up-and-going friction than the JS build world.

Lein, boot, and clj are simple tools. Choosing one does not tie you to any other particular choice.

You could pick one and switch to the other after 15 minutes reading.

Re: Ask HN: Best Lisp for software development?

#37
post #4

My personal choice would be Clojure. I learned Racket and Common Lisp but haven't used them build something production-grade yet. I don't even know how to properly build, deploy and monitor a Racket server yet. Racket is good but the toolchain and libraries are far behind Clojure. Especially Cider and Cursive are so great, and for libraries, there are a lot of solid ones like Ring/Compojure, interesting things like D…

Exactly. You "have to" deal with Java for Clojure about as much as you "have to" deal with C for Python, or C++ for Node.js. The implementation leaks for some dependencies, and it is easy to drop down into the lower language, but you can avoid knowing much about it.

Not understanding Java at all would seem to limit your choice of libraries, understanding of performance, and even usage of language features that directly rely on calling Java.

In theory you could but your experience won't be optimal.

Re: Ask HN: Best Lisp for software development?

#38
post #4

My personal choice would be Clojure. I learned Racket and Common Lisp but haven't used them build something production-grade yet. I don't even know how to properly build, deploy and monitor a Racket server yet. Racket is good but the toolchain and libraries are far behind Clojure. Especially Cider and Cursive are so great, and for libraries, there are a lot of solid ones like Ring/Compojure, interesting things like D…

Ref: https://github.com/topics/clojure

Re: Ask HN: Best Lisp for software development?

#39
post #4

My personal choice would be Clojure. I learned Racket and Common Lisp but haven't used them build something production-grade yet. I don't even know how to properly build, deploy and monitor a Racket server yet. Racket is good but the toolchain and libraries are far behind Clojure. Especially Cider and Cursive are so great, and for libraries, there are a lot of solid ones like Ring/Compojure, interesting things like D…

Am I wrong for saying that the Clojure community has not yet achieved consensus for things as simple as a build system? In some ways that seems like there would be more up-and-going friction than the JS build world.

Not exactly, it doesn't have a single build tool, but its build mechanisms have never diverged and have remained the same since the beginning.

Everything is packaged together in an UberJar or a Jar. The former can just be dropped on a host and ran, it contains everything needed to run. The latter is meant when packaging a library, it includes only your code, excluding all dependencies. Maven is used for distribution, Maven central and Clojars are the main repositories used for open source.

So there's no issue of compatibility or confusion in how to package and distribute programs or libraries.

But you have the choice between a few different frameworks for writing your build scripts and build pipelines. You can even just roll your own (seriously, rolling your own would take less than a week).

Because of this, there isn't any friction, just choice of multiple ways to define your build steps. So you can choose your favorite style, declarative with Lein, functional with Boot, or Unix-like with tools.deps.

Choice is everywhere in Clojure though, there's always a multitude of options for everything which can most of the time easily be combined together seamlessly and made to work together pretty simply. This choice attracts experienced devs, but turns off lesser experienced devs. It doesn't help that everything always continues to work, as backward compatibility is taken very seriously. So choice can be overwhelming, be prepared for that if you journey in Clojure. You'll have to make decisions of your own, and owe up to them.

Re: Ask HN: Best Lisp for software development?

#40

Earlier quoted context omitted.

Am I wrong for saying that the Clojure community has not yet achieved consensus for things as simple as a build system? In some ways that seems like there would be more up-and-going friction than the JS build world.

Doesn’t JS have basically the exact same thing going as leiningen vs boot in npm vs yarn?

Not really no. Lein and boot don't read from the same project declaration file and clj adds another way to declare dependencies through dep.edn files. A previous poster was being very optimistic when they said you could switch from one to another in fifteen minutes.

On the other hand using yarn or npm is almost completely interchangeable for the vast majority of workflows. The only thing one should be careful about with regards to them are project lock files. Otherwise most of the user facing differences are more about form rather than functionality.

Post reply on HN