If you are proficient in reading Java bytecode, or are willing to invest
some time to become so, then a disassembler like javap on the compiled
.class files of your code could help.
If not, then a bytecode to Java decompiler like JD-GUI or one of several
others to be useful. I have used the free
No, it's still lazy. Partitions are handed off to threads as they are
needed, and the results are collected in the main thread. I found the same
code in the O'Reilly book after I figured it out, in the "Parallelism on
the Cheap" section. It points out the problem with pmap over small
computatio
I nearly suggested that but it sounded so counter-intuitive and I
didn't have time to construct a test-bed for it... glad you figured it
out. That means that your float-seq has to be fully realized in memory
tho', right?
On Mon, Oct 14, 2013 at 9:58 PM, Brian Craft wrote:
> Answering my own quest
Answering my own question, my grouping example failed because of the
laziness of the expressions being computed in the pmap: the threads were
not evaluating the expressions until they were evaluated (sequentially) by
the main thread. Adding a doall gives the result I was hoping for.
On Sunday,
Profiling shows clojure.lang.RT.longCast is currently 25% of the run time
of the code I'm working on. It's being called from a routine that
manipulates primitive arrays while building a hex string, with aget, aset,
inc, and bitwise operations. Looking through the source for those, I can't
see w
So it turns out it is possible to have runtime disabled assertions in
Clojure without a compiler change, but I don think it is possible to have
assertions that can be disabled per package without a compiler change (if
at all).
I have released a new library that allows you to globally enable/disabl
On Mon, Oct 14, 2013 at 5:59 AM, Phillip Lord
wrote:
> writes:
>
> Same trick as
> Java -- optimise the check away at compile time.
>
> Indeed, this is how Clojure's assert works.
>
This is the way Clojure's assert works (by compiling away the assertion).
This is not the way Java assertions work
Hm. float-seq may not fit in memory. Perhaps I can read it in blocks.
On Monday, October 14, 2013 11:01:52 AM UTC-7, Herwig Hochleitner wrote:
>
> + make sure to pour float-seq into a vector before r/map, to make full use
> of parallel folding
>
>
> 2013/10/14 Herwig Hochleitner >
>
>> Try
>>
>>
+ make sure to pour float-seq into a vector before r/map, to make full use
of parallel folding
2013/10/14 Herwig Hochleitner
> Try
>
> (require '[clojure.core.reducers :as r])
> (reduce (fn [res val] (get-ids val))
> nil (r/map encode float-seq))
>
> This should parallel fold encode ove
Try
(require '[clojure.core.reducers :as r])
(reduce (fn [res val] (get-ids val))
nil (r/map encode float-seq))
This should parallel fold encode over float-seq (r/map) and then map
get-ids in order, but without allocation.
2013/10/14 Brian Craft
> I'm walking a seq of many millions of
This looks really cool. A few things.
*A)* Looks like I have to run nrepl in the jig project directory. I'm
finding that emacs also has to be started in the same jig directory. Then
all of my code editing has to be referenced from that directory (ie: *C-x
C-f ../my-project/my-file.clj*). If I try
thanks for you guide, this way is available.
On Saturday, October 12, 2013 2:00:56 PM UTC+8, Shantanu Kumar wrote:
>
> Hi Gaofeng,
>
> The JAR files are dependency artifacts that must be placed in the Maven
> repository. You can specify them in the :dependencies vector as below:
>
> : dependencie
I need to pull sequence ids from a db, which is a lot like using a
generator. I found this thread about generators:
https://groups.google.com/forum/?fromgroups=#!searchin/clojure/generator/clojure/IL_ONPb52-0/S_2p2-vjVCYJ
which suggests using seqs, like so:
(defn sines []
(cycle (map #(Math
Well, I had a very quick go at this; getting it to work simply is,
actually, remarkable easy.
(defmethod emit-pattern clojure.lang.IPersistentSet [pat]
pat)
(defmethod to-source clojure.lang.IPersistentSet [pat ocr]
`(every? identity (map #(contains? ~ocr %) ~pat)))
I'm guessing that this i
writes:
> Phillip, Paul - thanks a lot for you suggestions!
>
> Phillip - I will definitely give your trick a try.
>
> Right now, without experimenting, I see two shortcomings. First, as Paul
> mentioned, checking assertion status via call to Java function will
> introduce performance penalty,
Cheers,
I took the time this morning to hack around a bit, and [forked the
repository](https://github.com/talios/clojure.osgi) and updated it to:
* Use, and embed/re-export clojure 1.5.1, exporting clojure related packages.
* Use the `maven-bundle-plugin`
From there I just adapted my internal p
16 matches
Mail list logo