Re: recombining results from clojure.data/diff

2015-10-19 Thread JvJ
Merge isn't recursive on substructures.

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


Libraries for dealing with DNS

2015-10-19 Thread JvJ
DNS clients happen to be my job.  If you can't find one, maybe I'll conttibute 
to something.

-- 
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: Calling object members with symbols

2015-10-19 Thread Timur
Thanks for the answers!

On Monday, October 19, 2015 at 3:15:16 AM UTC+2, dennis wrote:
>
> In such case you have to use `eval`, another post
>
> https://groups.google.com/forum/#!topic/clojure/YJNRnGXLr2I
>
> 2015-10-19 9:10 GMT+08:00 James Reeves  >:
>
>> On 18 October 2015 at 23:54, Timur > 
>> wrote:
>>
>>> Hi all,
>>>
>>> Is there anyway to call an object member using its symbol? 
>>>
>>> For instance we have an object o, we get the symbol of a method, e.g., 
>>> toString, of our object o using clojure.reflect/reflect and and I want to 
>>> execute this method on this object through the symbol. 
>>>
>>> For instance *(. obj sym)* throws an exception. Here symbol for 
>>> instance contains toString
>>>
>>> Any ideas about how I can do this? 
>>>
>>
>> eval is probably the most straightforward way to achieve this:
>>
>> (eval `(. ~obj ~sym))
>>
>> I'm uncertain of the performance of this compared to using the Java 
>> reflection API, but it's a lot easier to write.
>>
>> - James
>>
>> -- 
>> 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.
>>
>
>
>
> -- 
> 庄晓丹 
> Email:killm...@gmail.com  xzh...@avos.com 
> 
> Site:   http://fnil.net
> Twitter:  @killme2008
>
>
>

-- 
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: Libraries for dealing with DNS

2015-10-19 Thread Pierre-Yves Ritschard
Hi Kyle,

If you don't mind synchronous queries, "InetAddress/getByName" will do the
job just fine and use your system resolving parameters.
http://docs.oracle.com/javase/6/docs/api/index.html?java/net/InetAddress.html#getByName

Cheers,
  - pyr

On Mon, Oct 19, 2015 at 9:56 AM, JvJ  wrote:

> DNS clients happen to be my job.  If you can't find one, maybe I'll
> conttibute to something.
>
> --
> 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.


aatree release 0.4.0--Durable Applications, Further Decoupling

2015-10-19 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure 
sorted-map, sorted-set and vector, with several extensions:
  - AAVector supports add/drop at any point using addn and dropn.
  - AAMap and AASet implement Reversible, Counted, Indexed and Sorted
  - CountedSequence implements Counted and do not use synchronized.
  - Lazy deserialization/reserialization provides ridiculously fast 
deserialize/update/reserialize processing typical of disk access.

Release 0.4.0:

   -  Functions have been added for file load/save using nio FileChannel, 
   and for a 256-bit checksum. Examples have also been included showing how to 
   use these functions in an application.
   - The API has been reworked to decouple application code from the choice 
   of implementation for the data structures. (The old API has been 
   deprecated.)


https://github.com/laforge49/aatree#readme

On Clojars: https://clojars.org/aatree

-- 
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: Libraries for dealing with DNS

2015-10-19 Thread David Powell
I've not used it, but Java comes with a DNS provider for JNDI too:

https://docs.oracle.com/javase/8/docs/technotes/guides/jndi/jndi-dns.html



On Mon, Oct 19, 2015 at 12:50 PM, Pierre-Yves Ritschard 
wrote:

> Hi Kyle,
>
> If you don't mind synchronous queries, "InetAddress/getByName" will do the
> job just fine and use your system resolving parameters.
> http://docs.oracle.com/javase/6/docs/api/index.html?java/net/InetAddress.html#getByName
>
> Cheers,
>   - pyr
>
> On Mon, Oct 19, 2015 at 9:56 AM, JvJ  wrote:
>
>> DNS clients happen to be my job.  If you can't find one, maybe I'll
>> conttibute to something.
>>
>> --
>> 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.
>

-- 
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: recombining results from clojure.data/diff

2015-10-19 Thread Fluid Dynamics
On Monday, October 19, 2015 at 3:49:41 AM UTC-4, JvJ wrote:
>
> Merge isn't recursive on substructures.


Of course, there's (fn foo [m1 m2] (if (and (map? m1) (map? m2)) 
(merge-with foo m1 m2) m2)) ... 

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


State Change Listener in Clojure on a Database

2015-10-19 Thread Adrian Cooley
Hi all,

I'm new to Clojure and I've been exploring the possibility of using it to 
handle a large list of Users stored in a Postgresql Database. I can see 
that there are some great sql libraries for clojure to query a Postgresql 
database and this is fine. However, I was wondering if there are any useful 
Clojure features or libraries that could allow me to 'listen' for changes 
to a Users Table in the Database. A use case scenario to describe what I 
want would be as follows: Say someone registers their details on a website 
and their details are persisted to the Database. I then want some process 
to pick up that a new user is now in the database and send this user 
information to a client that has registered to listen for new users. Is 
something like this possible in Clojure where it can handle listening to 
state changes and trigger a notification? Thanks in advance to anyone who 
chimes in with advice,

Regards,
Adrian.

-- 
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: deprecation warnings?

2015-10-19 Thread Lars Andersen
Font-locking of deprecated vars was just added to CIDER.  It's available in 
snapshots now, and will be included in 0.10.

On Wednesday, October 14, 2015 at 6:09:21 PM UTC+2, William la Forge wrote:
>
> Going forward, I'd like to deprecate some functions and have a warning 
> displayed on first use. So I've done this:
>
> (def emptyAAMap ^{:deprecated "0.3.4"}
>   (new AAMap emptyNode {:comparator RT/DEFAULT_COMPARATOR}))
>
>
> But I am not seeing any warnings from either lein or cursive. Do I need to 
> add a plugin?
>
> Thanks!
>

-- 
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.repl/doc - change request - print vs return-value

2015-10-19 Thread Terje Dahl
I am making a namespace inspector (using JavaFX) (somewhat like the 
Swing-based tree-inspector in Clojure), and when getting a function, I 
would like to diplay the same meta-information as "doc" prints in the REPL 
- including the special forms data coded in a private var/map in Clojure.


On Friday, October 2, 2015 at 3:40:20 PM UTC+2, Alex Miller wrote:
>
> What would you do with doc-fn?
>
> I think this is a reasonable enhancement request but backing it up with a 
> use case would help a lot (presuming you wanted to file a jira).
>
>
>

-- 
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: aatree release 0.4.0--Durable Applications, Further Decoupling

2015-10-19 Thread William la Forge
I've added the following qualifier to the README for this project, just to 
clarify that some of the code is more illustrative than practical:

It is not often that you need lazy deserialization when doing a file load. 
Rather, we are using file load and save here to illustrate how to use the 
lazy structures of aatree. (A better use of these structures would be in 
implementing a database, of course. But that will not be covered for a 
release or three.)

On Monday, October 19, 2015 at 7:52:01 AM UTC-4, William la Forge wrote:
>
> The aatree project provides fully compatible alternatives to Clojure 
> sorted-map, sorted-set and vector, with several extensions:
>   - AAVector supports add/drop at any point using addn and dropn.
>   - AAMap and AASet implement Reversible, Counted, Indexed and Sorted
>   - CountedSequence implements Counted and do not use synchronized.
>   - Lazy deserialization/reserialization provides ridiculously fast 
> deserialize/update/reserialize processing typical of disk access.
>
> Release 0.4.0:
>
>-  Functions have been added for file load/save using nio FileChannel, 
>and for a 256-bit checksum. Examples have also been included showing how 
> to 
>use these functions in an application.
>- The API has been reworked to decouple application code from the 
>choice of implementation for the data structures. (The old API has been 
>deprecated.)
>
>
> https://github.com/laforge49/aatree#readme
>
> On Clojars: https://clojars.org/aatree
>

-- 
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.repl/doc - change request - print vs return-value

2015-10-19 Thread Alex Miller
Please file a jira with a patch and we will consider it for the next 
release (it is too late to consider for Clojure 1.8 at this point). Include 
the info below as the problem in the jira description.

Thanks,
Alex

On Monday, October 19, 2015 at 11:23:43 AM UTC-5, Terje Dahl wrote:
>
> I am making a namespace inspector (using JavaFX) (somewhat like the 
> Swing-based tree-inspector in Clojure), and when getting a function, I 
> would like to diplay the same meta-information as "doc" prints in the REPL 
> - including the special forms data coded in a private var/map in Clojure.
>
>
> On Friday, October 2, 2015 at 3:40:20 PM UTC+2, Alex Miller wrote:
>>
>> What would you do with doc-fn?
>>
>> I think this is a reasonable enhancement request but backing it up with a 
>> use case would help a lot (presuming you wanted to file a jira).
>>
>>
>>

-- 
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: lazyseq?

2015-10-19 Thread Steve Miner
I’ll second what Timothy Baldridge  wrote.  By the way, 
you have to make sure you’re dealing with some sort of clojure.lang.IPending 
before you call realized? on it.  

I prefer to test against interfaces rather than concrete classes so I would try 
something like this (minimally tested):

(defn lazy-seq? [x]
  (and (instance? clojure.lang.IPending x) (seq? x) (not (realized? x

Even after a lazy seq has been “realized” (typically with doall), it’s still a 
clojure.lang.LazySeq but the results have been cached so it’s not so “lazy” 
anymore.

Depending on what you’re doing, you might get by with just counted? which is 
true for literal lists and vectors, but false for conses and lazy collections.



> On Oct 18, 2015, at 5:55 PM, Brian Marick  wrote:
> 
> Is there a way to tell if `v` is a lazyseq other than `(instance? 
> clojure.lang.LazySeq v)`? Seems like there should be, but I'm not seeing it.

-- 
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] PigPen 0.3.1

2015-10-19 Thread 'Matt Bossenbroek' via Clojure
We just released PigPen 0.3.1 with a couple of minor improvements: 

Update cascading version to 2.7.0
Update nippy (for serialization) to 2.10.0 & tune performance


PigPen is map-reduce for Clojure, or distributed Clojure. You write idiomatic 
Clojure code, we run it on thousands of machines using Apache Pig or Cascading.

Learn more here: https://github.com/Netflix/PigPen


-Matt

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