[ANN] Clojure 1.9.0-alpha20

1,537 views
Skip to first unread message

Alex Miller

unread,
Sep 7, 2017, 5:48:51 PM9/7/17
to Clojure
Clojure 1.9.0-alpha20 is now available.

Try it via

- Leiningen: [org.clojure/clojure "1.9.0-alpha20"]

1.9.0-alpha20 includes the following changes since 1.9.0-alpha19:

- CLJ-1074 - (new) add new ## reader macro for symbolic values, and
                   read/print support for double vals ##Inf, ##-Inf, ##NaN
- CLJ-1454 - (new) add swap-vals! and reset-vals! that return both old and new values
- CLJ-2184 - (errors) propagate meta in doto forms to improve error reporting
- CLJ-2210 - (perf) cache class derivation in compiler to improve compiler performance
- CLJ-2070 - (perf) clojure.core/delay - improve performance
- CLJ-1917 - (perf) reducing seq over string should call String/length outside of loop
- CLJ-1901 - (perf) amap - should call alength only once
- CLJ-99   - (perf) min-key and max-key - evaluate k on each arg at most once
- CLJ-2188 - (perf) slurp - mark return type as String
- CLJ-2108 - (startup time) delay loading of spec and core specs (still more to do on this)
- CLJ-2204 - (security) disable serialization of proxy classes to avoid potential issue when deserializing
- CLJ-2048 - (fix) specify type to avoid ClassCastException when stack trace is elided by JVM
- CLJ-1887 - (fix) IPersistentVector.length() - implement missing method
- CLJ-1841 - (fix) bean - iterator was broken
- CLJ-1714 - (fix) using a class in a type hint shouldn't load the class
- CLJ-1398 - (fix) clojure.java.javadoc/javadoc - update doc urls
- CLJ-1371 - (fix) Numbers.divide(Object, Object) - add checks for NaN
- CLJ-1358 - (fix) doc - does not expand special cases properly (try, catch)
- CLJ-1705 - (fix) vector-of - fix NullPointerException if given unrecognized type
- CLJ-2170 - (doc) fix improperly located docstrings
- CLJ-2156 - (doc) clojure.java.io/copy - doc char[] support
- CLJ-2051 - (doc) clojure.instant/validated docstring - fix typo
- CLJ-2104 - (doc) clojure.pprint docstring - fix typo
- CLJ-2028 - (doc) filter, filterv, remove, take-while - fix docstrings
- CLJ-1873 - (doc) require, *data-readers* - add .cljc files to docstrings
- CLJ-1159 - (doc) clojure.java.io/delete-file - improve docstring
- CLJ-2039 - (doc) deftype - fix typo in docstring
- CLJ-1918 - (doc) await - improve docstring re shutdown-agents
- CLJ-1837 - (doc) index-of, last-index-of - clarify docstrings
- CLJ-1826 - (doc) drop-last - fix docstring
- CLJ-1859 - (doc) zero?, pos?, neg? - fix docstrings

Jeaye

unread,
Sep 7, 2017, 8:24:49 PM9/7/17
to clo...@googlegroups.com
All of our tests are passing with this, so it looks good to me.

Thanks!
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

signature.asc

Sean Corfield

unread,
Sep 7, 2017, 8:57:02 PM9/7/17
to clo...@googlegroups.com

Likewise. I expect we’ll put this in production early next week.

 

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

Alex Miller

unread,
Sep 7, 2017, 11:09:58 PM9/7/17
to Clojure
If anyone speeds performance issues, that would be good to know. 

Or performance gains! :)  

> For more options, visit this group at

> http://groups.google.com/group/clojure?hl=en

> ---

> You received this message because you are subscribed to the Google Groups "Clojure" group.

> To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to the Google

Groups "Clojure" group.

To post to this group, send email to clo...@googlegroups.com

Note that posts from new members are moderated - please be patient with your first post.

To unsubscribe from this group, send email to

For more options, visit this group at

http://groups.google.com/group/clojure?hl=en

---

You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

Alex Miller

