Re: [ANN] Clojure 1.10.0-beta7

2018-11-20 Thread Alex Miller

On Tuesday, November 20, 2018 at 5:50:13 PM UTC-6, Matching Socks wrote:
>
> For those keeping score at home, the CLJ-2436 patch says, 
>
>  (defn- typeref->class
> -  [typeref classloader]
> +  ^Class [typeref classloader]
>(if (class? typeref)
>  typeref
> -   (clojure.lang.RT/classForName (typename typeref) false classloader)))
> +(clojure.lang.RT/classForName (typename typeref) false classloader)))
>
>
> I was wondering why the compiler required the type hint.  
>

Without the type hint the compiler assumes the return type of 
typeref->class is Object. Later code that uses that return value does Java 
interop and so it was reflecting. Adding the type hint is sufficient to 
tell the consumer what it's returning.
 

> It reminded me of something I had seen in the news recently, regarding 
> ClojureScript.  The ClojureScript changes.md lists "CLJS-1997: Outward 
> function type hint propagation".  That issue, in turn, has an informative 
> comment (Thanks, Mike Fikes!) about *Clojure*:
>
> Bronsa helpfully pointed out in Slack that outward type hint propagation 
> is avoided in Clojure because it breaks things like:
>
> (defn foo [] 1)
> (defn bar [] (String/valueOf (foo)))
> (defn foo [] "foo")
> (bar)
>
>
 

-- 
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.10.0-beta7

2018-11-20 Thread Matching Socks
For those keeping score at home, the CLJ-2436 patch says, 

 (defn- typeref->class
-  [typeref classloader]
+  ^Class [typeref classloader]
   (if (class? typeref)
 typeref
-   (clojure.lang.RT/classForName (typename typeref) false classloader)))
+(clojure.lang.RT/classForName (typename typeref) false classloader)))


I was wondering why the compiler required the type hint.  It reminded me of 
something I had seen in the news recently, regarding ClojureScript.  The 
ClojureScript changes.md lists "CLJS-1997: Outward function type hint 
propagation".  That issue, in turn, has an informative comment (Thanks, 
Mike Fikes!) about *Clojure*:

Bronsa helpfully pointed out in Slack that outward type hint propagation is 
avoided in Clojure because it breaks things like:

(defn foo [] 1)
(defn bar [] (String/valueOf (foo)))
(defn foo [] "foo")
(bar)


-- 
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: Confused by a bit of syntax-- Clojure(script) or Hiccup?

2018-11-20 Thread Randy J. Ray
Thanks for the pointer! My mistake was looking for this in the source-- had
I ack'd over the doc/ directory I would have found it!

Randy

On Tue, Nov 20, 2018 at 12:49 PM Justin Smith  wrote:

> I'll add that I knew this, but it took me longer than I expected to
> actually find the documentation to point to. I don't know how a new user of
> the library would be expected to discover what that symbol means.
>
> On Tue, Nov 20, 2018 at 12:43 PM Justin Smith 
> wrote:
>
>> :> is a valid Clojure keyword, but has no special meaning on its own.
>>
>> In Reagent's version of the Hiccup DSL, :> introduces a Reagent component
>> defined from a React component
>>
>> https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md#creating-reagent-components-from-react-components
>>
>> On Tue, Nov 20, 2018 at 11:27 AM Randy J. Ray 
>> wrote:
>>
>>> I've been trying to read through and understand the examples in the
>>> reagent repo, and I've come across something that I just don't quite get:
>>>
>>> :>
>>>
>>> I've looked over all the docs for Clojure, Clojurescript and Hiccup, but
>>> find no reference to this. It appears as the first element in vectors in a
>>> context that leads me to think it's part of Hiccup. But I'm expecting
>>> keywords like ":div", ":p", etc. The ":>" sequence, I guess I'm just not
>>> quite getting it?
>>>
>>> Randy
>>> --
>>> Randy J. Ray - randy.j@gmail.com - twitter.com/rjray
>>> Silicon Valley Scale Modelers: http://www.svsm.org
>>> San Jose, CA
>>>
>>> --
>>> 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.
>


-- 
Randy J. Ray - randy.j@gmail.com - twitter.com/rjray
Silicon Valley Scale Modelers: http://www.svsm.org
Sunnyvale, CA

-- 
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: Confused by a bit of syntax-- Clojure(script) or Hiccup?

2018-11-20 Thread Justin Smith
I'll add that I knew this, but it took me longer than I expected to
actually find the documentation to point to. I don't know how a new user of
the library would be expected to discover what that symbol means.

On Tue, Nov 20, 2018 at 12:43 PM Justin Smith  wrote:

