Re: [ANN] clojure.java.jdbc 0.7.0 Beta 2

2017-07-23 Thread Phillip Lord

Yep, appears that you are right. I ended with this:

(doseq
  [[k v] (ns-map ns)
   :when (= (find-ns 'clojure.core) (:ns (meta v)))]
(ns-unmap ns k))

which is pretty ugly.

Justin Smith  writes:

> refer-clojure doesn't ever remove mappings, it only adds them
>
> The reason a refer-clojure clause in your ns form can prevent bindings is
> because your refer-clojure clause (which is likely more qualified than the
> default) overrides the args that ns would otherwise provide to
> refer-clojure.

-- 
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.java.jdbc 0.7.0 Beta 2

2017-07-22 Thread Justin Smith
refer-clojure doesn't ever remove mappings, it only adds them

The reason a refer-clojure clause in your ns form can prevent bindings is
because your refer-clojure clause (which is likely more qualified than the
default) overrides the args that ns would otherwise provide to
refer-clojure.



On Sat, Jul 22, 2017 at 3:08 AM Phillip Lord 
wrote:

>
> I am confused about how to exclude clojure.core from a namespace already
> exists. That is, I have not just created the namespace, but it's been
> given to me by a tool.
>
> Consider, for example:
>
>
>
>
> lein repl
> nREPL server started on port 41054 on host 127.0.0.1 - nrepl://
> 127.0.0.1:41054
> REPL-y 0.3.7, nREPL 0.2.12
> Clojure 1.8.0
> OpenJDK 64-Bit Server VM 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11
>
> user=> (refer-clojure :only [])
> nil
> user=> (defn some[])
> WARNING: some already refers to: #'clojure.core/some in namespace: user,
> being replaced by: #'user/some
> #'user/some
> user=>
>
>
> Now, why do I get this warning? Surely some is not being replaced at
> all, since the refer-clojure form should have removed some
> clojure.core/some from the current namespace.
>
> Phil
>
> --
> 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.java.jdbc 0.7.0 Beta 2

2017-07-22 Thread Phillip Lord

Apologies, didn't mean to follow that thread!

Phillip Lord  writes:

> I am confused about how to exclude clojure.core from a namespace already
> exists. That is, I have not just created the namespace, but it's been
> given to me by a tool.
>
> Consider, for example:
>
>
>
>
> lein repl
> nREPL server started on port 41054 on host 127.0.0.1 - nrepl://127.0.0.1:41054
> REPL-y 0.3.7, nREPL 0.2.12
> Clojure 1.8.0
> OpenJDK 64-Bit Server VM 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11
>
> user=> (refer-clojure :only [])
> nil
> user=> (defn some[])
> WARNING: some already refers to: #'clojure.core/some in namespace:
> user, being replaced by: #'user/some
> #'user/some
> user=> 
>
>
> Now, why do I get this warning? Surely some is not being replaced at
> all, since the refer-clojure form should have removed some
> clojure.core/some from the current namespace.
>
> Phil

-- 
Phillip Lord,   Phone: +44 (0) 191 208 7827
Biology, Medicine, ComputingEmail: phillip.l...@newcastle.ac.uk
School of Computing Science,
http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower,   skype: russet_apples
Newcastle University,   twitter: phillord
NE1 7RU 

-- 
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.java.jdbc 0.7.0 Beta 2

2017-07-22 Thread Phillip Lord

I am confused about how to exclude clojure.core from a namespace already
exists. That is, I have not just created the namespace, but it's been
given to me by a tool.

Consider, for example:




lein repl
nREPL server started on port 41054 on host 127.0.0.1 - nrepl://127.0.0.1:41054
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
OpenJDK 64-Bit Server VM 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11

user=> (refer-clojure :only [])
nil
user=> (defn some[])
WARNING: some already refers to: #'clojure.core/some in namespace: user, being 
replaced by: #'user/some
#'user/some
user=> 


Now, why do I get this warning? Surely some is not being replaced at
all, since the refer-clojure form should have removed some
clojure.core/some from the current namespace.

Phil

-- 
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.java.jdbc 0.7.0 Beta 2

2017-06-30 Thread Sean Corfield
What?
   Clojure’s contrib wrapper for JDBC.

Where?
   https://github.com/clojure/java.jdbc
   [org.clojure/java.jdbc “0.7.0-beta2”]

Summary?
   Improves reducible queries; 
Completes (optional) specs for public API; 
Drops support for Clojure 1.5 and 1.6 (so, requires Clojure 1.7 or later).

Details?

The contract for ‘reduce’ in its docstring is very specific about the 
situations where ‘f’ is called and what it’s arguments are. java.jdbc 
0.7.0-beta1 did not respect that contract; java.jdbc 0.7.0-beta2 does.

The optional clojure.java.jdbc.spec namespace now has fdef specs for all the 
public API functions in clojure.java.jdbc. It assumes clojure.spec.alpha so it 
requires a recent Clojure 1.9 Alpha build to use it. Please try the specs out 
and open JIRA issues if I got anything wrong!

Based on responses to the survey – over 50 so far – there is clear support for 
only supporting Clojure 1.7 going forward (only one respondent is still on 1.7, 
34 are on 1.8, and 17 are on 1.9 already). This allows me to drop the 
conditional logic that used CollReduce in order to still support 1.5/1.6.

There’s probably a side discussion to be had about IReduce vs IReduceInit but 
I’ll take that to clojure-dev (

The survey is still open if you use java.jdbc and have not yet completed it:
   https://www.surveymonkey.com/r/MR2HRFD

Thanks to?
Kevin Downey and Ghadi Shayban again, as well as Nicola Mometto, for 
continued discussion on Slack around CollReduce, IReduce, IReduceInit, and the 
contract of reduce.
And also everyone who completed the survey!

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

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)









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