Hi Andy,
I would provide a function that wraps put!. It would still return a
deferred, but not the result of put!. It would create a deferred,
representing the result of the computation and pass it down the stream
together with the input. Consumers would set its value once the computation
is done.
Hey All,
I'm trying to build a library that exposes manifold streams for data
producing applications. The intention
would be for these apps to s/put! to a sink stream returned by the producer
function. However, I need to
take the value that is put in and pipe it into some other function before I
PersistentArrayMap is automatically promoted to PersistentHashMap when it
reaches a specific size. This is done for performance reasons. Neither
collection is considered ordered, and you should use a different datatype
if you want ordered data.
On Sunday, August 9, 2015 at 6:31:20 PM UTC-7, Phi
array-map preserving order is a property of its implementation, but not a
promise to those who use them.
Adding a key/value pair to an array-map that takes it over a certain
threshold size changes its implementation to a hash-map, which in general
changes the seq order completely. This is by desi
This works well as expected. The order of input elements is maintained.
(into (array-map) [[1 :a] [2 :b] [3 :c] [4 :d] [5 :e] [6 :f] [7 :g] [8 :h]])
; => {1 :a, 2 :b, 3 :c, 4 :d, 5 :e, 6 :f, 7 :g, 8 :h}
However, as soon as the number of the input elements exceeds 9, the order
is not maintained a
To do my bit to spread the Clojure meme, I've put together the essence of
the finest resources in print that have helped me grok Clojure. I take a
look at the following (Clojure, and related) books, in turn:
1. *The Joy of Clojure*, Second edition (Manning), by Michael Fogus and
Chris Hou
This works well as excepted. The order of input elements is maintained.
(into (array-map) [[1 :a] [2 :b] [3 :c] [4 :d] [5 :e] [6 :f] [7 :g] [8 :h]])
; => {1 :a, 2 :b, 3 :c, 4 :d, 5 :e, 6 :f, 7 :g, 8 :h}
However, as soon as the number of the input elements exceeds 9, the order
is not maintained a
Okay, I am an idiot. I had the "directory watch" setup to watch the
directory where the uberjar was built, so of course it was triggered
thousands of time while the uberjar was built, since I guess every new byte
added to the uberjar triggers the change event.
So I set my app to listen on the
I've done a lot with AA trees in the past, creating variations that are
immutable, durable (replacing b-trees) and versioned of vectors, maps and
sets.
I would like to migrate these ideas from Java to Clojure, while
implementing the interfaces appropriate for Clojure.
Still being very much a n
Agent2 release 0.2.1 now wraps exceptions passed as values in a vector
marked with the metadata flag :wrapped. The request-call method can now
distinguish between exceptions thrown by a request (and rethrows them) and
exceptions used as responses (and unwraps them before returning
them). https:
Let's assume for a moment that, for some strange reason, the "directory
watching" strategy won't work here. Does anyone have any other suggestions?
I am thinking there must be a simple way to setup Jenkins and Supervisord
to run these apps, but what I'm doing keeps getting more and more complex
Reid, thank you. I think you answer half the question. You make a good
point about giving the JVM a way to better optimize a hot path. I think you
are right about that. But, given the large amount of repetition between
"chain'-" and "chain-" I'm wondering why this wasn't done with a macro?
Oh, and whether or not Java regular expressions let you specify ranges of
such characters outside the BMP, I have no idea. I would expect there to
be odd behavior in that area of Java's regular expression implementation,
but haven't done extensive testing myself to find out. I would recommend
tha
Java uses UTF-16 encoding in memory for String objects. Characters in the
Basic Multilingual Plane are represented as a single 16-bit character in
memory, but anything outside the BMP is represented as a sequence of 2
16-bit characters. Clojure's \u syntax can only be used to
directly represent a
I've come on some trouble when parsing an Unicode character with
Clojure. I know it's likely to be a problem related to Java and not
Clojure itself but I'm looking for a Clojurish solution so that's why
I'm posting it here. FYI, I have a GNU / Linux OS on the top on which
I use emacs 24 in cunjunct
Hello fellow hackers,
I am happy to finally announce the release of Leiningen 2.5.2, which I know
a
lot of you have been waiting for. This version is mainly a bugfix release,
but
there are also some new enhancements to the `new` command. To all the Cider
users out there, nREPL has also been upda
(defmacro foo []
`(list
(defmacro ~'bar [] "nice")
(defn ~'bar-fn [] (~'bar
(foo)
;; => (#'defcrud.core/bar #'defcrud.core/bar-fn)
(bar-fn)
ArityException Wrong number of args (0) passed to: core/eval8800/bar--8801
clojure.lang.AFn.throwArity (AFn.java:429)
but this working
(def
17 matches
Mail list logo