> :> is a valid Clojure keyword, but has no special meaning on its own.
>
> In Reagent's version of the Hiccup DSL, :> introduces a Reagent component
> defined from a React component
>
> https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md#creating-reagent-components-from-react-components
>
> On Tue, Nov 20, 2018 at 11:27 AM Randy J. Ray  wrote:
>
>> I've been trying to read through and understand the examples in the
>> reagent repo, and I've come across something that I just don't quite get:
>>
>> :>
>>
>> I've looked over all the docs for Clojure, Clojurescript and Hiccup, but
>> find no reference to this. It appears as the first element in vectors in a
>> context that leads me to think it's part of Hiccup. But I'm expecting
>> keywords like ":div", ":p", etc. The ":>" sequence, I guess I'm just not
>> quite getting it?
>>
>> Randy
>> --
>> Randy J. Ray - randy.j@gmail.com - twitter.com/rjray
>> Silicon Valley Scale Modelers: http://www.svsm.org
>> San Jose, CA
>>
>> --
>> 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: Confused by a bit of syntax-- Clojure(script) or Hiccup?

2018-11-20 Thread Justin Smith
:> is a valid Clojure keyword, but has no special meaning on its own.

In Reagent's version of the Hiccup DSL, :> introduces a Reagent component
defined from a React component
https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md#creating-reagent-components-from-react-components

On Tue, Nov 20, 2018 at 11:27 AM Randy J. Ray  wrote:

> I've been trying to read through and understand the examples in the
> reagent repo, and I've come across something that I just don't quite get:
>
> :>
>
> I've looked over all the docs for Clojure, Clojurescript and Hiccup, but
> find no reference to this. It appears as the first element in vectors in a
> context that leads me to think it's part of Hiccup. But I'm expecting
> keywords like ":div", ":p", etc. The ":>" sequence, I guess I'm just not
> quite getting it?
>
> Randy
> --
> Randy J. Ray - randy.j@gmail.com - twitter.com/rjray
> Silicon Valley Scale Modelers: http://www.svsm.org
> San Jose, CA
>
> --
> 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.


Confused by a bit of syntax-- Clojure(script) or Hiccup?

2018-11-20 Thread Randy J. Ray
I've been trying to read through and understand the examples in the reagent
repo, and I've come across something that I just don't quite get:

:>

I've looked over all the docs for Clojure, Clojurescript and Hiccup, but
find no reference to this. It appears as the first element in vectors in a
context that leads me to think it's part of Hiccup. But I'm expecting
keywords like ":div", ":p", etc. The ":>" sequence, I guess I'm just not
quite getting it?

Randy
-- 
Randy J. Ray - randy.j@gmail.com - twitter.com/rjray
Silicon Valley Scale Modelers: http://www.svsm.org
San Jose, CA

-- 
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.10.0-beta7

2018-11-20 Thread Sean Corfield
Given how small the delta is from Beta 6 to Beta 7, it should surprise no one 
that all our tests pass on Beta 7 at World Singles Networks 

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


From: clojure@googlegroups.com  on behalf of Alex 
Miller 
Sent: Monday, November 19, 2018 1:34:03 PM
To: Clojure
Subject: [ANN] Clojure 1.10.0-beta7

1.10.0-beta7 is now available.

You can try it with clj using:

clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-beta7"}}}'

Changes in 1.10.0-beta7:

  *   CLJ-2435 - include root 
cause class name in compilation and macroexpansion errors

You can read the full 1.10 changelog here: 
https://github.com/clojure/clojure/blob/master/changes.md

--
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.10.0-beta7

2018-11-20 Thread Alex Miller
That is new code in reflect.java so that's a good catch. Patched 
in https://dev.clojure.org/jira/browse/CLJ-2436 and will prob get that in 
next.

On Monday, November 19, 2018 at 10:35:46 PM UTC-6, Andy Fingerhut wrote:
>
> Not testing results this time, but just a comparison of reflection 
> warnings in Clojure 1.9.0 vs. 1.10.0-beta7, after adding (set! 
> *warn-on-reflection* true) to all .clj files in Clojure's source code that 
> did not already have one.  These were obtained when compiling Clojure using 
> mvn and Oracle Java 1.8.0_192.
>
> A few reflection warnings in clojure/main.clj that were in 1.9.0 are gone 
> now.  Cool.
>
> One new reflection warning in Clojure 1.10.0-beta7 that was not in Clojure 
> 1.9.0:
>  [java] Reflection warning, clojure/reflect/java.clj:183:35 - 
> reference to field getModifiers on java.lang.Object can't be resolved.
>
> That is line 181 in the original source file here: 
> https://github.com/clojure/clojure/blob/master/src/clj/clojure/reflect/java.clj#L181
>
> That code doesn't appear to have changed, so only reason I can think of 
> off the top of my head why a new reflection warning is perhaps due to a 
> change in the method resolution code?
>
> Andy
>

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