Re: [ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread Tommi Reiman
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

perjantai 8. syyskuuta 2017 0.48.51 UTC+3 Alex Miller kirjoitti:
>
> Clojure 1.9.0-alpha20 is now available.
>
> Try it via
>
> - Download: 
> https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha20
> - 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
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure core documentation

2017-09-08 Thread Matching Socks
The question of markup has tended to attract many far-sighted suggestions 
that turn it into a bike shed. Luckily, the undertaking needs no blessing.

Clojure's doc strings change infrequently, if ever! Someone may set forth a 
markup language and create a fork with marked-up doc strings, and 
tool-wrights may substitute them for the matching unmarked originals on the 
fly. 

Perhaps if done consistently with the Contributor Agreement the markup 
could eventually be merged in, but, on the other hand, perhaps lasting 
advantages would be found in the outboard arrangement.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread Nicola Mometto
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.

On 8 Sep 2017 8:03 a.m., "Tommi Reiman"  wrote:

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

perjantai 8. syyskuuta 2017 0.48.51 UTC+3 Alex Miller kirjoitti:
>
> Clojure 1.9.0-alpha20 is now available.
>
> Try it via
>
> - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-
> alpha20
> - 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
>
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@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 clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread Alex Miller
On Thu, Sep 7, 2017 at 10:20 PM, Bill Robertson 
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

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using memory with futures

2017-09-08 Thread Max Muranov

>
> You can probably also avoid the 60- to 80-second wait if you call 
> (shutdown-agents) at the end of your program.
>

My program is endless =)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread Joel Holdbrooks
Are there any plans to make the ## reader macro extensible in the future?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread Alex Miller
On Fri, Sep 8, 2017 at 2:17 PM, Joel Holdbrooks 
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.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread rob
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?

On Friday, September 8, 2017 at 12:27:02 PM UTC-7, Alex Miller wrote:
>
>
> On Fri, Sep 8, 2017 at 2:17 PM, Joel Holdbrooks  > 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. 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread Alex Miller
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. 

On Friday, September 8, 2017 at 3:48:50 PM UTC-5, rob wrote:
>
> 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?
>
> On Friday, September 8, 2017 at 12:27:02 PM UTC-7, Alex Miller wrote:
>>
>>
>> On Fri, Sep 8, 2017 at 2:17 PM, Joel Holdbrooks  
>> 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. 
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0-alpha20

2017-09-08 Thread Jeaye
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.

On Fri, Sep 08, 2017 at 12:11:38PM +0100, Nicola Mometto wrote:
> 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.
> 
> On 8 Sep 2017 8:03 a.m., "Tommi Reiman"  wrote:
> 
> 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
> 
> perjantai 8. syyskuuta 2017 0.48.51 UTC+3 Alex Miller kirjoitti:
> >
> > Clojure 1.9.0-alpha20 is now available.
> >
> > Try it via
> >
> > - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-
> > alpha20
> > - 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
> >
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@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 clojure@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+unsubscr...@googlegroups.com
> For more options, visit thi