Live data from Hacker News

Clojure 1.9 is now available

blog.cognitect.com

61–70 of 121 posts

Re: Clojure 1.9 is now available

#61
post #59

Earlier quoted context omitted.

Last time I looked into Clojure, I found myself frustrated that I was expected to install leiningen, Java, etc. and get it all working together before I could write any code. I like to know how a toolchain works, how libraries are linked, etc. I don't want to rely on "magic" that can be incompatible with alternative "magic". Clojure didn't provide a good low-level interface, and I ended up giving up on it for that re…

I used Clojure before leiningen existed. It's very possible to run Clojure from the command line without it, to specify classpaths yourself, to manage dependencies by hand, even to build an executable JAR. There's not much documentation for doing that stuff though, because (almost) nobody wants to do that. It's painful.

> There's not much documentation for doing that stuff though, because (almost) nobody wants to do that. It's painful.

That is what I encountered when I first tried to learn Clojure.

I essentially gave up at that point. Installing the JRE is enough of a pain on its own.

Re: Clojure 1.9 is now available

#62
post #48

Earlier quoted context omitted.

Do you develop in JavaScript either front or back?

Not when I can avoid it ;) My real work is HPC, but I'm looking at this from a hobby perspective.

I actually don't think Clojure is a good hobby language; it has specific opinions that are there to help you make good design decisions in large scale systems, but in small projects they just get in the way.

Re: Clojure 1.9 is now available

#63

Earlier quoted context omitted.

Leiningen has been incredibly painless: $ brew install leiningen $ lein repl That's literally all it took.

So long as you have leiningen installed. That isn't always trivial.

Sure it is: you can just download and run the script they have on their site: https://raw.githubusercontent.com/technomancy/leiningen/stab...

or for windows: https://raw.githubusercontent.com/technomancy/leiningen/stab...

Re: Clojure 1.9 is now available

#64
post #43
post #42

Is clojure.spec a replacement for static typing? I ask because I've taken a look at clojure in the past and generally like what I see, but after moving from JavaScript to TypeScript at work I don't think I can ever return to a dynamically typed language again. Types are just priceless when refactoring, integrating someone else's code with your own or just exploring new libraries or APIs.

It addresses similar problems as static typing, yes, but it's not a compile time check. Instead, it's an optional runtime check. The idea is to use it during testing and development, and have it be disabled during production.

Its also great at validating data!

We're running some of our specs in production to enforce guarantees on data coming in and out of the app :)

Re: Clojure 1.9 is now available

#65
post #35
post #2

Can anyone sell me on why I should use clojure over say, any of the other nice Lisp-1s, given that I don't care about java.

If you need to force yourself, or if you need extra special motivation to use Clojure .. most likely you will never use it You might spend sometime learning it out of curiosity, but you will never use it The languages I used, are ones I had to use, either because they were the only option, or clearly the best option for my solution (C#, VB.Net, Powershell, SQL) Clojure will never be your only option, and .. it being…

Clojure is the best option for me, on my own projects, because I like it and I'm more productive in it (this applies to Lisp in general, I suppose) than any other language I've tried. And when I'm working alone, that's all that matters :D

Now, when I'm working on a team... I must tell you I live in Florida and if I've ever met another Clojure/Lisp programmer in meatspace I'm not aware of it (and I'd be surprised). In fact, most of the Java developers I work with only really know Java (and some are helpless without Eclipse). So recommending anything that isn't Java probably wouldn't be wise. So, yea.

Re: Clojure 1.9 is now available

#66
post #59

Earlier quoted context omitted.

I used Clojure before leiningen existed. It's very possible to run Clojure from the command line without it, to specify classpaths yourself, to manage dependencies by hand, even to build an executable JAR. There's not much documentation for doing that stuff though, because (almost) nobody wants to do that. It's painful.

> There's not much documentation for doing that stuff though, because (almost) nobody wants to do that. It's painful. That is what I encountered when I first tried to learn Clojure. I essentially gave up at that point. Installing the JRE is enough of a pain on its own.

In case it helps, my app actually bundles an entire Clojure environment (including the JRE) so you don't need anything else installed:

https://sekao.net/lightmod/

Re: Clojure 1.9 is now available

#67
post #34

Earlier quoted context omitted.

The API is still subject to change (alpha) but those changes are not expected to be dramatic at this point.

I'm looking forward to hearing a long-form rational of the :args :ret :fn function instrumenting decisions, and seeing if the devs see it as an easy choice or up for debate. It feels really uncomfortable declaring a full spec for a function & instrumenting it, then getting feedback if the args don't conform to spec but Clojure being A-OK if the return value doesn't. I understand well that in theory the functioning of…

I'm not familiar with Spec, but what you're describing sounds like enforcing preconditions but not postconditions by default, which is what most DbC frameworks (or languages with intrinsic support) normally do. The idea being that most of the time, you're running library code, and you want to validate what you're passing in, but you trust it to do the right thing for any input that is valid.

Re: Clojure 1.9 is now available

#68
post #39

Why focus on command line tools? There's already Leiningen which does an amazing job, and Boot for the few use-cases Leiningen doesn't take care of. Creating another CLI seems very strange.

Because lein is bloated, breaks constantly, and is absolutely overkill if all you want is a REPL and some deps from Maven.

Yea, I literally have never had a problem with leiningen breaking. All people that I know that use Leiningen are also in general very happy with it. Curious what lein-specific problems you've ran into.

Re: Clojure 1.9 is now available

#69
post #2

Can anyone sell me on why I should use clojure over say, any of the other nice Lisp-1s, given that I don't care about java.

+ exceptionally well designed "immutability by default": reduces accidental complexity to a minimum and lets you focus on the problem at hand

+ ClojureScript: allows you to write Clojure for any JavaScript platform (web, ReactNative iOS/Android, node.js) while writing 97% the same language excluding any platform-specific differences between the JVM and the JavaScript runtimes (V8, JavaScriptCore, etc)

+ piggyback on the entire mature+stable+performant JVM ecosystem of

... + tools (Maven >> npm, cocoapods, et al)

... + libraries (Netty, JodaTime, etc)

Re: Clojure 1.9 is now available

#70
post #35
post #2

Can anyone sell me on why I should use clojure over say, any of the other nice Lisp-1s, given that I don't care about java.

If you need to force yourself, or if you need extra special motivation to use Clojure .. most likely you will never use it You might spend sometime learning it out of curiosity, but you will never use it The languages I used, are ones I had to use, either because they were the only option, or clearly the best option for my solution (C#, VB.Net, Powershell, SQL) Clojure will never be your only option, and .. it being…

I'm quite surprised by your conclusion that Clojure "is not the best option" for Business Intelligence. What general purpose language is better for that in your opinion?

There's a difference between "best tool for the job" and "most widely used tool for the job" at this moment in time. People's habits sometimes take years or decades to break (if they ever do).

Post reply on HN