Live data from Hacker News

Clojure 1.9 is now available

blog.cognitect.com

91–100 of 121 posts

Re: Clojure 1.9 is now available

#91

Earlier quoted context omitted.

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).

Clojure as a data-oriented language is great in itself, but I can see why someone would choose say R or Python for BI/data science due to the ecosystem. Clojure can of course freeride on the Java or JS ecosystems, but I don't think those ecosystems offer the same breadth as R or Python either.

Try Hy (http://hylang.org) - an excellent Clojure-like Lisp in Python.

Re: Clojure 1.9 is now available

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

> 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. It's the same question I make myself, since after learning Clojure here I am, still using Common Lisp happily ever after. Well, if you think that data should be immutable by default, if you really need readymade syntax sugar for hash table and the likes, if you don't have any need for object o…

A small detail - Clojure has 20,000 libraries of its own. See http://clojars.org .

Re: Clojure 1.9 is now available

#93

Earlier quoted context omitted.

At the moment, most of the things that are spec'ed in the box are the gnarly macro "languages" like destructuring, defn, ns, etc. These spec'ed macros do catch a far more complete set of error messages than the macro did with custom error handling. However, those error messages are in many case more challenging to read than before. This is an area of ongoing research - the reasons for the complexity are varied. In ge…

Do you have an idea of how far along clojure.spec is for a stable, non-alpha/beta release? clojure.spec is by far the most interesting and compelling reason for me to check out Clojure. I would also love for it to apply to ClojureScript as well, although I understand that's a separate project.

You should try it now - the API has been out and stable for over a year. While it may change slightly, there is no reason not to use it now. https://clojure.org/guides/spec

The ClojureScript version of spec is largely API-compatible as well so the same specs should work in both.

Re: Clojure 1.9 is now available

#94

Earlier quoted context omitted.

More disillusionment than condescending. I jumped on learning Clojure waiting for big, nice surprises, new stuff, or an enlightening moment, but there wasn't any. I do, however, find it easy to learn and that's a good thing. On the other hand i am not really knocking down Clojure. If somebody wants me to do a project that requires interacting with lots of Java classes, I'm really glad Clojure exists, since it liberat…

I think your description is fair, although I feel like you could have started with the Clojure/ClojureScript combo for making SPAs in your first comment. That is really the biggest driver of Clojure right now, the fact that it has a mature compile-to-JS implementation that can share source code with the backend.

I think ClojureScript is very nice and I often recommend it to any Javascripter.

I sincerely thank Hickey for liberating us from Java and plain Javascript. I think that if Clojure was pitched more as substitutes of Javaxx and less as "the improvement over Lisp", many of us Lispers would be happy. As I mentioned, it isn't an improved Lisp; it is a different language with a different (valid) philosophy which some will like.

Re: Clojure 1.9 is now available

#96

Earlier quoted context omitted.

Well, for the first time since the langauge was created you can now do `brew install clojure`, and then `clj` on the commandline and get a repl. I would have loved something that painless when I was learning Clojure.

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

Installing leiningen is not trivial on all platforms (Eg: Windows).Even on Linux distro repos may contain older versions of leiningen that subtly break things. Perhaps it would be better if leiningen is part of closure distribution rather than existing as separate entity.

Re: Clojure 1.9 is now available

#98
post #92

Earlier quoted context omitted.

> 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. It's the same question I make myself, since after learning Clojure here I am, still using Common Lisp happily ever after. Well, if you think that data should be immutable by default, if you really need readymade syntax sugar for hash table and the likes, if you don't have any need for object o…

A small detail - Clojure has 20,000 libraries of its own. See http://clojars.org .

Npm (javascript's NPM) has over 500,000 libraries right now. Do this makes JS a better language than Clojure, or a better choice? No way. And everytime some javascript fan would go against Clj/ClojureScript use citing "Clojure has 25x less libraries", i will defend Clojure.

How many libs do we really need? So far i have found all libs I needed for Common Lisp. Many of them have high quality, at least in the sense that the code is easy to understand.

Most needed stuff is there - db access, key/value store, cryptography, authentication, html templating, JSON, xml, web servers, software transactional memory, parallelization, compression, networking, foreign interfaces, music, midi, all sorts of data structures, and of course tons of AI related stuff. This is not like NPM where there is a lib solely dedicated solely to left-padding a string, and when you take down this lib the whole ecosystem collapses big-time (true story).

Also, just as Clojure can easily call Java code and thus have access to the huge and mature Java lib ecosystem, also Common Lisp can very easily (see 'CFFI') access the huge and mature C lib ecosystem, mind you, and this feature is leveraged a lot in CL. This also has performance benefits, since tuned Lisp code is as fast as tuned Java code, but C can often go faster. With ABCL (JVM implementation of Common Lisp), you can even call Java libs and C libs in the very same source code, which I find amazing.

Re: Clojure 1.9 is now available

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

Associative data structures (maps / dicts) are super first-class in Clojure, in a way that they aren't in other Lisp-1's (at least from what I remember of dabbling in Racket). There's a literal syntax for them. Keywords are functions that you can call with a map as an argument. You can destructure them in `let` bindings. And so on. In my opinion, this turns out to be a pretty major win. Code is still data, it's just…

> Associative data structures (maps / dicts) are super first-class in Clojure

“First-class”, you keep using that word. I do not think it means what you think it means. See here for the details: https://en.wikipedia.org/wiki/First-class_citizen . tl;dr: First-class-ness is about semantics, not syntax. And, while every language (including Racket) is broken in some ways, it's not broken enough for associative data structures to be inexpressible in it.

> There's a literal syntax for them.

Why does this matter in a language with macros anyway?

Re: Clojure 1.9 is now available

#100
I'm disappointed that spec didn't get beyond alpha for this release. This worries me a little just because in the past a lot of stuff in Clojure releases has felt abandoned after a while - transducers were new in 1.8, but couldn't use the parallelism of 1.7's reducers (do we use them still?!) because of the way stateful transducers worked. I don't see this having been worked upon for this release.

As it is, spec is pretty slow, and the implementation is a massive black box, with a ton of `(case op...)` on the inside making it almost impossible to extend in any sensible way for the moment. Beyond that I'm still really not clear on what the workflow with spec is supposed to be. I just don't verify code in the repl and then move on with my life, and there's no clear guidance on what a productive developer workflow for this stuff is. It doesn't help when every example of generative testing I see online omits the bit where you actually check a function does what it's supposed to.

Anyway, love Clojure still, but in a way it feels like an ongoing dialogue that's over my head, rather than a programming language.

Post reply on HN