Live data from Hacker News

Clojure 1.7 is now available

blog.cognitect.com

61–70 of 125 posts

Re: Clojure 1.7 is now available

#61
post #54
post #50

Earlier quoted context omitted.

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Is the job simpler because Clojure is not statically typed?

Probably, more because its a lisp, whereas Scala was more of a fundamentally new language that isn't a member of such a well-studied family, but instead was led by inspiration from lots of different places, and has a lot more work in shaking out how to reconcile those influences into a coherent whole.

Though Scala being not merely statically typed by aimed at both interoperating with Java's type system and supporting a more robust and powerful type system than Java does did pose particular challenges.

Re: Clojure 1.7 is now available

#62
post #54
post #50

Earlier quoted context omitted.

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Is the job simpler because Clojure is not statically typed?

Part of it is that the standard library API has been stable for years, where new things are added but no breaking changes are introduced.

The second reason is that Clojure libraries are typically shipped as source. This avoids the whole binary compatibility problem you see in Scala. Typically, you only compile the end applications to byte code.

Re: Clojure 1.7 is now available

#63
post #50

I'm really impressed by how backwards compatible it is. I just changed the Clojure version from "1.6.0" to "1.7.0" for one of my side projects, without updating any library versions, ran it, all the tests passed, and it seems to work perfectly. It also didn't break my Emacs setup, which is a breath of fresh air compared to how much work it was to get the Haskell tooling working with the new 7.10 GHC release (GHC-mod…

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Scala's minor versions don't break compatibility. A year ago Scala 2.11 (major) was being released, which means you're talking about either 2.10.x or 2.11.x, neither of which broke binary compatibility between minor versions. And major versions usually have source level compatibility, our upgrade from 2.10 to 2.11 being pretty smooth.

The fundamental difference is that Clojure gets distributed as source and not as compiled .class files. Being an interpreted language that gets compiled on the fly does have some advantages. But it also has drawbacks. Startup performance suffers, the Java interoperability story is worse, many tools such as Android's toolchain expect bytecode, etc ...

The problem that Scala has (and also Clojure, as soon as you do AOT) is that Scala's idioms do not translate well into Java bytecode, as Java's bytecode is designed for, well, Java. Therefore even small and source-compatible changes, like adding another parameter with a default value to a method or like adding a method to a trait, can trigger binary incompatibilities.

The plan for Scala is to embed in the .class, besides the bytecode, the abstract syntax tree built by the compiler and then the compiler can take a JAR and repurpose it for whatever platform you want. This is part of the TASTY and the Scala-meta projects. If you think about it it's not that far from what Clojure is doing, except that this is done in the context of a static language that doesn't rely on the presence of an interpreter at runtime. Of course, LISPs are pretty cool. And of course, you'll still need to recompile your projects, but at least then the dependencies won't have to be changed.

Re: Clojure 1.7 is now available

#64
post #54
post #50

Earlier quoted context omitted.

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Is the job simpler because Clojure is not statically typed?

I don't think so. It's because of a strong commitment to users not to introduce breaking changes. I've been mostly using Java and Clojure in recent years, and before that C/C++ and I'm pretty surprised people don't take backwards compatibility for granted, and that there are languages that don't consider it a top priority. (Well, new C++ compiler versions sometimes broke existing code, but that was quite rare)

Re: Clojure 1.7 is now available

#65
post #17

If you want to build a website in Clojure, I highly recommend checking out http://luminusweb.net - the documentation is amazing, and it incorporates nearly all of the best practices I have seen. Making an API in Clojure using Swagger gives you a full, interactive UI and documentation for your API, while also having a schema which makes sure you know what is submitted and that it validates (i.e. is that a string or a…

Luminus author here, thanks for the kind words. :)

As a note making a Swagger app with Luminus is as simple as:

lein new luminus myapp +swagger

cd myapp

lein run

once the server starts, browse to http://localhost:3000/swagger-ui/index.html to see your Swagger API

Re: Clojure 1.7 is now available

#66

>Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the essence of the transformation in terms of an individual element. Because transducers are decoupled from input or output sources, The biggest thing holding me back from learning Clojure is that I fear it will take me a decade to become remotely competent in it.

Clojure is one of the easiest languages to learn. You need to know very few concepts to become productive in it. I get co-op students very 4 months at work and they generally start doing useful stuff within a week or so.

I wrote a conceptual starter guide a little while back ( https://yogthos.github.io/ClojureDistilled.html ), that covers all the basics that you need to know to get up and running.

Re: Clojure 1.7 is now available

#67
post #54
post #50

Earlier quoted context omitted.

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Is the job simpler because Clojure is not statically typed?

No, it's because Scala's dependencies / libraries get distributed as compiled .class files, whereas Clojure's get distributed as source-code. Tried explaining this above: https://news.ycombinator.com/item?id=9807323

Re: Clojure 1.7 is now available

#68
post #50

Earlier quoted context omitted.

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Scala's minor versions don't break compatibility. A year ago Scala 2.11 (major) was being released, which means you're talking about either 2.10.x or 2.11.x, neither of which broke binary compatibility between minor versions. And major versions usually have source level compatibility, our upgrade from 2.10 to 2.11 being pretty smooth. The fundamental difference is that Clojure gets distributed as source and not as co…

> and also Clojure, as soon as you do AOT

Not so much. You can do separate compilation with Clojure to a far greater extent than Scala (perhaps even completely). The Java interfaces of Clojure functions haven't changed in incompatible ways in a very, very long time.

Re: Clojure 1.7 is now available

#69
post #68

Earlier quoted context omitted.

Scala's minor versions don't break compatibility. A year ago Scala 2.11 (major) was being released, which means you're talking about either 2.10.x or 2.11.x, neither of which broke binary compatibility between minor versions. And major versions usually have source level compatibility, our upgrade from 2.10 to 2.11 being pretty smooth. The fundamental difference is that Clojure gets distributed as source and not as co…

> and also Clojure, as soon as you do AOT Not so much. You can do separate compilation with Clojure to a far greater extent than Scala (perhaps even completely). The Java interfaces of Clojure functions haven't changed in incompatible ways in a very, very long time.

That's just the power of good upfront design.

Re: Clojure 1.7 is now available

#70
post #33

Earlier quoted context omitted.

I mean the compilation and startup time that people think lies on the JVM, CLR, Dalvik and ART when trying to run Clojure code.

It sounds like you are referring to various ideas around delayed var loading to improve startup performance - most of that was delayed, although there was one change that improved compilation speed and improves the performance of some projects.

Yeah that was it, thanks.
Post reply on HN