Live data from Hacker News

Clojure 1.9 is now available

blog.cognitect.com

101–110 of 121 posts

Re: Clojure 1.9 is now available

#101

Earlier quoted context omitted.

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 struc…

>> There's a literal syntax for them.

> Why does this matter in a language with macros anyway

If you don't have this, you end up with a bunch of read table syntaxes for the same thing. These usually don't play nicely together. See Common Lisp libraries (since CL doesn't provide this syntax in the standard) for all the subtly incompatible hash table read syntaxes and printer implementations you can stomach.

Re: Clojure 1.9 is now available

#102
post #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 p…

> do we use (reducers) still?!

Yes, for the reason you cite: parallelism. See Alex Miller's recent comment here:

https://clojureverse.org/t/reducers-what-are-they-for/1054/3

> it feels like an ongoing dialogue that's over my head

There's always Haskell:

https://www.youtube.com/watch?v=6GNDzrgFhGM&t=23m34s

Re: Clojure 1.9 is now available

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

That's right spec is a runtime thing.

This Spectrum thing purports to evaluate your specs at compile time though:

https://github.com/arohner/spectrum

Re: Clojure 1.9 is now available

#104
post #101

Earlier quoted context omitted.

> 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 struc…

>> There's a literal syntax for them. > Why does this matter in a language with macros anyway If you don't have this, you end up with a bunch of read table syntaxes for the same thing. These usually don't play nicely together. See Common Lisp libraries (since CL doesn't provide this syntax in the standard) for all the subtly incompatible hash table read syntaxes and printer implementations you can stomach.

The solution to this specific problem is library standardization, not hardcoding more data structures into the core language.

Re: Clojure 1.9 is now available

#105

How is debugging support nowadays? Does it allow to spawn a repl at point of exception and examine locals? Is the Emacs based tooling become more refined?

  clojure.core.server/start-server
Will start a socket REPL at any point in your Clojure program.

Unravel is a terminal-based REPL client you can use to connect to that REPL:

https://github.com/Unrepl/unravel

Alternately, for a smooth interactive development experience, including the ability to set breakpoints on lines, there is Cursive:

https://github.com/cursive-ide/cursive

Cursive is a plugin for IntelliJ. There's a free community edition of IntelliJ that works great.

Re: Clojure 1.9 is now available

#106
post #65
post #35

Earlier quoted context omitted.

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…

Hey, if you're anywhere near Melbourne, check out Swarmify! We use Clojure(Script).

Re: Clojure 1.9 is now available

#107

Earlier quoted context omitted.

Well that was condescending.

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…

Clojure's just a bunch of specific pragmatic decisions bunged into a Lisp. If you've never had a problem selling, deploying and integrating Common Lisp apps for clients then it sounds like it would be of dubious utility to you. People will argue all your individual points because that's what people do, but honestly, you're fine, Clojure's fine, everyone's fine.

Re: Clojure 1.9 is now available

#108

Earlier quoted context omitted.

>specs can be used at runtime as well. What do you mean "as well"? I thought it was only a runtime check at all.

i think they're talking about production run time versus development runtime. think of it as turning asserts off on production builds. but spec can conform data and explain the reason for non-conformance so some might leave some spec in production for logging, messages, etc.

^^ this, using spec at run time in your actual application logic

Re: Clojure 1.9 is now available

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

It cannot fetch jars from maven though, you still need lein for that.

Re: Clojure 1.9 is now available

#110
post #39

Earlier quoted context omitted.

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

It cannot fetch jars from maven though, you still need lein for that.

It can fetch jars from Maven.
Post reply on HN