unread,
Sep 7, 2017, 11:14:16 PM9/7/17
to clo...@googlegroups.com
*sees*, not speeds (clearly I'm tired)
Message has been deleted

Didier

unread,
Sep 8, 2017, 1:35:49 AM9/8/17
to Clojure
I like this one, lots of good stuff. Thanks to everyone who contributed.

Tommi Reiman

unread,
Sep 8, 2017, 3:03:14 AM9/8/17
to Clojure
Hi.

The combo:

[org.clojure/clojure "1.9.0-alpha20"]
[org.clojure/clojurescript "1.9.660"]

seems to be emitting broken js:

return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [##NaN,##NaN], null);

With 1.9.0-alpha19 it gives:

return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [NaN,NaN], null);

regards,

Tommi

Nicola Mometto

unread,
Sep 8, 2017, 7:11:54 AM9/8/17
to clo...@googlegroups.com
That looks like a cljs issue, it shouldn't emit NaNs at all there, not relevant to the clojure change around how they are printed. 

--

Alex Miller

unread,
Sep 8, 2017, 11:11:14 AM9/8/17
to clo...@googlegroups.com
On Thu, Sep 7, 2017 at 10:20 PM, Bill Robertson <billrob...@gmail.com> wrote:
Does it run in Java 9?

Excellent question! The short and possibly misleading answer is yes, as do all other 1.9 alphas, and 1.8, and probably earlier versions of Clojure as well *with some important caveats*:

* CLJ-2077 - clojure.core currently uses classes outside the new Java base module (specifically java.sql.Timestamp for #inst support). This is a problem if you place the Clojure jar in the bootclasspath, which lein and (I think) boot both do for faster startup. The lein ticket for this is https://github.com/technomancy/leiningen/issues/2149. There are changes being made in lein to allow this to be more configurable. Additionally, CLJ-2077 is tracking a change in core to defer loading of #inst support if the java.sql.Timestamp class is not available, which would allow Clojure to be loaded from the bootclassloader (without #inst support) again. This fix just missed getting into this alpha, but should be coming in probably the next release.

* CLJ-2066 - there are some cases where reflection can lead to Clojure incorrectly invoking a method from a class in a non-visible module. Avoiding reflection in the first place is probably the best workaround for this, and turning off various module visibility constraints via JVM flags is another. We are working toward a more comprehensive solution to this in CLJ-2066, which I expect to be included in Clojure 1.9.

* Users of dynamic classloaders may experience issues due to the changes in the classloader hierarchy. This is not really a Clojure core issue, but you can encounter it through any tooling that uses dynamic classloaders. More on this here: https://github.com/tobias/clojure-java-9/issues/3


Joel Holdbrooks

unread,
Sep 8, 2017, 3:17:38 PM9/8/17
to Clojure
Are there any plans to make the ## reader macro extensible in the future?

Alex Miller

unread,
Sep 8, 2017, 3:27:02 PM9/8/17
to clo...@googlegroups.com
On Fri, Sep 8, 2017 at 2:17 PM, Joel Holdbrooks <cjhold...@gmail.com> wrote:
Are there any plans to make the ## reader macro extensible in the future?

No. For most data uses you are better served by tagged literals. 

rob

unread,
Sep 8, 2017, 4:48:50 PM9/8/17
to Clojure
Relatedly, what is the rationale for this requiring or benefiting from new syntax, versus using tagged literals for things like Inf & -Inf.  Is it a compiler performance optimization or something like that?

Alex Miller

unread,
Sep 8, 2017, 5:06:14 PM9/8/17
to Clojure
It's a judgement call when to add a new reader type vs when to use a tagged literal. Using the new reader type allows for greater concision for sure (##Inf vs ##double Inf) which seems particularly useful with numbers. It should allow for faster reading, printing, etc. 

Bill Robertson

unread,
Sep 8, 2017, 7:12:45 PM9/8/17
to Clojure
Thank you!

Jeaye

unread,
Sep 8, 2017, 7:54:47 PM9/8/17
to clo...@googlegroups.com
Similar to Tommi, I'm also seeing issues with the new syntax when combined with JS on our front-end:

[org.clojure/clojure "1.9.0-alpha20"]
[org.clojure/clojurescript "1.9.908"]

> SEVERE: my-project/client/target/android/cljs/core.js:3579: ERROR - Parse error. primary expression expected
> case ##Inf:

This is in the definition of cljs.core.hash. It looks like folks using Clojure + ClojureScript should hold off on using alpha20.
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
signature.asc

Daniel Szmulewicz

unread,
Sep 9, 2017, 8:50:07 AM9/9/17
to Clojure
I see this too with [org.clojure/clojure "1.9.0-alpha20"] and clojurescript, leading to errors in test.js.
I had to revert to [org.clojure/clojure "1.9.0-alpha19"].

geraldo dev

unread,
Sep 13, 2017, 8:44:15 PM9/13/17
to Clojure
Thank you!

Sean Corfield

unread,
Sep 13, 2017, 11:14:55 PM9/13/17
to clo...@googlegroups.com

We put it in production on Monday. So far, so good.

 

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

 

Reply all
Reply to author
Forward
0 new messages