This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool(int) [service (java.util.concurrent.Executors/newFixedThreadPool 24)] that is something that should, in theory, be a queue with 24 worker threads right? "ps aux | grep java" is only showing a single thread, "top" is only showing < 100% utilization, iknstead of 2400% utilization
Are you sending it 'jobs' that take significantly longer to execute than the overhead of starting and finishing the jobs? Sending it really tiny jobs might not get you any actual parallelism
Turns out, I was mis-reading the output of TOP. On per process, it' sshowing full usage (i..e 2400%), but on the top overall usage, it's showing 99% (i.e. 2400 / 2400).
is it possible to:
1. pass an anonymous function to a macro and
2. evaluate the function at MACRO EXPANSION time
in particular, I want to do:
(defmacro foo [ .... ] ....)
(foo (fn [x] (println (+ 1))) ...)
yeah, I have this weird situation where foo
behave as follows:
(foo f1 f2 data)
where data
is interpreted as data
however, I want to parameterize foo
by passing it functions f1
, f2
, that modify the behaviour of foo
-- is this possible ?
maybe i lack imagination, but i can't imagine a case where some client code would use a macro, parameterizing it with a function... So I guess you're writing a macro that itself calls a macro. In that case you would want the outer macro calling into functions that build the code rather than callinbg into macros, so you're out of the macro system as soon as you enter the outer level
in 10 (?) years since i started playing with clojure, i wrote maybe 5-10 macros and most were of the def-thing kind...thinly wrapping a function call.
that's to say, are you really sure you want a macro? and if so, can you simplify it so that it's only a wrapper around your data orienbted or function oriented underlying system
There are alot of functions to bind. I want to pass it two functions, c-name
and j-name
, which decides how the functions are named, for example, I want
(make-bind c-name j-name foo bar cat dog)
to bind cu-foo to java.jcuda.JCublas2/cublasFoo
cu-bar to java.jcuda.JCublas2/cublasBar ...so I have c-name be a function (s -> (symbol (str "cu-" s))) and j-name something to append the java.jcuda.JCublas2/cublas and capitalize the symbol
but now, I want the cname and j-name to be functions rather than hard coded, because I also will be binding jcudafft, jcuda/cudnn / ...
Looks like a fine occasion for macros indeed. I would take it in reverse order, by first gathering/processing a list of symbol names then feeding that into a def-bindings macro
During cider debugging, is there a way for it to keep refreshing local variables every step ( the l key) ?
by making a class that calls the superclass' method right?
maybe I don't understand what you're asking for
Why I can't (> #inst"2017" #inst"2018")
in clojure?
It works on cljs. And on clojure, I can compare inst
via sort
..
the fact that it works on cljs is just because javascript can do >
with Dates and cljs's >
delegates to javascript's >
I don't remember if #inst
in Cljs emits js/Date
or goog.date.DateTime
or UtcDateTime
, if latter, it shouldn't be comparable by default, but if cljs-time.extend
ns is loaded, that will extend IComparable
to DateTime
and UtcDateTime
#inst
creates JS Date, so cljs-date.extend
won't affect that
http://www.jcuda.org/jcuda/jcublas/doc/jcuda/jcublas/JCublas2.html#cublasSgemm(jcuda.jcublas.cublasHandle, int, int, int, int, int, jcuda.Pointer, jcuda.Pointer, int, jcuda.Pointer, int, jcuda.Pointer, jcuda.Pointer, int) is there a way to call 'resolve' or some other function, and get taht function as a result ?
i.e. I want something that will take "jcuda.jcublas.JCublas2/cublasSgemm", and return that function
Hm, could somebody explain me the difference between merge
and into
? does the latter have side effects?
@synthomat merge
is only for maps, into
works for any collection
you could do that via reflection if you wanted to but it doesn't sound like a particularly good idea
@juhoteperi hmm, but merge
does merge vectors as well. kind of
this works accidentally and isn't an intended feature