How to take a subsequence out of an infinite lazy sequence?

2014-06-15 Thread Yehonathan Sharvit
I have a infinite lazy sequence and I would like to create a lazy sub sequence with all the elements whose indices are between 100 and 1000. -- 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

Re: How to take a subsequence out of an infinite lazy sequence?

2014-06-15 Thread François Rey
(keep-indexed #(if(=100 %1 1000)%2) (range1001)) = (100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 ...) -- You received this

ANN Monger 2.0.0 is released

2014-06-15 Thread Michael Klishin
Monger [1] is a Clojure MongoDB driver for a more civilized age. Release notes: http://blog.clojurewerkz.org/blog/2014/06/15/monger-2-dot-0-0-is-released/ 1. http://clojuremongodb.info -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- You received this message

ANN Elastisch 2.0.0 is released

2014-06-15 Thread Michael Klishin
Elastisch [1] is a small, feature rich Clojure client for ElasticSearch that supports both HTTP and native transports. 2.0 is packed with improvements, large and small, and brings improved compatibility with ElasticSearch up to 1.2.x. Release notes:

Re: How to take a subsequence out of an infinite lazy sequence?

2014-06-15 Thread Steve Miner
On Jun 15, 2014, at 9:42 AM, Yehonathan Sharvit vie...@gmail.com wrote: I have a infinite lazy sequence and I would like to create a lazy sub sequence with all the elements whose indices are between 100 and 1000. You can use `drop` and `take` with infinite sequences. Something like this

Re: How to take a subsequence out of an infinite lazy sequence?

2014-06-15 Thread François Rey
On 15/06/14 18:11, Steve Miner wrote: You can use `drop` and `take` with infinite sequences. Something like this should work: (defn between [start end coll] (take (- end start) (drop start coll))) The `end` is exclusive as in `range`. Nice, especially since I suppose this will not incur

Re: What's clojure killer app? I don't see any.

2014-06-15 Thread gamma235
Hi Paulo, I saw this question a while back and for some reason it became lodged in my mind. If you are concerned about whether Clojure is a good practical language to learn, I can understand your worries and say, resoundingly, go for it. Why? because after learning Clojure, and perhaps

Re: Could use an error message here? (using `get` on an atom containing a map)

2014-06-15 Thread John Gabriele
On Saturday, June 14, 2014 11:43:46 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: Seems unlikely: http://dev.clojure.org/jira/browse/CLJ-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=34820#comment-34820 I would write my own get variant, or use

RFC: dynamic-object, a library for working with Clojure data in Java

2014-06-15 Thread Ryan Schmitt
I've been developing a library to bring Clojure data to Java developers. By Clojure data I mean both Clojure's persistent immutable data structures *and* serialized Edn data. I wanted access to Clojure's capabilities without having to use Clojure-Java interop directly or make use of

Re: RFC: dynamic-object, a library for working with Clojure data in Java

2014-06-15 Thread Atamert Ölçgen
Really cool library, thanks for sharing. I was initially irked by the use of (mutable) Java collection interfaces, but then I read that they're made immutable when passed to the builder. I assume they're recursively converted to persistent representations. It reminded me of Guava's immutable

Re: RFC: dynamic-object, a library for working with Clojure data in Java

2014-06-15 Thread Ryan Schmitt
Set, Util, and List are actually just interfaces, and Clojure's collections implement them. The destructive operations throw UnsupportedOperationException of course, which is actually explicitly allowed by the spec: * pThe destructive methods contained in this interface, that is, the *

Re: RFC: dynamic-object, a library for working with Clojure data in Java

2014-06-15 Thread Atamert Ölçgen
Perhaps if you make it easily available (making an early release) more people would use it and you might get more feedback then. You can always change interfaces, conventions etc. On Mon, Jun 16, 2014 at 3:09 AM, Ryan Schmitt rschm...@u.rochester.edu wrote: Set, Util, and List are actually

[ANN] Leiningen 2.4.2

2014-06-15 Thread Phil Hagelberg
Greetings. I'm happy to announce the release of Leiningen 2.4.2. Most of the changes are fixes to bugs uncovered in the 2.4.0 release. However, a couple tiny features snuck in. The main one is that the file `pom.properties` originally only got included in jars and uberjars, but now it's